The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Networking (http://hintsforums.macworld.com/forumdisplay.php?f=14)
-   -   DHCP Lease Constantly Expires (http://hintsforums.macworld.com/showthread.php?t=16314)

mnewman 10-23-2003 02:20 PM

DHCP Lease Constantly Expires
 
I posted a similar message over in "Hardware", got no replies, did a little more research, hence this:

Setup: Airport connected to ISP via dial-up. Airport set up to share Internet connection via wireless and one 10/100 Ethernet Switch. All machines set up with fixed IP addresses -- no DHCP involved.

No problem with the one wireless laptop and one hardwired iMac.

But, the other hardwired iMac constantly loses its Internet connection. I can still ping the Airport (10.0.1.1) and other machines on the LAN, which means that the Ethernet Switch is functioning. But, for this one connection the Airport simply stops connecting to the Internet.

I tried setting this machine up with DHCP and what I found was that it constantly loses the DHCP lease. If I use Cocktail I can renew the lease temporarily and connection to the Internet is re-established. But, I have to keep on renewing the lease every few minutes.

I should note that even if I set the machine up with a manual IP address, renewing the DHCP lease restores Internet access.

Why would only this one machine exhibit this behavior?

Is there anything I can do about it?

yellow 10-23-2003 02:43 PM

Tried creating a new "Network Location"?

mnewman 10-23-2003 03:07 PM

Quote:

Originally posted by yellow
Tried creating a new "Network Location"?
Yes, didn't help.

I should note that every time I request a new lease the IP address changes. This even though the Network Location is set up to be configured manualy with a fixed IP address.

So, it goes like this:

Manually assign IP address: 10.0.1.75

Internet OK.

After a few minutes....

Internet fails.

Renew DHCP lease.

DHCP assigns an address like: 10.0.1.9

Internet OK.

yellow 10-23-2003 03:09 PM

There isn't any "lease time" involved in a manual IP address. Have you tried booting in Safe Mode to ensure that there are no 3rd party kernel hacks that are effecting your networking?

mnewman 10-23-2003 03:12 PM

Quote:

Originally posted by yellow
There isn't any "lease time" involved in a manual IP address. Have you tried booting in Safe Mode to ensure that there are no 3rd party kernel hacks that are effecting your networking?
I know there's no "lease time" when the address is manually assigned. I was just fooling around and was surprised that "renewing" the DHCP lease (even though there wasn't one). restored my Internet connectivity.

How would I use Safe Mode to find kernel hacks?

yellow 10-23-2003 03:30 PM

I meant booting into Safe Mode, setting up a new location in Networking Pref pane and seeing if the iMac drops off the network.

mnewman 10-23-2003 05:40 PM

It doesn't really drop off the network as I can still ping other devices on the same subnet. I just can't connect to anything upstream of the Airport.

yellow 10-23-2003 07:48 PM

Hmm, tried switching ethernet cables and/or putting another machine in it's place? Or is this via an AirPort card and not the LAN connection?

mnewman 10-23-2003 08:28 PM

Quote:

Originally posted by yellow
Hmm, tried switching ethernet cables and/or putting another machine in it's place? Or is this via an AirPort card and not the LAN connection?
Tried switching cables, tried switching Ethernet switch ports. An older iMac (same switch) and an wireless iBook both work fine -- no Internet trouble.

It's definitely this one machine.

hayne 10-23-2003 08:42 PM

When you say that your machine loses its Internet connection, how are you testing that?
Are you sure that it isn't merely a problem with DNS?
Try connecting to a web site by using its IP address instead of its domain name. E.g. use "17.254.0.91" instead of "www.apple.com"

And the stuff about DHCP is confusing.
Do you or do you not have the Airport basestation set up to do DHCP?
If DHCP is turned off on the basestation, then what DHCP server is your machine talking to?
And I've read that you should use numbers over 200 if you are assigning manual IP addresses to machines connected to a basestation. This should only be an issue if you have the basestation DHCP server turned on.

mnewman 10-23-2003 09:25 PM

When I say that the machine loses its Internet connection I mean that it can no longer connect with machines that are not on the LAN. I can still ping the Airport Base Station and other machines on the LAN, but I cannot ping the ISP's DNS, nor can I resolve domain names, nor can I connect to a web page using its IP address.

The ABS is set up to use NAT and to assign IP addresses via DHCP. However, all the machines on the LAN have manually assigned IP addresses.

Only one of three machines on the LAN has this problem.

When that machine loses Internet connectivity I can temporarily "fix" it by having Cocktail request a new DHCP lease (even though the machine does not have a DHCP assigned IP address). Once the lease is "renewed" the machine has a new and different IP address and will be able to connect to the Internet for a few minutes.

When the connection again fails I can ask for a new DHCP lease. The machine will be assigned yet another new and different IP address and will have Internet connectivity for a few more minutes at which time I will have to repeat the process, again and again and again.

I have had the ABS set up this way without any trouble for some time now.

The only change I made recently was to use the ABS internal modem to dial-up the ISP while our Cable service was down. As I mentioned the other two machines on the LAN (one hard wired to the Airport via a 10/100 switch and the other connecting wirelessly) have continued to work fine.

It is just this one machine that continuously loses Internet connectivity.

darndog 10-23-2003 09:37 PM

Really should either use DHCP or not, not half & half.

other random ideas:
Could be MAC access control at the basestation...

...or could be Content Barrier type (safe kid) software with internet access time limit...

...or could be problem with user account, same issue with new user?...

...or could be a befuzzled (technical term) BaseStation that needs hard reset (paperclip time)...

maybe system damaged, after booting from another disk does problem persist?

Hard to believe its the Ethernet Hardware, can be ruled out by installing Airport card from laptop though.

out of ideas...
:confused:

dD

hayne 10-23-2003 09:57 PM

1) Please either turn off DHCP on the basestation
or start using it to assign addresses instead of doing it manually.

