Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LAN dhcpd server on eth0 stops internet on eth1 [Solved]
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
feynman
n00b
n00b


Joined: 25 Nov 2011
Posts: 13

PostPosted: Mon Nov 28, 2011 3:00 am    Post subject: LAN dhcpd server on eth0 stops internet on eth1 [Solved] Reply with quote

I have been following the diskless node and home router guides, and the eth0 server works just fine. However I cannot connect to the internet from eth1 (it is as though the ethernet cable is not connected.) Here is an odd clue:
I can get internet on eth1 if I bring eth0 down and up again.

I have:
interface eth1 (along with the defaults) in my dhcpcd.conf file
In my dhcpd.conf file
192.168.1.1 as my router and domain-name-server
"cluster" as my domain name
and ddns-update-style is none

My subnet is 192.168.1.0 and netmask is 255.255.255.0

DHCPD_IFACE="eth0" in my dhcpd file

my net file looks like this:
config_eth0="192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0" )
routes_eth0="default via 192.168.1.1"
dns_domain_eth0="cluster"
config_eth1="dhcp"

I have net.eth1 and net.eth0 loaded in default during boot. So it seems that if I made sure eth1 went up before eth0 everything would be fine. That still seems strange, and I think I must be missing some setting. If nothing else, I would like to know why this is necessary.

Thanks


Last edited by feynman on Wed Nov 30, 2011 8:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 418
Location: San Diego, California USA

PostPosted: Mon Nov 28, 2011 6:25 am    Post subject: Reply with quote

Take out the "default via 192.168.1.1" route. Just remove the whole line. It isn't correct. That says "for any IP address I don't have a direct route to, send it out via 192.168.1.1". That isn't what you want, you want "default" to go out the Internet interface that's handled by dhcpcd. It will set the default route.
Back to top
View user's profile Send private message
feynman
n00b
n00b


Joined: 25 Nov 2011
Posts: 13

PostPosted: Mon Nov 28, 2011 2:26 pm    Post subject: Reply with quote

Ok, I will give that a try when I get back home. If the line:
routes_eth0="default via 192.168.1.1"
It seems odd to me that a setting for "_eth0" influences eth1. How does that work? How is routes_eth0="stuff" different from routes_eth1="stuff"? Also, if I do set routes_ethN="stuff", does that always mean that setting config_ethM="dhcp" will not do anything?

I figure that as long as my desktop is inaccessible, I might as well take some time to better understand my setup.
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 418
Location: San Diego, California USA

PostPosted: Mon Nov 28, 2011 6:00 pm    Post subject: Reply with quote

Because normally you should have exactly one 'default' route on your machine. But your configuration made 2 default routes: the one the DHCP client will set up on eth1 and the incorrect one you hard-coded for eth0. Depending on the order that the interfaces come up, your outgoing Internet packets will either go down the incorrect default route on eth0 or the correct route on eth1. By cycling eth0 you potentially change the order of the 2 default routes and your network appears to work again.

If all you want is 192.168.1.0/24 traffic to do down eth0 (which is what I'm guessing you want), then you don't need to add any routes_eth0 entry to the config file. The correct route will get added automatically.

I predict the next issue you will face has to do with domain name resolution...
Back to top
View user's profile Send private message
feynman
n00b
n00b


Joined: 25 Nov 2011
Posts: 13

PostPosted: Tue Nov 29, 2011 1:15 am    Post subject: Reply with quote

Thank you. That worked just fine. I get internet and my client computer gets dhcp.

Quote:
I predict the next issue you will face has to do with domain name resolution...


Ok, I will bite--what else am I doing wrong?
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