Comprehensive experiment of mgre and ospf in ensp

catalogue

1, Experimental environment

2, Experimental requirements

3, Experimental steps

1. Reasonably divide network segments

2. Configure the specific network segment address

         3. Configure MGRE structure of R1, R4 and R5

         4. Configure MGRE structure of R1, R2 and R3

5. Manually write a default route to the isp

6. Turn on ospf of the router

4, Experimental results

1.ping

 

1, Experimental environment

2, Experimental requirements

1. R6 is an ISP, only IP addresses can be configured, and the loopback of R1-R5 is a private network segment.

2. R1, R4 and R5 are the MGRE structure of full connection, R1, R2 and R3 are the MGRE structure of star topology, and R1 is the central site.

3. All private network segments can communicate with each other, and the private network segments are completed by OSPF.

3, Experimental steps

1. Reasonably divide network segments

The network segment divided between R1 - R6 GE 0/0/0 interfaces is ----- 16.0.0.0/24

The network segment divided between R1 - R6 GE 0/0/1 interfaces is ----- 61.0.0.0/24

The network segment divided between R2 and R6 is ----- 26.0.0.0/24

The network segment divided between R3 and R6 is ----- 36.0.0.0/24

The network segment divided between R4 and R6 is ----- 46.0.0.0/24

The network segment divided between R5 and R6 is ----- 56.0.0.1/24

The private network segment of R1 - R5 is divided into: 192.168.1.0/24; 192.168.2.0/24; 192.168.3.0/24; 192.168.4.0/24; 192.168.5.0/24

2. Configure the specific network segment address

Enter different interfaces with the instruction int # g + interface number #

ip address + ip

R1

 R2

 R3

 R4

 R5

 R6

3. Configure MGRE structure of R1, R4 and R5

R1, R4 and R5 are all connected MGRE structures, that is, R1, R4 and R5 are all central stations

Configuration of central site R1

[r1]int Tunnel 0/0/0                              //Create tunnel interface
[r1-Tunnel0/0/0]ip add 192.168.10.1 24            //Configure tunnel IP address (this address is a private network segment)
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp          //Select the encapsulation type of the tunnel interface
[r1-Tunnel0/0/0]source 16.0.0.1                   //Define source IP address (IP address of information output interface)
[r1-Tunnel0/0/0]nhrp network-id 100               //Create NHRP domain (for connection between virtual tunnels)
[r1-Tunnel0/0/0]nhrp entry multicast dynamic      //Enable the pseudo broadcast of the central site: all branch sites can only receive the medium broadcast 
                                             The routing information of the core site, but the routing information of other branch sites cannot be received

[r1-Tunnel0/0/0]nhrp entry  192.168.10.2   46.0.0.1   register 
[r1-Tunnel0/0/0]nhrp entry  192.168.10.3   56.0.0.1   register //Report to other centers

Configuration of central site R4

[r4]int Tunnel 0/0/0                          
[r4-Tunnel0/0/0]ip add 192.168.10.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   

[r4-Tunnel0/0/0]nhrp entry  192.168.10.3   56.0.0.1   register 
Reporting is two-way. After one party reports, the other party will also receive the other party's feedback mgre information

Configuration of central site R5

[r5]int Tunnel 0/0/0                          
[r5-Tunnel0/0/0]ip add 192.168.10.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   

Reporting is two-way. After one party reports, the other party will also receive the other party's feedback mgre information

Problem analysis: because the tunnel interface formed by the MGRE structure is a p2p type interface, R1 will only connect with one of R4 or R5 routers and establish an ospf relationship. Therefore, we need to modify the three tunnel interfaces from a p2p type interface to a Broadcast (Ethernet type) so that the central site R1 can connect with R4 and R5 and establish an ospf relationship.  

Configuration of R1

[r1-Tunnel0/0/0]ospf network-type broadcast                //Configure at tunnel interface