2) You haven't mentioned what IP address your troublesome Mac is showing when it has the trouble. Does it change? Can you ping that address from other machines on your LAN?

3) Is your other iMac (the one that doesn't have trouble) running OS X? Are all your machines running the same version (10.2.8 ?)

4) What do you get when you do a 'traceroute' to some external machine (e.g. www.apple.com or 17.254.0.91) ?

mnewman 10-23-2003 10:03 PM

Quote:

Really should either use DHCP or not, not half & half.
I have DHCP enabled just in case a "guest" wanders on to the LAN (friend with a wireless laptop?). I discovered that "renewing" the DHCP lease would fix the connectivity problem quite by accident.

Quote:

Could be MAC access control at the basestation...
I guess I don't understand this. I've never seen any sort of MAC access control in the ABS configuration.

Quote:

...or could be Content Barrier type (safe kid) software with internet access time limit...
No such software installed here.

Quote:

...or could be problem with user account, same issue with new user?...
or could be a befuzzled (technical term) BaseStation that needs hard reset (paperclip time)...
maybe system damaged, after booting from another disk does problem persist?
I'll give these a shot when I get home tonight.

Quote:

Hard to believe its the Ethernet Hardware, can be ruled out by installing Airport card from laptop though.
Sadly, the laptop uses an "old" Airport card (PC card form factor) while the new iMac wants, I think, an Airport Extreme card.

mnewman 10-23-2003 10:33 PM

Quote:

Originally posted by hayne
1) Please either turn off DHCP on the basestation
or start using it to assign addresses instead of doing it manually.
I will try this when I get home. But, the ABS has always been set up to do DHCP and I've never had this sort of problem.

Quote:

2) You haven't mentioned what IP address your troublesome Mac is showing when it has the trouble. Does it change? Can you ping that address from other machines on your LAN?
The manually assigned IP address is 10.0.1.75. This is the IP address assigned to this machine since I put it on the LAN. When I get it back on the Internet after a failure by "renewing" the lease it gets the first available IP address after 10.0.1.1. Each time I "renew" the lease the machine is assigned the next available address.

