实验名称:简单的单臂路由的 配置实验 (思科)
实验拓扑:
实验需要:
1、按图中所示配置设网络备vlan,IP地址
2、能够使各pc互相ping通。
实验步骤:
1、配置终端设备:pc1-pc5按照拓扑图中所示配置各个pc的ip地址。网关配置为 192.168.x.254 2、配置网络设备#配置交换设备(sw1)1、创建vlanvlan 10vlan 202、配置端口模式并加入相应的vlan interface fa0/1switchport mode accessswitchport access vlan 10interface fa0/2switchport mode accessswitchport access vlan 203、配置交换机之间的互联链路(trunk)interface fa 0/24switchport mode trunkswitchport trunk allowed vlan 10,204、配置交换机与路由器之间的互联链路(trunk)interface fa 0/23switchport mode trunk#配置交换设备(sw2)1、创建vlanvlan 10vlan 202、配置端口模式并加入相应的vlan interface fa0/1switchport mode accessswitchport access vlan 10interface fa0/2switchport mode accessswitchport access vlan 203、配置交换机之间的互联链路(trunk)interface fa 0/24switchport mode trunkswitchport trunk allowed vlan 10,20 #配置路由器设备(AR1) 1、配置子端口,并定义对应的vlaninterface g0/1.1 encapsulation dot1Q 10ip address 192.168.10.254 255.255.255.0interface g0/1.2encapsulation dot1Q 20ip address 192.168.20.254 255.255.255.0 2、开启端口interface g0/1no shutdown 2、配置连接pc端的端口interface g0/0 ip address 192.168.30.254 255.255.255.0 验证:pc1 ping通 PC5![](https://s1.51cto.com/images/blog/201811/21/0fccbd29ce1982c8919177ffca263ac4.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
转载于:https://blog.51cto.com/14029008/2320234