第二次作业-完成OSPF环境下的MGRE实验

R6为ISP只能配置IP地址,R1-R5的环回为私有网段

为  R1-R5配置IP地址

R1配置ip

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn    
[Huawei]sysname r1
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 12.0.0.1 24
[r1-GigabitEthernet0/0/0]
Jul 12 2024 21:45:11-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]q
[r1]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 21.0.0.1 24
Jul 12 2024 21:46:15-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r1-GigabitEthernet0/0/1]q
[r1]interface LoopBack 90
[r1-LoopBack90]ip a    
[r1-LoopBack90]ip address 192.168.1.1 24
[r1-LoopBack90]    
[r1-LoopBack90]q

R2配置ip

r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 23.0.0.1 24
[r2-GigabitEthernet0/0/0]
Jul 12 2024 21:47:32-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]q
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.3.1 24
[r2-LoopBack0]q
[r2] 


R3配置ip


[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 26.0.0.1 24
[r3-GigabitEthernet0/0/0]
Jul 12 2024 21:53:57-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]q
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 192.168.6.1 24
[r3-LoopBack0]q

R4配置ip


[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 24.0.0.1 24
[r4-GigabitEthernet0/0/0]
Jul 12 2024 21:51:09-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r4-GigabitEthernet0/0/0]q
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 192.168.4.1 24
[r4-LoopBack0]q
[r4]

R5配置ip

[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 25.0.0.1 24
[r5-GigabitEthernet0/0/0]
Jul 12 2024 21:52:39-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r5-GigabitEthernet0/0/0]    
[r5-GigabitEthernet0/0/0]
[r5-GigabitEthernet0/0/0]q 
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 192.168.5.1 24
[r5-LoopBack0]q
[r5]

ISP

[isp]interface GigabitEthernet 0/0/0
[isp-GigabitEthernet0/0/0]ip address 12.0.0.2 24
[isp-GigabitEthernet0/0/0]
Jul 12 2024 21:55:58-08:00 isp %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[isp-GigabitEthernet0/0/0]q

[isp]interface GigabitEthernet 0/0/1

[isp-GigabitEthernet0/0/1]ip address 21.0.0.2 24
Jul 12 2024 21:56:39-08:00 isp %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[isp-GigabitEthernet0/0/1]q

[isp]interface GigabitEthernet 0/0/2

[isp-GigabitEthernet0/0/2]ip address 25.0.0.2 24
[isp-GigabitEthernet0/0/2]
Jul 12 2024 21:58:10-08:00 isp %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
 on the interface GigabitEthernet0/0/2 has entered the UP state. 
[isp-GigabitEthernet0/0/2]q
[isp]interface GigabitEthernet 4/0/0

[isp-GigabitEthernet4/0/0]ip address 24.0.0.2 24
[isp-GigabitEthernet4/0/0]
Jul 12 2024 21:59:02-08:00 isp %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
 on the interface GigabitEthernet4/0/0 has entered the UP state. 
[isp-GigabitEthernet4/0/0]q
[isp]interface GigabitEthernet 3/0/0
[isp-GigabitEthernet3/0/0]ip address 26.0.0.2 24
Jul 12 2024 22:00:34-08:00 isp %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP
 on the interface GigabitEthernet3/0/0 has entered the UP state. 
[isp-GigabitEthernet3/0/0]q
[isp]interface GigabitEthernet 2/0/0
[isp-GigabitEthernet2/0/0]ip address 23.0.0.2 24
[isp-GigabitEthernet2/0/0]
Jul 12 2024 22:01:40-08:00 isp %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP
 on the interface GigabitEthernet2/0/0 has entered the UP state. 
[isp-GigabitEthernet2/0/0]q

缺省连通


[r1]ip route-static 0.0.0.0 0 12.0.0.2
[r1]ip route-static 0.0.0.0 0 21.0.0.2
[r1]

