Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird Cable Company

Status
Not open for further replies.

Tigerjoe

IS-IT--Management
Nov 12, 2001
46
SA
I have a cisco router connected to a cable modem using dhcp. Everytime I restart this router I get a different IP address, but if I connect a netgear router or any other device (PC, Laptop etc) I get an IP address that has been the same for a few years now. Which I think it should be called almost Static. It only changes when i use a cisco router. I did connect different cisco routers to the cable modem and I ended up with the same result. I even assigned the MAC address of the netgear router to the cisco interface connected to the cable modem and that came out with the same result. The cisco router would not communicate with the cable modem when assigned it with the static IP.

Does anyone know why this is? To PING or not to PING?
 
There could be several reasons for this, the netgear probably has bridge designed ports and a wan port. The bridge is going to keep a mac table and it attempts re-assign the same ip to the mac whenever it can (if you have high amount of host off of the bridge connections this may happen less as the ip range gets consumed quickly and it cannot re-assign to same mac). Where the cisco is performing routing on between the ether ports and using a small pool for dhcp and just giving you what is free.

This is all speculation of course because I can only assume what type of configuration you have setup on the router.You didn't really leave a lot of information.
 
Sorry forget my previous post. You are saying that the netgear or a pc receives the exact same ip address when connected to the cable modem. However, the cisco router receives a totally different ip address and it doesn't function. My first guess is you have it mis-configured. How do you have the router configured, are you using NAT, ip helper address, etc? Here is a website with all the DHCP commands it may help you out a bit .

 
I really dont have much in configuration of the router. Actually Iam pretty sure I have it misconfigured, but this configuration that I have now was the only one that worked.

This is the config that I have now.


Cable modem ---> e0 2501 s1--->s1 2514 e1 --->netgear--> LAN


