分布操作:
1.划分vlan
2.ospf、area
3.测试ping
三层交换机×2
路由器×2
PC机×4
路由器使用WIC-2T模块
使用DCE串口线连接
其余设备间均用直通线连接
各种预配置信息:
设备从左往右,从上往下依次为
S1,R2,R3,S4,PC0,PC1,PC2,PC3
PC0:
PC1,PC2,PC3按照预配置信息和PC0同理配置完全
1.划分vlan
创建VLAN,配置VLAN
S1配置:
ena
conf t
vl 10
vl 20
vl 100
int vl 10
ip add 192.168.10.254 255.255.255.0
int vl 20
ip add 192.168.20.254 255.255.255.0
int vl 100
ip add 12.1.1.1 255.255.255.0
end
把端口划进VLAN中:
ena
conf t
int f0/1
swi mode access
swi access vl 10
int f0/2
swi mode access
swi access vl 20
int f0/3
swi mode access
swi access vl 100
激活三层交换机的路由功能:
ip routing
在f0/3端口激活端口:
int f0/3
no shut
end
R2配置:
ena
conf t
int f0/0
no shut
ip add 12.1.1.2 255.255.255.0
int s0/1/0
no shut
ip add 23.1.1.3 255.255.255.0
end
右边R3与S4配置过程相似,这里就不演示了
2.ospf、area
S1配置:
ena
conf t
rou ospf 1
router-id 1.1.1.1
net 192.168.10.0 0.0.0.255 area 0
net 192.168.20.0 0.0.0.255 area 0
net 12.1.1.0 0.0.0.255 area 0
end
R2配置:
R2左端口属于area 0,R2右端口属于area 1
ena
conf t
rou ospf 1
router-id 2.2.2.2
net 12.1.1.0 0.0.0.255 area 0
net 23.1.1.0 0.0.0.255 area 1
end
右边R3与S4配置过程相似,这里就不演示了
(提示:R3左端口属于area 1,右端口属于area 2)
两台路由器连接:
R2配置:
ena
conf t
rou ospf 1
area 1 virtual-link 3.3.3.3
end
R3配置:
ena
conf t
rou ospf 1
area 1 virtual-link 2.2.2.2
end
这样,所有设备就都配置好了
现在测试ping情况
3.测试ping
PC0:
继续测试其余PC机互ping情况
有些模拟器速度较慢,ospf可能需要额外等待一点时间才能使用PC机互ping