BGP 实验 , 联邦,聚合,和破解环路,route-map


一:实验拓扑与要求


在这里插入图片描述


二:实验思路


配IP—OSPF–BGP建邻–联邦 (1. 所有建邻和配置均基于小AS编号进行 2. 联邦内所有设备声明自己所在的大AS号
3.小AS间的EBGP邻居关系,需要互指peer;)–BGP的聚合(汇总)R1和R8用不同方法聚合—路由反射器-- 破环(route-map)–Tunnel


三:实验配置


**

R1:

**
!
interface Loopback0
ip address 192.168.1.1 255.255.255.0
!
interface Loopback1
ip address 10.1.1.1 255.255.255.128
!
interface Loopback2
ip address 10.1.1.129 255.255.255.128
!
interface Tunnel0
ip address 10.1.3.1 255.255.255.0
tunnel source 10.1.1.1
tunnel destination 10.1.2.1
!
!
interface Serial3/0
ip address 12.1.1.1 255.255.255.0
serial restart-delay 0

!
router bgp 1
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 10.1.1.0 mask 255.255.255.0
neighbor 12.1.1.2 remote-as 2
no auto-summary
!
ip forward-protocol nd
ip route 10.1.1.0 255.255.255.0 Null0
ip route 192.168.2.0 255.255.255.0 Tunnel0
no ip http server
no ip http secure-server

**

R2:

**
interface Loopback0
ip address 172.16.2.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 172.16.0.9 255.255.255.252
duplex auto
speed auto
!
interface Serial3/0
ip address 12.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial3/1
ip address 172.16.0.1 255.255.255.252
serial restart-delay 0
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 172.16.0.0 0.0.255.255 area 0
!
router bgp 64512
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
bgp confederation identifier 2
bgp confederation peers 64513
network 172.16.0.0
neighbor 12.1.1.1 remote-as 1
neighbor 172.16.3.1 remote-as 64512
neighbor 172.16.3.1 update-source Loopback0
neighbor 172.16.3.1 route-map nex out
neighbor 172.16.5.1 remote-as 64513
neighbor 172.16.5.1 ebgp-multihop 2
neighbor 172.16.5.1 update-source Loopback0
neighbor 172.16.5.1 route-map nex out
no auto-summary
!
ip forward-protocol nd
ip route 172.16.0.0 255.255.0.0 Null0
ip prefix-list nex seq 5 permit 10.1.1.0/24
no cdp log mismatch duplex
!
route-map nex permit 10
match ip address prefix-list nex
set ip next-hop peer-address
!
route-map nex permit 20
!

**

R3:

**
!
interface Loopback0
ip address 172.16.3.1 255.255.255.0
ip ospf network point-to-point
!
!
interface Serial3/0
ip address 172.16.0.5 255.255.255.252
serial restart-delay 0
!
interface Serial3/1
ip address 172.16.0.2 255.255.255.252
serial restart-delay 0
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 172.16.0.0 0.0.255.255 area 0
!
router bgp 64512
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
bgp confederation identifier 2
neighbor 172.16.2.1 remote-as 64512
neighbor 172.16.2.1 update-source Loopback0
neighbor 172.16.4.1 remote-as 64512
neighbor 172.16.4.1 update-source Loopback0
neighbor 172.16.4.1 route-reflector-client
no auto-summary
!

**

R4:

**
interface Loopback0
ip address 172.16.4.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 172.16.0.21 255.255.255.252
duplex auto
speed auto
interface Serial3/0
ip address 172.16.0.6 255.255.255.252
serial restart-delay 0
!
!
router ospf 1
router-id 4.4.4.4
log-adjacency-changes
network 172.16.0.0 0.0.255.255 area 0
!
router bgp 64512
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
bgp confederation identifier 2
bgp confederation peers 64513
neighbor 172.16.3.1 remote-as 64512
neighbor 172.16.3.1 update-source Loopback0
neighbor 172.16.7.1 remote-as 64513
neighbor 172.16.7.1 ebgp-multihop 2
neighbor 172.16.7.1 update-source Loopback0
no auto-summary
!
**

