VLAN lab questions:
Answer Process
(1) full connectivity between devices with the same VLAN
1. Create vlan2 and vlan3 on SW1 and sw2 respectively. The command is as follows:
SW1 # VLAN Database
SW1 (VLAN) # VLAN 2
2. Route the corresponding interfaces to the corresponding VLAN
SW1 (config) # int F0/1
SW1 (config-If) # switchport Mode Access
SW1 (config-If) # switchport access VLAN 2
3. Run the following command to view the VLAN of the corresponding port
SW1 # Show VLAN brief
Shows how to complete the configuration.
3.1SW1
3.2Sw2
4. Configure the truck communication plank between SW1 and sw2
SW1 (config) # int F0/24
SW1 (config-If) # switchport mode trunk
Sw2 configuration is the same as above
Run the following command to view all trunk stacks on the vswitch.
SW1 # Show interfaces trunk
So far, the first requirement has been completed. devices of the same VLAN should be able to communicate with each other, and devices of different VLANs cannot communicate with each other. In this case, perform a Unicom test and then configure the connection.
Bytes -----------------------------------------------------------------------------------------------------------------------------
(2)
For communication between different VLANs, you must use the router's route addressing.
1. Enable the plank path between the vswitch and the vro
SW1 (config) # int F0/5
SW1 (config-If) # switchport mode trunk
2. Enable sub-interfaces on the vro to correspond to different VLANs.
R1 (config) # int F0/0
R1 (config-If) # No Shutdown
R1 (config-If) # int F0/0.2// Subinterface. We recommend that you use the same vlan id.
R1 (config-subif) # encapsulation dot1q 2// Dot1q encapsulation, which must be the same as that of the switch communication data packet. 2 represents VLAN 2.
R1 (config-subif) # IP add 192.168.2.254 255.255.255.0// Vlan2 Gateway
Set sub-interfaces for vlan2 and vlan3 respectively.
In this step, different VLANs can communicate with each other through the router r1 :)
Certificate --------------------------------------------------------------------------------------------------------------------------------------------------------
(3) vswitch Remote Management
1. Configure virtual Interfaces
SW1 (config) # int VLAN 1// Vswitch virtual interface, which can be used to configure IP addresses for Connectivity testing and remote logon, also known as VTL.
SW1 (config-If) # IP add 10.1.1.1 255.255.255.0
SW1 (config-If) # No Shutdown
SW1 (config-If) # exit
SW1 (config) # IP default-Gateway 10.1.1.254// Specify a gateway. You do not need to specify a gateway if you do not need to log on remotely across network segments.
2. Enable vswitch Remote Login
SW1 (config) # Line vty 0 4
SW1 (config-line) # password Cisco
SW1 (config-line) # exit
SW1 (config) # enable password Cisco
3. Create a subinterface for the management ip address of the vswitch on router r1
R1 (config) # int F0/0.1
R1 (config-subif) # encapsulation dot1q 1
R1 (config-subif) # IP add 10.1.1.254 255.255.255.0
Now we can use a PC remote login switch for management:) as shown in
You have worked hard here. Thank you :)
-----------------------------------------------------------------------------
Statement:
This article aims to organize and implement the knowledge learned by Yi Ba Lang.
You are welcome to reprint this document, but please make sure that this document is complete or noted. This document shall not be used for commercial purposes without the consent of big Yi Ba Lang. Finally, if you can get some help from this simple document, big Yi Ba Lang will be very happy with his own efforts. Due to the limited level of the author, if the errors in this document cause inconvenience, I am sorry in advance.
Wish you good health and smooth work.