当前位置:网站首页>OSPF comprehensive experiment in hcip-mgre environment

OSPF comprehensive experiment in hcip-mgre environment

2022-07-23 12:52:00 Newcomer_ L

Experimental thinking     

1、R6 For operators , So will R6 All around are set as public addresses

2、R1/4/5 Bit all connected MGRE structure ,R1,R4,R5 It is the central site , It is also a branch site ,R1/2/3 Is a star topology , It's also MGRE structure , Only need to R1 As a central site ,2/3 For the certified party

3、 Create private network segment , Use OSPF Declare that the whole network can reach ,R1/2/3 The network type needs to be set to p2mp,R1/4/5 Set to broadcast.

Experimental process

1. To configure IP Address and make the default route

R1:

[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add 16.0.0.1 24
[r1-GigabitEthernet0/0/1]int g 0/0/0 
[r1-GigabitEthernet0/0/0]ip add 116.0.0.1 24
[r1-GigabitEthernet0/0/1]int l0
[r1-LoopBack0]ip add 192.168.1.1 24
[r1]ip route-static 0.0.0.0 0 16.0.0.2
[r1]ip route-static 0.0.0.0 0 116.0.0.2

 R2:

[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 26.0.0.1 24
[r2-GigabitEthernet0/0/0]int l0
[r2-LoopBack0]ip add 192.168.2.1 24
[r2]ip route-static 0.0.0.0 0 26.0.0.2

 

R3:

[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 36.0.0.1 24
[r3-GigabitEthernet0/0/0]int l0 
[r3-LoopBack0]ip add 192.168.3.1 24
[r3]ip route-static 0.0.0.0 0 36.0.0.2
 

 

R4:

[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 46.0.0.1 24
[r4-GigabitEthernet0/0/0]int l0
[r4-LoopBack0]ip add 192.168.4.1 24
[r4]ip route-static 0.0.0.0 0 46.0.0.2
 

 

R5:

[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 56.0.0.1 24
[r5-GigabitEthernet0/0/0]int l0
[r5-LoopBack0]ip add 192.168.5.1 24
[r5]ip route-static 0.0.0.0 0 56.0.0.2
 

 

ISP:

[ISP]int g 0/0/1
[ISP-GigabitEthernet0/0/1]ip add 16.0.0.2 24
[ISP-GigabitEthernet0/0/1]int g 0/0/0
[ISP-GigabitEthernet0/0/0]ip add 116.0.0.2 24
[ISP-GigabitEthernet0/0/0]int g 0/0/2
[ISP-GigabitEthernet0/0/2]ip add 26.0.0.2 24
[ISP-GigabitEthernet0/0/2]int g 2/0/0
[ISP-GigabitEthernet2/0/0]ip add 36.0.0.2 24
[ISP-GigabitEthernet2/0/0]int g 3/0/0
[ISP-GigabitEthernet3/0/0]ip add 46.0.0.2 24
[ISP-GigabitEthernet3/0/0]int g 4/0/0
[ISP-GigabitEthernet4/0/0]ip add 56.0.0.2 24

 2. Make a star topology

R1:

[r1]int Tunnel 0/0/0   Create a tunnel interface
[r1-Tunnel0/0/0]ip add 2.2.2.1 24   To configure IP Address
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp   establish MGRE structure
[r1-Tunnel0/0/0]source 16.0.0.1   Source IP
[r1-Tunnel0/0/0]nhrp network-id 100   Create a domain , Put all the goals IP Add it to the domain
[r1-Tunnel0/0/0]nhrp entry multicast dynamic   Enable pseudo broadcast
 

R2:

 [r2]int Tunnel 0/0/0   Create a tunnel interface
[r2-Tunnel0/0/0]ip add 2.2.2.2 24   To configure IP Address
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp   establish MGRE structure
[r2-Tunnel0/0/0]source GigabitEthernet 0/0/0   Source out interface
[r2-Tunnel0/0/0]nhrp network-id 100   Add to 100 In the domain of
[r2-Tunnel0/0/0]nhrp entry 2.2.2.1 16.0.0.1 register   Go to the center to register , Add the virtual interface address and physical interface address of the central site

R3:

[r3]int Tunnel 0/0/0   Create a tunnel interface
[r3-Tunnel0/0/0]ip add 2.2.2.3 24   To configure IP Address
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp   establish MGRE structure
[r3-Tunnel0/0/0]source GigabitEthernet 0/0/0   Source out interface
[r3-Tunnel0/0/0]nhrp network-id 100   Add to 100 In the domain of
[r3-Tunnel0/0/0]nhrp entry 2.2.2.1 16.0.0.1 register   Go to the center to register , Add the virtual interface address and physical interface address of the central site

 

3. Production company MGRE structure

R1:

[r1]int Tunnel 0/0/1   Create a tunnel interface
[r1-Tunnel0/0/1]ip add 1.1.1.1 24   To configure IP Address
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp   establish MGRE structure
[r1-Tunnel0/0/1]source 116.0.0.1   Source IP
[r1-Tunnel0/0/1]nhrp network-id 110   Create a new domain as 110
[r1-Tunnel0/0/1]nhrp entry multicast dynamic   Enable pseudo broadcast
[r1-Tunnel0/0/1]nhrp entry 1.1.1.2 46.0.0.1 register   With R4 Register for the center
[r1-Tunnel0/0/1]nhrp entry 1.1.1.3 56.0.0.1 register   With R5 Register for the center

 

R4:

[r4]int Tunnel 0/0/0   Create a tunnel interface
[r4-Tunnel0/0/0]ip add 1.1.1.2 24   To configure IP Address
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp   establish MGRE structure
[r4-Tunnel0/0/0]source 46.0.0.1   Source IP
[r4-Tunnel0/0/0]nhrp network-id 110   Add to the new domain as 110
[r4-Tunnel0/0/0]nhrp entry multicast dynamic   Enable pseudo broadcast
[r4-Tunnel0/0/0]nhrp entry 1.1.1.1 116.0.0.1 register   With R1 Register for the center
[r4-Tunnel0/0/0]nhrp entry 1.1.1.3 56.0.0.1 register   With R5 Register for the center

 

R5:

[r5]int Tunnel 0/0/0   Create a tunnel interface
[r5-Tunnel0/0/0]ip add 1.1.1.3 24     To configure IP Address
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp   establish MGRE structure
[r5-Tunnel0/0/0]source 56.0.0.1   Source IP
[r5-Tunnel0/0/0]nhrp network-id 110   Add to the new domain as 110
[r5-Tunnel0/0/0]nhrp entry multicast dynamic   Enable pseudo broadcast
[r5-Tunnel0/0/0]nhrp entry 1.1.1.1 116.0.0.1 register   With R1 Register for the center
[r5-Tunnel0/0/0]nhrp entry 1.1.1.2 46.0.0.1 register   With R4 Register for the center

 

4. The whole network can reach

Conduct OSPF Declare , take R1/2/3 The same tunnel interface of is modified as P2MP The Internet , because R1/2/3 Unwanted DR/BDR The election , But you need to learn the other side's route , take R1/4/5 The same tunnel interface of is modified as network Broadcast, need DR/BDR The election , We also have to realize the neighbor relationship

R1:

[r1]ospf 1 router-id 1.1.1.11   Set up RID by 1.1.1.11
[r1-ospf-1]area 0     Get into area 0
[r1-ospf-1-area-0.0.0.0]network 1.1.1.0 0.0.0.255   Declare
[r1-ospf-1-area-0.0.0.0]network 2.2.2.0 0.0.0.255 
[r1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255 
[r1]int Tunnel 0/0/0   Get into 0/0/0 Tunnel
[r1-Tunnel0/0/0]ospf network-type p2mp   The modification type is p2mp
[r1]int Tunnel 0/0/1   Get into 0/0/1 Tunnel
[r1-Tunnel0/0/1]ospf network-type broadcast   The modification type is broadcast

 

R2:

[r2]ospf 1 router-id 2.2.2.22     Set up RID by 1.1.1.11
[r2-ospf-1]area 0     Get into area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255     Declare
[r2-ospf-1-area-0.0.0.0]network 2.2.2.0 0.0.0.255
[r2]int Tunnel 0/0/0     Enter the tunnel
[r2-Tunnel0/0/0]ospf network-type p2mp     The modification type is p2mp

 

R3:

[r3]ospf 1 router-id 3.3.3.33
[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 2.2.2.0 0.0.0.255
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ospf network-type p2mp

 

R4:

[r4]ospf 1 router-id 4.4.4.44
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]net 192.168.4.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 1.1.1.0 0.0.0.255
[r4]int Tunnel 0/0/0
[r4-Tunnel0/0/0]ospf network-type broadcast 

 

R5:

[r5]ospf 1 router-id 5.5.5.55
[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 1.1.1.0 0.0.0.255
[r5]int Tunnel 0/0/0
[r5-Tunnel0/0/0]ospf network-type broadcast 

 

Four 、 testing

R1:

R2:

 

R3:

 

 

原网站

版权声明
本文为[Newcomer_ L]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207230540122851.html