HCIP bgp实验

任务:

1.R1上有两个环回,分别为192.168.1.0/24&192.168.2.0/24,只允许学到汇总&1.0

2.R7上有两个环回172.16.1.0/24&172.16.2.0/24,要求全部宣告,但是只有2.0可以通过

3.全网可达

第一步,配置IP&环回地址

以R1为例,R2~R7同理

interface LoopBack 0
ip address 1.1.1.1 32
interface GigabitEthernet 0/0/0
ip address 12.1.1.1 24
interface LoopBack 1
ip address 192.168.1.1 24
interface LoopBack 2
ip address 192.168.2.1 24

第二步,配置RIP

以R1为例,R2同理

rip 1
versiong 2
network 12.0.0.0
network 1.0.0.0
network 192.168.1.0
network 192.168.2.0

第三步,配置OSPF

以R3为例,R4~R7同理

ospf 1 router-id 3.3.3.3
area 0
network 3.3.3.3 0.0.0.0
network 34.1.1.1 0.0.0.0

配置重发布

R2

import-route rip 1

R3,R5同理

import-route ospf 1

R6

import-route ospf 2

修改本地连接

R3

peer 5.5.5.5 next-hop-local

R5

peer 3.3.3.3 next-hop-local

R6

peer 7.7.7.7 next-hop-local

R2

peer 1.1.1.1 next-hop-local

设置抑制列表

R2

ip ip-prefix xx permit 192.168.1.0 24
route-policy yy permit node 10
if-match ip-prefix xx
quit
bgp 100
aggregate 192.168.0.0 22 detail-suppressed suppress-policy yy

R6

ip ip-prefix xx permit 172.16.1.1 32
route-policy yy deny node 10
if-match ip-prefix xx
quit
route-policy yy deny node 20
quit
bgp 102
peer 56.1.1.1 route-policy yy export

  • 7
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值