This isn't specific to Raspberry Pi. Anyway, I'm not sure if I understand what you mean. The items gateway, interface, metric, flag
etc. are not simply labels on a table. They are properties of the routing mechanism. And what routing table do you mean? Mine has no labels:
rpi3 ~$ ip route
default via 192.168.10.2 dev vlan10 proto static
192.168.7.0/24 dev vlan7 proto kernel scope link src 192.168.7.1
192.168.10.0/24 dev vlan10 proto kernel scope link src 192.168.10.1
192.168.20.0/24 dev vlan20 proto kernel scope link src 192.168.20.1
For using VLAN you have to specify what VLANs your interface is connected to
rpi3 ~$ ip addr # stripped to relevant info
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:1c:38:55 brd ff:ff:ff:ff:ff:ff
3: vlan20@ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 52:54:00:1c:38:55 brd ff:ff:ff:ff:ff:ff
inet 192.168.20.1/24 brd 192.168.20.255 scope global vlan20
4: vlan10@ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 52:54:00:1c:38:55 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.1/24 brd 192.168.10.255 scope global vlan10
inet 192.168.10.10/24 brd 192.168.10.255 scope global secondary vlan10
5: vlan7@ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 52:54:00:1c:38:55 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.1/24 brd 192.168.7.255 scope global vlan7
and then you can route to the Virtual LANs
like with normal interfaces. Look at my routing table. That's how routing to VLANs work.
For showing the routing table with old style route
it isn't possible to add a column labeled "VLAN" but it isn't needed. The vlanX
is shown in column "Iface". VLANs
have normal (virtual) interfaces:
rpi3 ~$ sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.10.2 0.0.0.0 UG 0 0 0 vlan10
192.168.7.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan7
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan10
192.168.20.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan20