How to have custom names instead of numbers for routing tables

Solution Verified - Updated -

Issue

If some custom routing table is specified via the ip command, only number for this table is possible to put down to the ip command itself as the table ID.

Use of routing table number as ID:

# ip r add default via  xxx.xxx.xxx.xxx dev ethX table 10
# ip r show table 10
default via xxx.xxx.xxx.xxx dev ethX

Use of routing table string as ID:

# ip r add default via  xxx.xxx.xxx.xxx dev ethX table my_table
Error: argument "my_table" is wrong: "table" value is invalid

Environment

RHEL-7
iproute-4.11.0-14.el7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content