[r2]ip route-static 0.0.0.0 0 23.0.0.2
[r3]ip route-static 0.0.0.0 0 26.0.0.2

[r4]ip route-static 0.0.0.0 0 24.0.0.2
[r5]ip route-static 0.0.0.0 0 25.0.0.2

测试连通

<r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]ping -a 12.0.0.1 23.0.0.1
  PING 23.0.0.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 23.0.0.1: bytes=56 Sequence=2 ttl=254 time=110 ms
    Reply from 23.0.0.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 23.0.0.1: bytes=56 Sequence=4 ttl=254 time=40 ms
    Reply from 23.0.0.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 23.0.0.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 30/52/110 ms

[r1]ping -a 12.0.0.1 24.0.0.1
  PING 24.0.0.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 24.0.0.1: bytes=56 Sequence=2 ttl=254 time=60 ms
    Reply from 24.0.0.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 24.0.0.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 24.0.0.1: bytes=56 Sequence=5 ttl=254 time=20 ms

  --- 24.0.0.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 20/35/60 ms

[r1]ping -a 12.0.0.1 25.0.0.1
  PING 25.0.0.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 25.0.0.1: bytes=56 Sequence=2 ttl=254 time=50 ms
    Reply from 25.0.0.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 25.0.0.1: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 25.0.0.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 25.0.0.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 20/32/50 ms

[r1]ping -a 12.0.0.1 26.0.0.1
  PING 26.0.0.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 26.0.0.1: bytes=56 Sequence=2 ttl=254 time=50 ms
    Reply from 26.0.0.1: bytes=56 Sequence=3 ttl=254 time=20 ms
    Reply from 26.0.0.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 26.0.0.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 26.0.0.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 20/32/50 ms

[r1]ping -a 21.0.0.1 26.0.0.1
  PING 26.0.0.1: 56  data bytes, press CTRL_C to break
    Reply from 26.0.0.1: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 26.0.0.1: bytes=56 Sequence=2 ttl=254 time=20 ms
    Reply from 26.0.0.1: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 26.0.0.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 26.0.0.1: bytes=56 Sequence=5 ttl=254 time=30 ms

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

[r1]ping -a 21.0.0.1 25.0.0.1
  PING 25.0.0.1: 56  data bytes, press CTRL_C to break
    Reply from 25.0.0.1: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 25.0.0.1: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 25.0.0.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 25.0.0.1: bytes=56 Sequence=4 ttl=254 time=10 ms
    Reply from 25.0.0.1: bytes=56 Sequence=5 ttl=254 time=20 ms

  --- 25.0.0.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/24/30 ms

[r1]ping -a 21.0.0.1 24.0.0.1
  PING 24.0.0.1: 56  data bytes, press CTRL_C to break
    Reply from 24.0.0.1: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 24.0.0.1: bytes=56 Sequence=2 ttl=254 time=40 ms
    Reply from 24.0.0.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 24.0.0.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 24.0.0.1: bytes=56 Sequence=5 ttl=254 time=40 ms

  --- 24.0.0.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/34/40 ms

[r1]ping -a 21.0.0.1 23.0.0.1
  PING 23.0.0.1: 56  data bytes, press CTRL_C to break
    Reply from 23.0.0.1: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 23.0.0.1: bytes=56 Sequence=2 ttl=254 time=40 ms
    Reply from 23.0.0.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 23.0.0.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 23.0.0.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 23.0.0.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/32/40 ms

[r1]

中心配置,R1 为中心,R1.R2.R4 全连的MGRE结构

