Computing.Net > Forums > Linux > Another Cable Modem Problem

Another Cable Modem Problem

Reply to Message Icon

Original Message
Name: Matt Savigear
Date: March 6, 2001 at 08:04:45 Pacific
Subject: Another Cable Modem Problem
Comment:

I can't find this one in any previous posts.

I am trying to set up a Linux box (under RedHat 7) to function as a firewall server for my network and communicate out via a cable modem. It works, except...

I have the thing running DHCP for the modem interface (eth1), and a static address for the internal side (eth0). When I first boot up the system all is well - my other machine can see out and browse OK. Unfortunately after about an hour (roughly), eth1 seems to just lose its IP address (no errors reported), and of course IP forwarding then fails. eth1 still claims to be up in ifconfig, but it has no address assigned.

I know the modem is OK, because it functions without a hitch on my windows machine. Any ideas where to look for a fix?

Thanks.


Report Offensive Message For Removal


Response Number 1
Name: Apple
Date: March 6, 2001 at 10:17:12 Pacific
Subject: Another Cable Modem Problem
Reply: (edit)

ah. Linux has problems with DHCP (as if anyone else gets it right 8)

You need to kill dhcpcd every hour or so and restart it. You can do this with a shell script and a crontab

dhcpcd_update:
#!/bin/sh

myvar = $(ps -C dhcpcd -o pid=)

if [ $myvar ]; then
kill $myvar
else
echo "no dhcpcd started"
fi

/sbin/dhcpcd -d > newip.out

# do whatever you want to with newip.out here

crontab:
I can't find the file, so man crontab will explain things. These are my settings (2 hr intervals) My DSL is rock solid when SWBell decides not to drop my connection.

0 */2 * * * /root/dhcpcd_update 1> /dev/null 2> /dev/null



Report Offensive Follow Up For Removal

Response Number 2
Name: Matt S
Date: March 6, 2001 at 23:56:06 Pacific
Subject: Another Cable Modem Problem
Reply: (edit)

Er, my system isn't running dhcpcd, even when it works...?


Report Offensive Follow Up For Removal

Response Number 3
Name: JS
Date: March 7, 2001 at 02:08:20 Pacific
Subject: Another Cable Modem Problem
Reply: (edit)

Wait a minute...

It is correct that your system isn't running dhcpd (dhcp server). Your system is a dhcp client. The cable (modem) company is running a dhcp server to assign a ip-address to interface (eth1).

I don't know the solution for the problem.
It seems like the lease time expires and the ip-address is not reassigned. Try to find out what the lease time is.

JS.


Report Offensive Follow Up For Removal

Response Number 4
Name: Paul
Date: March 7, 2001 at 18:53:06 Pacific
Subject: Another Cable Modem Problem
Reply: (edit)

Which provider are you going through?

I am running the same setup as you, redhat 7 through bigpond cable, with firewall rules, and have no probs.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Another Cable Modem Problem

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge