实验前推介阅读
http://haolun.blog.51cto.com/173913/992834

 

 

【实验要求】

在R2上使用 community 的No-Advertise 确保 AS1、AS2、AS3能够访问互相通告的地址,并且只有R2能够访问R5的Loopback1地址155.1.58.0/24

 
【实验拓扑】

【实验基本配置】
1:
interface FastEthernet0/0
ip address 155.1.146.1 255.255.255.0

interface Serial0/0
ip address 155.1.13.1 255.255.255.0
clock rate 2000000

router eigrp 2
network 155.1.13.1 0.0.0.0
no auto-summary
!
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 155.1.13.3 remote-as 2
neighbor 155.1.13.3 next-hop-self
neighbor 155.1.23.2 remote-as 2
neighbor 155.1.23.2 next-hop-self
neighbor 155.1.146.4 remote-as 3
no auto-summary

R2:
interface Serial0/0
ip address 155.1.23.2 255.255.255.0
clock rate 2000000

interface Serial0/1
ip address 155.1.0.2 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 155.1.0.5 205 broadcast

router eigrp 2

network 155.1.23.2 0.0.0.0
auto-summary
!
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 155.1.0.5 remote-as 1
neighbor 155.1.13.1 remote-as 2
neighbor 155.1.13.1 next-hop-self
neighbor 155.1.23.3 remote-as 2
neighbor 155.1.23.3 next-hop-self
R3:(注意R3不用配置next-hop-self,因为它不不是边界路由器)
interface Loopback0
ip address 155.1.37.3 255.255.255.0

interface Serial0/0
ip address 155.1.13.3 255.255.255.0
clock rate 2000000

interface Serial0/1
ip address 155.1.23.3 255.255.255.0
clock rate 2000000

router eigrp 2
network 155.1.13.3 0.0.0.0
network 155.1.23.3 0.0.0.0
auto-summary
!
router bgp 2
no synchronization
bgp log-neighbor-changes
network 155.1.37.0 mask 255.255.255.0
neighbor 155.1.13.1 remote-as 2
neighbor 155.1.23.2 remote-as 2
no auto-summary

R4:
interface Loopback0
ip address 204.12.1.4 255.255.255.0
!
interface FastEthernet0/0
ip address 155.1.146.4 255.255.255.0

router bgp 3
no synchronization
bgp log-neighbor-changes
network 204.12.1.0
neighbor 155.1.146.1 remote-as 2
no auto-summary

R5:
interface Loopback0
ip address 155.1.5.5 255.255.255.0
interface Loopback1
ip address 155.1.58.5 255.255.255.0

interface Serial0/0
ip address 155.1.0.5 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 155.1.0.2 502 broadcast

router bgp 1
no synchronization
bgp log-neighbor-changes
network 155.1.5.0 mask 255.255.255.0
network 155.1.58.0 mask 255.255.255.0
neighbor 155.1.0.2 remote-as 2
no auto-summary

【实验前验证】

R4#show ip bgp 下面输出结果中存在155.1.58.0
<隐藏部分输出结果>
Network Next Hop Metric LocPrf Weight Path
*> 155.1.5.0/24 155.1.146.1 0 2 1 i
*> 155.1.37.0/24 155.1.146.1 0 2 i
*> 155.1.58.0/24 155.1.146.1 0 2 1 i
*> 204.12.1.0 0.0.0.0 0 32768 i

 
R3#show ip bgp R3同样能够学习到 155.1.58.0/24 地址
<隐藏部分输出结果>
Network Next Hop Metric LocPrf Weight Path
*>i155.1.5.0/24 155.1.23.2 0 100 0 1 i
*> 155.1.37.0/24 0.0.0.0 0 32768 i
*>i155.1.58.0/24 155.1.23.2 0 100 0 1 i
*>i204.12.1.0 155.1.13.1 0 100 0 3 i

【实验配置】
注意下面的route-map配置,必须增加一条 permit20 否则route-map的默认规则是阻断所有。
在R2上配置确保匹配到 155.1.58.0/24 网络,将其community设置为no-advertise 即不通告该路由到任何对等体(包括internel和External)
R2:
route-map NO_ADVERTISE permit 10
match ip address prefix-list VLAN58
set community no-advertise
!
route-map NO_ADVERTISE permit 20

!
router bgp 2
neighbor 155.1.0.5 route-map NO_ADVERTISE in
!
ip prefix-list VLAN58 permit 155.1.58.0/24
!
【实验验证】
R3#show ip bgp 结果中没有155.1.58.0/24 的网络
<隐藏部分输出结果>
Network Next Hop Metric LocPrf Weight Path
*>i155.1.5.0/24 155.1.23.2 0 100 0 1 i
*> 155.1.37.0/24 0.0.0.0 0 32768 i
*>i204.12.1.0 155.1.13.1 0 100 0 3 i

R4#show ip bgp 结果中没有155.1.58.0/24 的网络
<隐藏部分输出结果>
Network Next Hop Metric LocPrf Weight Path
*> 155.1.5.0/24 155.1.146.1 0 2 1 i
*> 155.1.37.0/24 155.1.146.1 0 2 i
*> 204.12.1.0 0.0.0.0 0 32768 i

R1#show ip bgp
<隐藏部分输出结果> 结果中没有155.1.58.0/24 的网络
Network Next Hop Metric LocPrf Weight Path
*>i155.1.5.0/24 155.1.23.2 0 100 0 1 i
*>i155.1.37.0/24 155.1.13.3 0 100 0 i
*> 204.12.1.0 155.1.146.4 0 0 3 i

