Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-09-2005, 05:52 PM
|
#1
|
Member
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408
Rep:
|
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?
|
|
|
12-09-2005, 06:26 PM
|
#2
|
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:
|
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
|
|
|
12-09-2005, 10:41 PM
|
#3
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,069
|
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."
|
|
|
12-09-2005, 11:01 PM
|
#4
|
Member
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408
Original Poster
Rep:
|
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.
|
|
|
12-10-2005, 01:08 AM
|
#5
|
Member
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315
Rep:
|
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.
|
|
|
12-10-2005, 09:57 AM
|
#6
|
Member
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408
Original Poster
Rep:
|
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).
|
|
|
12-10-2005, 03:45 PM
|
#7
|
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:
|
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
|
|
|
12-10-2005, 04:01 PM
|
#8
|
Member
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408
Original Poster
Rep:
|
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.
|
|
|
12-10-2005, 07:23 PM
|
#9
|
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:
|
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
|
|
|
All times are GMT -5. The time now is 04:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|