Experiment a VLAN: VLAN Access Interface and Basic Configuration

 

 

First, the subject and its requirements:

 

  

 

   

 

  

    Access interface is used on the interface connected to the host switch. When an interface receives a data frame without a VLAN tag Access from the host, which would add data coincides with the PVID VLAN tag (PVID be manually configured, it is 1, i.e., all the switches on the interface by default belong to the VLAN1) . When Access interfaces to send a VLAN tag to the data frame to the host, it first checks the data frame's VLAN ID whether their PVID same, if the same, then remove the transmission after the VLAN tag to the data frame to the host; if different, directly discards the data frame.

 

 Second, the experimental steps:

  1. In the first experiment topology eNSP draw a good start for all devices, make the appropriate IP configuration required. First use the ping command, ping about the IP address, should be all the PC can ping each other.

   Example: ping 10.1.1.3

    

  2. Create VLAN:

    VLAN1 is the default, all of the title given VLAN10 VLAN20 need to manually create and create VLAN10 on S1 and VLAN20 According to subject, and creating VLAN30 VLAN40 on S2.

    After configuring the look VLAN information.

    command:

      [S1]vlan 10

      [S1-vlan10]vlan 20

      [S1]display vlan

      

      

      [S2] vlan batch vlan 30 vlan 40 // create multiple vlan, vlan batch using command

      [S2]display vlan

      

  3. Configure Access Interface:

    The topology, using the port link-type access to configure all Access Interface S1 and interface of a PC type switch S2 is on, and uses the port default vlan command to configure the default VLAN interface and simultaneously added to the appropriate VLAN. By default, all interfaces of the default VLAN ID is 1.

    command:

    [S1]interface ethernet0/0/1

    [S1-Ethernet0/0/1]port link-type access

    [S1-Ethernet0/0/1]port default vlan 10

    [S1-Ethernet0/0/1]interface ethernet0/0/2

    [S1-Ethernet0/0/2]port link-type access

    [S1-Ethernet0/0/2]port default vlan 10

    [S1-Ethernet0/0/2]interface ethernet0/0/3

    [S1-Ethernet0/0/3]port link-type access

    [S1-Ethernet0/0/3]port default vlan 20

    

    

    [S2]interface ethernet0/0/1

    [S2-Ethernet0/0/1]port link-type access

    [S2-Ethernet0/0/1]port default vlan 30

    [S2-Ethernet0/0/1]interface ethernet0/0/2

    [S2-Ethernet0/0/2]port link-type access

    [S2-Ethernet0/0/2]port default vlan 40

    

 

4. Verify the configuration:

  In this experiment, only belong to the IT sector between the two hosts of PC1 and PC2 VLAN10 communicate with each other and can not communicate with each other between the PC between different departments.

  Were tested with the same sector of the terminal PC2, PC3 HR connectivity between the terminal sector PC1.

  

 

  This is all the Experimental procedure 1.

  

 

 

Guess you like

Origin www.cnblogs.com/zhaihuijie/p/11915494.html