05-17-2004 08:29 PM - edited 03-02-2019 03:45 PM
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?
05-17-2004 09:20 PM
I don't think this can be done with IOS 12.0 as this command/feature was introduced in IOS 12.1(2)T.
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.
05-17-2004 10:42 PM
May I ask why it is not a good idea to pick an IP from DHCP server? What is the disadvantages? thx~
05-17-2004 11:20 PM
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.
05-18-2004 05:42 PM
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??
05-18-2004 07:41 PM
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.
05-18-2004 07:54 PM
Very clear explanation. Thank you very much~~
05-20-2004 11:46 PM
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 ).
08-23-2004 07:37 AM
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
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