1、七层参考模型及IP讲解
2、TCP三次握手讲解
3、TCP四次挥手讲解及抓包分析
4、DHCP协议讲解及抓包分析
5、静态综合实验讲解
7、静态路由讲解
8、RIP路由信息协议讲解
9、动态路由协议讲解
10、抓包进行分析RIP以及OSPF的包
11、动态路由OSPF配置综合实验讲解
12、Vlan虚拟局域网技术讲解
13、ACL访问控制列表讲解
14、NAT技术讲解
15、网络综合实验讲解
1、除R5的环回地址固定以外,整个其他所有网段基于192.168.1.0/24进行合理的ip地址划分。
2、R1-R4每个路由器存在两个环回接口,用于模拟连接pc网段;地址也在192.168.1.0/24这个网络范围内。
3、R1-R4上不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问。
4、全网可达,尽量减少每台路由器,路由表条目数量,避免环路出现。
1、R5的环回地址固定为5.5.5.1。
2、由题目可知,这个拓扑图共有6个链路网段以及题目要求的R1-R4每个两个回环接口,则一共是6+8=14个需要划分的网段。
3、R1-R4上不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问,所以要使用缺省路由。
4、解决避免环路出现,采用空接口路由的方法解决,空接口是在黑洞路由器上配置
首先,我们知道IP子网划分:
192.168.1.00000000/24
我们需要得到14个网段,从题可知必须都在192.168.1.0/24这个范围里;
那我们想,如果向后借一位,我们可以得到两个子网网段;
向后借两位便可以得到四个子网网段;
······
按这个规律可知,向后借n位我们可以得到2的n次方个子网。
但同时,我们将得到2的n次方减二个IP地址,因为其中包含了0和255
那么我们现在向后借4位即:192.168.1.0000 0000
我们将可以得到16个子网网段。
划分过程如下:
192.168.1.00000000/24 总网络范围---192.168.1.0/24
这时我们向后借四位:
192.168.1.0000 0000/28 ---192.168.1.0/28
192.168.1.0001 0000/28 ---192.168.1.16/28
192.168.1.0010 0000/28 ---192.168.1.32/28
192.168.1.0011 0000/28 ---192.168.1.48/28
192.168.1.0100 0000/28 ---192.168.1.64/28
192.168.1.0101 0000/28 ---192.168.1.80/28
192.168.1.0110 0000/28 ---192.168.1.96/28
192.168.1.0111 0000/28 ---192.168.1.112/28
192.168.1.1000 0000/28 ---192.168.1.128/28
192.168.1.1001 0000/28 ---192.168.1.144/28
192.168.1.1010 0000/28 ---192.168.1.160/28
192.168.1.1011 0000/28 ---192.168.1.176/28
192.168.1.1100 0000/28 ---192.168.1.192/28
192.168.1.1101 0000/28 ---192.168.1.208/28
192.168.1.1110 0000/28 ---192.168.1.224/28
192.168.1.1111 0000/28 ---192.168.1.240/28
上面就是16个借四位所生成的子网网段。
当然,我们只需要14个网段,所以,最后两个网段我们用作保留。
192.168.1.224/28
192.168.1.240/28
在进行配置路由表时,应进行合理的手工汇总,使得路由器上面的路由条目数量减少,提升对应路由器的传输性能,对于传输开销相同的路由地址,应进行合理的负载均衡,增加信息传输速率。所以,我将每个路由器的两个回环都可进行子网汇总。
所以,我现在列出每个路由器的回环网段以及其汇总网段:
R1路由器:
loopback 0:192.168.1.0/28 其IP为192.168.1.1/28
loopback 1:192.168.1.16/28 其IP为192.1681.17/28
汇总网段:192.168.1.0/27
R2路由器:
loopback 0:192.168.1.32/28 其IP为192.168.1.33/28
loopback 1:192.168.1.48/28 其IP为192.168.1.49/28
汇总网段:192.168.1.32/27
R3路由器:
loopback 0:192.168.1.64/28 其IP为192.168.1.65/28
loopback 1:192.168.1.80/28 其IP为192.168.1.81/28
汇总网段:192.168.1.64/27
R4路由器:
loopback 0:192.168.1.96/28 其IP为192.168.1.97/28
loopback 1:192.168.1.112/28 其IP为192.168.1.113/28
汇总网段:192.168.1.96/27
剩下接口配置的IP将如下图所示:
ensp代码:
[Huawei]sysname r1
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.1 28
[r1-LoopBack0]quit
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.17 28
[r1-LoopBack1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.129 28
[r1-GigabitEthernet0/0/0]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.161 28.
[r1-GigabitEthernet0/0/1]quit
[r1]
R1路由器接口IP地址表:
[r1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.129/28 up up
GigabitEthernet0/0/1 192.168.1.161/28 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.1/28 up up(s)
LoopBack1 192.168.1.17/28 up up(s)
NULL0 unassigned up up(s)
ensp代码:
[Huawei]sysname r2
[r2]user-interface console 0
[r2-ui-console0]idle-timeout 0 0
[r2-ui-console0]quit
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.33 28
[r2-LoopBack0]quit
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.49 28
[r2-LoopBack1]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.130 28
[r2-GigabitEthernet0/0/0]interface g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.145 28
[r2-GigabitEthernet0/0/1]quit
[r2]
R2路由器接口IP地址表:
[r2]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.130/28 up up
GigabitEthernet0/0/1 192.168.1.145/28 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.33/28 up up(s)
LoopBack1 192.168.1.49/28 up up(s)
NULL0 unassigned up up(s)
ensp代码:
[r3]user-interface console 0
[r3-ui-console0]idle-timeout 0 0
[r3-ui-console0]quit
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 192.168.1.65 28
[r3-LoopBack0]quit
[r3]interface LoopBack 1
[r3-LoopBack1]ip address 192.168.1.81 28
[r3-LoopBack1]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.162 28
[r3-GigabitEthernet0/0/0]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.177 28
[r3-GigabitEthernet0/0/1]quit
[r3]
R3路由器接口IP地址表:
[r3]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.162/28 up up
GigabitEthernet0/0/1 192.168.1.177/28 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.65/28 up up(s)
LoopBack1 192.168.1.81/28 up up(s)
NULL0 unassigned up up(s)
ensp代码:
[Huawei]sysname r4
[r4]user-interface console 0
[r4-ui-console0]idle-timeout 0 0
[r4-ui-console0]quit
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 192.168.1.97 28
[r4-LoopBack0]interface LoopBack 1
[r4-LoopBack1]ip address 192.168.1.113 28
[r4-LoopBack1]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.146 28
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.178 28
[r4-GigabitEthernet0/0/1]int g0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.193 28
[r4-GigabitEthernet0/0/2]int g4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.209 28
[r4-GigabitEthernet4/0/0]quit
[r4]
R4路由器接口IP地址表:
[r4]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 7
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 7
The number of interface that is DOWN in Protocol is 0
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.146/28 up up
GigabitEthernet0/0/1 192.168.1.178/28 up up
GigabitEthernet0/0/2 192.168.1.193/28 up up
GigabitEthernet4/0/0 192.168.1.209/28 up up
LoopBack0 192.168.1.97/28 up up(s)
LoopBack1 192.168.1.113/28 up up(s)
NULL0 unassigned up up(s)
ensp代码:
[Huawei]sysname r5
[r5]user-interface console 0
[r5-ui-console0]idle-timeout 0 0
[r5-ui-console0]quit
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 5.5.5.1 24
[r5-LoopBack0]interface g0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.194 28
[r5-GigabitEthernet0/0/0]interface g0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.1.210 28
[r5-GigabitEthernet0/0/1]quit
[r5]
R5路由器接口IP地址表:
[r5]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.194/28 up up
GigabitEthernet0/0/1 192.168.1.210/28 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 5.5.5.1/24 up up(s)
ensp代码:
[r1]ip route-static 192.168.1.32 27 192.168.1.128
[r1]ip route-static 192.168.1.144 28 192.168.1.128
[r1]ip route-static 192.168.1.96 27 192.168.1.128
[r1]ip route-static 192.168.1.96 27 192.168.1.160
[r1]ip route-static 192.168.1.64 27 192.168.1.160
[r1]ip route-static 192.168.1.176 28 192.168.1.160
[r1]ip route-static 192.168.1.192 28 192.168.1.130
[r1]ip route-static 192.168.1.208 28 192.168.1.130
[r1]ip route-static 192.168.1.208 28 192.168.1.162
[r1]ip route-static 192.168.1.192 28 192.168.1.162
R1路由表:
[r1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 23 Routes : 26
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/28 Direct 0 0 D 192.168.1.1 LoopBack0
192.168.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.1.15/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.1.16/28 Direct 0 0 D 192.168.1.17 LoopBack1
192.168.1.17/32 Direct 0 0 D 127.0.0.1 LoopBack1
192.168.1.31/32 Direct 0 0 D 127.0.0.1 LoopBack1
192.168.1.32/27 Static 60 0 RD 192.168.1.128 GigabitEthernet 0/0/0
192.168.1.64/27 Static 60 0 RD 192.168.1.160 GigabitEthernet 0/0/1
192.168.1.96/27 Static 60 0 RD 192.168.1.128 GigabitEthernet 0/0/0
Static 60 0 RD 192.168.1.160 GigabitEthernet 0/0/1
192.168.1.128/28 Direct 0 0 D 192.168.1.129 GigabitEthernet 0/0/0
192.168.1.129/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.143/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.144/28 Static 60 0 RD 192.168.1.128 GigabitEthernet 0/0/0
192.168.1.160/28 Direct 0 0 D 192.168.1.161 GigabitEthernet 0/0/1
192.168.1.161/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.175/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.176/28 Static 60 0 RD 192.168.1.160 GigabitEthernet 0/0/1
192.168.1.192/28 Static 60 0 RD 192.168.1.130 GigabitEthernet 0/0/0
Static 60 0 RD 192.168.1.162 GigabitEthernet 0/0/1
192.168.1.208/28 Static 60 0 RD 192.168.1.130 GigabitEthernet 0/0/0
Static 60 0 RD 192.168.1.162 GigabitEthernet 0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
ensp代码:
[r2]ip route-static 192.168.1.192 28 192.168.1.146
[r2]ip route-static 192.168.1.208 28 192.168.1.146
[r2]ip route-static 192.168.1.96 27 192.168.1.146
[r2]ip route-static 192.168.1.64 27 192.168.1.146
[r2]ip route-static 192.168.1.176 28 192.168.1.146
[r2]ip route-static 192.168.1.160 28 192.168.1.129
[r2]ip route-static 192.168.1.0 27 192.168.1.129
[r2]ip route-static 192.168.1.64 27 192.168.1.129
R2路由表:
[r2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 23 Routes : 24
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/27 Static 60 0 RD 192.168.1.129 GigabitEthernet 0/0/0
192.168.1.32/28 Direct 0 0 D 192.168.1.33 LoopBack0
192.168.1.33/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.1.47/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.1.48/28 Direct 0 0 D 192.168.1.49 LoopBack1
192.168.1.49/32 Direct 0 0 D 127.0.0.1 LoopBack1
192.168.1.63/32 Direct 0 0 D 127.0.0.1 LoopBack1
192.168.1.64/27 Static 60 0 RD 192.168.1.146 GigabitEthernet 0/0/1
Static 60 0 RD 192.168.1.129 GigabitEthernet 0/0/0
192.168.1.96/27 Static 60 0 RD 192.168.1.146 GigabitEthernet 0/0/1
192.168.1.128/28 Direct 0 0 D 192.168.1.130 GigabitEthernet 0/0/0
192.168.1.130/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.143/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.144/28 Direct 0 0 D 192.168.1.145 GigabitEthernet 0/0/1
192.168.1.145/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.159/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.160/28 Static 60 0 RD 192.168.1.129 GigabitEthernet 0/0/0
192.168.1.176/28 Static 60 0 RD 192.168.1.146 GigabitEthernet 0/0/1
192.168.1.192/28 Static 60 0 RD 192.168.1.146 GigabitEthernet 0/0/1
192.168.1.208/28 Static 60 0 RD 192.168.1.146 GigabitEthernet 0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
ensp代码:
[r3]ip route-static 192.168.1.0 27 192.168.1.161
[r3]ip route-static 192.168.1.128 28 192.168.1.161
[r3]ip route-static 192.168.1.32 27 192.168.1.161
[r3]ip route-static 192.168.1.96 27 192.168.1.178
[r3]ip route-static 192.168.1.32 27 192.168.1.178
[r3]ip route-static 192.168.1.144 28 192.168.1.178
[r3]ip route-static 192.168.1.192 28 192.168.1.178
[r3]ip route-static 192.168.1.208 28 192.168.1.178
R3路由表:
[r3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 23 Routes : 24
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/27 Static 60 0 RD 192.168.1.161 GigabitEthernet 0/0/0
192.168.1.32/27 Static 60 0 RD 192.168.1.161 GigabitEthernet 0/0/0
Static 60 0 RD 192.168.1.178 GigabitEthernet 0/0/1
192.168.1.64/28 Direct 0 0 D 192.168.1.65 LoopBack0
192.168.1.65/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.1.79/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.1.80/28 Direct 0 0 D 192.168.1.81 LoopBack1
192.168.1.81/32 Direct 0 0 D 127.0.0.1 LoopBack1
192.168.1.95/32 Direct 0 0 D 127.0.0.1 LoopBack1
192.168.1.96/27 Static 60 0 RD 192.168.1.178 GigabitEthernet 0/0/1
192.168.1.128/28 Static 60 0 RD 192.168.1.161 GigabitEthernet 0/0/0
192.168.1.144/28 Static 60 0 RD 192.168.1.178 GigabitEthernet 0/0/1
192.168.1.160/28 Direct 0 0 D 192.168.1.162 GigabitEthernet 0/0/0
192.168.1.162/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.175/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.176/28 Direct 0 0 D 192.168.1.177 GigabitEthernet 0/0/1
192.168.1.177/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.191/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.192/28 Static 60 0 RD 192.168.1.178 GigabitEthernet 0/0/1
192.168.1.208/28 Static 60 0 RD 192.168.1.178 GigabitEthernet 0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
ensp代码:
[r4]ip route-static 192.168.1.32 27 192.168.1.145
[r4]ip route-static 192.168.1.0 27 192.168.1.145
[r4]ip route-static 192.168.1.128 28 192.168.1.145
[r4]ip route-static 192.168.1.160 28 192.168.1.177
[r4]ip route-static 192.168.1.0 27 192.168.1.177
[r4]ip route-static 192.168.1.64 27 192.168.1.177
R4路由表:
[r4]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 27 Routes : 28
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/27 Static 60 0 RD 192.168.1.145 GigabitEthernet 0/0/0
Static 60 0 RD 192.168.1.177 GigabitEthernet 0/0/1
192.168.1.32/27 Static 60 0 RD 192.168.1.145 GigabitEthernet 0/0/0
192.168.1.64/27 Static 60 0 RD 192.168.1.177 GigabitEthernet 0/0/1
192.168.1.96/28 Direct 0 0 D 192.168.1.97 LoopBack0
192.168.1.97/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.1.111/32 Direct 0 0 D 127.0.0.1 LoopBack0
192.168.1.112/28 Direct 0 0 D 192.168.1.113 LoopBack1
192.168.1.113/32 Direct 0 0 D 127.0.0.1 LoopBack1
192.168.1.127/32 Direct 0 0 D 127.0.0.1 LoopBack1
192.168.1.128/28 Static 60 0 RD 192.168.1.145 GigabitEthernet 0/0/0
192.168.1.144/28 Direct 0 0 D 192.168.1.146 GigabitEthernet 0/0/0
192.168.1.146/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.159/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.160/28 Static 60 0 RD 192.168.1.177 GigabitEthernet 0/0/1
192.168.1.176/28 Direct 0 0 D 192.168.1.178 GigabitEthernet 0/0/1
192.168.1.178/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.191/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.192/28 Direct 0 0 D 192.168.1.193 GigabitEthernet 0/0/2
192.168.1.193/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/2
192.168.1.207/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/2
192.168.1.208/28 Direct 0 0 D 192.168.1.209 GigabitEthernet 4/0/0
192.168.1.209/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 4/0/0
192.168.1.223/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 4/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
ensp代码:
[r5]ip route-static 192.168.1.96 27 192.168.1.193
[r5]ip route-static 192.168.1.32 27 192.168.1.193
[r5]ip route-static 192.168.1.64 27 192.168.1.193
[r5]ip route-static 192.168.1.64 27 192.168.1.209
[r5]ip route-static 192.168.1.32 27 192.168.1.209
[r5]ip route-static 192.168.1.396 27 192.168.1.209
[r5]ip route-static 192.168.1.96 27 192.168.1.209
[r5]ip route-static 192.168.1.144 28 192.168.1.209
[r5]ip route-static 192.168.1.176 28 192.168.1.209
[r5]ip route-static 192.168.1.160 28 192.168.1.209
[r5]ip route-static 192.168.1.128 28 192.168.1.209
[r5]ip route-static 192.168.1.0 27 192.168.1.209
[r5]ip route-static 192.168.1.0 27 192.168.1.193
[r5]ip route-static 192.168.1.144 28 192.168.1.193
[r5]ip route-static 192.168.1.176 28 192.168.1.193
[r5]ip route-static 192.168.1.160 28 192.168.1.193
[r5]ip route-static 192.168.1.128 28 192.168.1.193
R5路由表:
[r5]display IP routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 21 Routes : 29
Destination/Mask Proto Pre Cost Flags NextHop Interface
5.5.5.0/24 Direct 0 0 D 5.5.5.1 LoopBack0
5.5.5.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
5.5.5.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/27 Static 60 0 RD 192.168.1.209 GigabitEthernet 0/0/1
Static 60 0 RD 192.168.1.193 GigabitEthernet 0/0/0
192.168.1.32/27 Static 60 0 RD 192.168.1.193 GigabitEthernet 0/0/0
Static 60 0 RD 192.168.1.209 GigabitEthernet\ 0/0/1
192.168.1.64/27 Static 60 0 RD 192.168.1.193 GigabitEthernet 0/0/0
Static 60 0 RD 192.168.1.209 GigabitEthernet 0/0/1
192.168.1.96/27 Static 60 0 RD 192.168.1.193 GigabitEthernet 0/0/0
Static 60 0 RD 192.168.1.209 GigabitEthernet 0/0/1
192.168.1.128/28 Static 60 0 RD 192.168.1.209 GigabitEthernet 0/0/1
Static 60 0 RD 192.168.1.193 GigabitEthernet 0/0/0
192.168.1.144/28 Static 60 0 RD 192.168.1.209 GigabitEthernet 0/0/1
Static 60 0 RD 192.168.1.193 GigabitEthernet 0/0/0
192.168.1.160/28 Static 60 0 RD 192.168.1.209 GigabitEthernet 0/0/1
Static 60 0 RD 192.168.1.193 GigabitEthernet 0/0/0
192.168.1.176/28 Static 60 0 RD 192.168.1.209 GigabitEthernet 0/0/1
Static 60 0 RD 192.168.1.193 GigabitEthernet 0/0/0
192.168.1.192/28 Direct 0 0 D 192.168.1.194 GigabitEthernet 0/0/0
192.168.1.194/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.207/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0
192.168.1.208/28 Direct 0 0 D 192.168.1.210 GigabitEthernet 0/0/1
192.168.1.210/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.223/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
ensp代码:
[r1]ip route-static 0.0.0.0 0 192.168.1.130
[r1]ip route-static 0.0.0.0 0 192.168.1.162
R1路由表:
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.1.130 GigabitEthernet 0/0/0
Static 60 0 RD 192.168.1.162 GigabitEthernet 0/0/1
ensp代码:
[r2]ip route-static 0.0.0.0 0 192.168.1.146
R2路由表:
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.1.146 GigabitEthernet 0/0/1
ensp代码:
[r3]ip route-static 0.0.0.0 0 192.168.1.178
R3路由表:
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.1.178 GigabitEthernet 0/0/1
ensp代码:
[r4]ip route-static 0.0.0.0 0 192.168.1.194
[r4]ip route-static 0.0.0.0 0 192.168.1.210
R4路由表:
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.1.194 GigabitEthernet 0/0/2
Static 60 0 RD 192.168.1.210 GigabitEthernet 4/0/0
ensp代码:
[r1]ip route-static 192.168.1.0 27 NULL 0
ensp代码:
[r2]IP route-static 192.168.1.32 27 NULL 0
ensp代码:
[r3]IP route-static 192.168.1.64 27 NULL 0
ensp代码:
[r4]IP route-static 192.168.1.96 27 NULL 0
测试全网可达:
测试代码:
<r1>ping 5.5.5.1
<r1>ping 192.168.1.64
<r1>ping 192.168.1.146
<r1>ping 192.168.1.178
<r1>ping 192.168.1.96
展示:
<r1>ping 5.5.5.1
PING 5.5.5.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Reply from 5.5.5.1: bytes=56 Sequence=3 ttl=253 time=130 ms
Reply from 5.5.5.1: bytes=56 Sequence=4 ttl=253 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=5 ttl=253 time=40 ms
--- 5.5.5.1 ping statistics ---
5 packet(s) transmitted
3 packet(s) received
40.00% packet loss
round-trip min/avg/max = 30/66/130 ms
<r1>ping 192.168.1.64
PING 192.168.1.64: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.65: bytes=56 Sequence=1 ttl=255 time=100 ms
Reply from 192.168.1.65: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.1.65: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 192.168.1.65: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.1.65: bytes=56 Sequence=5 ttl=255 time=10 ms
--- 192.168.1.64 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/34/100 ms
<r1>ping 192.168.1.146
PING 192.168.1.146: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.146: bytes=56 Sequence=1 ttl=254 time=40 ms
Reply from 192.168.1.146: bytes=56 Sequence=2 ttl=254 time=20 ms
Reply from 192.168.1.146: bytes=56 Sequence=3 ttl=254 time=50 ms
Reply from 192.168.1.146: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 192.168.1.146: bytes=56 Sequence=5 ttl=254 time=30 ms
--- 192.168.1.146 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/34/50 ms
<r1>ping 192.168.1.178
PING 192.168.1.178: 56 data bytes, press CTRL_C to break
Request time out
Reply from 192.168.1.178: bytes=56 Sequence=2 ttl=254 time=20 ms
Reply from 192.168.1.178: bytes=56 Sequence=3 ttl=254 time=20 ms
Reply from 192.168.1.178: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 192.168.1.178: bytes=56 Sequence=5 ttl=254 time=40 ms
--- 192.168.1.178 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 20/27/40 ms
<r1>ping 192.168.1.96
PING 192.168.1.96: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.97: bytes=56 Sequence=1 ttl=254 time=80 ms
Reply from 192.168.1.97: bytes=56 Sequence=2 ttl=254 time=30 ms
Reply from 192.168.1.97: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 192.168.1.97: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 192.168.1.97: bytes=56 Sequence=5 ttl=254 time=40 ms
--- 192.168.1.96 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/44/80 ms