DynagenでCCIEを目指す
20100603 BGP eBGP neighbor
最終更新:
it_certification
-
view
目的
- eBGP neighborの確立方法について確認します
- Loopback I/FでeBGP neighborを確立する場合は、multihopオプションが必要である事を確認します。
構成
- 設定概要
- R1, R2は互いのLoopback I/Fに到達できるようstaticルートを設定します。
- 構成図

- 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 [[ROUTER R2]]
- 初期設定 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 192.168.1.1 255.255.255.0 secondary ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.2.1 255.255.255.0 duplex auto speed auto ! ip http server ip classless ip route 2.2.2.2 255.255.255.255 192.168.2.2 ! ! ! ! ! ! ! ! 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 192.168.3.2 255.255.255.0 secondary ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.2.2 255.255.255.0 duplex auto speed auto ! ip http server ip classless ip route 1.1.1.1 255.255.255.255 192.168.2.1 ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
検証1 Loopbackへの疎通確認
- 疎通確認
R1, R2の互いのLoopback I/Fに疎通可能かどうかを確認します。
R1#ping 2.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/45/76 ms R1# R2#ping 1.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/44/60 ms R2#
検証2 eBGPの設定
- eBGPの設定
R1, R2間でeBGP neighborを確立します。トップページ/動作検証 ネットワーク系/20100602 BGP iBGP neighborで述べた通り、忘れずにupdate-sourceの設定を行って下さい。(恥ずかしながら、私はupdate-sourceの設定を忘れ、はまりました。)
R1(config)#router bgp 1 R1(config-router)#neighbor 2.2.2.2 remote-as 2 R1(config-router)#neighbor 2.2.2.2 update-source Loopback 0 R1(config-router)#network 192.168.1.0 mask 255.255.255.0 R2(config)#router bgp 2 R2(config-router)#neighbor 1.1.1.1 remote-as 1 R2(config-router)#neighbor 1.1.1.1 update-source Loopback 0 R2(config-router)#network 192.168.3.0 mask 255.255.255.0
- neighbor確立の確認
neighborの状態はIdleとなっています。上記の設定だけでは、neighborを確立できない事を確認します。
R1#show ip bgp summary BGP router identifier 1.1.1.1, local AS number 1 BGP table version is 2, main routing table version 2 1 network entries using 101 bytes of memory 1 path entries using 48 bytes of memory 1 BGP path attribute entries using 60 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 209 total bytes of memory BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2.2.2.2 4 2 0 0 0 0 0 never Idle R1#
検証3 multihopの設定
- multihopの設定
eBGPの場合、TTL=1のパケットが送信されます。そのためTTLを明示的に指定しないと、Loopback I/FでのeBGP neighborを確立する事はできません。
R1(config)#router bgp 1 R1(config-router)#neighbor 2.2.2.2 ebgp-multihop 5 R2(config)#router bgp 2 R2(config-router)#neighbor 1.1.1.1 ebgp-multihop 5
- neighbor確立の確認
BGP neighborが確立された事を確認します。
R1#show ip bgp summary BGP router identifier 1.1.1.1, local AS number 1 BGP table version is 3, main routing table version 3 2 network entries using 202 bytes of memory 2 path entries using 96 bytes of memory 2 BGP path attribute entries using 120 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 442 total bytes of memory BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2.2.2.2 4 2 6 6 3 0 0 00:01:40 1 R1# R1# R1#show ip route bgp B 192.168.3.0/24 [20/0] via 2.2.2.2, 00:01:46 R1#
添付ファイル