我需要确定某个目标地址使用的传出接口。 show ip route告诉我几个到这个目的地的 BGP 路由,我怎样才能准确地找出将使用哪个交换机的接口?如果我没记错的话,ECMP 在这种情况下扮演了一些角色。
pd01-ilf-005# sh ip route a.b.c.d/32
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>
a.b.c.d/32, ubest/mbest: 2/0
*via 10.0.1.4, [20/0], 19w5d, bgp-4200020005, external, tag 4200000002
*via 10.0.1.132, [20/0], 19w5d, bgp-4200020005, external, tag 4200000002
pd01-ilf-005# sh forw 1.2.3.4
slot 1
=======
IPv4 routes for table default/base
------------------+-----------------------------------------+----------------------+-----------------+-----------------
Prefix | Next-hop | Interface | Labels | Partial Install
------------------+-----------------------------------------+----------------------+-----------------+-----------------
*a.b.c.d/32 10.0.1.4 Ethernet1/49
10.0.1.132 Ethernet1/50
BGP routing table entry for a.b.c.d/32, version 485974
Paths: (2 available, best #2)
Flags: (0x8008001a) (high32 00000000) on xmit-list, is in urib, is best urib route, is in HW
Multipath: eBGP
Path type: external, path is valid, not best reason: newer EBGP path, multipath, no labeled nexthop, in rib
AS-Path: 4200000002 4200020006 , path sourced external to AS
10.0.1.4 (metric 0) from 10.0.1.4 (10.0.27.125)
Origin incomplete, MED not set, localpref 100, weight 0
Advertised path-id 1
Path type: external, path is valid, is best path, no labeled nexthop, in rib
AS-Path: 4200000002 4200020006 , path sourced external to AS
10.0.1.132 (metric 0) from 10.0.1.132 (10.0.27.126)
Origin incomplete, MED not set, localpref 100, weight 0
Path-id 1 advertised to peers:
10.0.98.173 10.0.98.189