Quote:

3) Is your other iMac (the one that doesn't have trouble) running OS X? Are all your machines running the same version (10.2.8 ?)
All machines are running 10.2.8.

Quote:

4) What do you get when you do a 'traceroute' to some external machine (e.g. www.apple.com or 17.254.0.91) ?
Another task for this evening.

kfaulhaber 10-23-2003 10:34 PM

To rephrase what has been said here before, set the troubled machine to get its IP from DHCP or assign it a manual address ending in a number greater than 200 as anything less will conflict with the base station's DHCP server even if you are manually assigning IPs.

mnewman 10-24-2003 12:21 AM

OK, back home now.

I have configured every machine on the LAN to use DHCP. As usual, the wireless laptop and wired iMac are working fine. The troublesome machine is still exhibiting the same trouble.

I tried logging on using a pristine admin account and have the same difficulty.

As usual, if I renew the DHCP lease on the troubled machine, I get a brand new IP address and a few (3 or 4) minutes of Internet access and then it dies.

When I have Internet access I can do a normal traceroute with the expected results. When it dies, traceroute just hangs. As expected.

When it dies, I can still ping the other machines on the LAN as well as the ABS.

hayne 10-24-2003 12:28 AM

Quote:

Originally posted by mnewman
I have configured every machine on the LAN to use DHCP. As usual, the wireless laptop and wired iMac are working fine. The troublesome machine is still exhibiting the same trouble.
[...]
As usual, if I renew the DHCP lease on the troubled machine, I get a brand new IP address and a few (3 or 4) minutes of Internet access and then it dies.
Look in Network Preferences. What does that machine show as its IP address when it has the trouble? What does it show for the "router" ?

Quote:

When I have Internet access I can do a normal traceroute with the expected results. When it dies, traceroute just hangs. As expected.
Please show us the results from traceroute. I don't see how it can just hang (with no output) if you are able to ping the basestation. It should at least show the basestation link.

mnewman 10-24-2003 01:02 AM

Quote:

Originally posted by hayne
Look in Network Preferences. What does that machine show as its IP address when it has the trouble? What does it show for the "router" ?
IP: 10.0.1.18

Router: 10.0.1.1

But, if I renew the lease, the both go blank. But, the new IP address is displayed in the Network Utility.

Quote:

Please show us the results from traceroute. I don't see how it can just hang (with no output) if you are able to ping the basestation. It should at least show the basestation link.
Code:

64 bytes from 202.128.27.2: icmp_seq=115 ttl=253 time=122.619 ms
64 bytes from 202.128.27.2: icmp_seq=116 ttl=253 time=107.294 ms
64 bytes from 202.128.27.2: icmp_seq=117 ttl=253 time=122.38 ms
^C
--- 202.128.27.2 ping statistics ---
230 packets transmitted, 118 packets received, 48% packet loss
round-trip min/avg/max = 102.004/253.421/2974 ms
[imac-newman:~] mnewman% ping 10.0.1.1
PING 10.0.1.1 (10.0.1.1): 56 data bytes
64 bytes from 10.0.1.1: icmp_seq=0 ttl=64 time=0.744 ms
64 bytes from 10.0.1.1: icmp_seq=1 ttl=64 time=0.688 ms
64 bytes from 10.0.1.1: icmp_seq=2 ttl=64 time=0.686 ms
^C
--- 10.0.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.686/0.706/0.744 ms
[imac-newman:~] mnewman% ping 10.0.1.2
PING 10.0.1.2 (10.0.1.2): 56 data bytes
64 bytes from 10.0.1.2: icmp_seq=0 ttl=64 time=5.304 ms
64 bytes from 10.0.1.2: icmp_seq=1 ttl=64 time=2.783 ms
64 bytes from 10.0.1.2: icmp_seq=2 ttl=64 time=2.744 ms
^C
--- 10.0.1.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 2.744/3.61/5.304 ms
[imac-newman:~] mnewman% ping 202.128.27.2
PING 202.128.27.2 (202.128.27.2): 56 data bytes
^C
--- 202.128.27.2 ping statistics ---
12 packets transmitted, 0 packets received, 100% packet loss
[imac-newman:~] mnewman% traceroute 202.128.27.2
traceroute to 202.128.27.2 (202.128.27.2), 30 hops max, 40 byte packets
 1  cust144-duptaga2-202-128-27-250.saipan.com (202.128.27.250)  0.895 ms  0.943 ms  0.529 ms
 2  * * *
 3  * * *
 4  * * *
