Static routing configuration experiment

Complete all requirements for the following labs:


There are 6 network segments in this experiment, and the subnets are divided according to the requirements.

eg:
   192.168.1.0/24
   192.168.1.00000000   

By borrowing 3 bits, 8 subnets can be divided.

192.168.1.000 00000 /27 ----backbone link


1、192.168.1.000 000 00    192.168.1.0 /30
2、192.168.1.000 001 00    192.168.1.4 /30
3、192.168.1.000 010 00    192.168.1.8 /30
4、192.168.1.000 011 00    192.168.1.12/30
5、192.168.1.000 100 00    192.168.1.16/30
6、192.168.1.000 101 00    192.168.1.20/30
7、192.168.1.000 110 00    192.168.1.24/30
8、192.168.1.000 111 00    192.168.1.28/30

From question 2, each router of R1-R4 needs two loopback interfaces.

 R1: 192.168.1.001 0 0000 192.168.1.32/27 ---- Summarized subnet
         192.168.1.001 0 0000 192.168.1.32/28
         192.168.1.001 1 0000 192.168.1.48/28
 R2: 192.168.1.010 0 0000 192.168. 1.64/27 ---- Summarized subnet
         192.168.1.010 0 0000 192.168.1.64/28
         192.168.1.010 1 0000 192.168.1.80/28 
 R3: 192.168.1.011 0 0000 192.168.1. 96/27 ----after summary Subnet of
         192.168.1.011 0 0000 192.168.1.96/28
         192.168.1.011 1 0000 192.168.1.112/28 
 R4: 192.168.1.100 0 0000 192.168.1.128/27 ---- After summary Subnet 192.168.1.100
         0 0000 192.168 .1.128/28
         192.168.1.100 1 0000 192.168.1.144/28


The assigned ip address is as follows:

 


Experimental configuration


  First rename each router r1-r5.

  R1:

<Huawei>system-view
[Huawei]sysname R1
[R1]

(Similarly change the other four routes to R2-R5)

  Then assign an ip address to each router

  Static routing configuration for R1:

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
[R1-GigabitEthernet0/0/1]int lo 0
[R1-LoopBack0]ip add 192.168.1.33 28
[R1-LoopBack0]int lo 1
[R1-LoopBack1]ip add 192.168.1.49 28

Static routing configuration for R2:

