BGPの基本設定
設定イメージ
・インターフェース設定
R1への設定
interface GigabitEthernet8
ip address 100.0.0.1 255.255.255.0
duplex auto
speed auto
interface Vlan1
ip address 192.168.0.1 255.255.255.0
R2への設定
interface GigabitEthernet8
ip address 100.0.0.2 255.255.255.0
duplex auto
speed auto
interface Vlan1
ip address 172.16.0.1 255.255.255.0
・BGPの設定
R1への設定
router bgp 100
bgp log-neighbor-changes
network 192.168.0.0
neighbor 100.0.0.2 remote-as 200
R2への設定
router bgp 200
bgp log-neighbor-changes
network 172.16.0.0 mask 255.255.255.0
neighbor 100.0.0.1 remote-as 100
確認コマンド
show ip bgp
show ip bgp neighbors
show ip bgp summary
show ip route
・show ip route
R2#show ip route
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
・show ip bgp
R2# show ip bgp
BGP table version is 5, local router ID is 172.16.0.1
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
*> 172.16.0.0/24 0.0.0.0 0 32768 i
*> 192.168.0.0 100.0.0.1 0 0 100 i
※cisco 891を使用した場合、ルーターに端末およびL2SWなどが接続されていなければルーティングテーブルに記載が乗らない