0
点赞
收藏
分享

微信扫一扫

BGP——选路之—起源属性+ MED属性+EBGP优于IBGP属性(讲解+配置命令)

目录

一、起源属性:

(1)特性:

 (2)配置命令:

(3)图解:

二、MED属性

(1)特性:

(2)配置命令:

三、EBGP优于IBGP


一、起源属性:

(1)特性:

  • 两种邻居皆可传递,公有
  • 表示这个BGP路由一开始是怎么产生的:

                                    i   --network通告的
                                    ?--重分发进来的
                                    E --BGP的前身协议EGP通告的

  • 选路优先顺序:i>e>?
  • 前提是前面的选路没有选出来(权重+本地优先级+本地始发+AS-path)

—————————————————————————————————————————————————————————— 

 (2)配置命令:

r3(config)#ip prefix-list upaisen seq 1 permit 11.1.1.0/24  //前缀列表,主要匹配路由用的

r3(config)#route-map aaa per 10
r3(config-route-map)#match ip address prefix-list upaisen
r3(config-route-map)#set origin ?
  egp         remote EGP  ————E
  igp         local IGP  ——————i
  incomplete  unknown heritage—?

r3(config-route-map)#set origin incomplete //修改起源属性
r3(config-route-map)#exit
r3(config)#route-map aaa per 9999
r3(config-route-map)#exit

r3(config)#router bgp 200
r3(config-router)#neighbor 13.1.1.1 route-map aaa in
r3(config-router)#exit

————————————————————————————————————————————————————————————— 

(3)图解:

——————————————————————————————————————————————————————————— 

二、MED属性

(1)特性:

  • 1.1 用于入口选路,我AS有两个入口,用于影响其他AS流量从我的那个入口路由器进来
  • 1.2 默认值为0,数值越小越优先
  • 1.3 从自己的EBGP邻居收到的MED可以传给自己的IBGP邻居,从自己的IBGP邻居收到的MED不能传给自己的EBGP邻居

—————————————————————————————————————————————————————————— 

(2)配置命令:

r1(config)#ip prefix-list upaisen seq 1 permit 11.1.1.0/24  //前缀列表,主要匹配路由用的

r1(config)#route-map aaa permit 10  //定义一个策略路由,名字为aaa
r1(config-route-map)#match ip address prefix-list upaisen  //符合这个路由的
r1(config-route-map)#set  metric 1 //设置他的MED数值
r1(config-route-map)#exit

r1(config)#route-map aaa permit 9999  //用这个放行其他的BGP路由,里面没有匹配什么,意味着默认匹配any

r1(config)#router bgp 200
r1(config-router)#neighbor 13.1.1.3 route-map aaa in //从13.1.1.3收到路由执行route-map aaa策略

—————————————————————————————————————————————————————————— 

三、EBGP路由优于IBGP路由

 

 

举报

相关推荐

0 条评论