Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Multiple default routes

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2008, 12:20 PM
Default Multiple default routes



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


j-k-l@mail.ru
Reply With Quote
Reply

Tags
default, multiple, routes

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


All times are GMT. The time now is 03:57 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.