Switch#en Switch#conf Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface vlan 10 Switch(config-if)# %LINK-5-CHANGED: Interface Vlan10, changed state to up
Switch(config-if)#ip address 192.168.10.254255.255.255.0 Switch(config-if)#no sh Switch(config-if)#
添加出错后,可为vlan10删除该地址
1 2 3 4
Switch(config-if)#int vlan 10 Switch(config-if)#no ip addre Switch(config-if)#no ip address 192.168.10.254255.255.255.0 Switch(config-if)#
Switch(config)#interface gigabitEthernet 0/1 Switch(config-if)#switchport access vlan 10 Switch(config-if)# %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
Switch(config-if)#exit Switch(config)#inte Switch(config)#interface gi Switch(config)#interface gigabitEthernet 0/2 Switch(config-if)#switc Switch(config-if)#switchport acc Switch(config-if)#switchport access vlan 20 % Access VLAN does not exist. Creating 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
Ping statistics for192.168.20.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 6ms, Average = 1ms
Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int g0/1 Switch(config-if)#no swi Switch(config-if)#no switchport Switch(config-if)# %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
Switch(config-if)#ip add Switch(config-if)#ip address 192.168.10.254255.255.255.0 Switch(config-if)#no sh Switch(config-if)#int g0/2 Switch(config-if)#no sw Switch(config-if)#no switchport Switch(config-if)# %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up
Ping statistics for192.168.20.1: Packets: Sent = 4, Received = 3, Lost = 1 (25% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms