Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eth0 can not get IP from cable modem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
andrewy
l33t
l33t


Joined: 07 Apr 2004
Posts: 602

PostPosted: Sat Dec 10, 2005 3:23 pm    Post subject: eth0 can not get IP from cable modem Reply with quote

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 (and default gateway, etc) 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 get eth0 to "see" the cable modem by doing the following:
- plug the cable modem into the windows computer and disable/enable the interface to get an ip
- unplug the ethernet cable from the windows computer
- plug the ethernet computer into eth0 (which has the same mac as the windows computer's interface)

However, if I lose the connection for any reason, I always have to plug it back into the windows box and repeat the process in order to get a new IP.
I've tried several cable modems, all different brands, and this always happens. It also happens with my linux-based wrt54g router and OpenBSD. I'm pretty sure it's not a problem with mac addresses, because it still doesn't work when eth0 has the same mac as the windows computer's interface.

Does anyone know how I can fix this so that eth0 can receive an IP without having to first plug it into a windows computer?
Back to top
View user's profile Send private message
morodoch
Guru
Guru


Joined: 22 Sep 2005
Posts: 523
Location: England

PostPosted: Sat Dec 10, 2005 3:45 pm    Post subject: Reply with quote

This may be a dumb question, but do you have dhcp installed and running on your gentoo install?
_________________
Well, the Sister was right. You boys could use a little churching up. Slide on down to the Triple Rock, and catch Rev. Cleophus. You boys listen to what he's got to say.

-- Curtis
Back to top
View user's profile Send private message
morodoch
Guru
Guru


Joined: 22 Sep 2005
Posts: 523
Location: England

PostPosted: Sat Dec 10, 2005 4:24 pm    Post subject: Reply with quote

Actually I think it *was* a dumb question. Have you configured the ethernet device to use dhcp? This section in the handbook explains how:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=1
_________________
Well, the Sister was right. You boys could use a little churching up. Slide on down to the Triple Rock, and catch Rev. Cleophus. You boys listen to what he's got to say.

-- Curtis
Back to top
View user's profile Send private message
andrewy
l33t
l33t


Joined: 07 Apr 2004
Posts: 602

PostPosted: Sat Dec 10, 2005 4:26 pm    Post subject: Reply with quote

morodoch wrote:
Actually I think it *was* a dumb question. Have you configured the ethernet device to use dhcp?


Yes, it tries to get the IP address, but usually fails. Sometimes it does manage to get the IP via DHCP, but even then, a default gateway isn't added and I have to add all the gateways manually.
Back to top
View user's profile Send private message
morodoch
Guru
Guru


Joined: 22 Sep 2005
Posts: 523
Location: England

PostPosted: Sat Dec 10, 2005 4:31 pm    Post subject: Reply with quote

Quote:
I've found that if I manually set eth0's mac address to that of the windows box's nic, I can get eth0 to "see" the cable modem by doing the following:


Do you really have two machines on the same network with the same mac address? This would be really confusing.

Do I understand that you have one wire coming out of the router (no hub/switch) and when you plug it into your windows box it works, but into a gentoo box it doesn't?

Could it be a firewalling problem on your gentoo box? Is it bouncing dhcp / routing packets?
_________________
Well, the Sister was right. You boys could use a little churching up. Slide on down to the Triple Rock, and catch Rev. Cleophus. You boys listen to what he's got to say.

-- Curtis
Back to top
View user's profile Send private message
andrewy
l33t
l33t


Joined: 07 Apr 2004
Posts: 602

PostPosted: Sat Dec 10, 2005 4:47 pm    Post subject: Reply with quote

Two machines do have the same MAC because I manually changed one, but it isn't a problem because only one is on the LAN at any given time. The other nic is connected to the cable modem, so none of the LAN machines see it, so there is no conflict.

As for firewalling, I've tried setting iptables to accept everything and it still doesn't work. I've done the same with a wrt54g and OpenBSD box, so I'm pretty sure that it's not caused by the firewall.

It isn't one wire coming from the router, it's one wire coming from the cable modem. My network is setup like this:
cable modem plugged into eth0 on linux box
eth1 on linux box uplinked to switch (iptables is configured for NAT)
various computers plugged into the switch

Whenever my cable modem is powered off or needs to be reset for whatever reason, I have to first plug it into the windows box, get an ip/gateway/etc, and then plug it back into eth0. If I plug it into eth0 without plugging it into the windows box first, it won't work. The reason I can do this is because the mac addresses of the interfaces are the same, so the cable modem doesn't realize that it's connected to a different computer.

It's almost as if the cable modem will only give an ip and routing information to a windows box, but I have no idea how my ISP would have set that up, or how to get around it.
Back to top
View user's profile Send private message
morodoch
Guru
Guru


Joined: 22 Sep 2005
Posts: 523
Location: England

PostPosted: Sat Dec 10, 2005 4:50 pm    Post subject: Reply with quote

That *does* sound weird.

The only thing I could suggest is to run a packet analyser (tcpdump on the command line, ethereal from a gui) to see what exactly the cable modem is sending you - you may be able to work something out from that. Sorry if that isn't much help.
_________________
Well, the Sister was right. You boys could use a little churching up. Slide on down to the Triple Rock, and catch Rev. Cleophus. You boys listen to what he's got to say.

-- Curtis
Back to top
View user's profile Send private message
andrewy
l33t
l33t


Joined: 07 Apr 2004
Posts: 602

PostPosted: Sat Dec 10, 2005 4:53 pm    Post subject: Reply with quote

morodoch wrote:

The only thing I could suggest is to run a packet analyser (tcpdump on the command line, ethereal from a gui) to see what exactly the cable modem is sending you - you may be able to work something out from that. Sorry if that isn't much help.


I'll try that, thanks. It has only started happening within the last 6 months or so too, which is strange. They did upgrade their lines (5mbit instead of 3 :D), I think it started happening around that time.

I'm hoping that someone else has had this problem before, I guess I'll just have to wait and see.
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sat Dec 10, 2005 5:22 pm    Post subject: Reply with quote

Some cable modem systems provision the service based on MAC address. Stick the Windows NIC into the Linux machine if that's an option or just get them to reprovision based on the Linux machine's MAC.
Back to top
View user's profile Send private message
andrewy
l33t
l33t


Joined: 07 Apr 2004
Posts: 602

PostPosted: Sat Dec 10, 2005 5:32 pm    Post subject: Reply with quote

magic919 wrote:
Some cable modem systems provision the service based on MAC address. Stick the Windows NIC into the Linux machine if that's an option or just get them to reprovision based on the Linux machine's MAC.


I don't think this is the problem because I've used the "ifconfig eth0 hw ether <mac address here>" command to set my linux mac to that of the windows computer.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum