View previous topic :: View next topic |
Author |
Message |
aminm n00b
Joined: 01 May 2004 Posts: 10
|
Posted: Sun Jul 11, 2004 6:01 pm Post subject: Multihomed PC change default i |
|
|
Hi
I have a system with three ethernet interfaces (eth0,1,2) using the same subnet ip addresses (I know it's weird but here it goes).
eth0 217.116.216.3 down
eth1 217.116.216.4 up
eth2 217.116.216.5 up
netmask 255.255.255.0
Gateway 217.116.216.1
The problem is that right now eth0 is down and I want to use eth1 to point to default gateway, using:
Code: |
route del default gw 217.116.216.1 netmask 255.255.255.0 eth0
route add default gw 217.116.216.1 netmask 255.255.255.0 eth1
|
Pinging the gateway is OK, however, I can't reach beyond the gateway:
Code: |
ping 216.109.127.29
Connect: Network is unreachable
|
Here's the routing table output:
Code: |
Destination Gateway Genmask Flags ... Iface
default 217.116.216.1 255.255.255.0 UG eth2
217.116.216.0 * 255.255.255.0 U eth2
217.116.216.0 * 255.255.255.0 U eth1
loopback localhost 255.0.0.0 UG lo
|
What's the problem ? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54831 Location: 56N 3W
|
Posted: Sun Jul 11, 2004 7:52 pm Post subject: |
|
|
aminm,
default needs to be the last routing rule applied it matches anything. Just now, every packet is being sent via eth2.
Exactly why do you need these interfcaes on the same subnet?
Even if you get it to work, taht way lies madness. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
nobspangle Veteran
Joined: 23 Mar 2004 Posts: 1318 Location: Manchester, UK
|
Posted: Sun Jul 11, 2004 9:11 pm Post subject: |
|
|
NeddySeagoon wrote: |
Exactly why do you need these interfcaes on the same subnet?
Even if you get it to work, taht way lies madness. |
I agree, if you need more than 1 IP address on the same subnet, just use an alias. |
|
Back to top |
|
|
aminm n00b
Joined: 01 May 2004 Posts: 10
|
Posted: Mon Jul 12, 2004 11:06 am Post subject: |
|
|
It's just kinda trial-and-error.
The whole issue seems resolved. I don't know why it didn't work at the first go. May be a sleepless night, or crazy gentoo or both!
Thanks anyway |
|
Back to top |
|
|
|