03-01-2018 12:01 PM - edited 03-08-2019 02:05 PM
Hi,
I am trying to force Cisco ISR 4331 to assign static IPs to some of the hosts in the local network. It works partially, for instance for Linux laptop, HP printer, Windows laptops is fine, but not for Windows Server and WD NAS.
My configuration:
ip dhcp excluded-address 192.168.1.1 ! ip dhcp pool mypool network 192.168.1.0 255.255.255.0 domain-name domain dns-server 192.168.1.1 8.8.8.8 default-router 192.168.1.1 ! ip dhcp pool STATIC-99 host 192.168.1.99 255.255.255.0 hardware-address 68f7.2875.0899 default-router 192.168.1.1 domain-name domain dns-server 8.8.8.8 192.168.1.1 ! ip dhcp pool STATIC-100 host 192.168.1.100 255.255.255.0 hardware-address acbc.32cf.e9ff default-router 192.168.1.1 domain-name domain dns-server 8.8.8.8 192.168.1.1 ! ip dhcp pool STATIC-109 host 192.168.1.109 255.255.255.0 hardware-address f481.39e3.afe4 default-router 192.168.1.1 domain-name domain dns-server 8.8.8.8 192.168.1.1 ! ip dhcp pool STATIC-110 host 192.168.1.110 255.255.255.0 hardware-address 6c40.08a6.06ca default-router 192.168.1.1 domain-name domain dns-server 8.8.8.8 192.168.1.1 ! ip dhcp pool STATIC-141 host 192.168.1.141 255.255.255.0 hardware-address ac1f.6b20.f3a5 default-router 192.168.1.1 domain-name domain dns-server 8.8.8.8 192.168.1.1 ! ip dhcp pool STATIC-147 host 192.168.1.147 255.255.255.0 hardware-address 0090.a9e7.b624 default-router 192.168.1.1 domain-name domain dns-server 8.8.8.8 192.168.1.1 ! ip dhcp pool STATIC-151 host 192.168.1.151 255.255.255.0 hardware-address ac1f.6b02.513f default-router 192.168.1.1 domain-name domain dns-server 8.8.8.8 192.168.1.1 ! ip dhcp pool STATIC-200 host 192.168.1.200 255.255.255.0 hardware-address b827.eb86.ca35 default-router 192.168.1.1 domain-name domain dns-server 8.8.8.8 192.168.1.1 ! ip dhcp pool STATIC-101 host 192.168.1.101 255.255.255.0 hardware-address b888.e31a.7e18 default-router 192.168.1.1 domain-name domain dns-server 8.8.8.8 192.168.1.1
No matter how MAC address has been defined:
hardware-address b888.e31a.7e18
hardware-address b888.e31a.7e18 ethernet
or
hardware-address 01b8.88e3.1a7e.18
ciscorouter_SE#sh ip dhcp binding Bindings from all pools not associated with VRF: IP address Client-ID/ Lease expiration Type State Interface Hardware address/ User name 192.168.1.6 0100.90a9.e7b6.24 Mar 02 2018 11:33 AM Automatic Active GigabitEthernet0/0/1 192.168.1.99 68f7.2875.0899 Infinite Manual Selecting Unknown 192.168.1.100 acbc.32cf.e9ff Infinite Manual Selecting Unknown 192.168.1.101 b888.e31a.7e18 Infinite Manual Active Unknown 192.168.1.109 f481.39e3.afe4 Infinite Manual Selecting Unknown 192.168.1.110 6c40.08a6.06ca Infinite Manual Selecting Unknown 192.168.1.141 ac1f.6b20.f3a5 Infinite Manual Selecting Unknown 192.168.1.147 0090.a9e7.b624 Infinite Manual Selecting Unknown 192.168.1.151 ac1f.6b02.513f Infinite Manual Selecting Unknown 192.168.1.200 b827.eb86.ca35 Infinite Manual Selecting Unknown
As you can see host 192.168.1.147 is defined as static (WD NAS), but still getting dynamic IP. No matter if binding table has been cleared or not.
Between router and local network there is a switch (not cisco), but there is no configuration on it. If I swap Cisco with cheap soho router like Dlink then it is fine.
Any idea what is wrong here?
03-01-2018 12:24 PM
Hello,
you need to use the client-identifier option. Prepend 01 for the Ethernet media type, for example:
ip dhcp pool STATIC-99
host 192.168.1.99 255.255.255.0
client-identifier 0168.f728.7508.99
default-router 192.168.1.1
domain-name domain
dns-server 8.8.8.8 192.168.1.1
03-01-2018 12:33 PM
I tried client-identifier earlier but with no media prefix and it didn't work neither for NAS nor for Linux or Windows laptops. However I'll try tomorrow and let you know.
03-01-2018 12:36 PM
Actually, try both in the same pool, e.g.:
ip dhcp pool STATIC-99
host 192.168.1.99 255.255.255.0
client-identifier 0168.f728.7508.99
hardware-address 68f7.2875.0899
default-router 192.168.1.1
domain-name domain
dns-server 8.8.8.8 192.168.1.1
03-02-2018 03:39 AM
It doesn't work either. Second line (hardware-address) has overwritten client-identifier.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide