※noteから引っ越してきた記事
初期設定
iosv-1
en
terminal length 0
conf t
hostname iosv-1
line console 0
logging synchronous
exit
!
int gi0/0
ip address 192.168.12.1 255.255.255.0
no shut
!
int gi0/1
ip address 10.1.1.1 255.255.255.0
no shut
exit
!
router bgp 65000
neighbor 192.168.12.2 remote-as 20
network 10.1.1.0 mask 255.255.255.0
end
!
iosv-2
en
terminal length 0
conf t
hostname iosv-2
line console 0
logging synchronous
exit
!
int gi0/0
ip address 192.168.12.2 255.255.255.0
no shut
!
int gi0/1
ip address 192.168.23.2 255.255.255.0
no shut
exit
!
router bgp 20
neighbor 192.168.12.1 remote-as 65000
neighbor 192.168.23.3 remote-as 30
end
!
iosv-3
en
terminal length 0
conf t
hostname iosv-3
line console 0
logging synchronous
exit
!
int gi0/0
ip address 192.168.23.3 255.255.255.0
no shut
exit
!
router bgp 30
neighbor 192.168.23.2 remote-as 20
end
!
設定前
iosv-3#sh ip bgp | b Origin
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.1.1.0/24 192.168.23.2 0 20 65000 i
設定後
iosv-2(config)#router bgp 20
iosv-2(config-router)#neighbor 192.168.23.3 remove-private-as
iosv-3#sh ip bgp | b Origin
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.1.1.0/24 192.168.23.2 0 20 i
・as-path 65000がiosv-2で削除されてiosv-3に広告されていることが確認できる