①#改名字
Switch>enable \\進入特權執行模式
Switch #configure terminal \\進入全局配置模式
Switch(config)#hostname MS1 \\修改主機名為MS1
MS1(config)# \\配置完注意觀察命令提示符的變化
②
vlan database---進入vlan設置區---設置三個vlan:vlan 10,vlan 20,vlan 30
一個接口:
interface fa0/1
switchport mode access
switchport access vlan 10
多個接口:
interface range fa0/4 - 5
switchport mode access
switchport access vlan 20
③
交換機與交換機之間配置Trunk:
接口的中繼封裝是“自動”不能被配置為“主干”的模式。
解決方法:
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk //先配置封裝,再設置trunk
switchport trunk allowed vlan all
switchport trunk native vlan x(你想指定的VLAN ID)-----思科本征VLAN設置
④
Vlan接口配置:
interface vlan 10
ip address 192.168.1.4 255.255.255.0
no shutdown
開啟路由:在全局模式下輸入" ip routing ",就可以開啟路由
也只有開啟路由后才可以設置靜態路由
ip route 0.0.0.0 0 xxx