ip | 192.168.1.1 | vlan2 |
mask | 255.255.255.0 | |
gataway |
ip | 192.168.2.1 | vlan3 |
mask | 255.255.255.0 | |
gataway |
ip | 192.168.1.2 | vlan2 |
mask | 255.255.255.0 | |
gataway |
ip | 192.168.1.3 | vlan2 |
mask | 255.255.255.0 | |
gataway |
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname switch0
switch0(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
switch0#vlan database
% Warning: It is recommended to configure VLAN from config mode,
as VLAN database mode is being deprecated. Please consult user
documentation for configuring VTP/VLAN in config mode.
VLAN 2 modified:
Name: 2
VLAN 3 modified:
Name: 3
switch0(vlan)#exit
APPLY completed.
Exiting....
switch0#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch0(config)#interface f
switch0(config)#interface fastEthernet0/1
switch0(config-if)#switchport access vlan 2
switch0(config-if)#exit
switch0(config)#interface fastEthernet0/2
switch0(config-if)#switchport access vlan 3
switch0(config)#interface fastEthernet0/3
switch0(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
switch0#copy run star
Destination filename [startup-config]?
Building configuration...
[OK]
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname switch1
switch1(config)#vlan database
^
% Invalid input detected at '^' marker.
switch1(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
switch1#vlan database
% Warning: It is recommended to configure VLAN from config mode,
as VLAN database mode is being deprecated. Please consult user
documentation for configuring VTP/VLAN in config mode.
VLAN 2 modified:
Name: 2
switch1(vlan)#vlna 3 name 3
^
% Invalid input detected at '^' marker.
switch1(vlan)#exit
APPLY completed.
Exiting....
switch1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch1(config)#int
switch1(config)#interface f
switch1(config)#interface fastEthernet0/1
switch1(config-if)#switchport mode trunk
switch1(config-if)#exit
switch1(config)#interface fastEthernet0/2
switch1(config-if)#switchport mode access
switch1(config-if)#switchport access vlan 2
switch1(config-if)#exit
switch1(config)#interface fastEthernet0/3
switch1(config-if)#switchport mode access
switch1(config-if)#switchport access vlan 2
switch1(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
switch1#copy running-config st
switch1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Invalid Command.
Reply from 192.168.1.2: bytes=32 time=94ms TTL=128
Reply from 192.168.1.2: bytes=32 time=78ms TTL=128
Reply from 192.168.1.2: bytes=32 time=94ms TTL=128
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 78ms, Maximum = 187ms, Average = 113ms,ping通
Request timed out.
Request timed out.
Request timed out.
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),ping不通