Networking Forums

Networking Forums > Computer Networking > Linux Networking > Multiple default routes

Reply
Thread Tools Display Modes

Multiple default routes

 
 
j-k-l@mail.ru
Guest
Posts: n/a

 
      04-09-2008, 11:20 AM
Greetings to all
I try to make two default routes through one gateway server, but using
different interfaces.
It is possible?

#ip addr
2: eth0: inet 192.168.161.7/24 brd 192.168.161.255 scope global eth0
3: eth1: inet 192.168.161.4/24 brd 192.168.161.255 scope global eth1

#ip route
192.168.161.0/24 dev eth1 proto kernel scope link src 192.168.161.4
default via 192.168.161.1 dev eth1

#ip rule
0: from all lookup local
32765: from 192.168.161.7 lookup src7
32766: from all lookup main
32767: from all lookup default

#ip route list table src7
192.168.161.0/24 dev eth0 proto kernel scope link src 192.168.161.7

#ip route add default via 192.168.161.1 dev eth0 table src7
RTNETLINK answers: No such process

but,
#ip route add default via 192.168.161.1 dev eth1 table src7
works, but it is necessary use eth0

or simple

# ip route
# ip route list table local
broadcast 192.168.161.255 dev eth1 proto kernel scope link src
192.168.161.4
broadcast 192.168.161.255 dev eth0 proto kernel scope link src
192.168.161.7
broadcast 127.255.255.255 dev lo proto kernel scope link src
127.0.0.1
broadcast 192.168.161.0 dev eth1 proto kernel scope link src
192.168.161.4
broadcast 192.168.161.0 dev eth0 proto kernel scope link src
192.168.161.7
local 192.168.161.4 dev eth1 proto kernel scope host src
192.168.161.4
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 192.168.161.7 dev eth0 proto kernel scope host src
192.168.161.7
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
# ip route list default
# ip route add 192.168.161.0/24 dev eth1 src 192.168.161.4 table src4
# ip route list table src4
192.168.161.0/24 dev eth1 scope link src 192.168.161.4
# ip route add default via 192.168.161.1 table src4
RTNETLINK answers: No such process

why? i surrender...
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question: IPROUTES2 Multiple default routes restricted to specificNICs zedkay Linux Networking 2 12-24-2010 08:24 AM
Multiple default routes - sorting by interface priority =?UTF-8?B?TGFzc2UgS8Okcmtrw6RpbmVuIC8gVHJvbmlj?= Linux Networking 2 03-05-2006 11:02 AM
Multiple default routes on multiple interfaces t_pascal@my-deja.com Linux Networking 3 07-07-2005 03:28 PM
redundant default routes? Jay McCanta Linux Networking 1 10-11-2004 01:15 PM
Multiple default routes Kool Breeze Linux Networking 5 12-04-2003 01:41 AM



1 2 3 4 5 6 7 8 9 10 11