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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.