Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Network route
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
RedScull
n00b
n00b


Joined: 30 Oct 2004
Posts: 25

PostPosted: Tue Nov 23, 2004 3:09 am    Post subject: Network route Reply with quote

I'm kinda new at this, and I just got wireless set up, but I'm having problems.

I'm using baselayout, and I have my ethernet configured to eth0 and wireless configured to eth1.

When I boot up and I'm at work (so there's a wireless network to log into) both eth0 and eth1 load, but then programs seem to use the wireless network as a primary connection. When I type route with no parameters I get the following:

Code:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
202.28.249.128  *               255.255.255.128 U     0      0        0 eth0
10.40.0.0       *               255.255.0.0     U     0      0        0 eth1
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         10.40.0.1       0.0.0.0         UG    0      0        0 eth1
default         202.28.249.131  0.0.0.0         UG    0      0        0 eth0



I'm just wondering how to get things to use ethernet if it's available, since it's a ton faster since the servers that I use are on the same network.

The other problem I have is if I boot up, and wireless isn't available. eth1 fails, which is to be expected, but then apache2 and bttrack both fail as well, but eth0 is still there! I would have thought that they would use net.lo, but maybe they get configured to a specific network device? Before I set up wireless they both worked fine on my ethernet card.

Thanks for any help!

Iain
Back to top
View user's profile Send private message
Raffi
l33t
l33t


Joined: 17 Mar 2003
Posts: 731
Location: Moscow, Id.

PostPosted: Tue Nov 23, 2004 2:14 pm    Post subject: Reply with quote

You have a default route set on both eth0 and eth1. What does your /etc/conf.d/net file look like?
Back to top
View user's profile Send private message
RedScull
n00b
n00b


Joined: 30 Oct 2004
Posts: 25

PostPosted: Tue Nov 23, 2004 3:44 pm    Post subject: Reply with quote

to summarise (removing all the commented lines and stuff):

my /etc/conf.d/net file:
Code:
ifconfig_eth0=("202.28.249.208 netmask 255.255.255.128")
routes_eth0=("default gw 202.28.249.131")


my /etc/conf.d/wireless file:
Code:

associate_test_eth1="quality"
ifconfig_CMU1=("dhcp")
dhcpcd_CMU1="-t 5"
ifconfig_cmu=("dhcp")
dhcpcd_cmu="-t 5"
preferred_aps=("cmu" "CMU1")


I have just realised that when I stop net.eth1, apache2 and bttrack stop, but when I try to start apache2 or bttrack again, it starts up eth1
Back to top
View user's profile Send private message
Raffi
l33t
l33t


Joined: 17 Mar 2003
Posts: 731
Location: Moscow, Id.

PostPosted: Tue Nov 23, 2004 3:52 pm    Post subject: Reply with quote

I have not used /etc/conf.d/wireless. I've always done wireless my own way. However, neither file explains why you have a default route on eth1, unless your wireless is actually receiving a dhcp response that is setting it.

Are you receiving a dhcp response on your wireless card?
Back to top
View user's profile Send private message
xymanuel
n00b
n00b


Joined: 02 Nov 2004
Posts: 4

PostPosted: Tue Nov 23, 2004 9:45 pm    Post subject: Reply with quote

I'm wondering you have 2 default gateways..
With 2 defaultgatways in your Routing tabel nothing will work well i think.
If you want to Route all your Traffic to the Ethernetinterface (eth0), the default route have to point there.
If your eth1 is up you still need only one default route, or nothing will work.
Try an:
#route del default gw 10.40.0.1 0.0.0.0 (hm with or without the mask)
Then things will work fine.
All Traffic will go now to the default gw which is eth0. And all Traffic with Destination IP 10.40.0.0 255.255.0.0 will go to the eth1 Wlan.

Greets
Back to top
View user's profile Send private message
RedScull
n00b
n00b


Joined: 30 Oct 2004
Posts: 25

PostPosted: Wed Nov 24, 2004 6:07 am    Post subject: Reply with quote

so then what would happen should eth0 be unavailable, would traffic then get routed through eth1? or would I have to add eth1 as the default gateway?
Back to top
View user's profile Send private message
Raffi
l33t
l33t


Joined: 17 Mar 2003
Posts: 731
Location: Moscow, Id.

PostPosted: Wed Nov 24, 2004 3:27 pm    Post subject: Reply with quote

There needs to be only one default route (though the last one defined will probably take precedence) and the interface with the default route needs to be up and responding. Since there is no wireless at your work, the fact that your wireless is brought up with dhcp seems odd. The fact that dhcp is giving you a default route is probably your problem.
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