思科模拟器三层交换机配置实验

连接设配
在这里插入图片描述
注:两台笔记本用于配置两台交换机

pc_nameipmaskrlation_f
laptop2192.168.3.100192.168.3.1f0/4
pc0192.168.1.100192.168.1.1f0/1
pc1192.168.2.100192.168.2.1f0/2

配置3960

Switch(config)#vlan 10          //创建vlan 10
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#int f0/1        //进入f0/1 端口
Switch(config-if)#switchport mode access   配置端口模式为access ,accesss模式只允许一个vlan通过,trunk 可允许多个
Switch(config-if)#switchport access vlan 10  //允许vlan 10 通过
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#vlan 30
Switch(config-vlan)#exit
Switch(config)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch(config-if)#

配置3960与3560连接的端口

Switch(config)#int f0/3
Switch(config-if)#switchport mode trunk

配置3560

Switch(config)#vlan 10   //创建vlan 10
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#int vlan 10  //进入vlan 10
Switch(config-if)#  //下面两行是系统提示
%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

Switch(config-if)#ip address 192.168.1.1 255.255.255.0  //配置vlan IP 地址,对应pc上的网关
Switch(config-if)#no shutdown   //启动端口
Switch(config-if)#exit
Switch(config)#int vlan 20
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

Switch(config-if)#ip address 192.168.2.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip routing
Switch(config)#int f0/1        //进入与3960交换机连接的端口,并配置成trunk模式
Switch(config-if)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.
Switch(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to down

Switch(config-if)#exit
Switch(config)#vlan 30
Switch(config-vlan)#exit
Switch(config)#int vlan 30
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

Switch(config-if)#ip address 192.168.3.1 255.255.255.0
Switch(config-if)#

ping 一下
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值