cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
911
Views
0
Helpful
8
Replies

cisco 1600 series: How to get dynamic IP from DHCP server

admin_2
Level 3
Level 3

I am a newbie to router. I am now configuring a cisco 1605 router that is using IOS 12.0. There are two interfaces connecting to two different private networks. One of the private network has a DHCP server that allocate IPs to the PCs in that network. At first, I hardcoded an IP address to that router's interface by the following command:

interface Ethernet1

ip address 10.15.198.32 255.255.255.0

But then a duplicate IP error happened. It seems that the DHCP server continues to distribute 10.15.198.32 to others machines although I have already hardcoded it to the router's interface. So I would like to set the router's interface to retrieve a dynamic IP from the DHCP server, instead of hardcoding it.

In IOS 12.2, as I read from some articles on Internet, it's as simple as below:

interface Ethernet1

ip address dhcp

But for IOS 12.0, the command "ip address dhcp" does not exist and I don't know how to set it. Does anybody knows?

8 Replies 8

a.manosca
Level 4
Level 4

I don't think this can be done with IOS 12.0 as this command/feature was introduced in IOS 12.1(2)T.

http://www.cisco.com/en/US/products/sw/iosswrel/ps5207/products_command_reference_chapter09186a00801a7ea5.html#wp1109441

If you are connecting to a live network, I don't think it's a good idea to just pick and assign any ip address from the DHCP pool and configure it in your router. It's best that you ask the net admin for help.

Not applicable

May I ask why it is not a good idea to pick an IP from DHCP server? What is the disadvantages? thx~

Assuming that you're using MS Windows machines in your network, some hosts' (and probably servers too) interface might be disabled when duplicate addresses are detected and thus TCP/IP will fail. But I'm not sure if this is true for all versions of Windows. I've also read somewhere that duplicate IP addresses might cause some systems on the network to function unpredictably.

I think there will be no problem on the router side but ill effects could probably be seen on the host/server having the same address.

This isn't really a detailed explanation but I'm sure some (if not many) would agree that you should not do this in a 'live' network.

Not applicable

ic~~

But is there any command that can configure the router to advertise to the whole network its hardcoded IP address, so that the DHCP server can be aware of this and do not allocate the router's IP address to others? I heard that a Windows machine will do such advertisement thing when its IP address is hardcoded. Is this true??

Not applicable

One way to possess a permanent IP address for your router through DHCP server is binding the MAC address of your router to an IP address while configuring the DHCP server.

Otherwise, routers won't advertise its hardcoded IP address.

Let's talk about the mechanism of the dynamic IP address assignment.

1.When the host is powered up, it sends out a DHCPDISCOVER broadcast.

2.DHCP server receives it and find a free IP address in its pool and send out a DHCPOFFER unicast to the host with the IP address.

3.The host obtains the IP address, send out a DHCPrequest broadcast with the IP address to advertise it's going to use this IP address

4.If no problem, DHCP server returns a DHCPacknowledgement unicast to confirm it. Afterward, the host will use this IP address till the lease time expires.

5. But if another host has the same IP address, another host will send a DHCPdecline to DHCP server indicating IP address is already in use. Then the host has to go over the process again.

Not applicable

Very clear explanation. Thank you very much~~

Not applicable

As mentioned, use of a DHCP-server with a predefined IP-address bound to your router MAC-address.

This should allow you to still use the hardcoded address in the router as the DHCP-server will reserve the address for a dhcp-request that'll never come ( as the router is being addressed statically ).

Hello,

Why don´t you reserve the router IP address in the DHCP server, i.e, that IP address can not be distribute to any machine, it is reserved only for the router.

Regards