Make dhcp assign same IP and hostname for different interfaces at one machine

Posted by Egeshi on Super User See other posts from Super User or by Egeshi
Published on 2012-06-28T19:19:59Z Indexed on 2012/06/30 3:18 UTC
Read the original article Hit count: 481

Filed under:
|
|

I have a feeling that question itself looks stupid but it is not. Please let me clarify.

I have dynamic DNS with BIND and NIS configured at my LAN and have laptop which I am using in both wireless and wired mode. I mean that sometimes I have to use wired interface to achieve higher throughput but most of time I don't need it and using wireless mode. Everything works great.

Issue is that I want both interfaces get same IP from DHCP. Just for convenient firewall setup.

If I add both hosts to dhcp in this manner

# bt wireless
  host bt {
  hardware ethernet 00:1f:1f:62:60:28;
  fixed-address 172.16.77.110;
}
# bt wired
host bt {
  hardware ethernet 00:14:22:b7:5a:de;
  fixed-address 172.16.77.110;
}

DHCP says logs following message

dhcpd: Dynamic and static leases present for 172.16.77.110
dhcpd: Remove host declaration bt-wired or remove 172.16.77.110
dhcpd: from the dynamic address pool for 172.16/16

Host records are added outside of any subnet, but it makes no difference if I put them there, effect is still the same.

This is not critical but either is not my whim because even if DHCP seems to work fine for that "bt" host, I cannot make connection TO it from remote machine anymore with this definitely incorrect DHCP config.

I'd be thankful if one spares a minute for advice about how to configure DHCPD correctly.

UPDATE. I realize that there's a soulution to assign different hostname in DHCP config but would like to use benefits of short host names.

© Super User or respective owner

Related posts about configuration

Related posts about dhcp