Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Multihomed PC change default i
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
aminm
n00b
n00b


Joined: 01 May 2004
Posts: 10

PostPosted: Sun Jul 11, 2004 6:01 pm    Post subject: Multihomed PC change default i Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jul 11, 2004 7:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Sun Jul 11, 2004 9:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
aminm
n00b
n00b


Joined: 01 May 2004
Posts: 10

PostPosted: Mon Jul 12, 2004 11:06 am    Post subject: Reply with quote

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
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