Switch VLAN division Experiment

Source: Internet
Author: User

Basic knowledge of VLAN division experiment: VLAN is short for Virtual Local Area Network (VLAN), which is a logical Network divided on a physical Network. This network corresponds to the L2 network of the ISO model. VLAN division is not limited by the actual physical location of the network port. A VLAN has the same attributes as a common physical network, except that it has no physical location restrictions. It is the same as a common LAN. Layer-2 unicast, broadcast, and multicast frames are forwarded and spread in one VLAN, instead of directly accessing other VLANs. Partitioning policy: 1) Port-based vlan 2) MAC address-based vlan 3) routing-based vlan 4) policy-based vlan 1. Tutorial purpose (1) learn about VLAN configuration of a vswitch. 2. experiment content. // (1) log on to a vswitch from a Super Terminal. // (2) Basic vswitch configuration. (3) configure VLAN3, a PC in the experimental environment, one vswitch, and several lines. 4. Experiment topology. 5. tutorial step (1) Switch basic configuration Switch> enable (Switch from user mode to privileged mode) Switch # configure terminal (Switch to global configuration mode) Switch (config) # interface Vlan 1ip address 192.168.2.2 255.255.255.0 (no ip address 192.168.2.2 255.255.255.0) no shutdownexitSwitch # show run (view configuration information) the ip address of the host is configured as PC1 of the same network segment: 192.168.1.2PC2: 192.168.1.3 test: PC1 ping PC2) create a VLAN on the Switch and name the Switch # configure terminal Switch (config) # vlan 3 (create vlan 3) switch (config-vlan) # name vlan3 Switch (config) # vlan 4 (create vlan 4) Switch (config-vlan) # name vlan4 Switch (config-VLAN) # exit Add the port to the vlan Switch (config) # interface FastEthernet 0/1 Switch (config-if) # switchport mode access Switch (config-if) # switchport access vlan 3 Switch (conf Ig-if) # exit Switch (config) # interface FastEthernet 0/4 Switch (config-if) # switchport mode access Switch (config-if) # switchport access vlan 4 Switch (config-if) # exit test PC1 ping PC2Switch # show vlan view vlan configuration result Switch # show vlanVLAN Name Status Ports ---- ---------------------------------- ----------- Terminal 1 default active Fa0/3, Fa0/2, Fa0/5, fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/1 1, Fa0/12, Fa0/13, Fa0/14 Fa0/15, Fa0/16, Fa0/17, Fa0/18 Fa0/19, Fa0/20, Fa0/21, fa0/22 Fa0/23, Fa0/24, Gig1/1, gig1/210 VLAN0010 active Fa0/120 VLAN0020 active Fa0/41002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act /unsup (3) to delete a VLAN and delete a VALN, you must first Delete the interface under the VLAN: Switch> enable to enter the privileged mode Switch # configure terminal to enter the global configuration mode Switch (config) # interface fa Stethernet0/1 Switch (config-if) # no switchport access vlan 3 Switch (config-if) # exit and delete VLANSwitch (config) # no vlan 3 (vlan 4) view the deletion status Switch # show vlan configuration VLAN -- VLAN Creation Method 1: Step 1: Enter the global configuration mode Switch # configure terminal Step 2: Create a VLAN Switch (config) # vlan-id Step 3: (optional) name VLAN Switch (config-vlan) # name vlan-nam Method 2: Step 1: Switch to privileged configuration mode> enable Step 2: create VLAN Switch_A # vlan database Step 3: (optional) name VLAN Switch_A (vlan) # vlan 2 name VLAN2 VLAN configuration-Add a port to a VLAN Step 1: Enter the port configuration mode Swtich (config) # interface Step 2: Set the port mode to the access port Switch (config-if) # switchport mode access Step 3: Add a port to a specific VLANSwitch (config-if) # switchport access vlan-id configuration VLAN -- add a port to a VLAN example: add FastEthernet 0/1 to VLANSwitch # configure terminalSwitch (config) # interface fastEthernet 0/1 Switch (config-if) # switchport mode access Switch (config-if) # switchport access vlan 10 Switch (config- If) # end VLAN configuration-Add a group of ports to a VLAN Step 1: Enter a group of ports that need to be added to a VLAN Swtich (config) # interface range interface-range Step 2: set port mode to access port Switch (config-range-if) # switchport mode access Step 3: divide a group of ports into the specified VLANSwitch (config-range-if) # swtichport access vlan-id Example: Change the port fastEthernet 0/1 ~ 5, 0/7 are divided into VLAN10Switch # configure terminalSwitch (config) # interface range fastEthernet 0/1-5, 0/7 Switch (config-if-range) # switchport mode access Switch (config-if-range) # switchport access vlan 10 Switch (config-if-range) # exit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.