DCE#sho run
Current configuration : 1046 bytes
!
! Last configuration change at 16:58:08 UTC Wed Dec 11 2002
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname DCE
!
enable secret 5 $1$l9QB[v16duKhP3jP7D2wr9.
!
ip subnet-zero
ip name-server 4.2.2.2
no ip dhcp conflict logging <-- i didnt know how to this command
!
!
!
!
interface Ethernet0
ip address dhcp
ip nat outside
no cdp enable
!
interface Serial0
no ip address
shutdown
!
interface Serial1
ip address 10.0.0.1 255.255.255.252
ip nat inside
clockrate 4000000
no cdp enable
!
router rip
version 2
network 10.0.0.0
network 172.16.0.0
!
ip nat inside source list 1 interface Ethernet0 overload
ip classless
ip route 0.0.0.0 0.0.0.0 10.50.24.1
no ip http server
!
!
!
access-list 1 permit 10.0.0.0 0.0.0.255
access-list 1 permit 172.16.0.0 0.0.255.255
access-list 1 permit 192.168.0.0 0.0.255.255
access-list 1 permit 10.1.1.0 0.0.0.255
!
line con 0
logging synchronous
line aux 0
line vty 0 4
logging synchronous
login
!
ntp clock-period 17179894
ntp server 63.192.96.2
end


This is what I got so far. Back to the main question, I dont see why the cable modem assigns different IP's to the cisco router and not the netgear. They both use DHCP to obtain a leased address.

T J

To PING or not to PING?
 
Here is one remote possibility:

A typical DHCP client will clue the DHCP server to it's last lease address. I guess the machine stores the info in NVRAM when you shut it down. If the server has that address available, it will re-assign it. It's possible that the Cisco router isn't doing this. Possibly it is nulling that field. Since it's ethernet, you can go to and download a free open-source protocol analyzer. Watch the DHCP exchange process and see if there is any difference in behavior between the two.

Regards,

Scott
 
Thanks Ill try that ethereal. T J

To PING or not to PING?
 
I always get the same ip on my router:

I have a Cisco 806 connected to cable modem and I get the same ip over and over. I've even set the E1 interface to &quot;no ip address dhcp client-id Ethernet1&quot;, saved to start config, restarted both the router and the cable modem, re-enabled &quot;ip address dhcp client-id Ethernet1&quot;, reset them again, and it grabbed the same ip!

But if I run dhcp from Win2k or Linux then I will get different ip's from Cable modem provider?
 
Thats weird b/c i get the same ip when ever i use any other client (netgear, win2k, xp, etc) besides the cisco router. Even when i release and renew on windows machine, i still get that same ip. I wish i knew the reason so i could use that method for my router.


T J

To PING or not to PING?
 
Yes, if you sniff a windows DHCP exchange, you will see that the client tells the server what its last address was. That's how it gets the same IP every time. It may be that the Cisco isn't telling the server what the last address was. You'd have to sniff the Cisco DHCP exchange to know one way or the other.
 
Would the command (debug ip dhcp server packet) give the same results as the sniffer? Or is the sniffer the best way to go about finding out why the cisco router does dhcp different than the netgear router? T J

To PING or not to PING?
 
I think the sniffer would be best. You can download an executable and have it up and runnning in minutes. It will break the entire transaction down for you. The debug probably won't give you near as much info.
 
I was doing some testing earlier today and captured my laptop sending a DHCP request. Below is the Ethereal output. Notice that in Option 50, my machine requests the last address that it had...

Frame 186 (365 on wire, 365 captured)
Arrival Time: Dec 16, 2002 15:23:12.802578000
Time delta from previous packet: 0.043481000 seconds
Time relative to first packet: 36.291149000 seconds
Frame Number: 186
Packet Length: 365 bytes
Capture Length: 365 bytes
Ethernet II
Destination: ff:ff:ff:ff:ff:ff (ff:ff:ff:ff:ff:ff)
Source: 00:08:74:03:77:b5 (laphhsyl11.si.siroot.com)
Type: IP (0x0800)
Internet Protocol, Src Addr: 0.0.0.0 (0.0.0.0), Dst Addr: 255.255.255.255 (255.255.255.255)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..0. = ECN-Capable Transport (ECT): 0
.... ...0 = ECN-CE: 0
Total Length: 351
Identification: 0x0000
Flags: 0x00
.0.. = Don't fragment: Not set
..0. = More fragments: Not set
Fragment offset: 0
Time to live: 128
Protocol: UDP (0x11)
Header checksum: 0x398f (correct)
Source: 0.0.0.0 (0.0.0.0)
Destination: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67)
Source port: bootpc (68)
Destination port: bootps (67)
Length: 331
Checksum: 0x7c68 (correct)
Bootstrap Protocol
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0xeb0cc040
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
0... .... .... .... = Broadcast flag: Unicast
.000 0000 0000 0000 = Reserved flags: 0x0000
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client hardware address: 00:08:74:03:77:b5
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option 53: DHCP Message Type = DHCP Request
Option 61: Client identifier
Hardware type: Ethernet
Client hardware address: 00:08:74:03:77:b5
Option 50: Requested IP Address = 10.4.2.143
Option 12: Host Name = &quot;lapHHSYL11&quot;
Option 81: Client Fully Qualified Domain Name (27 bytes)
Option 60: Vendor class identifier = &quot;MSFT 5.0&quot;
Option 55: Parameter Request List
1 = Subnet Mask
15 = Domain Name
3 = Router
6 = Domain Name Server
44 = NetBIOS over TCP/IP Name Server
46 = NetBIOS over TCP/IP Node Type
47 = NetBIOS over TCP/IP Scope
31 = Perform Router Discover
33 = Static Route
Unknown Option Code: 249
43 = Vendor-Specific Information
End Option

That's what you need to capture for your Cisco. See if Option is even included or possibly nulled out.



 
Thanks for the advise svermill, I have 3 routers on my network and no hubs or switches. So for me to sniff any dhcp packets on the router interface would be pretty hard. I did a quick search on google and could not find a relevent way. Let me know if you know of an easy way of sniffing packets on a router interface. T J

To PING or not to PING?
 
Can't think of anything offhand. But as you can see, it's very likely that your router isn't including Option 50. So there's probably nothing you can do (short of putting in a feature request to TAC!).

If I ever have occasion to capture a Cisco DHCP exchange, I'll post it here.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top