Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DHCP works through hub, but not directly through router
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Mon Feb 28, 2005 8:14 pm    Post subject: DHCP works through hub, but not directly through router Reply with quote

I have had my computer's network cable plugged into a hub, which is plugged into a router which is plugged into another router which is plugged into a cable modem. Now I want to plug my computer into the other router, and found that if I plug my computer directly into either router, DHCP does not work. I get
Code:
Bringing up eth0 via DHCP...
then hangs for a while, and finally does [!!]. I have tried configuring my network setting manually and not using the DHCP server and I can connect, but I have bad packet loss. If my computer is plugged into the hub, no problems. I have a Via Rhine network card; one router is a Dlink, and the other is a Netgear. Thanks for any help.
_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54850
Location: 56N 3W

PostPosted: Mon Feb 28, 2005 9:59 pm    Post subject: Reply with quote

Larry The Cow,

Routers do not normally forward DHCP broadcast requests but they can usually be configured to do so.
How are your routers managed?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Tue Mar 01, 2005 2:17 am    Post subject: Reply with quote

The router is configured for DHCP, another computer (running Fedora Core) connects via DHCP fine.
_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Tue Mar 01, 2005 6:58 pm    Post subject: Reply with quote

No one knows? :(
_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Mar 01, 2005 7:17 pm    Post subject: Reply with quote

Hi,

did you try different settings for your NIC already?
check with ethtool and/or mii-tool

shoot in the dark:
your router is only capable of 10MB halfduplex and your NIC is set for 100MB fullduplex (or any other non working combination)

HTH
T.
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Tue Mar 01, 2005 7:42 pm    Post subject: Reply with quote

If I have my network up (through the hub) and then run mii-tool, I get:
Code:
eth0: no autonegotiation, 10baseT-HD, link ok
then when I switch to the router (without restarting eth0), I get:
Code:
eth0: negotiated 100baseTx-FD, link ok
I'm not quite sure what that tells me... How would I set my NIC to the correct duplex? I do not have much experience with network configuration in linux.
_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Tue Mar 01, 2005 7:49 pm    Post subject: Reply with quote

That basically means that your hub is broken...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54850
Location: 56N 3W

PostPosted: Tue Mar 01, 2005 7:53 pm    Post subject: Reply with quote

j-m,

Quote:
That basically means that your hub is broken...

Err, no. Hubs, unlike switches and routers have no internal storage and send all traffic to every port.
This prevents hubs from operating in full duplex mode.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Tue Mar 01, 2005 7:56 pm    Post subject: Reply with quote

NeddySeagoon wrote:

Err, no. Hubs, unlike switches and routers have no internal storage and send all traffic to every port.
This prevents hubs from operating in full duplex mode.


I´m not talking about HD/FD, I am talking about the fact that it is only 10Mbps (10baseT-HD)... Or if that is a feature and the hub is really only 10Mbit, I would definitely ditch it and get myself some switch. You can have a decent one for $20 and it does much better job... :wink:
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Tue Mar 01, 2005 8:05 pm    Post subject: Reply with quote

j-m wrote:
NeddySeagoon wrote:

Err, no. Hubs, unlike switches and routers have no internal storage and send all traffic to every port.
This prevents hubs from operating in full duplex mode.


I´m not talking about HD/FD, I am talking about the fact that it is only 10Mbps (10baseT-HD)... Or if that is a feature and the hub is really only 10Mbit, I would definitely ditch it and get myself some switch. You can have a decent one for $20 and it does much better job... :wink:


That is all good and well; but right now my problem is that the network does work through the hub, and doesn't work directly through the router. So my problem is not with the hub.
_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Tue Mar 01, 2005 8:07 pm    Post subject: Reply with quote

Larry The Cow wrote:

That is all good and well; but right now my problem is that the network does work through the hub, and doesn't work directly through the router. So my problem is not with the hub.


Which router? Sorry, this is a terrible mess. The first router, the second router, or both routers? :?
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Tue Mar 01, 2005 8:31 pm    Post subject: Re: DHCP works through hub, but not directly through router Reply with quote

Larry The Cow wrote:
...Now I want to plug my computer into the other router, and found that if I plug my computer directly into either router, DHCP does not work...
The network does not work through either router, only through the hub (which is plugged into the Dlink router).

Code:
GentooBox(and others)---------hub-------Dlink--------Netgear-------Internet (ok)

Code:

Other Computers-------hub-------Dlink-----Netgear-----Internet
                                  |
                                  |
                               GentooBox                             (bad)

Code:

Other Computers-------hub-------Dlink-----Netgear-----Internet
                                             |
                                             |
                                          GentooBox                   (bad)

_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Tue Mar 01, 2005 8:34 pm    Post subject: Reply with quote

One more question - which one of those is the DHCP server? :oops:
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Tue Mar 01, 2005 8:37 pm    Post subject: Reply with quote

Both routers are configured to be DHCP servers.
_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Tue Mar 01, 2005 8:40 pm    Post subject: Reply with quote

Larry The Cow wrote:
Both routers are configured to be DHCP servers.


Now it makes even less sense. Are you sure, that these devices are capable of running like "master"/"slave" DHCP server? Also, from the scheme, DHCP is usually running only on one router interface, not on all of them...

:? :?:
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Tue Mar 01, 2005 8:44 pm    Post subject: Reply with quote

They have different IP ranges, I believe this should work.
_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Tue Mar 01, 2005 8:47 pm    Post subject: Reply with quote

Also, as I mentioned above, all of this works fine with another computer.
_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Tue Mar 01, 2005 8:49 pm    Post subject: Reply with quote

It don´t think I will be able to solve this. Some basic troubleshooting would probably include disabling one of the DHCP servers and simplifying things in general. It is extremely difficult to troubleshoot such complex configuration. Turn both routers off to flush ARP tables. Try only the first router via hub and without hub, only the second router, etc. This is a real mess, sorry.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Tue Mar 01, 2005 8:54 pm    Post subject: Reply with quote

Larry The Cow wrote:
Both routers are configured to be DHCP servers.

Why? Why do you have both routers as a DHCP server?

Can you explain your entire network a little clearer and why you are using the two routers? This would help tremendously in solving this problem.

A couple things:

Devices such as your router usually have an option to act as a router or gateway; can you see what yours are set at.

When connecting the 2 routers did you use the uplink port on the routers or just have the second one acting like a dhcp client of the first?

All a hub does is repeat the signal, so it seems odd that when connecting your Gentoo box through the hub your receive DHCP info, but removing the hub you don't receive any DHCP info. Are you connecting into the same ethernet port on the router as when the hub was connected?

You aren't plugging into any uplink ports on the router?

I would really like more info on why 2 DHCP servers, if you explain your reasoning better I think we can find a better more appropriate arrangement.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54850
Location: 56N 3W

PostPosted: Tue Mar 01, 2005 8:55 pm    Post subject: Reply with quote

Larry The Cow,

Post the router DHCP setups. I need to know the IP ranges served, the network addresses and the gateway address.
The output of the route command from one of the PCs connected to the hub will be useful too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ARC2300
Apprentice
Apprentice


Joined: 30 Mar 2003
Posts: 267

PostPosted: Tue Mar 01, 2005 11:40 pm    Post subject: Reply with quote

We had a similar problem in the dorms at Uni. Sometimes the routers really, really screw up DHCP for one reason or another on the router the next level up. Some comps work fine, others totally bomb out.

Just curious, but why are you running two routers in tandem anyways??
_________________
It's fun to take a trip
Put acid in your veins
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Wed Mar 02, 2005 7:07 pm    Post subject: Reply with quote

http://home.comcast.net/~jeh3pe/Network.png

The reason I have two routers is because I want two levels of security, because I want to open ports on the NetGear router so I can have servers and such in group A (see link). But I want computers in groups B and C to be secure, even if a hacker got through the NetGear router. The computers in group A are blocked from group B and C by the Dlink router, but groups B and C can access group A. The problem is that my Gentoo box's network only works in group C. I hope this clears things up a bit.
_________________
-Larry The Cow


Maybe Today!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54850
Location: 56N 3W

PostPosted: Wed Mar 02, 2005 7:59 pm    Post subject: Reply with quote

Larry The Cow,

You want a proper firewall. Routers are no protection against crackers at all. The firewalls they contain are normally out of date because noone bothers to update the firmware.

Replace buth your routers with an old PC running Smoothwall or IPCop. A P1 will be plenty.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Wed Mar 02, 2005 9:15 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Larry The Cow,

You want a proper firewall. Routers are no protection against crackers at all. The firewalls they contain are normally out of date because noone bothers to update the firmware.

Replace buth your routers with an old PC running Smoothwall or IPCop. A P1 will be plenty.

I second what NeddySeagoon says and I have done the same myself.

I found the "personal" hardware routers just don't cut it and are quite inflexible. I ditched them.
I picked up a complete dual Pentium II system for only $30 on ebay and its working great.

You could still try the way you mentioned, but I don't think its worth the effort.
I am at a loss still as to why the hub would make a difference unless the hub has an uplink port and the cable connecting it to the router was actually as crossover cable. (So using the same cable to the computer wouldn't work)
Back to top
View user's profile Send private message
Larry The Cow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2005
Posts: 99

PostPosted: Thu Mar 03, 2005 2:51 am    Post subject: Reply with quote

All this advice is very nice, but right now I am slightly more interested in solving my problem then improving my setup. And as I mentioned twice already, another computer running Fedora Core will connect to either router, and it has almost exactly the same hardware. So this is almost certainly a software issue.
_________________
-Larry The Cow


Maybe Today!
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
Goto page 1, 2  Next
Page 1 of 2

 
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