interface f0/0
\\将指定端口设置成trunk模式
switchport mode trunk
end
write
----------------------------------------------------------
PC1:
Enable
\\命名并设置IP
config terminal
no ip routing
hostname pc1
interface f0/0
ip address 192.168.10.2 255.255.255.0
no shutdown
end
write
-----------------------------------------------------------
PC2:
\\命名并设置IP
enable
config terminal
no ip routing
hostname pc2
interface f0/0
ip address 192.168.1.2 255.255.255.0
no shutdown
end
write