[HCIP]第七天作业

拓扑图

在这里插入图片描述

要求

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,减少路由条目数量,避免环路出现

配置IP

在这里插入图片描述

配置边界静态

[r2]ip route-static 1.1.1.1 32 12.1.1.1
[r1]ip route-static 172.16.0.2 32 12.1.1.2

`[r7]ip route-static 8.8.8.8 32 78.1.1.8
[r7]ping 8.8.8.8
  PING 8.8.8.8: 56  data bytes, press CTRL_C to break
    Reply from 8.8.8.8: bytes=56 Sequence=1 ttl=255 time=90 ms
    Reply from 8.8.8.8: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 8.8.8.8: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 8.8.8.8: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 8.8.8.8: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 8.8.8.8 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/38/90 ms

R2-R7进行宣告

[r6]ospf 1
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]n	
[r6-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r6-LoopBack1]ospf network-type broadcast 

R1启动BGP

[r1]bgp 1
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 172.16.0.2 as-number 2
[r1-bgp]peer 172.16.0.2 connect-interface LoopBack 0
[r1-bgp]peer 172.16.0.2 ebgp-max-hop 2

[r2]bgp 64512
[r2-bgp]confederation id 2
[r2-bgp]router-id 172.16.0.2 
[r2-bgp]peer 1.1.1.1 as-number 1
[r2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[r2-bgp]peer 1.1.1.1 ebgp-max-hop 2

[r2]bgp 64512
[r2-bgp]peer 172.16.0.3 as-number 64512
[r2-bgp]peer 172.16.0.3 connect-interface LoopBack 0
[r2-bgp]peer 172.16.0.3 next-hop-local 

[r2]bgp 64512
[r2-bgp]confederation peer-as 64513
[r2-bgp]peer 172.16.0.5 as-number 64513
[r2-bgp]peer 172.16.0.5 connect-interface LoopBack 0
[r2-bgp]peer 172.16.0.5 ebgp-max-hop 2

[r3]bgp 64512
[r3-bgp]confederation id 2
[r3-bgp]peer 172.16.0.2 as-number 64512
[r3-bgp]peer 172.16.0.2 connect-interface LoopBack 0
[r3-bgp]peer 
Jan  8 2023 22:02:53-08:00 r3 %%01BGP/3/STATE_CHG_UPDOWN(l)[0]:The status of the
 peer 172.16.0.2 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, 
StateChangeReason=Up)  
[r3-bgp]peer 172.16.0.4 as-number 64512
[r3-bgp]peer 172.16.0.4 connect-interface LoopBack 0
[r3-bgp]peer 172.16.0.4 next-hop-local 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值