[Dnsmasq-discuss] client q: both static and dhcp

Carl Karsten carl at nextdayvideo.com
Sun Jun 27 00:16:37 UTC 2021

This is a bit OT, if there is a better place let me know.

I'm looking for advice on haveing some boxes to have both dynamic and
static IPs.

There is a risk that my static choice collides with an IP on a random lan I
jack into, which I can deal with manually.  Might even make a MOTD message
telling me why I can't log in and see the MOTD ;)

What else might be a problem?

This conf gets me that:

juser at gator:~$ cat /etc/network/interfaces
auto lo enp0s31f6 enp0s31f6:0
iface lo inet loopback

iface enp0s31f6 inet static

iface enp0s31f6:0 inet dhcp

juser at gator:~$ ip a show enp0s31f6
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 40:8d:5c:7f:bb:90 brd ff:ff:ff:ff:ff:ff
    inet brd scope global enp0s31f6
       valid_lft forever preferred_lft forever
    inet brd scope global secondary dynamic
       valid_lft 14219sec preferred_lft 14219sec
    inet6 fe80::428d:5cff:fe7f:bb90/64 scope link
       valid_lft forever preferred_lft forever

juser at gator:~$ /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface         UG    0      0        0
enp0s31f6   U     0      0        0

Carl K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210626/a42e37ad/attachment-0001.htm>

More information about the Dnsmasq-discuss mailing list