DynagenでCCIEを目指す
20100607 BGP トランジットAS コンフェデレーション
最終更新:
it_certification
-
view
目的
- トランジットASであるAS 1の設定方法を確認します。
- AS 1内でコンフェデレーションを設定します。
構成
- 設定概要
- AS 1内はOSPFによってルーティングします。
- 検証環境のスペック不足のため、ISP30は起動させません。
- 初期設定は、トップページ/動作検証 ネットワーク系/20100604 BGP トランジットAS IGPによるルーティングと全く同じです。
- 構成図

- netファイル
model = 3620 [localhost] [[3620]] image = C:\Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] f0/0 = R2 f0/0 f1/0 = R3 f1/0 [[ROUTER R2]] f1/0 = ISP20 f1/0 [[ROUTER R3]] [[ROUTER ISP20]]
- 初期設定 R1
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.13.1 255.255.255.0 duplex auto speed auto ! router ospf 1 log-adjacency-changes network 1.1.1.1 0.0.0.0 area 0 network 192.168.12.1 0.0.0.0 area 0 network 192.168.13.1 0.0.0.0 area 0 ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
- 初期設定 R2
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.122.2 255.255.255.0 duplex auto speed auto ! router ospf 1 log-adjacency-changes network 2.2.2.2 0.0.0.0 area 0 network 192.168.12.2 0.0.0.0 area 0 ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
- 初期設定 R3
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface FastEthernet1/0 ip address 192.168.13.3 255.255.255.0 duplex auto speed auto ! router ospf 1 log-adjacency-changes network 3.3.3.3 0.0.0.0 area 0 network 192.168.13.3 0.0.0.0 area 0 ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
- 初期設定 ISP20
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname ISP20 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 20.20.20.20 255.255.255.255 ! interface FastEthernet1/0 ip address 192.168.122.20 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
検証1 iEBGP (intra EBGP) neigborの確立
BGP neighborの設定を行います。
R1(config)#router bgp 65001 R1(config-router)#bgp confederation identifier 1 R1(config-router)# R1(config-router)#bgp confederation peers 65002 R1(config-router)#neighbor 2.2.2.2 remote-as 65002 R1(config-router)#neighbor 2.2.2.2 update-source Loopback 0 R1(config-router)#neighbor 2.2.2.2 ebgp-multihop 2 R1(config-router)# R1(config-router)# R1(config-router)#bgp confederation peers 6503 R1(config-router)#neighbor 3.3.3.3 remote-as 65003 R1(config-router)#neighbor 3.3.3.3 update-source Loopback 0 R1(config-router)#neighbor 3.3.3.3 ebgp-multihop 2 R1(config-router)# R1(config-router)# R1(config-router)#do show run | b ^router bgp router bgp 65001 no synchronization bgp log-neighbor-changes bgp confederation identifier 1 bgp confederation peers 65002 65003 neighbor 2.2.2.2 remote-as 65002 neighbor 2.2.2.2 ebgp-multihop 2 neighbor 2.2.2.2 update-source Loopback0 neighbor 3.3.3.3 remote-as 65003 neighbor 3.3.3.3 ebgp-multihop 2 neighbor 3.3.3.3 update-source Loopback0 no auto-summary ! R2(config)#ip route 20.20.20.20 255.255.255.255 192.168.122.20 240 R2(config)# R2(config)# R2(config)#router bgp 65002 R2(config-router)#bgp confederation identifier 1 R2(config-router)#bgp confederation peers 65001 R2(config-router)#neighbor 1.1.1.1 remote-as 65001 R2(config-router)#neighbor 1.1.1.1 update-source Loopback 0 R2(config-router)#neighbor 1.1.1.1 ebgp-multihop 2 R2(config-router)#neighbor 1.1.1.1 next-hop-self R2(config-router)# R2(config-router)#neighbor 20.20.20.20 remote-as 2 R2(config-router)#neighbor 20.20.20.20 update-source Loopback 0 R2(config-router)#neighbor 20.20.20.20 ebgp-multihop 2 R2(config-router)# R2(config-router)# R2(config-router)# R2(config-router)#do show run | b ^router bgp router bgp 65002 no synchronization bgp log-neighbor-changes bgp confederation identifier 1 bgp confederation peers 65001 neighbor 1.1.1.1 remote-as 65001 neighbor 1.1.1.1 ebgp-multihop 2 neighbor 1.1.1.1 update-source Loopback0 neighbor 20.20.20.20 remote-as 2 neighbor 20.20.20.20 ebgp-multihop 2 neighbor 20.20.20.20 update-source Loopback0 no auto-summary ! R3(config)#router bgp 65003 R3(config-router)#bgp confederation identifier 1 R3(config-router)#bgp confederation peers 65001 R3(config-router)#neighbor 1.1.1.1 remote-as 65001 R3(config-router)#neighbor 1.1.1.1 update-source Loopback 0 R3(config-router)#neighbor 1.1.1.1 ebgp-multihop 2 R3(config-router)# R3(config-router)# R3(config-router)# R3(config-router)#do show run | b ^router bgp router bgp 65003 no synchronization bgp log-neighbor-changes bgp confederation identifier 1 bgp confederation peers 65001 neighbor 1.1.1.1 remote-as 65001 neighbor 1.1.1.1 ebgp-multihop 2 neighbor 1.1.1.1 update-source Loopback0 no auto-summary ! ISP20(config)#ip route 0.0.0.0 0.0.0.0 192.168.122.2 ISP20(config)# ISP20(config)# ISP20(config)# ISP20(config)#router bgp 2 ISP20(config-router)#neighbor 2.2.2.2 remote-as 1 ISP20(config-router)#neighbor 2.2.2.2 update-source Loopback 0 ISP20(config-router)#neighbor 2.2.2.2 ebgp-multihop 2 ISP20(config-router)# ISP20(config-router)#network 192.168.122.0 mask 255.255.255.0 ISP20(config-router)#network 20.20.20.20 mask 255.255.255.255
- AS_PATHの確認
BGPによるルートがR3まで伝わっている事を確認します。ここで特に気にすべき事柄はAS_PATHです。サブAS番号は括弧で括られて表示されます。
R1#show ip bgp BGP table version is 3, local router ID is 1.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 20.20.20.20/32 2.2.2.2 0 100 0 (65002) 2 i <- サブASは括弧で表記 *> 192.168.122.0 2.2.2.2 0 100 0 (65002) 2 i <- サブASは括弧で表記 R1# R3#show ip bgp BGP table version is 3, local router ID is 3.3.3.3 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 20.20.20.20/32 2.2.2.2 0 100 0 (65001 65002) 2 i <- サブASは括弧で表記 *> 192.168.122.0 2.2.2.2 0 100 0 (65001 65002) 2 i <- サブASは括弧で表記 R3#
検証2 サブASとASの関係
- 経路のエミュレート
R3で30.30.30.30/32という経路を生成しISP20へ伝える際の挙動を観察します。以下の手順で、30.30.30.30/32を生成します。
R3(config)#interface Loopback 0 R3(config-if)#ip address 30.30.30.30 255.255.255.255 secondary R3(config-if)#exit R3(config)# R3(config)# R3(config)# R3(config)#router bgp 65003 R3(config-router)#network 30.30.30.30 mask 255.255.255.255
- AS_PATHの確認
R2内では括弧内でサブASが表記されているのに対し、ISP20ではサブASは表示されていません。eBGP neighborに経路を伝える時に、サブASをASに置き換えて送信している様子が読み取れます。
R2#show ip bgp BGP table version is 77, local router ID is 2.2.2.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 20.20.20.20/32 20.20.20.20 0 0 2 i *> 30.30.30.30/32 3.3.3.3 0 100 0 (65001 65003) i <- サブASは括弧で表記 r> 192.168.122.0 20.20.20.20 0 0 2 i R2# ISP20#show ip bgp BGP table version is 4, local router ID is 20.20.20.20 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 20.20.20.20/32 0.0.0.0 0 32768 i *> 30.30.30.30/32 2.2.2.2 0 1 i <- サブAS(65001 65003)がAS 1に変換されています *> 192.168.122.0 0.0.0.0 0 32768 i ISP20#
添付ファイル