Command Line Reference
Layer 3 Configuration
VRF
12 min
vrf view vrf view table 1 vrf view table 1 vrf view command purpose show vrf brief display vrf configuration show vrf interface display the binding relationship between vrfs and interfaces show interface mgmt vrf display vrf configuration of management port show vrf brief show vrf brief \[command] show vrf brief \[purpose] display vrf configuration \[view] privileged user view \[use cases] sonic# show vrf brief + + + + \| vrf name | vni | src mac | +============+=======+===========+ \| 100 | | | + + + + \| 101 | | | + + + + \| 200 | 2000 | | + + + + show vrf interface show vrf interface \[command] show vrf interface \[purpose] display the binding relationship between vrfs and interfaces \[view] privileged user view \[use cases] sonic# show vrf interface + + + \| vrf name | interfaces | +============+==============+ \| 200 | vlan 227 | \| | vlan 237 | + + + \| 101 | loopback 1 | + + + show interface mgmt vrf show interface mgmt vrf \[command] show interface mgmt vrf \[purpose] display vrf configuration of management port \[view] privileged user view \[use cases] sonic# show interface mgmt vrf managementvrf disabled vrf config vrf config table 2 vrf config table 2 vrf config command purpose vrf mgmt set the vrf of mgmt vrf vrf name (global configuration view) (global configuration view) create a vrf vrf vrf name (interface view) (interface view) bind the interface to the vrf mac hh\ hh\ hh\ hh\ hh\ hh configure the mac address of vrf ip route a b c d/m a b c d add routes for vrfs vrf mgmt vrf mgmt \[command] vrf mgmt \[purpose] set the vrf of mgmt \[view] management port configuration view \[notes] run command no vrf mgmt to delete management interface vrf configuration \[use cases] sonic# configure terminal sonic(config)# interface mgmt 0 sonic(config mgmt 0)# vrf mgmt vrf vrf vrf name (global configuration view) \[command] vrf vrf name \[purpose] create a vrf \[parameters] parameter description vrf name specify the vrf name, the default vrf is default \[view] global configuration view \[notes] run command no vrf vrf name to delete vrf \[use cases] sonic# configure terminal sonic(config)# vrf 123 vrf vrf vrf name (interface view) \[command] vrf vrf name \[purpose] bind the interface to the vrf \[parameters] parameter description vrf name specify the vrf name, the default vrf is default \[view] physical interface/vlanif/lagif/loopback interface configuration view \[notes] loopback0 is not allowed to bind vrfs run command no vrf unbind the interface from the vrf \[use cases] sonic# configure terminal sonic(config)# interface loopback 1 sonic(config loif 1)# vrf 123 mac mac hh\ hh\ hh\ hh\ hh\ hh \[command] mac hh\ hh\ hh\ hh\ hh\ hh \[purpose] configure the mac address of vrf \[parameters] parameter description hh\ hh\ hh\ hh\ hh\ hh mac address \[view] vrf configuration view \[notes] run command no mac to delete vrf mac address configuration \[use cases] sonic# configure terminal sonic(config)# vrf 123 sonic(config vrf)# mac 00\ a0 23 12 23 53 ip route ip route a b c d/m { a b c d | interface type interface name } \[ distance ]\[description description ] \[track track id ] \[bfd] \[nexthop vrf vrf ] \[command] ip route a b c d/m { a b c d | interface type interface name }\[ distance ]\[ description description ] \[ track track id ] \[ bfd ] \[ nexthop vrf vrf ] \[purpose] configure static routes for vrf \[parameters] parameter description a b c d/m specify the destination network segment for routing a b c d specify the ip address of next hop of the route interface type the next hop interface type optional parameters include ethernet, vlan, and link aggregation interface name next hop interface name distance static route distance value,range from 1 255 default value 1 description specify the description for the route in string form track id track id, range from \[1,4294967295] bfd configure static route and bfd linkage vrf name of the vrf where the next hop interface resides \[view] vrf configuration view \[notes] run command no ip route a b c d/m { a b c d | interface type interface name }\[ distance ]\[ description description ] \[ track track id ] \[ bfd ] \[ nexthop vrf vrf ] to delete static routes configuration \[use cases] sonic# configure terminal sonic(config)# vrf 123 sonic(config vrf)# ip route 10 0 0 0/24 20 0 0 2
