HCIP第二天作业

 

开始基础配置
r1:
system-view
sysname r1
interface g0/0/0
ip address 12.1.1.1 24
quit 
interface loopback 0
ip address  1.1.1.1 32

r2:
saytem-view
sysname r2
interface g0/0/0
ip address 12.1.1.2 24
quit
interface g0/0/1
ip address 23.1.1.1 24
quit
interface loopback 0
ip address 2.2.2.2 32

r3:
system-view
sysname r3
interface g0/0/0
ip address 23.1.1.2 24
quit
interface f0/0/1
ip address 34.1.1.1 24
quit
interface g0/0/2
ip address 37.1.1.1 24
quit
interface g4/0/0
ip address 38.1.1.1 24
quit
interface loopack 0
ip address 3.3.3.3 32

r4:
system-view
sysname r4
interface g0/0/0
ip address 34.1.1.2 24
quit
interface g0/0/1
ip address 45.1.1.1 24
quit
interface loopback 0
ip address 4.4.4.4 32

r5:
systam-view
sysname r5
interface g0/0/0
ip address 45.1.1.2 24
quit
interface loopback 0
ip address 5.5.5.5 32

r6:
system-view 
sysname r6
interface g0/0/0
ip address 67.1.1.1 24
quit
interface loopback 0
ip address 6.6.6.6 32

r7:
systam-view 
sysname r7
interface g0/0/0
ip address 37.1.1.2 24
quit
interface g0/0/1
ip address 67.1.1.2 24
quit
interface loopback 0
ip address 7.7.7.7 32

r8:
system-view
sysname r8
interface g0/0/0
ip address 38.1.1.2 24
quit
interface g0/0/1
ip address 89.1.1.1 24
quit
interface loopback 0
ip address 8.8.8.8 32

r9:
system-view
sysname r9
interface g0/0/0
ip address 89.1.1.2 24
quit
interface loopback 0
ip address 9.9.9.9 32


在跑动态路由器协议之前,我们先让中心站点到分支站点的所有的mgre去打通(不关闭水平分割)解决方法:全连结构(网络全连网状结构),互为中心互为分支。代码如下:
以2为例(2为中心站点):
1.配置gre模式(隧道模式)
interface tunnel 0/0/0
tunnel-protocol gre p2mp

2.源(接口地址)
source 23.1.1.1 

3.声明自己作为中心站点
nhrp entry multicast dynamic 

4.声明自己的组号
nhrp network-id 100

5.配IP
ip address 10.1.1.1 24

r4(分支站点):
interface tunnel 0/0/0
tunnel-protocol gre p2mp

固定地址source 34.1.1.2 

写map到中心站点去  注册(register)
nhrp entry (隧道地址)10.1.1.1 (映射到物理端口地址) 23.1.1.1 register

配置与中心站点相同的组号
nhrp network-id 100

配置地址:ip address 10.1.1.2 24

r7
interface tunnel 0/0/0
tunnel-protocol gre p2mp
source 37.1.1.2 
nhrp entry 10.1.1.1 23.1.1.1 register
nhrp network-id 100
ip address 10.1.1.3 24

r8
interface tunnel 0/0/0
tunnel-protocol gre p2mp 
source 38.1.1.2 
nhrp entry 10.1.1.1 23.1.1.1 register
nhrp network-id 100
ip address 10.1.1.4 24 
以上是hbs结构
接下来的操作就是  互指静态

r2(中心站点):
ip route-static 34.1.1.0 24 23.1.1.2
ip route-static 37.1.1.0 24 23.1.1.2
ip route-static 38.1.1.0 24 23.1.1.2

r4:
ip route-static 23.1.1.0 24 34.1.1.1
ip route-static 37.1.1.0 24 34.1.1.1
ip route-static 38.1.1.0 24 34.1.1.1

r7:
ip route-static23.1.1.0 24 37.1.1.1
ip route-static34.1.1.0 24 37.1.1.1
ip route-static38.1.1.0 24 37.1.1.1

r8:
ip route-static23.1.1.0 24 38.1.1.1
ip route-static34.1.1.0 24 38.1.1.1
ip route-static37.1.1.0 24 38.1.1.1

互指结束后可以去测隧道

r2:
ping 10.1.1.2(10.1.1.3 10.1.1.4)都会通的
所以现在r2上已经把mgre隧道打通了

如果偷数据,偷动态rip,需要在中心站点去关闭水平分割;由于要求不关闭水平分割,就应该互为主变

r4:
interface tunnel 0/0/0
nhrp entry mulitcast dynamic
display this(查看自己既有注册列表,又是中心站点)
nhrp entry 10.1.1.1 23.1.1.1 register
nhrp entry 10.1.1.3 37.1.1.2 register
nhrp entry 10.1.1.4 38.1.1.2 register 

r2:
interface tunnel 0/0/0
nhrp entry 10.1.1.2 34.1.1.2 register(注册以r4为中心站点的注册列表)
nhrp entry 10.1.1.3 37.1.1.2 register
nhrp entry 10.1.1.4 38.1.1.2 register

r7:
interface tunnel 0/0/0
nhrp entry mulitcast dynamic
nhrp entry 10.1.1.1 23.1.1.1 register
nhrp entry 10.1.1.2 34.1.1.2 register
nhrp entry 10.1.1.4 38.1.1.2 register

r8:
interface tunnel 0/0/0
nhrp entry mulitcast dynamic
nhrp entry 10.1.1.1 23.1.1.1 register
nhrp entry 10.1.1.2 34.1.1.2 register 
nhrp entry 10.1.1.3 37.1.1.2 register

接下来开始跑rip

r1:
rip 1
version 2
network 1.0.0.0  (1的环回)
network 12.0.0.0(网段)

r2:
rip 1
version 2
network 2.0.0.0 
network 12.0.0.0
network 10.0.0.0 

r4:
rip 1
version 2
network 10.0.0.0
network 45.0.0.0
network 4.0.0.0

r5:
rip 1
version 2
network 5.0.0.0
network 45.0.0.0

r6:
rip 1
version 2
network 6.0.0.0
network 67.0.0.0

r7:
rip 1
version 2
network 10.0.0.0
network 7.0.0.0
network 67.0.0.0

r8:
rip 1
version 2
network 8.0.0.0
network 10.0.0.0
network 89.0.0.0

r9:
rip 1
version 2
network 9.0.0.0
network 89.0.0.0


display ip routing-table(查看rip)

r1:
ping 5.5.5.5 
ping 9.9.9.9
.........

结果都通了,说明此实验完成

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值