^C
[imac-newman:~] mnewman% ping 202.128.27.250
PING 202.128.27.250 (202.128.27.250): 56 data bytes
64 bytes from 202.128.27.250: icmp_seq=0 ttl=64 time=0.757 ms
64 bytes from 202.128.27.250: icmp_seq=1 ttl=64 time=0.687 ms
64 bytes from 202.128.27.250: icmp_seq=2 ttl=64 time=0.71 ms
64 bytes from 202.128.27.250: icmp_seq=3 ttl=64 time=0.689 ms
64 bytes from 202.128.27.250: icmp_seq=4 ttl=64 time=0.707 ms
^C
--- 202.128.27.250 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.687/0.71/0.757 ms

Above shows a continuous ping to the DNS server until the Internet connection died. Then I successfully ping the ABS and one of the other machines on the LAN (the wireless laptop) which are 10.0.1.1 and 10.0.1.2. Then I ping the DNS server again and it fails. Then I do a traceroute to the DNS server. Finally, I ping the IP address assigned by the ISP: 202.128.27.250

mnewman 10-24-2003 01:03 AM

I should add that I booted in safe mode and created a new network location there, but that didn't help.

I am now going to boot from a known good system (10.2.6) which is on an external firewire drive.

mnewman 10-24-2003 01:19 AM

OK, booted from an old, known good system and it still failed. I did continuous pings to the DNS and it failed after 107:

Code:

64 bytes from 202.128.27.2: icmp_seq=106 ttl=253 time=112.355 ms
64 bytes from 202.128.27.2: icmp_seq=107 ttl=253 time=113.438 ms
^C
--- 202.128.27.2 ping statistics ---
154 packets transmitted, 107 packets received, 30% packet loss
round-trip min/avg/max = 104.791/505.023/3274.34 ms

So, it ain't software....

hayne 10-24-2003 02:33 AM

So it seems (from the traceroute) that your machine can send packets through the switch and get to the basestation but then they get lost - they don't seem to be routed out of the basestation. Very strange.

I'm about out of ideas. Only one thing occurs to me - is it possible that this trouble is caused by some periodic activity on one of the oteh rmachines connected to the basestation? Try disconneecting all but the one machine and see.

mnewman 10-24-2003 02:44 AM

My cable modem is back running. I can run the Ethernet cable directly to the once troublesome machine and it now stays connected to the Internet with no trouble. So, I have to assume now that there must be something wrong with either the Ethernet switch or the ABS.

However, if I route the Ethernet cable from the Cable Modem to the Airport so I can use the ABS as a router and bridge, I am unable to get ANY machine to connect to the Internet. (How odd that it worked for two out of three machines when the ABS was doing the dialing.)

Here's how the ABS is set up:

INTERNET:

Connect using Ethernet.

Configure using DHCP.

The ISP's DNS servers listed.

NETWORK:

"Distribute IP addresses" is checked.

"Share a single IP address (using DHCP and NAT)" is selected.

"Enable DHCP server on Ethernet" is checked.

"Enable AirPort to Ethernet bridging" is checked.

Here's how each individual machine is set up in the Network preferences pane:

Configure: Using DHCP

