H3C_S7500E_BGP路由属性控制路由选择典型配置举例
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Vlan-int 12 12.12.12.1/24
Vlan-int 46 46.46.46.4/24
Vlan-int 46 46.46.46.6/24
Internet AS 400
Loop0 6.6.6.6/32
Device A
Vlan-int 13 13.13.13.1/24
ISP 2 AS 300
3 通过AS-Path属性控制路由选择典型配置举例
3.1 组网需求
如 图 1 所示,所有设备均运行BGP协议。AS 100 和AS 400 之间有两条路径可以通信,这两条路径 分别经过AS 200 和AS 300。现要求通过配置路由策略,实现: • AS 100 内的设备访问 AS 200 始发的路由时,优先选择从 Device D 转发; • AS 100 内的设备访问 AS 300 始发的路由时,优先选择从 Device E 转发; • AS 100 内的设备访问 AS 400 始发的路由时,优先选择从 Device D 转发。 图1 AS-Path 属性控制路由选择配置组网图
Loop0 5.5.5.5/32
1
3.2 配置思路
• 为了使 AS 100 内的设备能够根据路由的始发 AS 号来选择优先转发路径,需要在 AS 100 的 边缘设备上为特定 AS 始发的路由提高优先级,并将该路由扩散至 AS 100 内部: { 在 Device B 上配置路由策略,将从 AS 200 或 AS 400 始发的路由的本地优先级设置为 300; { 在 Device C 上配置路由策略,将从 AS 300 始发的路由的本地优先级设置为 200。
# 请参考以上方法配置其它相关接口的 IP 地址,配置步骤这里省略。
3.4.2 配置BGP连接
# 在 Device A 上创建本地 AS 号为 100 的 BGP 实例,指定对等体 12.12.12.2 和 13.13.13.3。
[DeviceA] bgp 100 [DeviceA-bgp] router-id 1.1.1.1 [DeviceA-bgp] peer 12.12.12.2 as-number 100 [DeviceA-bgp] peer 13.13.13.3 as-number 100 [DeviceA-bgp] address-family ipv4 unicast [DeviceA-bgp-ipv4] peer 12.12.12.2 enable [DeviceA-bgp-ipv4] peer 13.13.13.3 enable [DeviceA-bgp-ipv4] quit [DeviceA-bgp] quit
• 使用 AS 路径过滤列表来匹配由指定 AS 始发的路由。
3.3 使用版本
本举例是在 S7500E-CMW710-R7150 版本上进行配置和验证的。
3.4 配置步骤
3.4.1 配置各接口的IP地址
# 配置接口 Vlan-interface 12 的 IP 地址。
<DeviceA> system-view [DeviceA] interface Vlan-interface 12 [DeviceA-Vlan-interface12] ip address 12.12.12.1 24 [DeviceA-Vlan-interface12] quit
ii
1 简介
本文档介绍使用通过 BGP 路由属性控制路由选择的配置举例。
2 配置前提
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺 省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置 不冲突。 本文档假设您已了解 BGP 特性和路由策略特性。
3.4.1 配置各接口的IP地址 ·················································································································· 2 3.4.2 配置BGP连接·····························································································································2 3.4.3 配置路由策略 ····························································································································· 4 3.5 验证配置 ··············································································································································· 5 3.6 配置文件 ··············································································································································· 5 4 通过MED属性控制路由选择典型配置举例 ···························································································· 9 4.1 组网需求 ··············································································································································· 9 4.2 配置思路 ············································································································································· 10 4.3 使用版本 ············································································································································· 10 4.4 配置步骤 ············································································································································· 10 4.4.1 基础配置 ·································································································································· 10 4.4.2 配置路由策略 ··························································································································· 12 4.5 验证配置 ············································································································································· 12 4.6 配置文件 ············································································································································· 12 5 相关资料 ············································································································································· 14
AS 100
Loop0 1.1.1.1/32
Loop0 2.2.2.2/32
ISP 1
AS 200 Loop0
4.4.4.4/32
Vlan-int 24 24.24.24.2/24
Device B
Vlan-int 12 12.12.12.2/24
Vlan-int 24 24.24.24.4/24
Device D
H3C S7500E BGP 路由属性控制路由选择典 型配置举例
Copyright © 2015 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。
i
目录
1 简介 ······················································································································································ 1 2 配置前提 ··············································································································································· 1 3 通过AS-Path属性控制路由选择典型配置举例 ······················································································· 1
3.1 组网需求 ··············································································································································· 1 3.2 配置思路 ··············································································································································· 2 3.3 使用版本 ··············································································································································· 2 3.4 配置步骤 ··············································································································································· 2
Device F
Vlan-int 56 56.56.56.6/24
Vlan-int 13 13.13.13.3/24
Device C
ຫໍສະໝຸດ Baidu
Device E Vlan-int 35
35.35.35.5/24
Vlan-int 35
35.35.35.3/24
Vlan-int 56 56.56.56.5/24
Loop0 3.3.3.3/32