Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Routing between virtual 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
comper2004
n00b
n00b


Joined: 18 Jul 2011
Posts: 2

PostPosted: Mon Jul 18, 2011 12:04 pm    Post subject: Routing between virtual interfaces Reply with quote

My ISP is migrating me to a new IP block. I have two sets of disjoint addresses:

Code:
    10.0.0.xxx gw 10.0.0.1 (netmask 255.255.255.0)
    10.10.0.xxx gw 10.10.0.1 (netmask 255.255.255.0)


They are providing a migration path that means that we can keep working without downtime, but it does mean we have to configure our machines to deal with two gateways. With two interfaces (eth0 and eth1), I can use the following iproute2 setup with addresses 10.0.0.44 and 10.10.0.55 respectively:

Code:
    ip route add 10.0.0.1/32 dev eth0 src 10.0.0.44 table oldgw
    ip route add default via 10.0.0.1 table oldgw
    ip rule add from 10.0.0.44 table oldgw

    ip route add 10.10.0.1/32 dev eth1 src 10.10.0.55 table newgw
    ip route add default via 10.10.0.1 table newgw
    ip rule add from 10.10.0.55 table newgw


I have another machine with only one interface. The above trick does not appear to work with virtual interfaces (eth0:xx). Is there a workaround ?
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 911
Location: Switzerland

PostPosted: Wed Jul 20, 2011 10:18 am    Post subject: Reply with quote

Hi,

Have a look here... https://forums.gentoo.org/viewtopic-t-834203.html :wink:

HTH, Cheers
_________________
Power to the people!
Back to top
View user's profile Send private message
comper2004
n00b
n00b


Joined: 18 Jul 2011
Posts: 2

PostPosted: Wed Jul 20, 2011 10:43 am    Post subject: Reply with quote

Duh! Why didn't I spot that post before! Sorry for posting something samey and thanks for your help :)
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 911
Location: Switzerland

PostPosted: Wed Jul 20, 2011 2:26 pm    Post subject: Reply with quote

Don't worry... the forum-search could really be better and as long as i remember my own posts here and do not have to explain something twice because of it, it's not an issue! :lol:
_________________
Power to the people!
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