DynagenでCCIEを目指す
20100625 BGP private ASの削除
最終更新:
it_certification
-
view
目的
- BPG環境において、プライベートASをAS PATHから削除する方法を確認します。
構成
- 設定概要
- IPアドレスのみ設定します。
- 構成図

- 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]] f1/0 = R3 f1/0 [[ROUTER R3]]
- 初期設定 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 ! 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.23.2 255.255.255.0 duplex auto speed auto ! 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.0 ! interface FastEthernet1/0 ip address 192.168.23.3 255.255.255.255 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
検証1 検証環境構築
- BGPの設定
BGP neighborの設定を投入します。
R1(config)#router bgp 1 R1(config-router)#neighbor 192.168.12.2 remote-as 2 R1(config-router)#network 1.1.1.1 mask 255.255.255.255 R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 remote-as 1 R2(config-router)#neighbor 192.168.23.3 remote-as 65003 R2(config-router)#network 2.2.2.2 mask 255.255.255.255 R3(config)#router bgp 65003 R3(config-router)#neighbor 192.168.23.2 remote-as 2 R3(config-router)#network 3.3.3.3 mask 255.255.255.255
- BGPテーブルの確認
BGP neighborが確立された事で、互いに経路が交換された事を確認します。
R1#show ip bgp BGP table version is 4, 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 *> 1.1.1.1/32 0.0.0.0 0 32768 i *> 2.2.2.2/32 192.168.12.2 0 0 2 i *> 3.3.3.3/32 192.168.12.2 0 2 65003 i R1#
検証2 remove-private-AS
- remove-private-AS
R2からR1に経路を伝える際に、private ASを削除するように設定します。
余談ですが、R2のshow ip bgp neighbor <ip address> advertised-routesコマンドでは、プライベートASが削除されたかどうかの確認はできませんでした。
余談ですが、R2のshow ip bgp neighbor <ip address> advertised-routesコマンドでは、プライベートASが削除されたかどうかの確認はできませんでした。
R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 remove-private-AS R2(config-router)#^Z R2# *Mar 1 00:13:57.235: %SYS-5-CONFIG_I: Configured from console by console R2# R2#clear ip bgp 192.168.12.1 out R2# R2# R2#show ip bgp neighbors 192.168.12.1 advertised-routes BGP table version is 4, 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 *> 2.2.2.2/32 0.0.0.0 0 32768 i *> 3.3.3.3/32 192.168.23.3 0 0 65003 i R2#
- BGPテーブルの確認
R1のBGPテーブルを表示させ、プライベートASが削除された事を確認します。
R1#show ip bgp BGP table version is 5, 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 *> 1.1.1.1/32 0.0.0.0 0 32768 i *> 2.2.2.2/32 192.168.12.2 0 0 2 i *> 3.3.3.3/32 192.168.12.2 0 2 i <- AS 65003が消えた事を確認します。 R1#
添付ファイル