首先根据题目要求划分子网:
结果:
子网掩码:255.255.255.224
网络地址:
192.168.1.0
192.168.1.32
192.168.1.64
192.168.1.96
192.168.1.128
192.168.1.160
192.168.1.192
192.168.1.224
广播地址:
192.168.1.31
192.168.1.63
192.168.1.95
192.168.1.127
192.168.1.159
192.168.1.191
192.168.1.223
192.168.1.255
可用IP地址范围:
192.168.1.1-30 /27
192.168.1.33-62 /27
192.168.1.65-94 /27
192.168.1.97-126 /27
192.168.1.129-158 /27
192.168.1.161-190 /27
192.168.1.193-222 /27
192.168.1.225-254 /27
添加ip接口与环回配置
R1:
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/27 up up
GigabitEthernet0/0/1 192.168.1.33/27 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack1 1.1.1.1/24 up up(s)
LoopBack2 1.1.2.1/24 up up(s)
NULL0 unassigned up up(s)
R2:
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.2/27 up up
GigabitEthernet0/0/1 192.168.1.65/27 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack1 1.1.3.1/24 up up(s)
LoopBack2 1.1.4.1/24 up up(s)
NULL0 unassigned up up(s)
R3:
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.97/27 up up
GigabitEthernet0/0/1 192.168.1.34/27 up up
GigabitEthernet0/0/2 192.168.1.129/27 up up
NULL0 unassigned up up(s)
PC1-IP:
PC>ipconfig
Link local IPv6 address…: fe80::5689:98ff:fe42:2697
IPv6 address…: :: / 128
IPv6 gateway…: ::
IPv4 address…: 192.168.1.157
Subnet mask…: 255.255.255.224
Gateway…: 192.168.1.158
Physical address…: 54-89-98-42-26-97
DNS server…: 192.168.1.150
PC2-IP:
PC>ipconfig
Link local IPv6 address…: fe80::5689:98ff:fec0:5564
IPv6 address…: :: / 128
IPv6 gateway…: ::
IPv4 address…: 192.168.1.156
Subnet mask…: 255.255.255.224
Gateway…: 192.168.1.158
Physical address…: 54-89-98-C0-55-64
DNS server…: 192.168.1.150
R4:
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.66/27 up up
GigabitEthernet0/0/1 192.168.1.98/27 up up
GigabitEthernet0/0/2 192.168.1.161/27 up up
GigabitEthernet4/0/0 192.168.1.193/27 up up
GigabitEthernet4/0/1 unassigned down down
GigabitEthernet4/0/2 unassigned down down
GigabitEthernet4/0/3 unassigned down down
LoopBack1 1.1.5.1/24 up up(s)
LoopBack2 1.1.6.1/24 up up(s)
NULL0 unassigned up up(s)
R5:
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.162/27 up up
GigabitEthernet0/0/1 192.168.1.225/27 up up
GigabitEthernet0/0/2 192.168.1.194/27 up up
GigabitEthernet4/0/0 unassigned down down
GigabitEthernet4/0/1 unassigned down down
GigabitEthernet4/0/2 unassigned down down
GigabitEthernet4/0/3 unassigned down down
LoopBack1 1.1.7.1/24 up up(s)
NULL0 unassigned up up(s)
R6:
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.226/27 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack1 5.5.5.5/24 up up(s)
NULL0 unassigned up up(s)
如图:
添加静态路由
R1:
[Huawei]ip route-static 192.168.1.64 27 192.168.1.2
[Huawei]ip route-static 192.168.1.161 27 192.168.1.2
[Huawei]ip route-static 192.168.1.192 27 192.168.1.2
[Huawei]ip route-static 192.168.1.224 27 192.168.1.2
[Huawei]ip route-static 192.168.1.128 27 192.168.1.34
[Huawei]ip route-static 192.168.1.96 27 192.168.1.34
[Huawei]ip route-static 192.168.1.160 27 192.168.1.34
[Huawei]ip route-static 192.168.1.224 27 192.168.1.34
[Huawei]ip route-static 192.168.1.192 27 192.168.1.34
R2:
[Huawei]ip route-static 192.168.1.32 27 192.168.1.1
[Huawei]ip route-static 192.168.1.128 27 192.168.1.1
[Huawei]ip route-static 192.168.1.96 27 192.168.1.66
[Huawei]ip route-static 192.168.1.128 27 192.168.1.66
[Huawei]ip route-static 192.168.1.160 27 192.168.1.66
[Huawei]ip route-static 192.168.1.192 27 192.168.1.66
[Huawei]ip route-static 192.168.1.224 27 192.168.1.66
R3:
[Huawei]ip route-static 192.168.1.0 27 192.168.1.33
[Huawei]ip route-static 192.168.1.64 27 192.168.1.33
[Huawei]ip route-static 192.168.1.64 27 192.168.1.98
[Huawei]ip route-static 192.168.1.160 27 192.168.1.98
[Huawei]ip route-static 192.168.1.192 27 192.168.1.98
[Huawei]ip route-static 192.168.1.224 27 192.168.1.98
R4:
[Huawei]ip route-static 192.168.1.0 27 192.168.1.65
[Huawei]ip route-static 192.168.1.32 27 192.168.1.97
[Huawei]ip route-static 192.168.1.224 27 192.168.1.162
[Huawei]ip route-static 192.168.1.224 27 192.168.1.194
[Huawei]ip route-static 192.168.1.224 27 192.168.1.194 preference 61
R5:
[Huawei]ip route-static 192.168.1.64 27 192.168.1.161
[Huawei]ip route-static 192.168.1.0 27 192.168.1.161
[Huawei]ip route-static 192.168.1.96 27 192.168.1.161
[Huawei]ip route-static 192.168.1.32 27 192.168.1.161
[Huawei]ip route-static 192.168.1.128 27 192.168.1.161
[Huawei]ip route-static 192.168.1.128 27 192.168.1.193 preference 61
[Huawei]ip route-static 192.168.1.64 27 192.168.1.193 preference 61
[Huawei]ip route-static 192.168.1.96 27 192.168.1.193 preference 61
[Huawei]ip route-static 192.168.1.0 27 192.168.1.193 preference 61
[Huawei]ip route-static 192.168.1.32 27 192.168.1.193 preference 61
R6:
[Huawei]ip route-static 192.168.1.160 27 192.168.1.225
[Huawei]ip route-static 192.168.1.192 27 192.168.1.225
[Huawei]ip route-static 192.168.1.64 27 192.168.1.225
[Huawei]ip route-static 192.168.1.96 27 192.168.1.225
[Huawei]ip route-static 192.168.1.0 27 192.168.1.225
[Huawei]ip route-static 192.168.1.128 27 192.168.1.225
[Huawei]ip route-static 192.168.1.32 27 192.168.1.22