HCIP第四次作业

在这里插入图片描述
1、配置各路由器IP极其环回
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 14.1.1.2 24
[r1-GigabitEthernet0/0/0]
Jul 9 2021 18:11:14-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]quit
[r1]int lo
[r1]int LoopBack 0
[r1-LoopBack0]ip add 1.1.1.1 32
其他同理
2、配置静态路由以及NAT
[r1]ip route-static 0.0.0.0 0 14.1.1.1
[r2]ip route-static 0.0.0.0 0 24.1.1.1

[r3]ip route-static 0.0.0.0 0 34.1.1.1
[r3]ip route-static 192.168.0.0 22 192.168.1.2
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.0.0 0.0.3.255
[r3-acl-basic-2000]int g0/0/0
[r3-GigabitEthernet0/0/0]nat outbound 2000

[r4]ip route-static 192.168.3.0 24 192.168.2.2
[r4]ip route-static 0.0.0.0 0 192.168.1.1
[r5]ip route-static 0.0.0.0 0 192.168.2.1
[r6]ip route-static 0.0.0.0 0 192.168.3.1
测试连通性
在这里插入图片描述
3、全连R1-R3
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]ip add 10.1.1.1 24
[r1-Tunnel0/0/0]source 14.1.1.2
Jul 9 2021 20:22:58-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]nhrp entry 10.1.1.2 24.1.1.2 register
[r1-Tunnel0/0/0]nhrp entry 10.1.1.3 34.1.1.2 register
[r1-Tunnel0/0/0]ospf network-type broadcast
R2,R3同理
测验
在这里插入图片描述
4、使用OSPF连接私网R1-R3
在这里插入图片描述
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]AREA 0
[r1-ospf-1-area-0.0.0.0]network 10.1.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 14.1.1.2 0.0.0.255
其他同理

R3-R5
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 1
[r4-ospf-1-area-0.0.0.1]network 192.168.1.2 0.0.0.255
[r4-ospf-1-area-0.0.0.1]network 192.168.2.1 0.0.0.255

[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 1
[r5-ospf-1-area-0.0.0.1]network 192.168.2.2 0.0.0.255
[r5-ospf-1]area 2
[r5-ospf-1-area-0.0.0.2]network 192.168.3.1 0.0.0.255

[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]net
[r6-ospf-1-area-0.0.0.2]network 192.168.3.2 0.0.0.255

5、用tunnel法连接R3 R5

[r3]int Tunnel 0/0/1
[r3-Tunnel0/0/1]ip add 11.1.1.1 24
[r3-Tunnel0/0/1]tunnel-protocol gre
[r3-Tunnel0/0/1]source 192.168.1.1
[r3-Tunnel0/0/1]destination 192.168.2.2
[r3]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 11.1.1.1 0.0.0.255

[r5]int t0/0/1
[r5-Tunnel0/0/1]ip add 11.1.1.2 24
[r5-Tunnel0/0/1]tunnel-protocol gre
[r5-Tunnel0/0/1]source 192.168.2.2
[r5-Tunnel0/0/1]destination 192.168.1.1
[r5]ospf 1
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 11.1.1.2 0.0.0.255
R6拥有a0 的路由
在这里插入图片描述
在这里插入图片描述6、R1telnetR3登录到R6
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]nat server protocol tcp global current-interface 23 in
side 192.168.3.2 23
[r6]aaa
[r6-aaa]local-user liu password cipher 123456
Info: Add a new user.
[r6-aaa]local-user liu service-type telnet
[r6]user-interface vty 0 4
[r6-ui-vty0-4]authentication-mode aaa

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值