Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 5
    one correction (but not sure if your one will also work. for the second command: ip route add default dev eth4 table <name> (table directive should go at the end I think, just like in the first command... also default can be replaced by a subnet, just like in your example)
    – Alex
    Commented Jan 12, 2012 at 2:23
  • I had to issue these commands in reverse order: 1st sudo ip route add default via <router-addr> dev <device-name> table <table-id>, 2nd sudo ip rule add from <source-addr>/<mask> lookup <table-id>. I think the 1st one creates the table and the 2nd adds a line to it, so the reverse order shouldn't work.
    – kol
    Commented Aug 11, 2022 at 9:38