【BGP】基本設定

 
1.bgpのプロセスを稼働
2.ネイバーの登録
3.BGPテーブルにルート情報を登録する。
 
(Config)#router bgp 3000
(Confi-router)#neighbor 10.1.1.2 remote-as 4000
 
(Config)#router bgp 4000
(Confi-router)#neighbor 10.1.1.1 remote-as 3000
(Confi-router)#network 10.3.1.0 mask 255.255.255.0
 
 
BGPでのnetworkコマンドはBGPテーブルにルート情報を登録する意味。
指定するnetworkコマンドは「ルーティングテーブル内のエントリと完全に一致」していること。
 
この場合10.3.1.0のネットワークはBGPで配布されているため左のルータで確認できる。
 
--
Router#sh ip route
Codes: 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

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 3 subnets
B 10.3.1.0 [20/0] via 10.1.1.2, 00:57:47
C 10.2.1.0 is directly connected, Loopback0
C 10.1.1.0 is directly connected, FastEthernet1

--