BGP综合实验

一、实验拓扑

二、实验要求

1、AS1存在两个环回,一个地址为192.168.1.0/24该地址不能在任何协议中宣告,AS3中存在两个环回,一个地址为192.168.2.0/24该地址不能在任何协议中宣告,最终要求这两个环回可以互相通讯

2、整个AS2的IP地址为172.16.0.0/16,请合理划分

3、AS间的骨干链路IP地址随意定制

4、使用BGP协议让整个网络所有设备的环回可以互相访问

5、减少路由条自数量,避免环路出现

三 、实验配置

AS1存在两个环回,一个地址为192.168.1.0/24该地址不能在任何协议中宣告,AS3中存在两个环回,一个地址为192.168.2.0/24该地址不能在任何协议中宣告,最终要求这两个环回可以互相通讯

interface LoopBack0
 ip address 192.168.1.1 255.255.255.0 
interface LoopBack1
 ip address 192.168.4.1 255.255.255.0 
interface LoopBack0
 ip address 192.168.2.1 255.255.255.0 
interface LoopBack1
 ip address 192.168.5.1 255.255.255.0 

整个AS2的IP地址为172.16.0.0/16,请合理划分

使用BGP协议让整个网络所有设备的环回可以互相访问,R2内部使用OSPF宣告

 R1:

bgp 1
 peer 12.1.1.2 as-number 2 
  network 192.168.4.0 
  peer 12.1.1.2 enable

R2:

bgp 64512
 confederation id 2
 confederation peer-as 64513
 peer 12.1.1.1 as-number 1 
 peer 13.1.1.2 as-number 64513 
 peer 13.1.1.2 ebgp-max-hop 255 
 peer 172.16.48.1 as-number 64512 
 peer 172.16.48.1 connect-interface LoopBack0
  aggregate 172.16.0.0 255.255.0.0 detail-suppressed 
  network 172.16.16.0 255.255.240.0
  peer 172.16.48.1 next-hop-local
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 172.16.0.0 0.0.255.255

R3:

bgp 64512
 confederation id 2
 peer 172.16.16.1 as-number 64512 
 peer 172.16.16.1 connect-interface LoopBack0
 peer 172.16.80.1 as-number 64512 
 peer 172.16.80.1 connect-interface LoopBack0                 
  network 172.16.48.0 255.255.240.0 
  peer 172.16.16.1 reflect-client  -----配置为路由反射器
  peer 172.16.16.1 next-hop-local 
  peer 172.16.80.1 reflect-client
  peer 172.16.80.1 next-hop-local 
ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 0.0.0.0 255.255.255.255

R4:

bgp 64512
 confederation id 2
 confederation peer-as 64513
 peer 14.1.1.2 as-number 64513 
 peer 14.1.1.2 ebgp-max-hop 255 
 peer 172.16.48.1 as-number 64512 
 peer 172.16.48.1 connect-interface LoopBack0
  aggregate 172.16.0.0 255.255.0.0 detail-suppressed 
  network 172.16.0.0 
  network 172.16.80.0 255.255.240.0 
  peer 172.16.48.1 next-hop-local
ospf 1 router-id 4.4.4.4 
 area 0.0.0.0 
  network 0.0.0.0 255.255.255.255 

R5:

bgp 64513
 confederation id 2
 confederation peer-as 64512
 peer 13.1.1.1 as-number 64512 
 peer 13.1.1.1 ebgp-max-hop 255 
 peer 172.16.128.1 as-number 64513 
 peer 172.16.128.1 connect-interface LoopBack0
  aggregate 172.16.0.0 255.255.0.0 detail-suppressed 
  network 172.16.96.0 255.255.240.0 
  peer 172.16.128.1 next-hop-local
ospf 1 router-id 5.5.5.5 
 area 0.0.0.0 
  network 0.0.0.0 255.255.255.255

R6:

bgp 64513
 confederation id 2
 peer 172.16.96.1 as-number 64513 
 peer 172.16.96.1 connect-interface LoopBack0
 peer 172.16.160.1 as-number 64513 
 peer 172.16.160.1 connect-interface LoopBack0                   
  network 172.16.128.0 255.255.240.0 
  peer 172.16.96.1 reflect-client
  peer 172.16.96.1 next-hop-local 
  peer 172.16.160.1 reflect-client
  peer 172.16.160.1 next-hop-local
ospf 1 router-id 6.6.6.6 
 area 0.0.0.0 
  network 0.0.0.0 255.255.255.255

R7:

bgp 64513
 confederation id 2
 confederation peer-as 64512
 peer 14.1.1.1 as-number 64512 
 peer 14.1.1.1 ebgp-max-hop 255 
 peer 15.1.1.1 as-number 3 
 peer 172.16.128.1 as-number 64513 
 peer 172.16.128.1 connect-interface LoopBack0
  aggregate 172.16.0.0 255.255.0.0 detail-suppressed 
  network 172.16.160.0 255.255.240.0 
  peer 172.16.128.1 next-hop-local
ospf 1 router-id 7.7.7.7 
 area 0.0.0.0 
  network 172.16.0.0 0.0.255.255 

R8:

bgp 3
 peer 15.1.1.2 as-number 2 
  network 192.168.5.0 
  peer 15.1.1.2 enable

测试:

减少路由条自数量,避免环路出现

区域二进行手工汇总并抑制明细

  aggregate 172.16.0.0 255.255.0.0 detail-suppressed

在R1和R8上配置GRE

R1:

interface Tunnel0/0/0
 ip address 192.168.9.1 255.255.255.0 
 tunnel-protocol gre
 source 192.168.4.1
 destination 192.168.5.1
ip route-static 0.0.0.0 0.0.0.0 192.168.9.2

R8:

interface Tunnel0/0/0
 ip address 192.168.9.2 255.255.255.0 
 tunnel-protocol gre
 source 192.168.5.1
 destination 192.168.4.1
ip route-static 0.0.0.0 0.0.0.0 192.168.9.1

测试:

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值