操作BGP路由过滤(基于路由条目)实际案例(配图+详细验证过程)

简介:


路由能够基于网络号过滤到或来自于某个特定邻居的路由更新。由访问列表组成的过滤器被应用到所有发送到或来自于某个特定邻居的BGP更新上。
 
本案例中,我们在R1上配置一个distribute-list,防止1.0.0.0/8被通告入AS200中。
 
 
//// r1 ////
int f2/0
  ip ad 192.1.1.1 255.255.255.0
 
int f3/0
  ip ad 193.1.1.1 255.255.255.0
 
int lo0
  ip ad 1.1.1.1 255.255.255.0
 
int lo1
  ip ad 2.2.2.2 255.255.255.0
 
router bgp 100
  no syn
  neighbor 192.1.1.2 remote-as 200
  neighbor 193.1.1.3 remote-as 200
  network 1.0.0.0
  network 1.0.0.0
  neighbor 193.1.1.3 distribute-list 1 out
 
access-list 1 deny 1.0.0.0 0.255.255.255
access-list 1 permit any
 
 
 
//// r2 ////
int f2/0
  ip ad 192.1.1.2 255.255.255.0
 
int f4/0
  ip ad 194.1.1.2 255.255.255.0
 
router os 1
  netw 0.0.0.0 255.255.255.255 a 0
  passive-interface f2/0
 
router bgp 200
  no syn
  neighbor 192.1.1.1 remote-as 100
  neighbor 194.1.1.4 remote-as 200
  neighbor 195.1.1.3 remote-as 200
  neighbor 194.1.1.4 next-hop-self
 
 
//// r3 ////
int f3/0
  ip ad 193.1.1.3 255.255.255.0
 
int f5/0
  ip ad 195.1.1.3 255.255.255.0
 
router os 1
  netw 0.0.0.0 255.255.255.255 a 0
  passive-interface f3/0
 
router bgp 200
  no syn
  neighbor 193.1.1.1 remote-as 100
  neighbor 195.1.1.4 remote-as 200
  neighbor 195.1.1.4 next-hop-self
  neighbor 194.1.1.2 remote-as 200
 
 
//// r4 ////
int f4/0
  ip ad 194.1.1.4 255.255.255.0
 
int f5/0
  ip ad 195.1.1.4 255.255.255.0
 
int lo0
  ip ad 4.4.4.4 255.255.255.0
 
router os 1
  netw 0.0.0.0 255.255.255.255 a 0
 
router bgp 200
  no syn
  neighbor 194.1.1.2 remote-as 200
  neighbor 195.1.1.3 remote-as 200
  netw 4.0.0.0
 
 
 
验证:
r2#sh ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*> 1.0.0.0          192.1.1.1                0             0 100 i
* i2.0.0.0          193.1.1.1                0    100      0 100 i
*>                  192.1.1.1                0             0 100 i
*>i4.0.0.0          194.1.1.4                0    100      0 i
 
由193.1.1.1学来的1.0.0.0/8路由条目已被过滤!










本文转自 ciscodocu51CTO博客,原文链接:http://blog.51cto.com/ciscodocu/52810,如需转载请自行联系原作者
目录
相关文章
|
弹性计算 安全 容灾
【深度好文】为什么说用好VPC很重要!
本文详细探讨了阿里云VPC(Virtual Private Cloud)的使用方法及其重要性。 VPC作为用户云上的“数据中心”,提供了安全隔离的网络环境,帮助用户构建和管理云服务。文章首先对比了经典网络和VPC的区别,强调了VPC在安全性、灵活性和扩展性方面的优势。接着,通过具体的规划步骤,包括选择地域、账号规划、网段规划、安全隔离设计等,展示了如何有效利用VPC。此外,还介绍了VPC连接互联网的方式及安全措施,以及VPC与IDC互访的解决方案。 总体而言,VPC不仅是用户上云的第一步,更是构建稳定、高效云基础设施的关键。
|
弹性计算 负载均衡 监控
slb配置健康检查
slb配置健康检查
393 2
|
负载均衡 算法 网络协议
阿里云slb中的lvs介绍
【10月更文挑战第17天】
730 2
|
算法 安全 网络安全
Diffie-Hellman (DH) 算法的工作原理
【8月更文挑战第23天】
2369 0
|
Linux 网络架构 Windows
TTL传输中过期原因,ttl传输中过期的解决办法(ttl传输中过期怎么解决)
A3: 实际上,TTL值需依据实际网络环境设定。过小的TTL值可能导致数据包过早丢弃,影响通信;反之,过大的TTL值则可能占用不必要的网络资源。因此,科学合理的TTL值设定是平衡通信效率与资源利用的关键。
3367 0
|
运维 负载均衡 算法
|
运维 负载均衡 监控
|
网络协议 数据库 数据安全/隐私保护
|
人工智能 Scala 知识图谱
一场与自己心魔的 “殊死搏斗”
本文主要记录了作者与自己的心魔展开 “殊死搏斗”,最终建立起了一套良好的阅读与写作循环的过程。希望本文可以帮助更多的人破除自己的“心魔”,通过阅读与写作过上更加充实的人生。
10147 111
|
运维 网络协议 安全
Wireshark网络抓包工具入门指南
Wireshark是一款功能强大的开源网络协议分析器,它允许用户捕获和查看网络接口上传输的详细数据包信息。无论是网络故障排查、安全分析还是开发调试,Wireshark都能提供深入的网络洞察。本文旨在为初学者提供Wireshark的基本使用方法,帮助快速掌握网络抓包技巧。
3465 0