OSPF小型实验

在这里插入图片描述
在这里插入图片描述
IP地址规划如图,其他的惯例
1.R1 R 2 R 3做tunnel隧道
R1命令如下
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source g0/0/0
[R1-Tunnel0/0/0]nhrp network-id 100
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp entry 10.1.1.2 27.1.1.1 register
[R1-Tunnel0/0/0]nhrp entry 10.1.1.3 37.1.1.1 register

R2的命令如下
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 10.1.1.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source g0/0/0
[R2-Tunnel0/0/0]nhrp entry multicast dynamic
[R2-Tunnel0/0/0]nhrp entry 10.1.1.1 17.1.1.1 register
[R2-Tunnel0/0/0]nhrp entry 10.1.1.3 37.1.1.1 register
[R2-Tunnel0/0/0]nhrp network-id 100

R3的命令如下
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ip address 10.1.1.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source g0/0/1
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry multicast dynamic
[R3-Tunnel0/0/0]nhrp entry 10.1.1.1 17.1.1.1 register
[R3-Tunnel0/0/0]nhrp entry 10.1.1.2 27.1.1.1 register
2.全网可达
因为R1,2,3之间做了MGRE三层隧道技术,所以各接口网络类型为NBMA,为点到点封装,没办法建邻居.
在R1,2,3的接口上修改网络类型
R1:
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ospf network-type broadcast
R2:
[R2]int Tunnel 0/0/0
[R2]int Tunnel0/0/0]ospf network-type broadcast
R3:
[R3]int Tunnel 0/0/0
[R3]int Tunnel0/0/0]ospf network-type broadcast

在R1-R6网段上起OSPF协议,因为R6所在区域为不规则区域,所以在R5上进行双向重发布.
[R5-ospf-1]area 1
[R5-ospf-1-area-0.0.0.1]undo network 192.168.3.1 0.0.0.0
[R5-ospf-1-area-0.0.0.1]ospf 2
[R5-ospf-2]area 2
[R5-ospf-2-area-0.0.0.2]network 192.168.3.1 0.0.0.0

[R5]ospf 1
[R5-ospf-1]import-route ospf 2
[R5-ospf-1]ospf 2
[R5-ospf-2]import-route ospf 1
在这里插入图片描述

3.R4-6可正常访问R7的环回
在R3上写缺省
[R3]ospf 1 (所有起ospf 1进程的路由器上均会下放一条缺省,)
[R3-ospf-1]default-route-advertise

因为R6路由器上路由是由R5用ospf 2进程重发布进来的,所以…
[R5]ospf 2
[R5-ospf-2]default-route-advertise [R3]

acl 2000
[R3-acl-basic-2000]rule permit source 6.6.6.6 0.0.0.0
[R3-acl-basic-2000]rule permit source 192.168.0.0 0.0.255.255
[R3-acl-basic-2000]int g0/0/1
[R3-GigabitEthernet0/0/1]nat outbound 2000
在这里插入图片描述
4.在R6上
[R6]user-interface vty 0 4
[R6-ui-vty0-4]authentication-mode aaa
[R6-ui-vty0-4]aaa
[R6-aaa]local-user huawei password cipher 123456
Info: Add a new user.
[R6-aaa]local-user huawei privilege level 15
[R6-aaa]local-user huawei service-type telnet

在R3上
[R3-GigabitEthernet0/0/1]nat server pro tcp global current-interface 23 inside 6.6.6.6 23
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值