On Ubuntu 14.04.

I need to route the traffic to specific IP ranges though a specific interface.

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 eth2   U     0      0        0 eth2   U     0      0        0 eth3   U     0      0        0 eth4

I need the following: - => Route through "eth3" - => Route through "eth4"

Must also persist when server restarts.

Any help please?

  • Your routing table is set up correctly. This looks like the routes has been already set up by just adding the IPs from those subnets on correct interfaces. Perhaps there is a different issue with your setup?
    – Fox
    Apr 25 '15 at 18:21
  • When configuring an interface, a subnet route is added to the kernel routing table at the same time. There is no need to add any routes. Apr 26 '15 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.