标签:华三 cli EAA BGP Track test rtm Device DeviceA
1.7.3 配置EAA和Track联动
1. 组网需求
Device A和Device D、Device E已经建立BGP会话,正常情况下,Device D、Device E发往外网的流量通过Device A转发。现要求通过对Device A进行配置实现:当Device A连接Device C的接口GigabitEthernet1/0/1状态变为Down之后,Device A能够自动感知,并禁止和Device D、Device E建立BGP会话,这样,Device D、Device E发往外网的流量可通过Device B转发。
2. 组网图
图1-3 EAA和Track联动配置组网图
3. 配置步骤
# 查看当前的BGP对等体的状态和统计信息。
BGP local router ID: 1.1.1.1
Local AS number: 100
Total number of peers: 3 Peers in established state: 3
-
- Dynamically created peer
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
10.2.1.2 200 13 16 0 0 00:16:12 Established
10.3.1.2 300 13 16 0 0 00:10:34 Established
10.3.2.2 300 13 16 0 0 00:10:38 Established
# 配置Track项监控接口GigabitEthernet1/0/1的状态。
[DeviceA] track 1 interface gigabitethernet 1/0/1
# 配置Tcl监控策略,当GigabitEthernet1/0/1状态变为Down之后,Device A能够自动感知,并禁止和Device D、Device E建立BGP会话。
[DeviceA] rtm cli-policy test
[DeviceA-rtm-test] event track 1 state negative
[DeviceA-rtm-test] action 0 cli system-view
[DeviceA-rtm-test] action 1 cli bgp 100
[DeviceA-rtm-test] action 2 cli peer 10.3.1.2 ignore
[DeviceA-rtm-test] action 3 cli peer 10.3.2.2 ignore
[DeviceA-rtm-test] user-role network-admin
[DeviceA-rtm-test] commit
[DeviceA-rtm-test] quit
4. 验证配置
# 将GigabitEthernet1/0/1关闭。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] shutdown
# 在DeviceA上使用display bgp peer ipv4命令查看BGP对等体的状态和统计信息,无显示信息,表示BGP对等体数量为0。
标签:华三,cli,EAA,BGP,Track,test,rtm,Device,DeviceA 来源: https://www.cnblogs.com/winyhan/p/16671463.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。