R5:

**
interface Loopback0
ip address 172.16.5.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 172.16.0.10 255.255.255.252
duplex auto
speed auto
!
!
interface Serial3/0
ip address 172.16.0.13 255.255.255.252
serial restart-delay 0
!

!
router ospf 1
router-id 5.5.5.5
log-adjacency-changes
network 172.16.0.0 0.0.255.255 area 0
!
router bgp 64513
no synchronization
bgp router-id 5.5.5.5
bgp log-neighbor-changes
bgp confederation identifier 2
bgp confederation peers 64512
neighbor 172.16.2.1 remote-as 64512
neighbor 172.16.2.1 ebgp-multihop 2
neighbor 172.16.2.1 update-source Loopback0
neighbor 172.16.6.1 remote-as 64513
neighbor 172.16.6.1 update-source Loopback0
no auto-summary
!

**

R6:

**
!
interface Loopback0
ip address 172.16.6.1 255.255.255.0
ip ospf network point-to-point
interface Serial3/0
ip address 172.16.0.14 255.255.255.252
serial restart-delay 0
!
interface Serial3/1
ip address 172.16.0.17 255.255.255.252
serial restart-delay 0
!
router ospf 1
router-id 6.6.6.6
log-adjacency-changes
network 172.16.0.0 0.0.255.255 area 0
!
router bgp 64513
no synchronization
bgp router-id 6.6.6.6
bgp log-neighbor-changes
bgp confederation identifier 2
neighbor 172.16.5.1 remote-as 64513
neighbor 172.16.5.1 update-source Loopback0
neighbor 172.16.7.1 remote-as 64513
neighbor 172.16.7.1 update-source Loopback0
neighbor 172.16.7.1 route-reflector-client
no auto-summary
**

R7:

**
!
interface Loopback0
ip address 172.16.7.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 172.16.0.22 255.255.255.252
duplex auto
speed auto
!
interface Serial3/0
ip address 78.1.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial3/1
ip address 172.16.0.18 255.255.255.252
serial restart-delay 0

!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 172.16.0.0 0.0.255.255 area 0
!
router bgp 64512
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
bgp confederation identifier 2
bgp confederation peers 64513
network 172.16.0.0
neighbor 12.1.1.1 remote-as 1
neighbor 172.16.3.1 remote-as 64512
neighbor 172.16.3.1 update-source Loopback0
neighbor 172.16.3.1 route-map nex out
neighbor 172.16.5.1 remote-as 64513
neighbor 172.16.5.1 ebgp-multihop 2
neighbor 172.16.5.1 update-source Loopback0
neighbor 172.16.5.1 route-map nex out
no auto-summary
!
ip forward-protocol nd
ip route 172.16.0.0 255.255.0.0 Null0
no ip http server
no ip http secure-server
!
!
!
!
ip prefix-list nex seq 5 permit 10.1.1.0/24
no cdp log mismatch duplex
!
!
!
!
route-map nex permit 10
match ip address prefix-list nex
set ip next-hop peer-address
!
route-map nex permit 20
!
!
**

R8:

**
!
interface Loopback0
ip address 192.168.2.1 255.255.255.0
!
interface Loopback1
ip address 10.1.2.1 255.255.255.128
!
interface Loopback2
ip address 10.1.2.129 255.255.255.128
!
interface Tunnel0
ip address 10.1.3.2 255.255.255.0
tunnel source 10.1.2.1
tunnel destination 10.1.1.1
!
interface Serial3/0
ip address 78.1.1.2 255.255.255.0
serial restart-delay 0
!

!
router bgp 3
no synchronization
bgp router-id 8.8.8.8
bgp log-neighbor-changes
network 10.1.2.0 mask 255.255.255.128
network 10.1.2.128 mask 255.255.255.128
aggregate-address 10.1.2.0 255.255.255.0 summary-only
neighbor 78.1.1.1 remote-as 2
no auto-summary
!
ip forward-protocol nd
ip route 192.168.1.0 255.255.255.0 Tunnel0
no ip http server
no ip http secure-server
!


四:测试


在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值