BGP-综合实验 请教高手
http://ciscobbs.njut.edu.cn/bbs/viewthread.php?tid=10069&page=1&extra=page%3D1 直接把帖子发到这里来 太偷懒了。。 发出来给大家看看 TOP 才能解决问题啊 这个我做过了 !==R1en
conf
host R1
line co 0
exec-ti 0 0
exit
inter lo 0
ip add 10.10.0.1 255.255.255.0
exit
inter se 1/1
ip add 1.1.0.1 255.255.255.0
no shu
exit
router bgp 100
nei 1.1.0.2 remote 100
net 10.10.0.0 mask 255.255.255.0
net 1.1.0.0mask 255.255.255.0
no au
no sy
exit
!==R2
en
conf
host R2
line co 0
exec-ti 0 0
exit
inter se 1/0
ip add 1.1.0.2 255.255.255.0
no shu
exit
inter se 1/1
ip add 1.1.1.1 255.255.255.0
no shu
exit
inter se 1/2
ip add 1.1.8.2 255.255.255.0
no shu
exit
access 1 per 192.168.0.0 0.0.0.255
access 1 deny any
access 2 per 192.168.1.0 0.0.0.255
access 2 deny any
access 3 per 150.150.0.0 0.0.0.255
access 3 per 150.150.4.0 0.0.0.255
access 3 per 1.1.2.0 0.0.0.255
access 3 deny any
route-map as-path per 10
set as-path prepend 500 600 700
exit
route-map as-path per 20
exit
route-map weigh1 per 10
match ip add 1
set weight 100
exit
route-map weigh1 per 20
exit
route-map weigh2 per 10
match ip add 2
set weight 100
exit
route-map weigh2 per 20
exit
router bgp 100
nei 1.1.0.1 remote 100
nei 1.1.8.1 remote 400
nei 1.1.1.2 remote 200
net 1.1.0.0 mask 255.255.255.0
net 1.1.8.0 mask 255.255.255.0
net 1.1.1.0 mask 255.255.255.0
nei 1.1.1.2 route-map weigh1 in
nei 1.1.8.1 route-map weigh2 in
nei 1.1.8.1 route-map as-path out
neighbor 1.1.0.1 next-hop-self
no au
no sy
exit
!==R3
en
conf
host R3
line co 0
exec-ti 0 0
exit
inter lo 0
ip add 150.150.4.1 255.255.255.0
exit
inter se 1/0
ip add 1.1.1.2 255.255.255.0
no shu
exit
inter se 1/1
ip add 1.1.2.1 255.255.255.0
no shu
exit
inter se 1/2
ip add 1.1.4.1 255.255.255.0
no shu
exit
inter se 1/3
ip add 1.1.9.1 255.255.255.0
no shu
exit
access 1 per 150.150.4.0 0.0.0.255
access 1 per 10.10.0.0 0.0.0.255
access 1 deny any
access 2 per 150.150.0.0 0.0.0.255
access 2 per 150.150.4.0 0.0.0.255
access 2 per 1.1.2.0 0.0.0.255
access 2 deny any
route-map med per 10
match ip add 1
set met 100
route-map med per 20
exit
route-map as-path per 10
set as-path prepend 500 600 700
exit
route-map as-path per 20
exit
router bgp 200
nei 1.1.1.1 remote 100
nei 1.1.2.2 remote 200
nei 1.1.9.2 remote 400
nei 1.1.4.2 remote 300
net 150.150.4.0 mask 255.255.255.0
net 1.1.2.0 mask 255.255.255.0
net 1.1.1.0 mask 255.255.255.0
net 1.1.9.0 mask 255.255.255.0
net 1.1.4.0 mask 255.255.255.0
neighbor 1.1.4.2 route-map med out
neighbor 1.1.9.2 route-map as-path out
neighbor 1.1.2.2 next-hop-self
no au
no sy
exit
!==R4
en
conf
host R4
line co 0
exec-ti 0 0
exit
inter lo 0
ip add 150.150.0.1 255.255.255.0
exit
inter se 1/0
ip add 1.1.2.2 255.255.255.0
no shu
exit
inter se 1/1
ip add 1.1.3.1 255.255.255.0
no shu
exit
access 1 per 150.150.4.0 0.0.0.255
access 1 per 10.10.0.0 0.0.0.255
access 1 deny any
access 2 per 192.168.0.0 0.0.0.255
access 2 per 192.168.1.0 0.0.0.255
access 2 deny any
route-map med per 10
match ip add 1
set met 200
route-map med per 20
exit
route-map local per 10
match ip add 2
set local-preference 200
exit
route-map local per 20
exit
router bgp 200
nei 1.1.2.1 remote 200
nei 1.1.3.2 remote 300
net 150.150.0.0 mask 255.255.255.0
net 1.1.2.0 mask 255.255.255.0
net 1.1.3.0 mask 255.255.255.0
neighbor 1.1.3.2 route-map med out
neighbor 1.1.2.1 next-hop-self
neighbor 1.1.2.1 route-map local out
no au
no sy
exit
!==R5
en
conf
host R5
line co 0
exec-ti 0 0
exit
inter lo 0
ip add 192.168.0.1 255.255.255.0
ip add 192.168.1.1 255.255.255.0 se
exit
inter se 1/0
ip add 1.1.3.2 255.255.255.0
no shu
exit
inter se 1/1
ip add 1.1.5.1 255.255.255.0
no shu
exit
inter se 1/2
ip add 1.1.4.2 255.255.255.0
no shu
exit
router bgp 300
nei 1.1.3.1 remote 200
nei 1.1.4.1 remote 200
nei 1.1.5.2 remote 400
net 192.168.0.0 mask 255.255.255.0
net 192.168.1.0 mask 255.255.255.0
net 1.1.3.0 mask 255.255.255.0
net 1.1.4.0 mask 255.255.255.0
net 1.1.5.0 mask 255.255.255.0
no au
no sy
exit
!==R6
en
conf
host R6
line co 0
exec-ti 0 0
exit
inter se 1/0
ip add 1.1.5.2 255.255.255.0
no shu
exit
inter se 1/1
ip add 1.1.6.1 255.255.255.0
no shu
exit
inter se 1/3
ip add 1.1.9.2 255.255.255.0
no shu
exit
access 1 per 150.150.4.0 0.0.0.255
access 1 per 10.10.0.0 0.0.0.255
access 1 deny any
route-map med per 10
match ip add 1
set met 200
route-map med per 20
exit
router bgp 400
nei 1.1.5.1 remote 300
nei 1.1.9.1 remote 200
nei 1.1.6.2 remote 400
nei 1.1.7.2 remote 400
bgp router-id 172.16.255.255
net 1.1.5.0 mask 255.255.255.0
net 1.1.9.0 mask 255.255.255.0
net 1.1.6.0 mask 255.255.255.0
neighbor 1.1.6.2 next-hop-self
neighbor 1.1.7.2 next-hop-self
neighbor 1.1.5.1 route-map med out
no au
no sy
exit
!===R7
en
conf
host R7
line co 0
exec-ti 0 0
exit
inter lo 0
ip add 172.16.0.1 255.255.255.0
exit
inter se 1/0
ip add 1.1.6.2 255.255.255.0
no shu
exit
inter se 1/1
ip add 1.1.7.1 255.255.255.0
no shu
exit
router bgp 400
nei 1.1.7.2 remote 400
nei 1.1.6.1 remote 400
net 1.1.7.0 mask 255.255.255.0
net 1.1.6.0 mask 255.255.255.0
net 172.16.0.0 mask 255.255.255.0
no au
no sy
exit
!===R8
en
conf
host R8
line co 0
exec-ti 0 0
exit
inter se 1/0
ip add 1.1.7.2 255.255.255.0
no shu
exit
inter se 1/2
ip add 1.1.8.1 255.255.255.0
no shu
exit
router bgp 400
nei 1.1.8.2 remote 100
nei 1.1.7.1 remote 400
nei 1.1.6.1 remote 400
net 1.1.8.0 mask 255.255.255.0
net 1.1.7.0 mask 255.255.255.0
neighbor 1.1.7.1 next-hop-self
no au
no sy
exit
页:
[1]