BGP总结

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

配置BGP 的路由属性
设定BGP 协议的优先级 preference { external internal local | route-policy route-policy-name } 配置本机的缺省Local_Pref 属性值 default local-preference preference 配置缺省MED 值 default med med 比较来自不同AS 的MED 值 compare-different-as-med 设置当MED值丢失时将其作为最大值处理 bestroute med-none-as-maximum 当路由属性中的 MED 值丢失时,如果配置了该命令,则BGP 在选路时将MED 值 作为最大值处理,否则将MED 当作0 处理。 配置发布路由时将自身地址作为下一跳 peer { ip-address | group-name } next-hop-local 允许本地AS 编号重复出现 peer { ip-address | group-name } allow-as-loop [ number ] 不将AS_Path 属性作为选路条件 bestroute as-path-neglect 配置伪AS 编号 peer { ip-address | group-name } fake-as fake-as-number 使用此命令可以将本地真实的 AS 编号隐藏,其他AS 内的对等体在指定本端对等体所在的 AS 编号时,应该设置成这个伪AS 编号。
组建大型BGP 网络
配置BGP 对等体组
创建IBGP 对等体组 group group-name [ internal ] 向对等体组中加入对等体 peer ip-address group group-name 创建EBGP 对等体组 group group-name external 设置该对等体组所属的AS 编号 peer group-name as-number as-number 向对等体组中加入对等体 peer ip-address group group-name
执行 peer default-route-advertise 命令后,不论本地路由表中是否存在缺省路由,都将 向指定对等体发布一条下一跳地址为本地地址的缺省路由。
配置相关访问列表
配置AS 路径过滤列表 ip as-path-filter as-path-filter-number { permit | deny } regular-expression 配置标准团体属性过滤器 ip community-filter basic-comm-filter-num { deny | permit } [ community-number | aa:nn ] *&<1-16> [ internet | no-export-subconfed | no-advertise | no-export ] * 配置高级团体属性过滤器 ip community-filter adv-comm-filter-num { permit | deny } regular-expression 扩展团体属性过滤器 ip extcommunity-filter extcomm-filter-number { deny | permit } rt { as-number : nn | ipv4-address : nn } &<1-16>
BGP常用配置命令(华为设备VRP5.30)
配置BGP 的基本功能
启动BGP(指定本地AS 编号) bgp as-number 配置BGP 的Router ID router-id ip-address 指定对等体的IP 地址及其所属的AS 编号 peer ip-address as-number as-number 进入BGP-IPv4 单播地址族视图(系统默认配置在单播地址族视图下) ipv4-family unicast 配置BGP 发布本地路由(要发布的本地路由必须存在于本地的 IP 路由表中) network ip-address [ mask | mask-length ][ route-policy route-policy-name ] 指定BGP 连接所使用的本地接口 peer { ip-address | group-name }connect-interface interface-type interface-number 缺省情况下,BGP 使用与邻居直连的物理接口作为TCP 连接的本地接口。 配置EBGP 连接的最大跳数 peer { ip-address | group-name } ebgp-max-hop [ number ] 通常情况下,EBGP 对等体之间必须具有直连的物理链路,如果不满足这一要求,则必须 使用peer ebgp-max-hop 命令允许它们之间经过多跳建立TCP 连接。
配置BGP 路由衰减参数
dampening [ half-life-reach half-life-unreach reuse suppress ceiling ] [ route-policy route-policy-name ] 指定的reuse、suppress、ceiling 三个阈值是依次增大,dampening 命令只对EBGP 路由 生效。
替换AS_Path 属性中的AS 编号 peer { ip-address | group-name } substitute-as 如果AS_Path 属性中含有对等体所在的AS 的编号, 则在通告给对等体之前, 将这些AS 编号 用本地AS 编号替换。 配置AS_Path 属性中仅携带公有AS 编号(该命令只能应用于 EBGP 对等体。) peer { ip-address | group-name } public-as-only
调整和优化BGP 网络
配置BGP 定时器 timer keepalive keepalive-time hold hold-time 配置对等体/组的keepalive 发送间隔和保持时间 peer { ip-address | group-name } timer keepalive keepalive-time hold hold-time 配置更新报文的发送时间间隔 peer { ip-address | group-name } route-update-interval interval 使能Route-refresh 能力 peer { ip-address | group-name } capability-advertise { route-refresh |conventional } 保留对等体的所有路由更新 peer { ip-address | group-name } keep-all-routes 软复位BGP 连接(用户视图下执行 refresh bgp 命令) refresh bgp [ vpn-instance vpn-instance-name |vpnv4 ] { all | ipv4-address | group group-name |external | internal } { export | import } 使能EBGP 连接快速复 ebgp-interface-sensitive 配置MD5 认证密码 peer { ip-address | group-name } password { cipher | simple } password 配置BGP 最大等价路由条数 maximum load-balancing number
配置BGP wenku.baidu.com入路由
进入BGP 视图 bgp as-number 允许BGP 引入缺省路由 default-route imported 配置BGP 引入其他协议的路由 import-route protocol process-id [ med med |route-policyroute-policy-name ] * import-route 命令不能引入缺省路由 对引入的路由信息进行过滤 filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ] 配置子网路由自动聚合 summary automatic 配置手动路由聚合 aggregate ip-address { mask | mask-length } 向对等体或对等体组发送缺省路由 peer { group-name | ipv4-address } default-route-advertise
配置BGP 路由信息的发布策略
配置出方向路由策略 peer { ip-address | group-name } route-policy route-policy-name export 配置基于ACL 的过滤策略 peer { ip-address | group-name } filter-policy acl-number export 配置基于 AS 路径过滤器的路由过滤 peer { ip-address | group-name } as-path-filter as-path-filter-number export 配置基于前缀列表的路由过滤 peer { ip-address | group-name } ip-prefix ip-prefix-name export
进入BGP 扩展地址族视图
进入L2VPN 地址族视图 进入VPLS 地址族视图 进入VPNv4 地址族视图 进入BGP-VPN 实例视图 进入IPv6 地址族视图 l2vpn-family vpls-family ipv4-family vpnv4 [ unicast ] ipv4-family vpn-instance vpn-instance-name ipv6-family
检查配置结果
查看BGP 发布的路由信息 display bgp network 查看与指定AS 路径过滤器匹配的路由信息 display bgp routing-table as-path-filter as-path-filter-number 查看CIDR 路由信息 display bgp routing-table cidr 查看匹配指定BGP 团体属性过滤器的路由 display bgp routing-table community-filter community-filter-number [ whole-match ] 查看BGP 衰减的路由 display bgp routing-table dampened 查看BGP 衰减的配置参数 display bgp routing-table dampening parameter 查看路由振荡统计信息 display bgp routing-table flap-info 查看BGP 对等体发布或者收到的路由信息 display bgp routing-table peer ip-address { advertised-routes | received-routes } [ statistics ]
配置BGP 路由信息的接收策略
对接收的所有BGP 路由信息进行过滤 filter-policy { acl-number | ip-prefix ip-prefix-name } import 对接收的路由信息应用路由策略 peer { ip-address | group-name } route-policy route-policy-name import 配置基于ACL 的路由过滤 peer { ip-address | group-name } filter-policy acl-number import 配置基于 AS 路径过滤器的路由过滤 peer { ip-address | group-name } as-path-filter as-path-filter-number import 配置基于地址前缀列表的路由过滤 peer { ip-address | group-name } ip-prefix ip-prefix-name import
相关文档
最新文档