R2#show ip bgp R2 可以学习到155.1.58.0/24的网络,但它不传给其他对等体
<隐藏部分输出结果>
Network Next Hop Metric LocPrf Weight Path
*> 155.1.5.0/24 155.1.0.5 0 0 1 i
*>i155.1.37.0/24 155.1.23.3 0 100 0 i
*> 155.1.58.0/24 155.1.0.5 0 0 1 i
*>i204.12.1.0 155.1.13.1 0 100 0 3 i
R2#show ip bgp 155.1.58.0 注意下面R2学习到的155.1.58.0 网络的community已经被标记为no-advertise
BGP routing table entry for 155.1.58.0/24, version 4
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to any peer)
Not advertised to any peer
1
155.1.0.5 from 155.1.0.5 (155.1.5.5)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: no-advertise


 

转载于:https://blog.51cto.com/haolun/992825

BGP no-advertise相关推荐

  1. BGP-13 配置BGP多路径发布

    JUNIPER文档里面对add-path的解释: "BGP peers advertise routes to each other in update messages. BGP stor ...

  2. CCNP350-401学习笔记(易错题合集)

    CCNP350-401学习笔记(1-50题)_殊彦_sy的博客-CSDN博客CCNP350-401学习笔记(2023.2.17)https://blog.csdn.net/shuyan1115/art ...

  3. BGP Soft Reset Enhancement

    Feture Overview: 对每个peer的policy(如,route-map,distribute-list,prefix-list,filter-list等),可能会影响inbound或o ...

  4. 互联网协议 — BGP 边界网关协议 — Router(路由器)

    目录 文章目录 目录 BGP Router 的角色类型 BGP Router 的状态机 BGP Router 的邻居关系建立 I-BGP 邻居关系的建立 I-BGP Router 的组网模式 Full ...

  5. ENSPLAB笔记:配置VXLAN(分布式网关,BGP EVPN方式)(Part1)

    目录 1.实验目的 2.实验环境 2.1 实验拓扑 2.2 数据准备 2.3 设备型号 3.实验内容 4.配置步骤 4.1 基础配置 4.2 配置业务接入点 4.3 配置BGP EVPN Peer 4 ...

  6. BGP知识手册-华为-华三-思科

    备注:以下资料整理自以下三个网站,有华为,华三,思科三个厂商官网的BGP相关资料.放这里是为了自己查看方便.同时,有需要的可以参考参考. 官方文档BGP相关资料: 华为:https://support ...

  7. BGP协议:简介、属性、选路原则

    BGP协议:简介.属性.选路原则 目录 BGP协议:简介.属性.选路原则 一.学习网络BGP必备基础知识 二.BGP 工作原理 三.BGP报文 四.BGP邻居关系的配置 五.BGP需要注意的事项 六. ...

  8. BGP属性即选路规则

    BGP属性即选路规则 文章目录 BGP属性即选路规则 BGP属性 1.Origin(起源属性) 2.AS-Path属性 3.next-hop(下一跳属性) 4.local-preference(本地优 ...

  9. 华为网络配置(BGP)

    目录 前言 一.BGP概述 1.BGP介绍 2.BGP的起源 3.BGP作用 4.BGP的特点 5.BGP的分类和区别 (1)分类 (2)区别 6.BGP报文交互中的角色 7.BGP的路由器号(Rou ...

  10. SonicWALL如何配置BGP

    如何在SonicWALL防火墙上配置BGP(Border Gateway Protocol) 简述: BGP是我们常见的一种路由协议,目前常用于专线网络中.本文介绍如何使用单个ISP配置BGP(边界网 ...

最新文章

  1. APL开发日志--2012-11-08
  2. linux脚本获取当前用户,bash shell 获取当前正在执行脚本的绝对路径
  3. Tortoise SVN 版本控制常用操作汇总(show log)
  4. C++ Builder技巧集锦
  5. 数据结构实验之图论三:判断可达性(dfs/bfs)
  6. 电脑ping不通 plsql能连上_台式电脑不能上网手机却能连上wifi无线网络的解决方法...
  7. 刚回到北京,倒时差中……
  8. SQL Server-聚焦WHERE Column = @Param OR @Param IS NULL有问题?
  9. python基础项目实践之: 学生通讯录管理系统
  10. android系统(3)---dumpsys 知识学习
  11. 【Antlr】rule expr: must label all alternatives or none
  12. 1、Java多线程基础:进程和线程之由来
  13. 孙鑫VC学习笔记:第十三讲 (五) 保存可串行化的类对象 如何获取文档与视类指针
  14. JavaScript 中的事件对象(读书笔记思维导图)
  15. 一步一步学Repast 第四章——分析SimpleModel
  16. Android Studio 如何使用uiautomatorviewer.bat,文件夹下没有uiautomatorviewer.bat
  17. ktt算法 约化_矩阵特征与特征向量的计算
  18. 整流十五—网侧低频电流谐波抑制方法及其稳定性分析
  19. 基于Android Studio实现的学生蹭课APP
  20. 新闻报道翻译研讨20091128 饱受战争冲突之苦的国家腐败根深蒂固Corruption Digs Deepest in Countries in Conflict...

热门文章

  1. 【C++标准库】并发
  2. 47. 对数组进行冒泡排序,实现冒泡排序的基础版与优化版
  3. (一)python简单应用
  4. thinkphp模型中的获取器和修改器(根据字段名自动调用模型中的方法)
  5. Dockerfile 常用指令 - 每天5分钟玩转 Docker 容器技术(16)
  6. 推荐几个MySQL大牛的博客
  7. crack笔记1 常用脱壳方法
  8. 关于Block Formatting Context--BFC和IE的hasLayout
  9. 在main()之前,IAR都做了啥?
  10. 小问题(可能持续更新)