HCIP------ospf

本文档介绍了如何配置和验证OSPF协议在GRE隧道中运行,包括建立GRE隧道、配置IP地址、启用OSPF、指定路由器ID、宣告网络,并通过ping命令验证邻居状态和路由可达性。
摘要由CSDN通过智能技术生成

在这里插入图片描述
在这里插入图片描述
The device is running!

sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy r1
[r1-GigabitEthernet0/0/0]ip add 16.1.1.1 24
Jan 21 2021 16:11:01-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]q
[r1]int loo 0
[r1-LoopBack0]ip add 192.168.1.1 24
[r1-LoopBack0]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r1]ip rou
[r1]ip route
[r1]ip route-static 0.0.0.0 0 16.1.1.2
[r1]ping 16.1.1.2
PING 16.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 16.1.1.2: bytes=56 Sequence=1 ttl=255 time=190 ms
Reply from 16.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 16.1.1.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 16.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 16.1.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms

— 16.1.1.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/54/190 ms

[r1]ping 26.1.1.1
PING 26.1.1.1: 56 data bytes, press CTRL_C to break
Request time out
Reply from 26.1.1.1: bytes=56 Sequence=2 ttl=254 time=80 ms
Reply from 26.1.1.1: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 26.1.1.1: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 26.1.1.1: bytes=56 Sequence=5 ttl=254 time=20 ms

— 26.1.1.1 ping statistics —
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 20/42/80 ms

[r1]ping 36.1.1.1
PING 36.1.1.1: 56 data bytes, press CTRL_C to break
Request time out
Reply from 36.1.1.1: bytes=56 Sequence=2 ttl=254 time=70 ms
Reply from 36.1.1.1: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 36.1.1.1: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 36.1.1.1: bytes=56 Sequence=5 ttl=254 time=20 ms

— 36.1.1.1 ping statistics —
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 20/40/70 ms

[r1]int tun0/0/0
[r1-Tunnel0/0/0]ip add 10.1.1.1 24
[r1-Tunnel0/0/0]tu
[r1-Tunnel0/0/0]tunnel-protocol gre p2
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]sou
[r1-Tunnel0/0/0]source 16.1.1.1
Jan 21 2021 16:29:42-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]
[r1-Tunnel0/0/0]nhrp en
[r1-Tunnel0/0/0]nhrp entry mu
[r1-Tunnel0/0/0]nhrp entry multicast dy
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nhrp ne
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]display nhrp peer all

Protocol-addr Mask NBMA-addr NextHop-addr Type Flag

10.1.1.2 32 46.1.1.1 10.1.1.2 dynamic route tunnel

Tunnel interface: Tunnel0/0/0
Created time : 00:01:30
Expire time : 01:58:30

Protocol-addr Mask NBMA-addr NextHop-addr Type Flag

10.1.1.3 32 56.1.1.1 10.1.1.3 dynamic route tunnel

Tunnel interface: Tunnel0/0/0
Created time : 00:00:28
Expire time : 01:59:32

Number of nhrp peers: 2
[r1-Tunnel0/0/0]q
[r1]ospf 1 rou
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]net
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]ne
[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]q
[r1-Tunnel0/0/0]ospf network-type broadcast
[r1-Tunnel0/0/0]display ospf peer brief

 OSPF Process 1 with Router ID 1.1.1.1
	  Peer Statistic Information

Area Id Interface Neighbor id State
0.0.0.0 Tunnel0/0/0 4.4.4.4 2-Way
0.0.0.0 Tunnel0/0/0 5.5.5.5 2-Way

[r1]ping 10.1.1.2
PING 10.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=30 ms

— 10.1.1.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/26/30 ms

[r1]ping 10.1.1.3
PING 10.1.1.3: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.3: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 10.1.1.3: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 10.1.1.3: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 10.1.1.3: bytes=56 Sequence=4 ttl=255 time=60 ms
Reply from 10.1.1.3: bytes=56 Sequence=5 ttl=255 time=40 ms

— 10.1.1.3 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/48/70 ms

[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 17.1.1.1 24
[r1]ip route-static 0.0.0.0 0 17.1.1.2
[r1]int tu0/0/1
[r1-Tunnel0/0/1]ip add 20.1.1.1 24
[r1-Tunnel0/0/1]tu
[

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值