Is there something wrong with the way I'm configuring either the ABS or the individual machines? I'm sure this is the way I was doing it before the Cable Modem went down....

hayne 10-24-2003 02:59 AM

Your config sounds reasonable.
Are you sure you have the cable modem coming into the WAN port (and the switch on the LAN port)?

is it possible that your cable company registeres the MAC address of the machine connected to it and is refusing to service a different MAC address (your basestation)? The usual fix for this is to turn off the cable modem for a while - maybe a few hours - to let it forget about the old MAC address. Or call your cable company and ask them to check what the problem is.

mnewman 10-24-2003 03:05 AM

I should add here that when I am trying to use the ABS as a router/bridge I cannot ping the Cable Modem either at the address assigned by the ISP or at the address it uses for web based configuration. I can ping all the other machines on the network.

I should also note that I tried this with only a single machine on the LAN with no success.

mnewman 10-24-2003 03:08 AM

Quote:

Originally posted by hayne
Your config sounds reasonable.
Are you sure you have the cable modem coming into the WAN port (and the switch on the LAN port)?

is it possible that your cable company registeres the MAC address of the machine connected to it and is refusing to service a different MAC address (your basestation)? The usual fix for this is to turn off the cable modem for a while - maybe a few hours - to let it forget about the old MAC address. Or call your cable company and ask them to check what the problem is.
Yes, the Cable Modem is connected to the upstream port on the siwtch. The ABS and the wired machines are all on the other ports.

This is how it's always been.

I'll try shutting off the cable modem while I go out and run and I'll get back to this tomorrow morning.

Thanks to all for your help and suggestions.

mnewman 10-24-2003 04:19 AM

Quote:

Originally posted by mnewman
I'll try shutting off the cable modem while I go out and run and I'll get back to this tomorrow morning.
Sorry. This didn't work.

Maybe I'l abandon the ABS as a router and use the OS/X one....

mnewman 10-24-2003 04:28 AM

Quote:

[i]Maybe I'l abandon the ABS as a router and use the OS/X one....
But this didn't work. Here's what I did:

I reconfigured the ABS to serve only as an Ethernet/Wireless Bridge.

I left the Cable Modem connected to the WAN (upstream) port on the switch.

I enabled Internet Sharing on the troublesome iMac.

I expected the iMac to get an IP address from the DHCP server in the Cable Modem, just the way the ABS does. But, the iMac can't seem to get an IP address from the Cable Modem.

What am I missing here? If I connect the iMac directly to the Cable Modem it gets an IP address just fine. Why can't it get one when it's connected to the Cable Modem through a switch?

darndog 10-24-2003 06:21 AM

In the last example your mac still gets its iP from the ABS, this is where the problem lies.

Shut down all hardware except the ABS, then disconnect everything.

Hard reset the ABS (check manual for location, ABS will forget all settings, so note down first if necessary)

Power down ABS

Connect the CM to the WANonABS, the LANonABS to your Switch, Your Switch to TM (troublesomeMac).

Power up the CM (let finish checks)
Power the ABS (ditto)
Power up TM

Use TM to reconfigure ABS WAN and LAN, Set ABS as DCHP server, leave off all Encryption, Access controls and any other options, You may need to clone your MAC address from TM to ABS.

If procedure fails, Hard reset ABS again & reconfigure.

If procedure fails second time remove (better to replace with another switch if possible) switch & try again.

IF (CM____ABS____TM is False) AND (CM____TM is true) then ABS = FUBAR

dD

hayne 10-24-2003 10:46 AM

Quote:

Originally posted by mnewman
Yes, the Cable Modem is connected to the upstream port on the siwtch. The ABS and the wired machines are all on the other ports.
Whoa! All this time I'd been assuming that your switch was connected to the LAN port of the ABS and that the only thing connected to your cable modem was the ABS. Something like this:
Code:

    cable modem
          |
          ABS
        /  \
    switch    mac1
    /    \
