LinuxQuestions.org
Help answer threads with 0 replies.
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-09-2005, 05:52 PM   #1
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Rep: Reputation: 30
eth0 can not get IP from cable modem


I have RoadRunner cable internet service. When the cable modem is connected to eth0 on my linux box (which functions as a router), eth0 will not receive an IP via DHCP. However, if I connect the cable modem to a windows box and disable/enable the windows network interface, the interface will get an IP. I've found that if I manually set eth0's mac address to that of the windows box's nic, I can receive an IP with it plugged into the windows box, then plug the ethernet cable into the linux box, and everything works the internet works.
However, if I lose the connection for any reason, I have to plug it back into the windows box and repeat the process.
I've tried several cable modems, all different brands, and this always happens. It also happens with my linux-based wrt54g router and OpenBSD.

Does anyone know how I can fix this so that eth0 can receive an IP?
 
Old 12-09-2005, 06:26 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
If like the local comcast cable internet you might be able to add addition mac addresses to your account. Contact Roadrunner and see if it is an option. Comcast allows 3 mac addresses to an account here.

Hope this helps.
Brian1
 
Old 12-09-2005, 10:41 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,069
Blog Entries: 4

Rep: Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071
Usually, it works best to buy a dedicated router (with firewall, maybe VPN) and have that be the first thing that's downstream from the cable modem or DSL line. Even if the only thing down from that is your Linux box, "now everything that you have to deal with is on your desk or shelf."
 
Old 12-09-2005, 11:01 PM   #4
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
Brian, I'm pretty sure that it has nothing to do with mac addresses, since when I set my eth0 mac to that of the windows computer, eth0 still can't get an IP. It works if I plug the cable into a windows computer, get the IP, and then plug it into the Linux box, but I think this is because something has already been initialized. Other interfaces also work on the windows box if I plug the ethernet cable into them, so it doesn't appear to have anything to do with the mac address.

sundialsvcs, yes, that's what I'm doing. This box has another nic which uplinks to a switch where all my other computers are connected, it's serving the purpose of a dedicated router/firewall.
 
Old 12-10-2005, 01:08 AM   #5
winsnomore
Member
 
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Rep: Reputation: 31
It has nothing to do with your computers .. it's the darn modem.

Almos all cablemodems give out IP address to one MAC.
If you switch hardware, you have to powercycle them .. they never will recognize a "new" mac on the interface.
 
Old 12-10-2005, 09:57 AM   #6
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
It _does_ recognize new hardware without powercycling. This is the only way it works. The reason that works is because the mac addresses are the same.

I want to know how to get it to work _with_ powercycling, since there should be no reason that I have to plug it into the windows computer at first.
As I've said, the mac addresses of the windows interface and eth0 are the same (I cloned them).
 
Old 12-10-2005, 03:45 PM   #7
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
How about putting the nic from the windows machine into the linux machine.

Now as far cloning the mac, it may not truely work. Not all nics work the same. I have seen it say to change the mac you must first turn down the nic then modify the mac and then turn the nic back up. This has never worked for any of my wired or wireless nics I have used. I can only make the change while the nic is still up and active. There are defiantly some out there that actually work like above but I have no idea which ones they are.

If I think of something I will post.
Brian1
 
Old 12-10-2005, 04:01 PM   #8
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
I've tried switching the nics, still no luck. It's almost like the cable modem knows that the computer isn't windows and won't give it the information it needs.
There have been a few times when the cable modem does give eth0 an IP, but the linux box still doesn't receive any routing information, so there is no default gateway or any routes other than loopback.
 
Old 12-10-2005, 07:23 PM   #9
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
I am really confused why it does not work. A quick google on the net popped this link up. http://www.seawood.org/rr/linux-setup.html This might help.

Brian1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Daisy-Chain eth0 via cross-over cable? ravenslay3r Debian 2 08-05-2005 04:07 AM
Linux box with eth0 to cable modem and eth1 to Windows box videojeff Linux - Networking 23 03-03-2005 08:58 PM
knetload reports constant traffic on eth0 + cable modem Freon Linux - Networking 3 11-30-2004 11:05 PM
printer cable > modem cable? C++freak Linux - Hardware 1 06-21-2003 02:53 PM
Help With eth0 And Cable Internet..... wzt29 Linux - Networking 1 02-16-2001 02:04 PM

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

All times are GMT -5. The time now is 04:30 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