DynagenでCCIEを目指す
20100618 BGP 認証の設定
最終更新:
it_certification
-
view
目的
- BGP neighborで認証を設定する方法を確認します。
構成
- 設定概要
- 初期設定はip addressのみです
- 構成図

- 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 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 ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
検証1 方側のみ設定
- 方側のみ設定
R1のみ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 R1(config-router)#neighbor 192.168.12.2 password hoge R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 remote-as 1 R2(config-router)#network 2.2.2.2 mask 255.255.255.255
- エラーメッセージの確認
コンソール上に以下のようなエラーメッセージが表示されます。
R1# *Mar 1 00:04:47.783: %TCP-6-BADAUTH: No MD5 digest from 192.168.12.2(179) to 192.168.12.1(13522) (RST)
検証2 パスワードが違う場合
- パスワードが違う場合
R2にもBGP neighbor認証の設定を投入します。但し、敢えてR1, R2で異なるパスワードを入力します。
R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 password HOGE
- エラーメッセージの確認
コンソール上に以下のようなエラーメッセージが表示されます。
R1# *Mar 1 00:08:03.415: %TCP-6-BADAUTH: Invalid MD5 digest from 192.168.12.2(30845) to 192.168.12.1(179)
検証3 BGP neighborの認証
- BGP neighborの認証
R2にR1と同じパスワードを入力します。
R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 password hoge
- 経路の確認
BGP neighborが確立され、経路が交換された事を確認します。
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 *> 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 R1#
添付ファイル