思科BGP路由聚合配置实验案例分析
本文讲述了思科BGP路由聚合配置实验。分享给大家供大家参考,具体如下:
如下图示:
R1:
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface Loopback11
ip address 11.11.11.1 255.255.255.0
interface Loopback101
ip address 101.1.1.1 255.255.255.0
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
no sh
interface FastEthernet0/1
ip address 13.1.1.1 255.255.255.0
no sh
router ospf 1
network 1.1.1.1 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
network 13.1.1.0 0.0.0.255 area 0
router bgp 1
bgp router-id 1.1.1.1
network 11.11.11.0 mask 255.255.255.0
network 101.1.1.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
R2:
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Loopback22
ip address 22.22.22.2 255.255.255.0
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
no sh
interface FastEthernet0/1
ip address 24.1.1.2 255.255.255.0
no sh
router ospf 1
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
network 24.1.1.0 0.0.0.255 area 0
router bgp 1
bgp router-id 2.2.2.2
network 22.22.22.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
R3:
interface Loopback0
ip address 3.3.3.3 255.255.255.255
interface Loopback33
ip address 33.33.33.3 255.255.255.0
interface FastEthernet0/0
ip address 34.1.1.3 255.255.255.0
no sh
interface FastEthernet0/1
ip address 13.1.1.3 255.255.255.0
no sh
router ospf 1
network 3.3.3.3 0.0.0.0 area 0
network 13.1.1.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
router bgp 1
bgp router-id 3.3.3.3
network 33.33.33.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
R4:
interface Loopback0
ip address 4.4.4.4 255.255.255.255
interface Loopback44
ip address 44.44.44.4 255.255.255.0
interface FastEthernet0/0
ip address 34.1.1.4 255.255.255.0
no sh
interface FastEthernet0/1
ip address 24.1.1.4 255.255.255.0
no sh
interface FastEthernet1/0
ip address 45.1.1.4 255.255.255.0
no sh
interface FastEthernet1/1
ip address 46.1.1.4 255.255.255.0
no sh
router ospf 1
network 4.4.4.4 0.0.0.0 area 0
network 24.1.1.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
network 45.1.1.0 0.0.0.255 area 0
network 46.1.1.0 0.0.0.255 area 0
router bgp 4
bgp router-id 4.4.4.4
network 44.44.44.0 mask 255.255.255.0
//aggregate-address 101.1.0.0 255.255.252.0 as-set summary-only //抑制全部的101.1.0.0/22明细路由,只发汇总路由。(在此实验,这一条命令是多余的。)
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 ebgp-multihop 255
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 ebgp-multihop 255
neighbor 3.3.3.3 update-source Loopback0
neighbor 5.5.5.5 remote-as 5
neighbor 5.5.5.5 ebgp-multihop 255
neighbor 5.5.5.5 update-source Loopback0
neighbor 6.6.6.6 remote-as 6
neighbor 6.6.6.6 ebgp-multihop 255
neighbor 6.6.6.6 update-source Loopback0
access-list 1 permit 101.1.1.0 //以下五行命令是抑制101.1.1.0这个网段不予通告路由。
route-map apple permit 10
match ip address 1
router bgp 4
aggregate-address 101.1.0.0 255.255.252.0 as-set suppress-map apple
R5:
interface Loopback0
ip address 5.5.5.5 255.255.255.255
interface Loopback55
ip address 55.55.55.5 255.255.255.0
interface FastEthernet1/0
ip address 45.1.1.5 255.255.255.0
no sh
router ospf 1
network 5.5.5.5 0.0.0.0 area 0
network 45.1.1.0 0.0.0.255 area 0
router bgp 5
bgp router-id 5.5.5.5
network 55.55.55.0 mask 255.255.255.0
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
R6:
interface Loopback0
ip address 6.6.6.6 255.255.255.255
interface Loopback66
ip address 66.66.66.6 255.255.255.0
interface Loopback101
ip address 101.1.3.6 255.255.255.0 secondary
ip address 101.1.2.6 255.255.255.0
interface FastEthernet1/1
ip address 46.1.1.6 255.255.255.0
no sh
router ospf 1
network 6.6.6.6 0.0.0.0 area 0
network 46.1.1.0 0.0.0.255 area 0
router bgp 6
bgp router-id 6.6.6.6
network 66.66.66.0 mask 255.255.255.0
network 101.1.2.0 mask 255.255.255.0
network 101.1.3.0 mask 255.255.255.0
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
R5(config-router)#do show ip bgp
BGP table version is 32, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path
*> 11.11.11.0/24 4.4.4.4 0 4 1 i
*> 22.22.22.0/24 4.4.4.4 0 4 1 i
*> 33.33.33.0/24 4.4.4.4 0 4 1 i
*> 44.44.44.0/24 4.4.4.4 0 0 4 i
*> 55.55.55.0/24 0.0.0.0 0 32768 i
*> 66.66.66.0/24 4.4.4.4 0 4 6 i
*> 101.1.0.0/22 4.4.4.4 0 0 4 {1,6} i
*> 101.1.2.0/24 4.4.4.4 0 4 6 i
*> 101.1.3.0/24 4.4.4.4 0 4 6 iR1(config-router)#do show ip bgp
BGP table version is 52, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path
*> 11.11.11.0/24 0.0.0.0 0 32768 i
*>i22.22.22.0/24 2.2.2.2 0 100 0 i
*>i33.33.33.0/24 3.3.3.3 0 100 0 i
* i44.44.44.0/24 4.4.4.4 0 100 0 4 i
*>i 4.4.4.4 0 100 0 4 i
* i55.55.55.0/24 4.4.4.4 0 100 0 4 5 i
*>i 4.4.4.4 0 100 0 4 5 i
* i66.66.66.0/24 4.4.4.4 0 100 0 4 6 i
*>i 4.4.4.4 0 100 0 4 6 i
*> 101.1.1.0/24 0.0.0.0 0 32768 i
* i101.1.2.0/24 4.4.4.4 0 100 0 4 6 i
*>i 4.4.4.4 0 100 0 4 6 i
* i101.1.3.0/24 4.4.4.4 0 100 0 4 6 i
*>i 4.4.4.4 0 100 0 4 6 i
R1(config-router)#do ping 101.1.2.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 101.1.2.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/64/112 ms
增加语句:
R1:
router bgp 1
neighbor 3.3.3.3 route-reflector-client //这两句必须加,否R2和R3不知道对方的存在。
neighbor 2.2.2.2 route-reflector-client
相关文章
- 这篇文章主要介绍了思科BGP AS-PATH配置实验,结合具体实验案例形式分析了思科BGP AS-PATH配置具体步骤与操作命令,需要的朋友可以参考下2020-04-18
- 这篇文章主要介绍了思科Cisco BGP常用show命令,总结整理了思科Cisco BGP使用show命令查看BGP路由表与网络状态相关操作技巧,需要的朋友可以参考下2020-04-05
- 这篇文章主要介绍了BGP边界网关路由协议学习笔记之属性和选路规则,详细分析了BGP属性、路由条件及相关配置命令使用技巧,需要的朋友可以参考下2020-04-08
- 这篇文章主要介绍了BGP边界网关路由协议路由聚合操作,汇总整理了BGP边界网关路由协议路由聚合相关概念、原理、操作命令与使用注意事项,需要的朋友可以参考下2020-04-07
- 这篇文章主要介绍了BGP边界网关路由协议,总结整理了BGP边界网关路由协议的相关概念、原理、配置命令及操作注意事项,需要的朋友可以参考下2020-04-07
最常用路由协议RIP-1/2 OSPF IS-IS BGP的特点对比
RIP协议是最早的路由协议,OSPF是目前应用最广泛的IGP协议,IS-IS是另外一种链路状态型的路由协议,BGP协议是唯一的EGP协议,那么这几种路由协议有什么特点和不同呢?下面就2017-04-06- 在bgp同步打开的情况下,一个BGP路由器不会把那些通过ibgp邻居学到的bgp路由通告给自己的ebgp邻居;除非自己的igb路由表中存在这些路由,才可以向ebgp路由器通告;有需要的朋2016-10-16
- 路由包括两个基本的动作:确定最佳路径和信息群(通常称为分组)通过网络的传输。通过网络传输分组相对较简单, 而路径的确定可以分复杂。 BGP 就是当今网络中实现路径选择2016-10-16
- BGP作为一种广泛使用的边界网关路由协议,从设计上提供了强大的路由过滤能力,与一般的访问列表ACL不同的是,基于BGP属性的路由过滤是通过对路由属性的控制或修改来完成的2016-10-16
- 这篇文章主要为大家介绍了边界网关协议BGP的概念,怎么配置BGP?下面文章里有详细的BGP基本配置的方法步骤,有兴趣的可以和脚本之家的小编一起来看一下2014-09-24
最新评论