0

I have the following commands and outputs Here are my current commands (this work fine on RHEL system but not on ubuntu)

ip route add default via 10.1.1.1 dev eth0 tab 1
ip route add default via 10.1.1.1 dev eth1 tab 2
ip route add default via 10.1.1.1 dev eth2 tab 3
ip route add default via 10.1.1.1 dev eth3 tab 4
ip route add default via 10.1.1.1 dev eth4 tab 5
ip rule add from 10.1.1.13/32 tab 1 priority 500
ip rule add from 10.1.1.31/32 tab 2 priority 600
ip rule add from 10.1.1.35/32 tab 3 priority 700
ip rule add from 10.1.1.36/32 tab 4 priority 800
ip rule add from 10.1.1.39/32 tab 5 priority 900

and here are the results of these commands(which is not doing exactly what i want)

ip route show

default via 10.1.1.1 dev eth0
10.1.1.0/24 dev eth0  proto kernel  scope link  src 10.1.1.13
10.1.1.0/24 dev eth1  proto kernel  scope link  src 10.1.1.31
10.1.1.0/24 dev eth2  proto kernel  scope link  src 10.1.1.35
10.1.1.0/24 dev eth3  proto kernel  scope link  src 10.1.1.36
10.1.1.0/24 dev eth4  proto kernel  scope link  src 10.1.1.39

ip rule show

0:  from all lookup local
500:    from 10.1.1.13 lookup 1
600:    from 10.1.1.31 lookup 2
700:    from 10.1.1.35 lookup 3
800:    from 10.1.1.36 lookup 4
900:    from 10.1.1.39 lookup 5
32766:  from all lookup main
32767:  from all lookup default

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.1.1.1      0.0.0.0         UG    0      0        0 eth0
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth0
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth1
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth2
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth3
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth4

BUT here is what i want it to be

ip route show

default via 10.1.1.1 dev eth0
default via 10.1.1.1 dev eth1
default via 10.1.1.1 dev eth2
default via 10.1.1.1 dev eth3
default via 10.1.1.1 dev eth4
10.1.1.0/24 dev eth0  proto kernel  scope link  src 10.1.1.13
10.1.1.0/24 dev eth1  proto kernel  scope link  src 10.1.1.31
10.1.1.0/24 dev eth2  proto kernel  scope link  src 10.1.1.35
10.1.1.0/24 dev eth3  proto kernel  scope link  src 10.1.1.36
10.1.1.0/24 dev eth4  proto kernel  scope link  src 10.1.1.39

ip rule show

0:  from all lookup local
500:    from 10.1.1.13 lookup 1
600:    from 10.1.1.31 lookup 2
700:    from 10.1.1.35 lookup 3
800:    from 10.1.1.36 lookup 4
900:    from 10.1.1.39 lookup 5
32766:  from all lookup main
32767:  from all lookup default

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.1.1.1      0.0.0.0         UG    0      0        0 eth0
0.0.0.0         10.1.1.1      0.0.0.0         UG    0      0        0 eth1
0.0.0.0         10.1.1.1      0.0.0.0         UG    0      0        0 eth2
0.0.0.0         10.1.1.1      0.0.0.0         UG    0      0        0 eth3
0.0.0.0         10.1.1.1      0.0.0.0         UG    0      0        0 eth4
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth0
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth1
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth2
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth3
10.1.1.0      0.0.0.0         255.255.0.0     U     0      0        0 eth4

So what command on UBUNTU 16.04 LTS can i run that will make me add more default routes?

NOTE: Again this is called asymmetrical routing on linux and here are people that have it work or need this time of routing as well

1 https://ubuntuforums.org/showthread.php?t=2135343

2 https://forums.aws.amazon.com/message.jspa?messageID=404398

3 http://www.linuxjournal.com/article/7291?page=0,0

uberrebu
  • 493
  • 5
  • 15
  • 32
  • There can only be one default route. Hence the name "default". – Gerald Schneider Jan 21 '18 at 09:12
  • not true this works in RHEL very well and multiple default routes also check this https://ubuntuforums.org/showthread.php?t=2135343&p=12603718#post12603718 – uberrebu Jan 21 '18 at 09:15
  • i have done this on RHEL 7 and works perfect and the output am looking for is what i have seen work on RHEL 7 which ubuntu has refused to allow to work..this is called **asymmetrical routing** – uberrebu Jan 21 '18 at 09:16

0 Answers0