[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip ad 192.168.1.2 30
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip ad 192.168.1.9 30
[R2-GigabitEthernet0/0/1]int lo 0
[R2-LoopBack0]ip ad 192.168.1.65 28
[R2-LoopBack0]int lo1
[R2-LoopBack1]ip ad 192.168.1.81 28

Static routing configuration of R3:

[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip ad 192.168.1.6 30
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip ad 192.168.1.13 30
[R3-GigabitEthernet0/0/1]int lo0
[R3-LoopBack0]ip ad 192.168.1.97 28
[R3-LoopBack0]int lo1
[R3-LoopBack1]ip ad 192.168.1.113 28

Static routing configuration of R4:

[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip ad 192.168.1.10 30
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip ad 192.168.1.14 30
[R4-GigabitEthernet0/0/1]int g4/0/0
[R4-GigabitEthernet4/0/0]ip ad 192.168.1.17 30
[R4-GigabitEthernet4/0/0]int g0/0/2
[R4-GigabitEthernet0/0/2]ip ad 192.168.1.21 30
[R4-GigabitEthernet0/0/2]int lo0
[R4-LoopBack0]ip ad 192.168.1.129 28
[R4-LoopBack0]int lo1
[R4-LoopBack1]ip ad 192.168.1.145 28

Static routing configuration of R5:

[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 192.168.1.18 30
[R5-GigabitEthernet0/0/1]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.1.22 30
[R5-GigabitEthernet0/0/0]int lo0
[R5-LoopBack0]ip ad 5.5.5.5 24

(You can use display ip interface brief to check the assigned ip information)

Then realize the reachability of the whole network, and perform routing configuration R1 routing configuration for each route
:

[R1]ip route-static 192.168.1.64 27 192.168.1.2
[R1]ip route-static 192.168.1.96 27 192.168.1.6
[R1]ip route-static 192.168.1.8 30 192.168.1.2
[R1]ip route-static 192.168.1.12 30 192.168.1.6
[R1]ip route-static 192.168.1.128 27 192.168.1.2
[R1]ip route-static 192.168.1.128 27 192.168.1.6
[R1]ip route-static 192.168.1.16 30 192.168.1.2
[R1]ip route-static 192.168.1.16 30 192.168.1.6

R2 routing configuration:

[R2]ip route-static 192.168.1.32 27 192.168.1.1
[R2]ip route-static 192.168.1.128 27 192.168.1.10
[R2]ip route-static 192.168.1.96 27 192.168.1.1
[R2]ip route-static 192.168.1.96 27 192.168.1.10
[R2]ip route-static 192.168.1.16 30 192.168.1.10
[R2]ip route-static 192.168.1.4 30 192.168.1.1
[R2]ip route-static 192.168.1.12 30 192.168.1.10

R3 routing configuration:

[R3]ip route-static 192.168.1.32 27 192.168.1.5
[R3]ip route-static 192.168.1.0 30 192.168.1.5
[R3]ip route-static 192.168.1.128 27 192.168.1.14
[R3]ip route-static 192.168.1.8 30 192.168.1.14
[R3]ip route-static 192.168.1.16 30 192.168.1.14
[R3]ip route-static 192.168.1.64 27 192.168.1.5
[R3]ip route-static 192.168.1.64 27 192.168.1.14

R4 routing configuration:

[R4]ip route-static 192.168.1.96 27 192.168.1.13
[R4]ip route-static 192.168.1.4 30 192.168.1.13
[R4]ip route-static 192.168.1.64 27 192.168.1.9
[R4]ip route-static 192.168.1.0 30 192.168.1.9
[R4]ip route-static 192.168.1.32 27 192.168.1.9
[R4]ip route-static 192.168.1.32 27 192.168.1.13

R5 routing configuration:

[R5]ip route-static 192.168.1.128 27 192.168.1.17
[R5]ip route-static 192.168.1.8 30 192.168.1.17
[R5]ip route-static 192.168.1.12 30 192.168.1.17
[R5]ip route-static 192.168.1.64 27 192.168.1.17
[R5]ip route-static 192.168.1.0 30 192.168.1.17
[R5]ip route-static 192.168.1.32 27 192.168.1.17
[R5]ip route-static 192.168.1.96 27 192.168.1.17
[R5]ip route-static 192.168.1.4 30 192.168.1.17

Finally, check whether the ping between the routes is successful!

Since R1-R4 cannot directly write a static route to 5.5.5.0/24, they cannot access the network segment 5.5.5.0, that is, they cannot ping 5.5.5.5. To allow it to be accessed, a default address must be written for each route.

Default address of R1:

[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.6

The default address of R2:

[R2]ip route-static 0.0.0.0 0.0.0.0 192.168.1.10

The default address of R3:

[R3]ip route-static 0.0.0.0 0.0.0.0 192.168.1.14

The default address of R4:

[R4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.18

At this time, each route can be pinged through ping5.5.5.5.

In order to avoid loops, an empty interface
R1 should also be added to each route

[R1]ip route-static 192.168.1.32 27 NULL 0

R2

[R2]ip route-static 192.168.1.64 27 NULL 0

R3

[R3]ip route-static 192.168.1.96 27 NULL 0

R4

[R4]ip route-static 192.168.1.128 27 NULL 0

To make the normal 1000M link communication between R4 and R5, and automatically change to 100M when a failure occurs, a floating static route must be used. According to the smaller the value of the priority, the higher the priority, adjust the priority of the 100M link to 61 is enough.

Check the R5 route and modify the priority of the 100M link

[R5]ip route-static 192.16.1.0 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.32 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.64 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.96 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.128 255.255.255.252 192.168.1.21 preference 61

 

Next, verify whether the 100M link is used when the failure occurs. First, the 1000M link needs to be disconnected.

[R4]int g4/0/0
[R4-GigabitEthernet4/0/0]shutdown
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]shutdown

After disconnecting, go to R4 to check the routing table at this time, and find that the 100M interface is already on the routing table

 Finally, you can use the router to ping 5.5.5.5 to check whether the ping is successful.

Guess you like

Origin blog.csdn.net/m0_66185683/article/details/128376298