cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1413
Views
5
Helpful
5
Replies

Static mapping not working on cisco router

Majed Zouhairy
Level 1
Level 1

Peace, I tried to configure a dhcp pool with a database agent to get static mapping from but it didn't work.

here is the dhcp configuration:

ip dhcp excluded-address 10.6.0.250 10.96.0.254
!
ip dhcp pool VLAN30_VOIP_DHCP
network 10.6.2.0 255.255.255.0
default-router 10.6.2.1
option 150 ip 10.1.1.17 10.1.1.16
!
ip dhcp pool data-vlan
network 10.6.0.0 255.255.255.0
default-router 10.6.0.1
dns-server 172.17.2.4

I uploaded the database file to flash and

when I try to add the origin file, I get an error.

21(dhcp-config)#origin file flash:static-binding.txt

% This command may not be used with host, network, or relay pools.

the file is as follows:

*time* September 15 2016 04:18 PM

*version* 2

!IP address Type Hardware address Lease expiration

10.6.0.104 /24 1 c57e.1f05.810b Infinite
10.6.0.103 /24 1 73c4.35ff.c346  Infinite
10.6.0.102 /24 1 c57e.1f05.8999 Infinite

*end*

5 Replies 5

ahmedshoaib
Level 4
Level 4

Hi;

Please modify the dhcp static-binding.txt file and upload it again;

!IP address Type Hardware address Lease expiration

10.6.0.104 /24  id   01c5.7e1f.0581.0b Infinite
10.6.0.103 /24  id   0173.c435.ffc3.46  Infinite
10.6.0.102 /24  id   01c5.7e1f.0589.99 Infinite

Thanks & Best regards;

Peace, at this point it does not matter what the file contains, the problem is that the command is not being accepted. it looks like the pool i created is not a host, network or relay pool. i am going to try to create the pool on the switch and see if it works.

has nobody ever encountered this?

After about 2 years of ignoring, I decided to crack this down.

The problem turns out that the equipment doesn't accept the origin file command when the network command is present!

Having solved that, the pc is still not getting an offer. However, if I configure the dhcp on the switch, there is no such problem which makes me think that the router is missing some relay command or maybe not.

When dhcp is configured on the router, its debug just shows that the origin file is read and show ip dhcp binding shows the static bindings from the origin file. Debug on the switch shows that only discovery offers are coming which means the router is not sending offers. Any help on this?

the problem was that dhcp was not allowed in the router access list:

permit udp any host 255.255.255.255 eq 67 68

needs to be added and

 what also helps is defining the domain in the dhcp pool

Review Cisco Networking products for a $25 gift card