Similarly, the configurations of R4 and R5 are the same, so they will not be repeated

4. Configure MGRE structure of R1, R2 and R3

Configuration of central site R1

[r1]int Tunnel 0/0/0                          
[r1-Tunnel0/0/1]ip add 192.168.20.1 24           
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp          
[r1-Tunnel0/0/1]source 61.0.0.1                 
[r1-Tunnel0/0/1]nhrp network-id 101               
[r1-Tunnel0/0/1]nhrp entry multicast dynamic   

Configuration of branch site R2

[r2]int t 0/0/0
[r2-Tunnel0/0/0]ip address 192.168.20.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r2-Tunnel0/0/0]source GigabitEthernet 0/0/0            
[r2-Tunnel0/0/0]nhrp network-id 101            
[r2-Tunnel0/0/0]nhrp entry  192.168.20.1   61.0.0.1   register  

Configuration of branch site R3

[r3]int t 0/0/0
[r3-Tunnel0/0/0]ip address 192.168.20.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/0]source GigabitEthernet 0/0/0            
[r3-Tunnel0/0/0]nhrp network-id 101            
[r3-Tunnel0/0/0]nhrp entry  192.168.20.1   62.0.0.1   register

Problem analysis: since R1 R2 R3 is an MGRE structure with star topology, and the tunnel interface formed by the MGRE structure is a p2p interface, the central site R1 will only connect with one of R2 or R3 routers and establish ospf relationship, Therefore, we need to change the tunnel interface corresponding to the three from p2p type interface to Broadcast (Ethernet type), so that the central sites R1, R2 and R3 can be connected and establish ospf relationship.

Configuration of R1

[r1-Tunnel0/0/1]ospf network-type broadcast                //Configure at tunnel interface

Similarly, the configurations of R2 and R3 are the same, so it will not be repeated

Further analysis: after the tunnel interface type corresponding to the three is modified to Broadcast, an election of BR and BDR will be held. The election rule is to compare the size of the three router IDs. Because the router ID of R1 is smaller than that of R2 and R3, and because the information of R2 and R3 is transmitted through the central site R1, R1 will only elect DR and BDR with one of R2 and R3 routers, As a result, R1 will only establish an ospf relationship with one of R2 or R3 routers, informing that the ospf relationship of the three cannot be established.

Solution: let R2 and R3 abandon the election

R2 configuration

[r2-Tunnel0/0/0]ospf dr-priority 0

Configuration of R3

[r3-Tunnel0/0/0]ospf dr-priority 0

5. Manually write a default route to the isp

R1

Instruction: IP route static 0.0.0.0 16.0.0.2

R2

Instruction: IP route static 0.0.0.0 26.0.0.2

R3

Instruction: IP route static 0.0.0.0 36.0.0.2

R4

Instruction: IP route static 0.0.0.0 46.0.0.2

R5

Instruction: IP route static 0.0.0.0 56.0.0.2

6. Turn on ospf of the router

Configuration of R1

[r1]ospf 1 router-id 1.1.1.1                              //Start ospf process and set 1outer ID to 1.1.1.1
[r1-ospf-1]area 0                                         //Divide into zone 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.10.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255    //Declare private network segment

Similarly, R2's ID is set to 2.2.2.2, R3's ID is set to 3.3.3, R4's ID is set to 4.4.4, and R5's ID is set to 5.5.5.5. Divide them into area 0, and then announce the private network segment. The specific configuration is the same as R1, so it will not be repeated here.

4, Experimental results

1.ping

R1 Ping R3 loopback route between R2 and

ping indicates that the star topology MGRE structure built by R1 R2 R3 is successful

R1 Ping the loopback route of R4 and R5

ping indicates that the MGRE structure built by R1 ^ R4 ^ R5 is successful

 

Keywords: Load Balance network server

Added by mikegzarejoyce on Thu, 13 Jan 2022 14:30:02 +0200