思科路由命令备忘稿:Cisco BGP常用show命令
show ip bgp regexp ^6939 show ip bgp neighbors 100.64.163.1 show ip bgp neighbors 100.64.163.1 advertised-routes
Cisco BGP常用show命令 1.常用的show 命令 查看BGP路由表 XRV8#show ip bgp all For address family: IPv4 Unicast BGP table version is 217, local router ID is 10.255.255.8 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 10.33.0.0/19 0.0.0.0 32768 i *> 10.33.1.0/24 0.0.0.0 0 32768 i *> 10.33.2.0/24 0.0.0.0 0 32768 i *> 10.33.3.0/24 0.0.0.0 0 32768 i 查看BGP邻居表 XRV8#show ip bgp summary BGP router identifier 10.255.255.8, local AS number 65002 BGP table version is 217, main routing table version 217 72 network entries using 10368 bytes of memory 76 path entries using 6080 bytes of memory 3/3 BGP path/bestpath attribute entries using 456 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 16928 total bytes of memory BGP activity 140/68 prefixes, 220/144 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.201.1.1 4 65000 95 89 217 0 0 01:08:02 4 10.201.2.1 4 65000 86 90 217 0 0 01:01:00 4 查看路由表中的BGP路由 XRV8#show ip route bgp Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 141 subnets, 4 masks B 10.33.0.0/19 [200/0], 01:07:50, Null0 B 10.63.0.0/19 [20/0] via 10.201.2.1, 00:14:30 B 10.79.0.0/19 [20/0] via 10.201.2.1, 00:14:30 B 10.118.0.0/19 [200/0], 01:07:50, Null0 B 10.123.0.0/19 [200/0], 01:07:50, Null0 B 10.133.0.0/19 [20/0] via 10.201.2.1, 00:14:30 B 10.149.0.0/19 [200/0], 01:07:50, Null0 B 10.158.0.0/19 [20/0] via 10.201.2.1, 00:14:30 查看BGP路由含有某些特定路由的信息 XRV8#show ip route bgp | include 10.133.0.0 B 10.133.0.0/19 [20/0] via 10.201.2.1, 00:19:04 查看含有某些前缀的BGP路由信息 XRV8#show ip bgp 10.133.0.0 BGP routing table entry for 10.133.0.0/19, version 216 Paths: (2 available, best #2, table default) Not advertised to any peer Refresh Epoch 4 65000 65001, (aggregated by 65001 10.255.255.7) 10.201.1.1 from 10.201.1.1 (10.255.255.5) Origin IGP, localpref 100, valid, external, atomic-aggregate rx pathid: 0, tx pathid: 0 Refresh Epoch 4 65000 65001, (aggregated by 65001 10.255.255.7) 10.201.2.1 from 10.201.2.1 (10.255.255.6) Origin IGP, localpref 100, valid, external, atomic-aggregate, best rx pathid: 0, tx pathid: 0x0 查看某个特定的掩码区间的路由 XRV8#show ip bgp 10.133.0.0/16 longer-prefixes BGP table version is 217, local router ID is 10.255.255.8 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path * 10.133.0.0/19 10.201.1.1 0 65000 65001 i *> 10.201.2.1 0 65000 65001 i 查看起源于某个特定AS的路由 XRV8#show ip bgp regexp 65001$ BGP table version is 217, local router ID is 10.255.255.8 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path * 10.63.0.0/19 10.201.1.1 0 65000 65001 i *> 10.201.2.1 0 65000 65001 i * 10.79.0.0/19 10.201.1.1 0 65000 65001 i *> 10.201.2.1 0 65000 65001 i * 10.133.0.0/19 10.201.1.1 0 65000 65001 i *> 10.201.2.1 0 65000 65001 i * 10.158.0.0/19 10.201.1.1 0 65000 65001 i *> 10.201.2.1 0 65000 65001 i
none