Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
using 2 network interfaces
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
jeanluca
Apprentice
Apprentice


Joined: 08 Jan 2005
Posts: 179

PostPosted: Wed Dec 28, 2005 8:55 pm    Post subject: using 2 network interfaces Reply with quote

Hi All

I've a computer with 2 network interfaces, below is what I get when I run route:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.255.255.0   U     0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 ath0
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         10.0.0.2        0.0.0.0         UG    0      0        0 eth0

My question is how does my computer know which gateway to use for http://www.google.com ?
I ask this because they have the same Genmask (same as netmask ?) ?
And how do I set the default gateway (automatic)?
or maybe there is someone some other usefull stuff ??

Thanks a lot in advance
Luca
Back to top
View user's profile Send private message
ewtrowbr
Apprentice
Apprentice


Joined: 08 May 2004
Posts: 153
Location: Columbus, OH

PostPosted: Wed Dec 28, 2005 9:08 pm    Post subject: Reply with quote

The default gateway is described in the entry where 'destination' = default. The Gateway is described as 10.0.0.2 or this entry.

Genmask is like a netmask, and describes the shape of the destination subnet. Since the default route leads everywhere, the subnet mask is 0.0.0.0. In general, a tcpip system will always route to the longest mask (most full netmask) it has available. 0.0.0.0 is usually the route of last resort.

gateway is defined in /etc/conf.d/net. The syntax for setting a default gateway is in the net.example file. The syntax looks like this...

routes_eth0=(
"default via 65.208.203.145"
)

gl,
erich
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Dec 28, 2005 9:10 pm    Post subject: Reply with quote

jeanluca,

It uses the defualt gateway to find google.
This is either defined by your dhcp server or in your /etc/conf.d/net file
_________________
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
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