0

After restarting network/rebooting the server, the default gateway IP address is also getting added as a route Destination in RHEL7. How can I prevent this? We have not specified this setting and not sure how RHEL is picking up and adding this in the route table.

[root@server1 ~]$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.23.100.1    0.0.0.0         UG    300    0        0 bond0
0.0.0.0         172.23.100.1    0.0.0.0         UG    301    0        0 bond1
172.23.100.0    0.0.0.0         255.255.255.0   U     300    0        0 bond0
172.23.100.1    0.0.0.0         255.255.255.255 UH    301    0        0 bond1
172.23.130.23   0.0.0.0         255.255.255.255 UH    301    0        0 bond1

I dont want the last but one entry with Destination "172.23.100.1" to be present in the route table. Can someone please help me here?

alexander.polomodov
  • 1,068
  • 3
  • 10
  • 14

1 Answers1

0

The real problem is not the route you are speaking about; rather, you have two bond interfaces (bond0 and bond1) on the same network and both with a default gateway specified.

This setup is generally discouraged, as:

  • only one logical interface (ie: a single bond) should be on a given network segment;
  • only one gateway should exists.

I strongly suggest you to correct the above issues.

shodanshok
  • 47,711
  • 7
  • 111
  • 180
  • I would add that combining all of the interfaces forming the two bonds is likely the right solution to this problem. – Tomek Oct 03 '18 at 18:26