HCIP fourth experiment

Insert image description here
1. Topology setup (R1 and R6 are connected by two lines because each GRE occupies one interface)
Insert image description here
2. Configure address
[ R1】
[r1-GigabitEthernet0/0/0]ip address 16.0.0.1 24
[r1-GigabitEthernet0/0/1]ip address 116.0.0.1 24
[r1-LoopBack0]ip address 192.168.1.1 24
[R2]
[r2-GigabitEthernet0/0/0] ip address 26.0.0.1 24
[r2-LoopBack0]ip address 192.168.2.1 24
[R3]
[r3- GigabitEthernet0/0/0]ip address 36.0.0.1 24
[r3-LoopBack0]ip address 192.168.3.1 24
[R4]
[r4-GigabitEthernet0/0/0]ip address 46.0.0.1 24
[r4-LoopBack0]ip address 192.168.4.1 24
[R5]
[r5-GigabitEthernet0/0/0]ip address 56.0.0.1 24
[r5-LoopBack0]ip address 192.168.5.1 24
【R6】
[ISP-GigabitEthernet2/0/0]ip address 116.0.0.2 24
[ISP-GigabitEthernet0/0/0]ip address 16.0.0.2 24
[ISP-GigabitEthernet0/0/1]ip address 26.0.0.2 24
[ISP-GigabitEthernet0/0/2]ip address 36.0. 0.2 24
[ISP-GigabitEthernet3/0/0]ip address 46.0.0.2 24
[ISP-GigabitEthernet4/0/0]ip address 56.0.0.2 24

三、配缺省
[r1]ip route-static 0.0.0.0 0 116.0.0.2
[r1]ip route-static 0.0.0.0 0 16.0.0.2

[r2]ip route-static 0.0.0.0 0 26.0.0.2

[r3]ip route-static 0.0.0.0 0 36.0.0.2

[r4]ip route-static 0.0.0.0 0 46.0.0.2

[r5]ip route-static 0.0.0.0 0 56.0.0.2

4. R1/R4/R5 are fully connected MGRE structure
Analysis: Each of the three routers belongs to the other two. Center
Set the network segment of R1/R4/R5 to 192.168.6.0/24, and use the interface of 16.0.0.1 as this time Quanlian MGRE

[r1]interface t0/0/0
[r1-Tunnel0/0/0]ip address 192.168.6.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 16.0.0.1
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]nhrp entry multicast dynamic

[r4]interface t0/0/0
[r4-Tunnel0/0/0]ip address 192.168.6.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]source 46.0.0.1
[r4-Tunnel0/0/0]nhrp network-id 100
[r4-Tunnel0/0/0]nhrp entry multicast dynamic

[r5]interface t0/0/0
[r5-Tunnel0/0/0]ip address 192.168.6.3 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source 56.0.0.1
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry multicast dynamic

In this way, R1/4/5 are all centered in nhrp of 100, so mutual authentication is required next.

[r1-Tunnel0/0/0]nhrp entry 192.168.6.2 46.0.0.1 register
[r1-Tunnel0/0/0]nhrp entry 192.168.6.3 56.0.0.1 register

[r4-Tunnel0/0/0]nhrp entry 192.168.6.3 56.0.0.1 register
([r4-Tunnel0/0/0 ]nhrp entry 192.168.6.1 16.0.0.1 register) You can knock it or not. After R1 authentication, you can also knock R4 without it

[r5-Tunnel0/0/0]nhrp entry 192.168.6.1 16.0.0.1 register
[r5-Tunnel0/0/0]nhrp entry 192.168.6.2 46.0.0.1 register

5. R1/R2/R3 is a star topology, and R1 is the central site
Analysis: Three routers with R1 as the central site
The network segment of R1/R2/R3 is set to 192.168.7.0/24, and the interface of 116.0.0.1 is used as this MGRE

[r1]interface t0/0/1
[r1-Tunnel0/0/1]ip address 192.168.7.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source 116.0.0.1
[r1-Tunnel0/0/1]nhrp network-id 110
[r1-Tunnel0/0/1]nhrp entry multicast dynamic

[r2]interface t0/0/1
[r2-Tunnel0/0/1]ip address 192.168.7.2 24
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp
[r2-Tunnel0/0/2]source GigabitEthernet 0/0/0(出接口)
[r2-Tunnel0/0/1]nhrp network-id 110
[r2-Tunnel0/0/1]nhrp entry 192.168.7.1 116.0.0.1 register (中心站点)

[r3]interface t0/0/1
[r3-Tunnel0/0/1]ip address 192.168.7.3 24
[r3-Tunnel0/0/1]tunnel-protocol gre p2mp
[r3-Tunnel0/0/2]source GigabitEthernet 0/0/0(出接口)
[r3-Tunnel0/0/1]nhrp network-id 110
[r3-Tunnel0/0/1]nhrp entry 192.168.7.1 116.0.0.1 register (中心站点)

6. Use OSPF to complete mutual communication between all private network segments
[r1]ospf 1 router-id 1.1.1.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]network 192.168.6.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.7.0 0.0.0.255

[r2]ospf 1 router-id 2.2.2.2
[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.7.0 0.0.0.255

[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 192.168.7.0 0.0.0.255

[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]network 192.168.6.0 0.0.0.255

[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 192.168.5.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]network 192.168.6.0 0.0.0.255

Question 1: In R1/R4/R5, R1 only has a neighbor relationship with R4 or R5 (you can only choose one)
Question 2: In R1/R2/R3 , R1 has only established a neighbor relationship with R2 or R3 (you can only choose one)
Reason: This is due to the working mode of the tunnel port in OSPF - the default type of the tunnel port in GRE is P2P (point-to-point network) type, only one neighbor relationship can be established
Insert image description here
Solution 1: Change the type to broadcast (but for GRE between R1/R2/R3, DR needs to be elected)
Solution 2: Change the type to P2MP (no election required)

Solution 1:
(1) Modification of fully connected MGRE of R1/R4/R5
[r1]interface t0/0/0< /span>
[r1-Tunnel0/0/0]ospf network-type broadcast

[r4]interface t00/0/0
[r4-Tunnel0/0/0]ospf network-type broadcast

[r5]interface t00/0/0
[r5-Tunnel0/0/0]ospf network-type broadcast

(2) GRE modification of R1/R2/R3
R1 must be elected as DR, increase the priority of R1 or let R2/R3 give up the election (the method used here is 1)

[r1]interface t00/0/1
[r1-Tunnel0/0/1]ospf network-type broadcast
[r1-Tunnel0 /0/1]ospf dr-priority 10(Restart the three ospf processes at the same time, because ospf is non-preemptive)

[r2]interface t00/0/1
[r2-Tunnel0/0/1]ospf network-type broadcast

[r3]interface t00/0/1
[r3-Tunnel0/0/1]ospf network-type broadcast

解决二:
[r1]interface t00/0/1
[r1-Tunnel0/0/1]ospf network-type P2MP

[r2]interface t00/0/1
[r2-Tunnel0/0/1]ospf network-type P2MP

[r3]interface t00/0/1
[r3-Tunnel0/0/1]ospf network-type P2MP

Guess you like

Origin blog.csdn.net/FlightDiarys/article/details/122491718