View previous topic :: View next topic |
Author |
Message |
jeanluca Apprentice
Joined: 08 Jan 2005 Posts: 179
|
Posted: Wed Dec 28, 2005 8:55 pm Post subject: using 2 network interfaces |
|
|
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 |
|
|
ewtrowbr Apprentice
Joined: 08 May 2004 Posts: 153 Location: Columbus, OH
|
Posted: Wed Dec 28, 2005 9:08 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54790 Location: 56N 3W
|
Posted: Wed Dec 28, 2005 9:10 pm Post subject: |
|
|
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 |
|
|
|