雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 3796|回复: 5

[讨论/求助] BGP-综合实验 请教高手

[复制链接]
发表于 2009-4-29 14:11:19 | 显示全部楼层 |阅读模式
发表于 2009-4-29 16:03:35 | 显示全部楼层
直接把帖子发到这里来
发表于 2009-5-17 23:17:17 | 显示全部楼层
太偷懒了。。
发表于 2009-5-18 00:05:46 | 显示全部楼层
发出来给大家看看 TOP 才能解决问题啊
发表于 2009-6-5 13:53:48 | 显示全部楼层
这个我做过了
发表于 2009-6-5 13:54:34 | 显示全部楼层
!==R1

en

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.0  mask 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
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-6-28 14:40 , Processed in 0.079083 second(s), 18 queries , Gzip On.

快速回复 返回顶部 返回列表