CCNP之BGP實驗

test-1
r1配置:
Router#enable
Router#config terminal
Router(config)#enable password cisco
Router(config)#hostname r1
r1(config)#no ip domain lookup
r1(config)#interface loopback 0
r1(config-if)#ip address 1.1.1.1 255.255.255.0
r1(config-if)#interface s 0
r1(config-if)#encapsulation frame-relay
r1(config-if)#ip address 6.6.13.1 255.255.255.0
r1(config-if)#no shutdown
r1#(config)router rip
r1#(config-router)version 2
r1(config-router)#network 1.0.0.0
r1(config-router)#network 6.0.0.0
r1(config-router)#no auto-summary
r1(config)#router bgp 100
r1(config-router)#neighbor 6.6.13.3 remote-as 200
r1(config-router)#network 1.1.1.0 mask 255.255.255.0
r1(config-router)#no synchronization
r1(config-router)#end
r1#
r3配置:
Router#enable
Router#config terminal
Router(config)#enable password cisco
Router(config)#hostname R3
r3(config)#no ip domain lookup
r3(config)#interface loopback 0
r3(config-if)#ip address 3.3.3.3 255.255.255.0
r3(config)#interface s 0
r3(config-if)#encapsulation frame-relay
r3(config-if)#ip address 6.6.13.3 255.255.255.0
r3(config-if)#no shutdown
r3(config)#interface s 1
r3(config-if)#encapsulation frame-relay
r3(config-if)#ip address 6.6.34.3 255.255.255.0
r3(config-if)#no shutdown
r3(config-if)#ip ospf authenticaion-key cisco-123
r3(config)#router rip
r3(config-router)#version 2
r3(config-router)#network 6.0.0.0
r3(config-router)#no auto-summary
r3(config-router)# redistribute ospf 1 metric 1
r3(config)#router ospf 1
r3(config-router)#network 3.3.3.3 0.0.0.255 area 0
r3(config-router)#network 6.6.34.3 0.0.0.255 area 0
r3(config-router)#area 0 authentication
r3(config-router)#redistribute rip metric 100 subnets
r3(config)#router bgp 200
r3(config-router)#neighbor 6.6.13.1 remote-as 100
r3(config-router)#neighbor 6.6.34.4 remote-as 200
r3(config-router)#network 3.3.3.0 mask 255.255.255.0
r3(config-router)#no synchronization
end
r4配置:
Router#enable
Router#config terminal
Router#enable password cisco
Router#hostname R4
r4(config)#no ip domain lookup
r4(config)#interface loopback 0
r4(config-if)#ip address 4.4.4.4 255.255.255.0
r4(config)#interface s 0
r4(config-if)#ip address 6.6.34.4 255.255.255.0
r4(config-if)#clock rate 64000
r4(config-if)#no shutdown
r4(config-if)#ip ospf authenticaion-key cisco-123
r4(config)#interface s 1
r4(config-if)#ip address 6.6.45.4 255.255.255.0
r4(config-if)#clock rate 64000
r4(config-if)#no shutdown
r4(config-if)#ip ospf message-digest-key 1 md5 cisco-123
r4#(config)#router ospf 1
r4#(config-router)#router-id 4.4.4.4
r4#(config-router)#network 4.4.4.4 0.0.0.255 area 0
r4#(config-router)#network 6.6.34.4 0.0.0.255 area 0
r4#(config-router)#network 6.6.45.4 0.0.0.255 area 1
r4#(config-router)#area 0 authentication
r4#(config-router)#area 1 authentication message-disgest
r4#(config-router)#area 1 virtual-link 5.5.5.5
r4#(config)#router bgp 200
r4#(config-router)#neighbor 6.6.34.3 remote-as 200
r4#(config-router)#network 4.4.4.0 mask 255.255.255.0 
r4#(config-router)#no synchronization
r4#(config-router)#end
r4#
r5配置:
Router#enable
Router#config terminal
Router#enable password cisco
Router#hostname R5
r5(config)#no ip domain lookup
r5(config)#access-list 1 deny 1.1.1.0 0.0.0.255
r5(config)#access-list 1 permit any
r5(config)#interface loopback 0
r5(config-if)#ip address 5.5.5.5 255.255.255.0
r5(config)#interface loopback 1
r5(config-if)#ip address 8.8.12.1 255.255.255.0
r5(config)#interface loopback 2
r5(config-if)#ip address 8.8.13.1 255.255.255.0
r5(config)#interface loopback 3
r5(config-if)#ip address 8.8.14.1 255.255.255.0
r5(config)#interface s 0
r5(config-if)#ip address 6.6.45.5 255.255.255.0
r5(config-if)#no shut
r5(config-if)#ip ospf message-digest-dey 1 md5 cisco-123
r5(config-if)#ip access-group 1 in
r5#(config)#router ospf 1
r5#(config-router)#router-id 5.5.5.5
r5#(config-router)#network 5.5.5.5 0.0.0.255 area 1
r5#(config-router)#network 6.6.45.5 0.0.0.255 area 1
r5#(config-router)#network 8.8.12.1 0.0.0.255 area 2
r5#(config-router)#network 8.8.13.1 0.0.0.255 area 2
r5#(config-router)#network 8.8.14.1 0.0.0.255 area 2
r4#(config-router)#area 2 range 8.8.12.0 255.255.252.0
r5#(config-router)#area 1 authentication message-disgest
r5#(config-router)#area 1 virtual-link 4.4.4.4
r5#(config-router)#end
r5#
幀中繼交換機配置:
Router#enable
Router#config terminal
Router#enable password cisco
Router#hostname frameswitch
frameswitch#conf t
frameswitch(config)#frame-relay switching
frameswitch(config)#interface s 0/1
frameswitch(config-if)#encapsulation frame-relay
frameswitch(config-if)#clock rate 64000
frameswitch(config-if)#no shutdown
frameswitch(config-if)#frame-relay lmi-type ansi
frameswitch(config-if)#frame-relay intf-type dce
frameswitch(config-if)#frame-relay route 100 interface s 0/0 100
frameswitch(config)#interface s 0/0
frameswitch(config-if)#encapsulation frame-relay
frameswitch(config-if)#clock rate 64000
frameswitch(config-if)#no shutdown
frameswitch(config-if)#frame-relay lmi-type ansi
frameswitch(config-if)#frame-relay intf-type dce
frameswitch(config-if)#frame-relay route 100 interface s 0/1 100
frameswitch(config)#end
frameswitch#
測試命令:ping 和debug 
本文出自 “飛奔男孩” 博客,請務必保留此出[url]http://xiaotao.blog.51cto.com/432500/145440[/url]
本文出自 51CTO.COM技術博客
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章