LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-19-2003, 10:06 AM   #1
Woody_84
LQ Newbie
 
Registered: Dec 2003
Posts: 3

Rep: Reputation: 0
Updating IP Addresses


I've got a Redhat 9 machine set up as a NAT on my network. This is connected via ethernet to my NTL Cable Modem. However, one machine in the house does not have a network card so uses the USB connection when it is required.

The problem comes when the cable modem is plugged back into the ethernet again and the IP address of the connection has changed, the ethernet card still has the old one. Although deactivating and reactivating the network card solves the problem is there a way of automatically checking if the ip address has changed (a script that could be Cronned etc).

I know this is not the MAC related problems associated with NTL as is worked with Windows XP using the same machine.

The cable modem is connected to device eth0.
 
Old 12-19-2003, 11:56 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Well, you could cron DHCP...

I would recommend simply getting a NIC for the box that doesn't have one. They aren't that expensive. If you look on pricewatch.com, you can even get an Intel 82559-based NIC (great chipset) for around $20. You can get shoddy (like rl8139) cards for much less, probably less than $10 with tax and shipping.
 
Old 12-19-2003, 01:12 PM   #3
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
Are you running dhcpcd or dhclient? I don't remember what redhat defaults to.
 
Old 12-19-2003, 02:45 PM   #4
Woody_84
LQ Newbie
 
Registered: Dec 2003
Posts: 3

Original Poster
Rep: Reputation: 0
I'm using DHCPD. The only modifications i've made to /etc/dhcpd.conf are to assign addresses to the pc's on the network.
 
Old 12-19-2003, 03:01 PM   #5
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
Yeah, but I thought your problems were with the NAT box pulling a new IP addr when you hooked it back up to the cable modem. This doesn't have anything to do dhcpd on your NAT box. You need to configure your dhclient or dhcpcd. You need to let us know which of these you are running. just ps -aux | grep eth0 and you should see one of these two attached to an interface.

Justin
 
Old 12-19-2003, 03:19 PM   #6
Woody_84
LQ Newbie
 
Registered: Dec 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Sorry, got my wires crossed a bit there.

[root@localhost root]# ps -aux | grep eth0
root 4210 0.0 0.0 0 0 ? SW 21:13 0:00 [eth0]
root 4258 0.0 0.1 1896 948 ? S 21:13 0:00 /sbin/dhclient -1 -q
-lf /var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid -cf /etc/dhc
lient-eth0.conf eth0
root 4317 0.0 0.1 3508 616 pts/0 S 21:16 0:00 grep eth0


Assume the settings go into "/etc/dhclient-eth0.conf" ?
 
Old 12-19-2003, 04:16 PM   #7
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
Yes! You need to man this file and play around with the settings or just modify the ones already there.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IP addresses boakye Linux - Enterprise 1 01-31-2005 08:16 PM
using 2 ip addresses Laimonas16 Linux - Networking 0 09-21-2004 05:45 AM
Trying to resolve IP Addresses? ajrosen Linux - Newbie 1 04-16-2004 11:20 AM
Virtual Ip addresses jhayes Linux - Networking 2 09-30-2003 01:31 PM
IP addresses ruhode Linux - Software 2 09-09-2002 04:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration