记录一次Cisco 2960交换机配置

1.进入特权配置
enable
conf t
2.设置VLAN

全局模式下进入fa/01端口到fa0/12端口模式

Switch(config)#interface range fastEthernet 0/1-12

将入fa/01端口到fa0/12端口划分到Vlan10

Switch(config-if-range)#switchport access vlan 10

fa/01端口到fa0/12端口设置成静态Vlan访问模式

Switch(config-if-range)#switchport mode access

激活fa/01端口到fa0/12端口

Switch(config-if-range)#no shutdown

设置GigabitEthernet0/1为trunk口

interface GigabitEthernet0/1
description to router
switchport mode trunk

修改g0/1口的封装类型 改成dot1q

switchport trunk encapsulation dot1q

设置GigabitEthernet0/2为trunk口

interface GigabitEthernet0/2
description to router
switchport mode trunk

修改g0/2口的封装类型 改成dot1q

switchport trunk encapsulation dot1q

设置VLAN1地址

interface Vlan1为空
no ip address
no ip route-cache

设置VLAN10地址

interface Vlan10
ip address 192.168.1.200 255.255.255.0
no ip route-cache

设置VLAN20地址

interface Vlan20
ip address 10.16.16.200 255.255.255.0
no ip route-cache
ip default-gateway 10.16.16.1

开启HTTP页面

ip http server
ip http secure-server
S1(config-if)#end --退出特权模式
S1#copy running-config startup-config --保存配置

P.K

computer loser

评论已关闭