cisco学习笔记

      CCIE之路中。。。。其实我是一个天才,可惜天妒英才!o(∩_∩)o...哈哈

  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  39 随笔 :: 5 文章 :: 36 评论 :: 0 Trackbacks
<2025年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

公告

本blog为作者本人学习cisco所用,未经特别声明,本站所有文章均属作者本人原创,请转载时注明来源!谢谢合作!同时希望与各位cisco爱好者交流学习。QQ:95217333

常用链接

留言簿(4)

随笔分类(34)

随笔档案(39)

文章分类(3)

最新随笔

搜索

积分与排名

最新评论

阅读排行榜

BGPMED试验

拓扑:

 

MED是指在本地配置影响EBGP对等体进站

(默认值是 0 ,越小越优,)

现在要求在R1 R2上做流量分行,即R3 R4到达网络100.100.100.0/24 都是从R1

而到达200.200.200.0/24都是从R2

基本配置之前配置过了,与BGPLP试验是一样的

在没做MED配置前先查看R3 R4bgp路由表

R3#sh  ip bgp

BGP table version is 3, local router ID is 3.3.3.3

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

* i100.100.100.0/24    1.1.1.1                  0    100      0 100 i

*>                  2.2.2.2                                0 100 i

* i200.200.200.0       1.1.1.1                  0    100      0 100 i

*>                  2.2.2.2                  0             0 100 i

 

R4#sh ip bgp

BGP table version is 4, local router ID is 4.4.4.4

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

* i100.100.100.0/24   2.2.2.2                  0    100      0 100 i

*>                  1.1.1.1                  0             0 100 i

*> 200.200.200.0      1.1.1.1                                0 100 i

* i                  2.2.2.2                  0    100      0 100 i

可以看到R3到达100.100.100.0/24以及200.200.200.0/24的下一跳都是2.2.2.2

 

可以看到R4到达100.100.100.0/24以及200.200.200.0/24的下一跳都是1.1.1.1

这是因为EBGP优与IBGP

现在要在R1 R2上做流量分行,R3 R4到达网络100.100.100.0/24 都是从R1即下一跳是(1.1.1.1

而到达200.200.200.0/24都是从R2即下一跳是(2.2.2.2

R1配置:

R1(config)#access-list 1 per 200.200.200.0 0.0.0.255   (在R1上标示出要施加策略的网络)

R1(config)#route-map ccxx per 10

R1(config-route-map)#ma ip add 1

R1(config-route-map)#set metric 1

R1(config-route-map)#exi

R1(config)#route-map ccxx per 20                  (书写空route-map,相当与permit any

R1(config-route-map)#exi

R1(config)#router bgp 100

R1(config-router)#nei 4.4.4.4 route-map ccxx out     (在BGP进程下套用策略)

 

R2配置

R2(config)#access-list 1 per 100.100.100.0 0.0.0.255

R2(config)#route-map ccxx per 10

R2(config-route-map)#match ip address 1

R2(config-route-map)#set metric 1

R2(config-route-map)#exi

R2(config)#route-map ccxx per 20

R2(config-route-map)#exi

R2(config)#router bgp 100

R2(config-router)#nei 3.3.3.3 route-map ccxx out

 

做好后再查看R3 R4BGP路由表:

R3#sh ip bgp

BGP table version is 4, local router ID is 3.3.3.3

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

*>i100.100.100.0/24    1.1.1.1                  0    100      0 100 i

*                    2.2.2.2                  1             0 100 i

*> 200.200.200.0       2.2.2.2                  0             0 100 i

 

R4#sh ip bgp

BGP table version is 5, local router ID is 4.4.4.4

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

*> 100.100.100.0/24   1.1.1.1                  0             0 100 i

*  200.200.200.0     1.1.1.1                  1             0 100 i

*>i                 2.2.2.2                  0    100      0 100 i

与想要的结果完全一致!!1 (*^__^*) 嘻嘻……

posted on 2008-10-07 00:53 cisco交流平台 阅读(2914) 评论(0)  编辑 收藏 引用 所属分类: BGP
只有注册用户登录后才能发表评论。