configure an arbitrary static ipv4/netmask with dhcpcd -S
Giorgio
Thu May 19 15:41:19 2016
Hi,
I'm calling dhcpcd with the -S option to configure
static ip's but I noticed that the configured netmask
is not (always) honored:
# dhcpcd -d -S ip_address=172.1.2.3/21 br0:gdm
dhcpcd-6.11.0 starting
br0: if_disable_autolinklocal: Operation not supported
br0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
br0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
DUID 00:01:00:01:1e:ce:00:af:00:03:c5:07:01:8e
br0: IAID c5:07:01:8e
br0: delaying IPv6 router solicitation for 0.6 seconds
br0: using ClientID 01:00:03:c5:07:01:8e
br0: probing address 172.1.2.3/16
br0: probing for 172.1.2.3
br0: ARP probing 172.1.2.3 (1 of 3), next in 1.7 seconds
br0: soliciting an IPv6 router
br0: sending Router Solicitation
br0: Router Advertisement from fe80::203:c5ff:fe07:165
br0: adding address 2001:db8:0:1:2c1f:4f90:92d7:37be/64
br0: pltime 14400 seconds, vltime 86400 seconds
br0: adding route to 2001:db8:0:1::/64
br0: adding default route via fe80::203:c5ff:fe07:165
br0: executing `/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT
br0: No DHCPv6 instruction in RA
br0: ARP probing 172.1.2.3 (2 of 3), next in 1.9 seconds
br0: ARP probing 172.1.2.3 (3 of 3), next in 2.0 seconds
br0: DAD completed for 172.1.2.3
br0: using static address 172.1.2.3/16
br0: adding IP address 172.1.2.3/16 broadcast 172.1.255.255
br0: adding route to 172.1.0.0/16
br0: ARP announcing 172.1.2.3 (1 of 2), next in 2.0 seconds
br0: executing `/lib/dhcpcd/dhcpcd-run-hooks' STATIC
forking to background
forked to background, child pid 21926
I asked for a netmask with /21 bits but got only /16.
The same happens with:
# dhcpcd -d -S subnet_mask=255.255.248.0 -S ip_address=172.1.2.3
br0:gdm
I suppose that this is the intended behavior and that there
is a valid explanation for this, nevertheless is there a way
to force the program to do exactly what it's told ?
thanks,
giorgio
--
Giorgio, iw3gtf@xxxxxxxxxx
Con Tutto Incluso Light navighi fino a 20 Mega senza limiti e chiami a
0 cent/minuto verso tutti i fissi e i mobili in Italia a 19,95 euro/mese
per sempre. In piu' ora l'attivazione e' Gratis! http://casa.tiscali.it/
Archive administrator: postmaster@marples.name