HCIP文章目录
文章目录
- HCIP文章目录
- ospf实验
- 实验要求
- 拓扑图
- R1/4/5为全连的MGRE结构
- 所有私有网段可以互相通讯
ospf实验
实验要求
1、R6为ISP只能配置ip地址,R1-5的环回为私有网段
2、R1/4/5为全连的MGRE结构,R1/2/3为星型的拓扑结构,R1为中心站点
3、所有私有网段可以互相通讯,私有网段使用OSPF协议完成
拓扑图
R1/4/5为全连的MGRE结构
R1/4/5
使用全连所有接口工作方式为broadcast;DR/BDR将默认自动选举成功
R1
[r1-Tunnel0/0/0]display this
[V200R003C00]
#
interface Tunnel0/0/0
ip address 1.1.1.1 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
#
return
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 1.1.1.1(Tunnel0/0/0)'s neighbors
Router ID: 4.4.4.4 Address: 1.1.1.4
State: Full Mode:Nbr is Master Priority: 1
DR: 1.1.1.1 BDR: 1.1.1.4 MTU: 0
Dead timer due in 31 sec
Retrans timer interval: 4
Neighbor is up for 00:19:27
Authentication Sequence: [ 0 ]
Router ID: 5.5.5.5 Address: 1.1.1.5
State: Full Mode:Nbr is Master Priority: 1
DR: 1.1.1.1 BDR: 1.1.1.5 MTU: 0
Dead timer due in 34 sec
Retrans timer interval: 4
Neighbor is up for 00:20:18
Authentication Sequence: [ 0 ]
[r1]display ospf peer b
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 Full
0.0.0.0 Tunnel0/0/0 5.5.5.5 Full
0.0.0.0 Tunnel0/0/1 2.2.2.2 Full
0.0.0.0 Tunnel0/0/1 3.3.3.3 Full
----------------------------------------------------------------------------
[r1]
R4
[r4-Tunnel0/0/0]display this
[V200R003C00]
#
interface Tunnel0/0/0
ip address 1.1.1.4 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
nhrp entry 1.1.1.1 14.1.1.1 register
nhrp entry 1.1.1.5 54.1.1.1 register
#
return
[r4]display ospf peer b
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 Full
0.0.0.0 Tunnel0/0/0 5.5.5.5 Init
----------------------------------------------------------------------------
[r4]
<r4>display ospf peer
OSPF Process 1 with Router ID 4.4.4.4
Neighbors
Area 0.0.0.0 interface 1.1.1.4(Tunnel0/0/0)'s neighbors
Router ID: 1.1.1.1 Address: 1.1.1.1
State: Full Mode:Nbr is Slave Priority: 1
DR: 1.1.1.1 BDR: 1.1.1.5 MTU: 0
Dead timer due in 36 sec
Retrans timer interval: 0
Neighbor is up for 00:22:00
Authentication Sequence: [ 0 ]
Router ID: 5.5.5.5 Address: 1.1.1.5
State: Init Mode:Nbr is Master Priority: 1
DR: 1.1.1.1 BDR: 1.1.1.5 MTU: 0
Dead timer due in 37 sec
Retrans timer interval: 0
Neighbor is up for 00:00:00
Authentication Sequence: [ 0 ]
R5
[r5-Tunnel0/0/0]display this
[V200R003C00]
#
interface Tunnel0/0/0
ip address 1.1.1.5 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
nhrp entry 1.1.1.1 14.1.1.1 register
nhrp entry 1.1.1.4 44.1.1.2 register
#
return
[r5]display ospf peer b
OSPF Process 1 with Router ID 5.5.5.5
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
0.0.0.0 Tunnel0/0/0 1.1.1.1 Full
----------------------------------------------------------------------------
[r5]
<r5>display ospf peer
OSPF Process 1 with Router ID 5.5.5.5
Neighbors
Area 0.0.0.0 interface 1.1.1.5(Tunnel0/0/0)'s neighbors
Router ID: 1.1.1.1 Address: 1.1.1.1
State: Full Mode:Nbr is Slave Priority: 1
DR: 1.1.1.1 BDR: 1.1.1.5 MTU: 0
Dead timer due in 34 sec
Retrans timer interval: 5
Neighbor is up for 00:23:18
Authentication Sequence: [ 0 ]
R1/2/3为星型的拓扑结构,R1为中心站点
所有接口的工作方式为p2mp
不进行dr、bdr选举
R1
[r1-Tunnel0/0/1]display this
[V200R003C00]
#
interface Tunnel0/0/1
ip address 2.2.2.1 255.255.255.0
tunnel-protocol gre p2mp
source 41.1.1.1
ospf network-type p2mp
nhrp entry multicast dynamic
nhrp network-id 200
#
return
Area 0.0.0.0 interface 2.2.2.1(Tunnel0/0/1)'s neighbors
Router ID: 2.2.2.2 Address: 2.2.2.2
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 111 sec
Retrans timer interval: 5
Neighbor is up for 00:52:38
Authentication Sequence: [ 0 ]
Router ID: 3.3.3.3 Address: 2.2.2.3
State: Full Mode:Nbr is Master Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 102 sec
Retrans timer interval: 5
Neighbor is up for 00:52:08
Authentication Sequence: [ 0 ]
R2
[r2-Tunnel0/0/1]display this
[V200R003C00]
#
interface Tunnel0/0/1
ip address 2.2.2.2 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type p2mp
nhrp network-id 200
nhrp entry 2.2.2.1 41.1.1.1 register
#
return
OSPF Process 1 with Router ID 2.2.2.2
Neighbors
Area 0.0.0.0 interface 2.2.2.2(Tunnel0/0/1)'s neighbors
Router ID: 1.1.1.1 Address: 2.2.2.1
State: Full Mode:Nbr is Slave Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 112 sec
Retrans timer interval: 5
Neighbor is up for 00:54:25
Authentication Sequence: [ 0 ]
R3
[r3-Tunnel0/0/1]display this
[V200R003C00]
#
interface Tunnel0/0/1
ip address 2.2.2.3 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type p2mp
nhrp network-id 200
nhrp entry 2.2.2.1 41.1.1.1 register
#
return
[r3]display ospf peer
OSPF Process 1 with Router ID 3.3.3.3
Neighbors
Area 0.0.0.0 interface 2.2.2.3(Tunnel0/0/1)'s neighbors
Router ID: 1.1.1.1 Address: 2.2.2.1
State: Full Mode:Nbr is Slave Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 118 sec
Retrans timer interval: 5
Neighbor is up for 00:54:19
Authentication Sequence: [ 0 ]
所有私有网段可以互相通讯
<r2>ping 192.168.1.1
PING 192.168.1.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 192.168.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/30/40 ms
<r2>ping 192.168.10.1
PING 192.168.10.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.10.1: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 192.168.10.1: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.10.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 192.168.10.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.10.1: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 192.168.10.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/28/40 ms
<r2>ping 192.168.5.1
PING 192.168.5.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.5.1: bytes=56 Sequence=1 ttl=254 time=50 ms
Reply from 192.168.5.1: bytes=56 Sequence=2 ttl=254 time=40 ms
Reply from 192.168.5.1: bytes=56 Sequence=3 ttl=254 time=40 ms
Reply from 192.168.5.1: bytes=56 Sequence=4 ttl=254 time=50 ms
Reply from 192.168.5.1: bytes=56 Sequence=5 ttl=254 time=40 ms
--- 192.168.5.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/44/50 ms
<r2>ping 192.168.4.1
PING 192.168.4.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.4.1: bytes=56 Sequence=1 ttl=254 time=30 ms
Reply from 192.168.4.1: bytes=56 Sequence=2 ttl=254 time=40 ms
Reply from 192.168.4.1: bytes=56 Sequence=3 ttl=254 time=40 ms
Reply from 192.168.4.1: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 192.168.4.1: bytes=56 Sequence=5 ttl=254 time=40 ms
--- 192.168.4.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/38/40 ms
<r2>ping 192.168.3.1
PING 192.168.3.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.3.1: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 192.168.3.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.3.1: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 192.168.3.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 192.168.3.1: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 192.168.3.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/34/40 ms