發布時間: 2017-06-16 11:30:08
在進行ccnp課程學習的時候經常會遇見各種問題,而問題最多的莫過于bgp協議的backdoor實驗,backdoor再加上幀中繼那就是很多人的惡夢了,那么我們今天就來做一個backdoor的實驗,backdoor在CCIE考試的實驗考試的時候也是用到了的,它的主要目的就是把ebgp學習的路由的AD值從20變為200,從而改變路徑的選擇。
1、實驗拓撲如下:
3、具體的命令
r1:
interface Serial0/0
ip address 123.1.1.1 255.255.255.0
encapsulation frame-relay
serial restart-delay 0
frame-relay map ip 123.1.1.3 103 broadcast
frame-relay map ip 123.1.1.1 103 broadcast
frame-relay map ip 123.1.1.2 102 broadcast
no frame-relay inverse-arp
!
router bgp 1
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 123.1.1.2 remote-as 2
neighbor 123.1.1.3 remote-as 3
no auto-summary
r2:
interface Loopback0
ip address 192.168.1.1 255.255.255.0
ip ospf network point-to-point
!
interface Serial0/0
ip address 123.1.1.2 255.255.255.0
encapsulation frame-relay
serial restart-delay 0
frame-relay map ip 123.1.1.3 203 broadcast
frame-relay map ip 123.1.1.1 201 broadcast
frame-relay map ip 123.1.1.2 201 broadcast
no frame-relay inverse-arp
!
router ospf 23
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 192.168.1.1 0.0.0.0 area 0
network 192.168.23.2 0.0.0.0 area 0
!
router bgp 2
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
network 192.168.1.0
network 192.168.2.0 backdoor
neighbor 123.1.1.1 remote-as 1
neighbor 123.1.1.3 remote-as 3
no auto-summary
!
R3:
interface Loopback0
ip address 192.168.2.2 255.255.255.0
!
interface Serial0/0
ip address 123.1.1.3 255.255.255.0
encapsulation frame-relay
serial restart-delay 0
frame-relay map ip 123.1.1.3 302 broadcast
frame-relay map ip 123.1.1.1 301 broadcast
frame-relay map ip 123.1.1.2 302 broadcast
no frame-relay inverse-arp
!
router ospf 23
router-id 3.3.3.3
log-adjacency-changes
network 192.168.23.3 0.0.0.0 area 0
!
router bgp 3
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
network 192.168.1.0 backdoor
network 192.168.2.0
neighbor 123.1.1.1 remote-as 1
neighbor 123.1.1.2 remote-as 2
no auto-summary
4、實驗結果
R2(config-router)#do sh ip rou
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
C 192.168.23.0/24 is directly connected, Serial0/1
123.0.0.0/24 is subnetted, 1 subnets
C 123.1.1.0 is directly connected, Serial0/0
C 192.168.1.0/24 is directly connected, Loopback0
B 192.168.2.0/24 [200/0] via 123.1.1.3, 00:09:13
R3(config-router)#do sh ip rou
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
C 192.168.23.0/24 is directly connected, Serial0/1
123.0.0.0/24 is subnetted, 1 subnets
C 123.1.1.0 is directly connected, Serial0/0
O 192.168.1.0/24 [110/65] via 192.168.23.2, 00:08:47, Serial0/1
C 192.168.2.0/24 is directly connected, Loopback0