: dump routing peer route-json
Focus
Focus

dump routing peer route-json

Table of Contents

dump routing peer route-json

Use the dump routing peer routes-json command to display the installed routes learned from BGP peers in javascript object notation (JSON) format.

Command

dump routing peer routes-json ( all | peer-ip = Peer IP | vrf-name=vrf name | address-family= (ipv4 or ipv6) )

Options

allEnter all to display learned routes from all BGP peers.
vrf-nameEnter a VRF name to display the configuration for a specific BGP peer. Release 6.3.1
address-familyEnter an address family (IPv4 or IPv6) to display the learned routes to a specific BGP peer. Release 6.3.1
peer-ipEnter an IP address to display routes learned from a specific BGP peer with both IPv4 and IPv6 address..

Command Notes

RoleSuper, Read Only, Monitor
Related Commands
Introduced inRelease 5.0.1

Example

dump routing peer route-json peer-ip 192.168.106.1Routes for peer:192.168.106.1{"10.10.60.0/30":{"nexthop":"0.0.0.0","metric":0,"lp":0,"wt":32768,"path":"","rtrid":"0.0.0.0","ts":"1528942009"},"10.16.39.0/24"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192" ,"rtr_id":"192.192.192.192","ts":"1528942013"},"192.168.101.0/24"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192","rtrid":"192.192.192.192","ts":"1528942013"},"192.168.102.0/24"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192","rtrid":"192.192.192.192","ts":"1528942013"},"192.168.103.0/24"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192" ,"rtrid":"192.192.192.192","ts":"1528942013"},"192.168.104.0/24"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192","rtr_id":"192.192.192.192","ts":"1528942013"},"192.168.105.0/24"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192","rtrid":"192.192.192.192","ts":"1528942013"},"192.168.106.0/24"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192" ,"rtrid":"192.192.192.192","ts":"1528942013"},"192.168.107.0/24"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192","rtr_id":"192.192.192.192","ts":"1528942013"},"192.168.108.0/24"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192","rtrid":"192.192.192.192","ts":"1528942013"},"192.168.109.0/24":{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192" ,"rtrid":"192.192.192.192","ts":"1528942013"},"192.168.193.192/32"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192" ,"rtr_id":"192.192.192.192","ts":"1528942013"},"192.192.192.192/32"{"nexthop":"192.168.106.1","metric":1,"lp":0,"wt":0,"path":"65192","rtrid":"192.192.192.192","ts":"1528942013"}}
dump routing peer route-json vrf-name=IOT-Data Routes for peer:6.6.8.254 { "vrfId": 31, "vrfName": "v633-e3", "tableVersion": 2, "routerId": "6.6.8.8", "defaultLocPrf": 100, "localAS": 1200, "routes": { "4.4.4.0/24": [ { "valid":true, "bestpath":true, "selectionReason":"First path received", "pathFrom":"external", "prefix":"4.4.4.0", "prefixLen":24, "network":"4.4.4.0\/24", "version":2, "metric":0, "weight":0, "peerId":"6.6.8.254", "path":"1400", "origin":"IGP", "nexthops":[ { "ip":"6.6.8.254", "hostname":"vyos", "afi":"ipv4", "used":true } ] } ] } }
dump routing peer route-json peer-ip 10.2.68.2 address-family=ipv6 Routes for peer:10.2.68.2 { "vrfId": 0, "vrfName": "64", "tableVersion": 192, "routerId": "4.4.4.4", "defaultLocPrf": 100, "localAS": 2001, "routes": { "2001:10:2:68::/64": [ { "valid":true, "pathFrom":"external", "prefix":"2001:10:2:68::", "prefixLen":64, "network":"2001:10:2:68::\/64", "version":41, "metric":0, "weight":0, "peerId":"10.2.68.2", "path":"2002", "origin":"incomplete", "nexthops":[ { "ip":"2001:10:2:68::2", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"global" }, { "ip":"fe80::250:56ff:fe95:2a6f", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"link-local", "used":true } ] } ],"2001:10:2:69::/64": [ { "valid":true, "pathFrom":"external", "prefix":"2001:10:2:69::", "prefixLen":64, "network":"2001:10:2:69::\/64", "version":12, "metric":0, "weight":0, "peerId":"10.2.68.2", "path":"2002", "origin":"incomplete", "nexthops":[ { "ip":"2001:10:2:68::2", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"global" }, { "ip":"fe80::250:56ff:fe95:2a6f", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"link-local", "used":true } ] } ],"2001:10:2:70::/64": [ { "valid":true, "bestpath":true, "selectionReason":"First path received", "pathFrom":"external", "prefix":"2001:10:2:70::", "prefixLen":64, "network":"2001:10:2:70::\/64", "version":92, "metric":0, "weight":0, "peerId":"10.2.68.2", "path":"2002", "origin":"incomplete", "nexthops":[ { "ip":"2001:10:2:68::2", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"global" }, { "ip":"fe80::250:56ff:fe95:2a6f", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"link-local", "used":true } ] } ],"2001:10:2:72::/64": [ { "valid":true, "bestpath":true, "selectionReason":"First path received", "pathFrom":"external", "prefix":"2001:10:2:72::", "prefixLen":64, "network":"2001:10:2:72::\/64", "version":93, "metric":0, "weight":0, "peerId":"10.2.68.2", "path":"2002", "origin":"incomplete", "nexthops":[ { "ip":"2001:10:2:68::2", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"global" }, { "ip":"fe80::250:56ff:fe95:2a6f", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"link-local", "used":true } ] } ],"3aaa:3aaa:3aaa:3aaa::/65": [ { "valid":true, "bestpath":true, "selectionReason":"First path received", "pathFrom":"external", "prefix":"3aaa:3aaa:3aaa:3aaa::", "prefixLen":65, "network":"3aaa:3aaa:3aaa:3aaa::\/65", "version":94, "metric":0, "weight":0, "peerId":"10.2.68.2", "path":"2002", "origin":"incomplete", "nexthops":[ { "ip":"2001:10:2:68::2", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"global" }, { "ip":"fe80::250:56ff:fe95:2a6f", "hostname":"BR2L3SW", "afi":"ipv6", "scope":"link-local", "used":true } ] } ] } }