Note: The router is used for simulation.
PC
Host
Step 1: Configure
PC
Of
IP
Address.
Step 2:
PC1
Upper
Ping
All other hosts are accessible.
Step 3: Set
Switch1
And
Switch2
Of
Fa0/12
The direct connection interface
SW1 (config) # inte fa0/12 SW1 (config-If )#Switchport trunk encapsulation dot1q SW1 (config-If )#Switchport mode trunk SW1 (config-If) # exit
Sw2 (config) # inte fa0/12 Sw2 (config-If) # switchport trunk encapsulation dot1q Sw2 (config-If) # switchport mode trunk Sw2 (config-If) # exit |
Step 4: UseShow interface trunkOrShow interface fa0/12 switchportCommand to view and confirm
SW1 # Show interfaces trunk
Port mode encapsulation status Native VLAN Fa0/12 on 802.1Q Trunking 1
Port VLANs allowed on trunk Fa0/12 none
Port VLANs allowed and active in management domain Fa0/12 none
Port VLANs in Spanning Tree forwarding state and not pruned Fa0/12 none
Sw2 # Show interfaces fastethernet0/12 switchport
Name: fa0/12 Switchport: Enabled Administrative Mode: Trunk Operational Mode: Trunk Administrative trunking encapsulation: dot1q Negotiation of trunking: On Access Mode VLAN: 1 (default) Trunking native mode VLAN: 1 (default) Trunking VLANs enabled: All Pruning VLANs enabled: 2-1001
Protected: false
Voice VLAN: none (inactive) Appliance trust: None
|
Step 3:Switch1AndSwitch2Create onVLAN 10AndVLAN 20And add the port to the correspondingVLAN
Step 4: UsePingConfirm
PC1 PC2 Pc5 PC6Mutual supportPingConnect |
Mutually unavailablePingConnect |
PC3 pc4 pc7 pc8Mutual supportPingConnect |