Command Line Reference
Layer 3 Configuration
Basic Routing
21 min
route view route view table 1 route view table 1 route view true 431,230#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type show {ip|ipv6} route \[summary|connected|static|bgp|ospf|isis| show {ip|ipv6} route \[summary|connected|static|bgp|ospf|isis| ip address ] \[command] show { ip | ipv6 } route \[ summary | connected | static | bgp | ospf | isis | ip address ] \[purpose] display ipv4/ipv6 route info \[parameters] true 326,335#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] privileged user view \[use cases] sonic# show ip route connected codes k kernel route, c connected, s static, r rip, o ospf, i is is, b bgp, e eigrp, n nhrp, t table, v vnc, v vnc direct, a babel, d sharp, f pbr, f openfabric, \> selected route, fib route, q queued, r rejected, b backup c> 10 0 0 0/24 is directly connected, ethernet112, 00 22 20 c> 10 1 0 103/32 is directly connected, loopback0, 20 16 20 c> 10 250 0 0/24 is directly connected, eth0, 20 16 40 c> 11 11 10 0/24 is directly connected, vlan10, 20 16 10 c> 112 0 0 0/24 is directly connected, ethernet112, 00 22 20 c> 122 0 0 0/24 is directly connected, vlan100, 20 16 10 show {ip|ipv6} protocol show {ip|ipv6} protocol \[command] show { ip | ipv6 } protocol \[purpose] display ipv4/ipv6 protocol info \[view] privileged user view \[use cases] sonic# show ip protocol protocol route map \ system none kernel none connected none static none rip none ripng none ospf none ospf6 none isis none bgp rm set src pim none eigrp none nhrp none hsls none olsr none table none ldp none vnc none vnc direct none vnc rn none bgp direct none bgp direct to nve groups none babel none sharp none pbr none bfd none wildcard none any none show pbr interface \[ethernet show pbr interface \[ethernet interface name |link aggregation lag id ] \[json] \[command] show pbr interface \[ ethernet interface name | link aggregation lag id ] \[ json ] \[purpose] display pbr binding info \[parameters] true 217,444#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[view] privileged user view \[use cases] sonic# show pbr interface ethernet 0/0 ethernet 0/0(15) with pbr policy yd1 show pbr map \[pbr map name|json|detail] show pbr map \[pbr map name|json|detail] \[command] show pbr map \[ pbr map name | json | detail ] \[purpose] display pbr policy info \[parameters] true 285,376#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] privileged user view \[use cases] sonic# show pbr map yd1 pbr map yd1 valid yes seq 1 rule 300 installed yes reason valid src match 100 0 0 2/32 nexthop 102 0 0 2 installed yes tableid 10002 show pbr nexthop groups \[next group name|json] show pbr nexthop groups \[next group name|json] \[command] show pbr nexthop groups \[ next group name | json ] \[purpose] display pbr next hop info \[parameters] true 256,405#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] privileged user view \[use cases] sonic# show pbr nexthop groups yd nexthop group yd table 10000 valid 1 installed 1 valid 1 nexthop 102 0 0 2 valid 1 nexthop 103 0 0 2 route config route config table 2 route config table 2 route config true 405,256#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type ip route ip route a b c d/m { a b c d | interface type interface name } \[options] \[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 ipv4 static routes \[parameters] true 184,477#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type \[view] global configuration 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)# ip route 20 0 0 0/24 10 0 0 57 description test ipv6 route ipv6 route x\ x x\ x/m { x\ x x\ x | interface type interface name } \[options] \[options] \[command] ipv6 route x\ x x\ x/m { x\ x x\ x | interface type interface name }\[ distance ]\[ description description ] \[ track track id ] \[ bfd ] \[ nexthop vrf vrf ] \[purpose] configure ipv6 static routes \[parameters] true 216,445#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type \[view] global configuration view / vrf configuration view \[notes] run command no ipv6 route x\ x x\ x/m { x\ x x\ x | 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)# ipv6 route 2001 2/96 2002 1 track 1 pbr map pbr map pbr map name seq seq num \[command] pbr map pbr map name seq seq num \[purpose] create pbr policy and enter the pbr map configuration view \[parameters] true 274,387#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[view] global configuration view \[notes] run command no pbr map pbr map name \[ seq seq num ] to delete pbr policy configuration \[use cases] sonic(config)# pbr map pbrmap1 seq 1 sonic(config pbr map)# match { dst ip match { dst ip dip |dst port dport |ip protocol ip protocol |src ip sip |src port sport } \[command] match { dst ip dip | dst port dport | ip protocol ip protocol | src ip sip | src port sport } \[purpose] configure pbr policy match fields \[parameters] true 206,455#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type \[view] pbr map configuration view \[notes] run command no match { dst ip dip | dst port dport | ip protocol ip protocol | src ip sip | src port sport } to delete pbr policy match fields \[use cases] sonic(config)# pbr map pbrmap1 seq 1 sonic(config pbr map)# match src ip 1 2 1 1/32 sonic(config pbr map)# set {nexthop { set {nexthop { a b c d | x\ x x\ x }|nexthop group next group name } \[command] set { nexthop { a b c d | x\ x x\ x }| nexthop group next group name } \[purpose] configure pbr policy actions \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type \[view] pbr map configuration view \[notes] run command no set { nexthop { a b c d | x\ x x\ x }| nexthop group next group name } to delete pbr policy actions \[use cases] sonic(config)# pbr map pbrmap1 seq 1 sonic(config pbr map)# set nexthop 83 0 0 1 sonic(config pbr map)# nexthop group nexthop group next group name \[command] nexthop group next group name \[purpose] create a next hop group and enter the next hop group configuration mode \[parameters] true 267,394#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] global configuration view \[notes] run command no nexthop group next group name to delete the next hop group configuration \[use cases] sonic(config)# nexthop group nextgroup1 sonic(config nh group)# nexthop { nexthop { a b c d | x\ x x\ x } \[command] nexthop { a b c d | x\ x x \ x} \[purpose] configure the next hop \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] nexthop group configuration view \[notes] run command no nexthop { a b c d | x\ x x \ x} to delete the next hop configuration \[use cases] sonic(config)# nexthop group nextgroup1 sonic(config nh group)# nexthop 82 0 0 1 sonic(config nh group)# pbr policy pbr policy pbr map name \[command] pbr policy pbr map name \[purpose] bind pbr policy \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] physical interface/lagif configuration view \[notes] run command no pbr policy pbr map name to delete binding pbr policy configuration \[use cases] sonic(config)# interface ethernet 0/0 sonic(config if 0/0)# pbr policy pbrmap1 sonic(config if 0/0)#