[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168.10.1 24
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]source 21.0.0.1
Jul 12 2024 22:34:39-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 network-id 100
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]nhrp entry 192.168.10.2 23.0.0.1 re    
[r1-Tunnel0/0/0]nhrp entry 192.168.10.2 23.0.0.1 register 
[r1-Tunnel0/0/0]nhrp entry 192.168.10.3 26.0.0.1 register
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]nhrp entry 192.168.10.4 24.0.0.1 register
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]nhrp entry 192.168.10.5 25.0.0.1 register
[r1-Tunnel0/0/0]  
[r1-Tunnel0/0/0]display this 
[V200R003C00]
#
interface Tunnel0/0/0
 ip address 192.168.10.1 255.255.255.0 
 tunnel-protocol gre p2mp
 source 21.0.0.1
 nhrp network-id 100
 nhrp entry 192.168.10.2 23.0.0.1 register
 nhrp entry 192.168.10.3 26.0.0.1 register
 nhrp entry 192.168.10.4 24.0.0.1 register
 nhrp entry 192.168.10.5 25.0.0.1 register
#
return
[r1-Tunnel0/0/0]
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]
[r1-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]

<r1>sys
Enter system view, return user view with Ctrl+Z. 
[r1]display ospf peer brief 

     OSPF Process 1 with Router ID 1.1.1.1
          Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 ----------------------------------------------------

     R2

[r2]interface Tunnel 0/0/0

[r2-Tunnel0/0/0]ip address 192.168.10.2 24

[r2-Tunnel0/0/0]tunnel-protocol gre p2mp 

[r2-Tunnel0/0/0]source 23.0.0.1
Jul 12 2024 22:42:04-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 

[r2-Tunnel0/0/0]nhrp network-id 100

[r2-Tunnel0/0/0]nhrp entry 192.168.10.1 21.0.0.1 register 
Info: This peer protocol address conflicts with hub register peer protocol addre
ss.   

[r2-Tunnel0/0/0]display nhrp peer all 
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
192.168.10.1    32    21.0.0.1        192.168.10.1    dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:04:05
Expire time     : 01:55:55

Number of nhrp peers: 1
[r2-Tunnel0/0/0]

[r2-Tunnel0/0/0]nhrp entry 192.168.10.4 24.0.0.1 register 
[r2-Tunnel0/0/0]

 


[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]
[r2-ospf-1-area-0.0.0.0]
Jul 12 2024 23:01:40-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.10.168.192, Neigh
borEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r2-ospf-1-area-0.0.0.0]

 
[r2]display ospf peer brief 

     OSPF Process 1 with Router ID 2.2.2.2
          Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          Tunnel0/0/0                      1.1.1.1          Init        
 ----------------------------------------------------------------------------
[r2]

R4

[r4]interface Tunnel 0/0/0

[r4-Tunnel0/0/0]ip address 192.168.10.4 24
[r4-Tunnel0/0/0]
 
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r4-Tunnel0/0/0]
 
[r4-Tunnel0/0/0]source 24.0.0.1
Jul 12 2024 22:53:34-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r4-Tunnel0/0/0]
[r4-Tunnel0/0/0]nhrp network-id 100
[r4-Tunnel0/0/0]

[r4-Tunnel0/0/0]nhrp entry 192.168.10.1 21.0.0.1 register 
Info: This peer protocol address conflicts with hub register peer protocol addre
ss. 
[r4-Tunnel0/0/0]
[r4-Tunnel0/0/0]display this 
[V200R003C00]
#
interface Tunnel0/0/0
 ip address 192.168.10.4 255.255.255.0 
 tunnel-protocol gre p2mp
 source 24.0.0.1
 nhrp network-id 100
#
return
[r4-Tunnel0/0/0]


[r4]ospf 1 router-id 4.4.4.4
  
[r4-ospf-1]area 0
  
[r4-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]
[r4-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]
Jul 12 2024 23:05:30-08:00 r4 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.10.168.192, Neigh
borEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r4-ospf-1-area-0.0.0.0]q
[r4-ospf-1]q
[r4]display ospf peer brief 

     OSPF Process 1 with Router ID 4.4.4.4
          Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          Tunnel0/0/0                      1.1.1.1          Init        
 ----------------------------------------------------------------------------
[r4]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值