Dans la présente topographie BGP, nous avons trois 3 AS.
Il a deux routages de SWA à 192.168.1.100, on peut voir dans le SWA
[SWA]disp bgp routing-table 192.168.1.100 24
BGP local router ID : 1.1.1.1
Local AS number : 100
Paths: 2 available, 1 best, 2 select
BGP routing table entry information of 192.168.1.0/24:
From: 200.1.1.2 (2.2.2.2)
Route Duration: 00h20m08s
Direct Out-interface: Vlanif10
Original nexthop: 200.1.1.2
Qos information : 0x0
AS-path 300 200, origin igp, pref-val 0, valid, external, best, select, active,
pre 255
Advertised to such 2 peers:
200.1.2.2
200.1.1.2
BGP routing table entry information of 192.168.1.0/24:
From: 200.1.2.2 (3.3.3.3)
Route Duration: 00h20m08s
Direct Out-interface: Vlanif100
Original nexthop: 200.1.2.2
Qos information : 0x0
AS-path 300 200, origin igp, pref-val 0, valid, external, select, active, pre 25
5, not preferred for router ID
Not advertised to any peer yet
[SWA]
Nous pouvons voir que deux routages, un est le meilleur, l’un est choisi; ils sont tous deux choisis; Donc, le blance de charge BGP fonctionne.
si nous supprimons la commande "charge max. 2" dans la configuration BGP dans SWA, comme ceci:
[SWA-bgp]disp this
#
bgp 100
router-id 1.1.1.1
peer 200.1.1.2 as-number 300
peer 200.1.2.2 as-number 300
#
ipv4-family unicast
undo synchronization
peer 200.1.1.2 enable
peer 200.1.2.2 enable
#
return
Ensuite, nous vérifions l’acheminement de SWA vers 192.168.1.100, comme suit:
[SWA-bgp]q
[SWA]disp bgp routing-table 192.168.1.100 24
BGP local router ID : 1.1.1.1
Local AS number : 100
Paths: 2 available, 1 best, 1 select
BGP routing table entry information of 192.168.1.0/24:
From: 200.1.1.2 (2.2.2.2)
Route Duration: 00h35m07s
Direct Out-interface: Vlanif10
Original nexthop: 200.1.1.2
Qos information : 0x0
AS-path 300 200, origin igp, pref-val 0, valid, external, best, select, active,
pre 255
Advertised to such 2 peers:
200.1.2.2
200.1.1.2
BGP routing table entry information of 192.168.1.0/24:
From: 200.1.2.2 (3.3.3.3)
Route Duration: 00h35m07s
Direct Out-interface: Vlanif100
Original nexthop: 200.1.2.2
Qos information : 0x0
AS-path 300 200, origin igp, pref-val 0, valid, external, pre 255, not preferred
for router ID
Not advertised to any peer yet
[SWA]
nous pouvons voir qu'il n'y a qu'un seul choix de routage. de sorte que le blance de charge de bgp ne fonctionne pas