BGP路径属性与选路原则

目录  路径属性

1.定义

2.分类 

3.GNS3实验分析路径属性

4.点击链接查看路由属性实验详解

5.BGP按照如下顺序选择一条没有环路并且可用的路由

 


 

路径属性

1.定义

路径属性:path attributes,作用类似有metric,用于度量BGP的路由优劣(用来进行选路)

 

2.分类 

公认强制属性:所有的BGP的updata消息都要包含该属性

>>>AS路径(AS-path)

>>>下一跳(next-hop)

>>>起源(origin)

公认自由属性:该属性是可选可不选的,但是所有的BGP进程都能识别

>>>本地优先级(local preferent)

可选传递属性:即使BGP进程不能识别该属性,也会继续传递下去

>>>团体属性(community)

可选非传递属性:如果BGP进程不能识别该属性,可以忽略这条updata,并且不传递下去

 >>>MED

 

 

3.GNS3实验分析路径属性

实验目的:通过修改bgp路径属性(as-path、next-hop、origin、local preferent、MED)来修改bgp的选路

 

4.点击链接查看路由属性实验详解

as-path 实验分析

next-hop 实验分析

origin 实验分析

local preference 实验分析

MED 实验分析

weight 实验分析

  5.BGP按照如下顺序选择一条没有环路并且可用的路由:

  1. 权重:Prefer highest weight (local to router).
  2. 本地优先级:Prefer highest local preference (global within AS).
  3. 起源于本地:Prefer route originated by the local router (next hop = 0.0.0.0)
  4. 最短AS路径:Prefer shortest AS path.
  5. 最低的起源属性:Prefer lowest origin code (IGP < EGP < incomplete).
  6. 最低的MED:Prefer lowest MED.
  7. EBGP优于IBGP:Prefer EBGP path over IBGP path.
  8. 最近的IGP邻居:Prefer the path through the closest IGP neighbor.
  9. 生存最长的路由:Prefer oldest route for EBGP paths.
  10. 最低的router-id:Prefer the path with the lowest neighbor BGP router ID.
  11. 最低的IP地址:Prefer the path with the lowest neighbor IP address.

猜你喜欢

转载自blog.csdn.net/Mr_Bei/article/details/83856616