mac2  mac3

Note: the upwards side of the ABS and the switch are the "WAN" connections. The downwards side are the "LAN" connections.
That's the way I would do it. Your ABS is the gateway to the Internet. All of your 3 macs get their IP address from the ABS's DHCP server.
But you seem to have it like this:
Code:

  cable modem
          |
      switch
    /    |  \
  ABS  mac2  mac3
  |
 mac1

It is not clear which port (WAN or LAN) you are using to connect the ABS to the switch. (It should be the WAN side.)
This means that mac2 & mac3 are talking directly to the cable modem without any NAT. I don't see how this could work. Anyway, there's not much point in thinking about it since I don't see why you would want this configuration when you could do it as in the first diagram which is far more secure.

All of this is assuming that it really is a switch that you are using and not a router-switch combo.

mnewman 10-24-2003 02:05 PM

Sorry folks, this is an old graphite ABS with only a single Ethernet port. This is the way it has always been set up and has always worked just fine:


Code:

cable modem
          |
      /-switch -\
      /    |    \
  ABS  mac2    mac3
  ~
 mac1 (wireless)

The single port on the Cable Modem is connected to the upstream (WAN) port on the switch. The ABS and the wired Mac's are connected to downstream (WAN) ports on the switch.

The ABS has always been able to do DHCP and NAT configured like this and I think I got the configuraton from an Apple document called "Configuring Airport Networks".

The ABS gets it's IP address from the Cable Modem. When this was working I was using fixed IP addresses for the Mac's and the ABS was doing NAT. Perhaps I ought to go back to fixed IP addresses for the Macs to see if that works.

darndog 10-24-2003 04:16 PM

have you tried this?

dD

hayne 10-24-2003 04:38 PM

Quote:

Originally posted by mnewman
Code:

cable modem
          |
      /-switch -\
      /    |    \
  ABS  mac2    mac3
  ~
 mac1 (wireless)

[...]
The ABS gets it's IP address from the Cable Modem. When this was working I was using fixed IP addresses for the Mac's and the ABS was doing NAT.
Hmm - I wouldn't have thought this would work but I guess if mac2 & mac3 are configured to gateway through the ABS then it would be okay.

I can see a possible problem with DHCP since mac2 & mac3 are going to see the DHCP server from the cable company. I'm not sure what determines which DHCP server gets used when there are two of them on a LAN. (Your machines mac1 & mac2 are on the cable company's LAN since there is no router between them and the cable modem.)
And there might also be problems if you give your machines static IP addresses that collide with those assigned by some of your neighbours - whose machines are also on the cable company's LAN.

Summary - I still think there are big problems with the config you have outlined above due to the fact that mac1 & mac2 are on the cable company's LAN.
It would be far simpler if you bought a router box to replace your switch.

kfaulhaber 10-24-2003 06:54 PM

If memory serves me correct, you can use the older airport base stations as a router without having it do DHCP. The Extreme base stations don't do NAT without DHCP. Anyway, disable DCHP on the base station and use fixed IP's for all your machines. This will avoid any DHCP conflicts with the cable modem. I had one of the older base stations and had the same setup and this worked fine. A better option would be to get a router to put between the cable modem and the switch.

mnewman 10-24-2003 11:38 PM

It Was The Switch
 
I replaced the suspect switch, set up the LAN exactly as described before:

Code:

cable modem
          |
      /-switch -\
      /    |    \
  ABS  mac2    mac3
  ~
 mac1 (wireless)

and all is well.

The only difference is that now, at the behest of several posters in this thread, I am using DHCP rather than fixed IP addresses for all the machines on the LAN.

It seems to work like this: The cable modem serves up an IP address (202.128.1.n) to the ABS. The ABS serves IP addresses (10.0.1.n) to all the machines on the LAN. The ABS does NAT and bridges the wired and wireless networks.

Thanks to all of your for your help and patience.


All times are GMT -5. The time now is 08:59 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.