noteから引っ越してきた記事
Before
設定
R6(config)#router bgp 100
R6(config-router)#nei 155.1.67.7 remote 200
R9(config)#router bgp 300
R9(config-router)#nei 155.1.79.7 remote 200
R7(config)#router bgp 200
R7(config-router)#nei PEER peer-group
R7(config-router)#nei PEER remote 100
R7(config-router)#bgp listen range 155.1.0.0/16 peer-group PEER
結果
R7#
%BGP-5-ADJCHANGE: neighbor *155.1.67.6 Up
R7#
%BGP-5-NBR_RESET: Neighbor *155.1.79.9 passive reset (Neighbor deleted)
%BGP-3-NOTIFICATION: sent to neighbor *155.1.79.9 passive 2/2 (peer in wrong AS) 2 bytes 012C
%BGP-4-MSGDUMP: unsupported or mal-formatted message received from *155.1.79.9:
FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0039 0104 012C 00B4 9601 0909 1C02 0601
0400 0100 0102 0280 0002 0202 0002 0246 0002 0641 0400 0001 2C
R7#
%BGP-5-ADJCHANGE: neighbor *155.1.79.9 passive Down BGP Notification sent
iosv-7は155.1.0.0/16でlistenしているので、iosv-6,9の両方とも条件に当てはまるものの、”neighbor PEER remote-as 100″としか設定されていないためiosv-9とはASNの不一致によりエラーログが大量発生する。
After
設定(alternate-as)
R7(config)#router bgp 200
R7(config-router)#nei PEER peer-group
R7(config-router)#nei PEER remote 100 alternate-as 300
R7(config-router)#bgp listen range 155.1.0.0/16 peer-group PEER
結果
R7#
%BGP-5-ADJCHANGE: neighbor *155.1.67.6 Up
R7#
%BGP-5-ADJCHANGE: neighbor *155.1.79.9 Up
R7#sh ip bgp sum
BGP router identifier 150.1.7.7, local AS number 200
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
*155.1.67.6 4 100 4 4 1 0 0 00:00:38 0
*155.1.79.9 4 300 4 2 1 0 0 00:00:33 0
* Dynamically created based on a listen range command
Dynamically created neighbors: 2, Subnet ranges: 1
BGP peergroup PEER listen range group members:
155.1.0.0/16
Total dynamically created neighbors: 2/(100 max), Subnet ranges: 1
正常にピアリングされる。
注意
R7(config-router)#nei PEER remote 100 alt 200 300 ?
<1-4294967295> Alternate AS for accepting remote neighbors
<1.0-XX.YY> Alternate AS for accepting remote neighbors
<cr> <cr>
R7(config-router)#nei PEER remote 10 alt 100 200 300 400 ?
<1-4294967295> Alternate AS for accepting remote neighbors
<1.0-XX.YY> Alternate AS for accepting remote neighbors
<cr> <cr>
R7(config-router)#nei PEER remote 10 alt 100 200 300 400 500 ?
<cr> <cr>
alternate-asで指定できるASNは5つ。
CCOにもちゃんと明記されている。