一、需求:
二、分析
分析图示拓扑结构和需求可知,该结构一共有15个广播域,也就是要将192.168.1.0/24这个网段分为至少15个子网段。根据子网划分原则,需要将4位主机位变成网络位,划分后的子网如下:
192.168.1.0/28 192.168.1.16/28 192.168.1.32/28 192.168.1.48/28
192.168.1.64/28 192.168.1.80/28 192.168.1.96/28 192.168.112.0/28
192.168.1.128/28 192.168.1.144/28 192.168.1.160/28 192.168.1.176/28
192.168.1.192/28 192.168.1.208/28 192.168.1.224/28 192.168.1.240/28
根据需求尽量减少每台路由的路由表条目,将相邻的网段尽量分配在一个区域2.
网段分配如下:
三、配置ip
1.r1
2.r2
3.r3 4.r4
5.r5
四、配置路由表
r1:
0.0.0.0/0 Static 60 0 RD 192.168.1.82 GigabitEthernet0/0/0
Static 60 0 RD 192.168.1.226 GigabitEthernet0/0/1
192.168.1.64/26 Static 60 0 RD 192.168.1.82 GigabitEthernet0/0/0
192.168.1.128/26 Static 60 0 RD 192.168.1.82 GigabitEthernet0/0/0
Static 60 0 RD 192.168.1.226 GigabitEthernet0/0/1
192.168.1.192/26 Static 60 0 RD 192.168.1.226 GigabitEthernet0/0/1
r2:
0.0.0.0/0 Static 60 0 RD 192.168.1.66 GigabitEthernet0/0/1
192.168.1.32/27 Static 60 0 RD 192.168.1.81 GigabitEthernet0/0/0
192.168.1.128/26 Static 60 0 RD 192.168.1.66 GigabitEthernet0/0/1
192.168.1.192/27 Static 60 0 RD 192.168.1.81 GigabitEthernet0/0/0
Static 60 0 RD 192.168.1.66 GigabitEthernet0/0/1
192.168.1.224/28 Static 60 0 RD 192.168.1.81 GigabitEthernet0/0/0
192.168.1.240/28 Static 60 0 RD 192.168.1.66 GigabitEthernet0/0/1
r3:
0.0.0.0/0 Static 60 0 RD 192.168.1.242 GigabitEthernet0/0/0
192.168.1.32/27 Static 60 0 RD 192.168.1.225 GigabitEthernet0/0/1
192.168.1.64/28 Static 60 0 RD 192.168.1.242 GigabitEthernet0/0/0
192.168.1.80/28 Static 60 0 RD 192.168.1.225 GigabitEthernet0/0/1
192.168.1.96/27 Static 60 0 RD 192.168.1.225 GigabitEthernet0/0/1
Static 60 0 RD 192.168.1.242 GigabitEthernet0/0/0
192.168.1.128/26 Static 60 0 RD 192.168.1.242 GigabitEthernet0/0/0
r4:
0.0.0.0/0 Static 60 0 RD 192.168.1.162 GigabitEthernet4/0/0
0.0.0.0/0 Static 61 0 RD 192.168.1.178 GigabitEthernet4/0/0
192.168.1.32/27 Static 60 0 RD 192.168.1.65 GigabitEthernet0/0/0
Static 60 0 RD 192.168.1.241 GigabitEthernet0/0/1
192.168.1.80/28 Static 60 0 RD 192.168.1.65 GigabitEthernet0/0/0
192.168.1.96/27 Static 60 0 RD 192.168.1.65 GigabitEthernet0/0/0
192.168.1.192/27 Static 60 0 RD 192.168.1.241 GigabitEthernet0/0/1
192.168.1.224/28 Static 60 0 RD 192.168.1.241 GigabitEthernet0/0/1
r5:
0.0.0.0/0 Static 60 0 RD 192.168.1.161 GigabitEthernet0/0/1
0.0.0.0/0 Static 61 0 RD 192.168.1.177 GigabitEthernet0/0/1