Switch Trunk port configuration

Source: Internet
Author: User

TrunkTo configure a port, follow these steps:

One Networking requirement:

1. SwitchA and SwitchB are interconnected with trunk. Mutual access is allowed between PCs with the same VLAN. Mutual access is prohibited between PCs with different VLANs;

2. PC1 and PC2 are located in different VLANs. You can set the IP address of VLAN Interface 10 of the SwitchB layer-3 Switch to 10.1.1.254/24, when the IP address of VLAN 20 is 255.1.1.254/24, mutual access between VLANs can be achieved.

2. Networking diagram:

1. Mutual access within a VLAN and inter-VLAN access prohibited

2. layer-3 Switch for mutual VLAN access

Step 3:

Enable intercommunication between VLANs in a VLAN

SwitchA configurations:

 
 
  1. 1. Create and enter) VLAN10, Add E0/1 to VLAN10
  2.  
  3. [SwitchA] vlan 10
  4.  
  5. A [SwitchA-vlan10] port Ethernet 0/1
  6.  
  7. 2. Create and enter) VLAN20, Add E0/2 To VLAN20
  8.  
  9. [SwitchA] vlan 20
  10.  
  11. A [SwitchA-vlan20] port Ethernet 0/2
  12.  
  13. 3. Configure port G1/1 as the Trunk port and allow VLAN10 and VLAN20 to pass through
  14.  
  15. [SwitchA] interface GigabitEthernet 1/1
  16.  
  17. [SwitchA-GigabitEthernet1/1] port link-type trunk
  18.  
  19. [SwitchA-GigabitEthernet1/1] port trunk permit vlan 10 20

SwitchB configurations:

 
 
  1. 1. Create and enter) VLAN10, Add E0/10 to VLAN10
  2. [SwitchB] vlan 10
  3. A [SwitchB-vlan10] port Ethernet 0/10
  4. 2. Create and enter) VLAN20, Add E0/20 to VLAN20
  5. [SwitchB] vlan 20
  6. A [SwitchB-vlan20] port Ethernet 0/20
  7. 3. Configure port G1/1 as the Trunk port and allow VLAN10 and VLAN20 to pass [SwitchB] interface GigabitEthernet 1/1
  8. [SwitchB-GigabitEthernet1/1] port link-type trunk [SwitchB-GigabitEthernet1/1] port trunk permit vlan 10 20
  9. Configure layer-3 switches for intercommunication between VLANs

SwitchA configurations:

 
 
  1. 1. Create and enter) VLAN10, Add E0/1 to VLAN10
  2. [SwitchA] vlan 10
  3. A [SwitchA-vlan10] port Ethernet 0/1
  4. 2. Create and enter) VLAN20, Add E0/2 To VLAN20
  5. [SwitchA] vlan 20
  6. A [SwitchA-vlan20] port Ethernet 0/2
  7. 3. Configure port G1/1 as the Trunk port and allow VLAN10 and VLAN20 to pass [SwitchA] interface GigabitEthernet 1/1
  8. [SwitchA-GigabitEthernet1/1] port link-type trunk [SwitchA-GigabitEthernet1/1] port trunk permit vlan 10 20

SwitchB configurations:

 
 
  1. 1. Create VLAN10
  2.  
  3. [SwitchB] vlan 10
  4.  
  5. 2. Set the Virtual Interface address of VLAN10
  6.  
  7. [SwitchB] interface vlan 10
  8.  
  9. [SwitchB-int-vlan10] ip address 10.1.1.254 255.255.255.0
  10.  
  11. 3. Create VLAN20
  12.  
  13. [SwitchB] vlan 20
  14.  
  15. 4. Set the Virtual Interface address of VLAN20
  16.  
  17. [SwitchB] interface vlan 20
  18.  
  19. [SwitchB-int-vlan20] ip address 255.1.1.254 255.255.255.0
  20.  
  21. 5. Configure port G1/1 as the Trunk port and allow VLAN10 and VLAN20 to pass through
  22.  
  23. [SwitchA] interface GigabitEthernet 1/1
  24.  
  25. [SwitchA-GigabitEthernet1/1] port link-type trunk
  26.  
  27. [SwitchA-GigabitEthernet1/1] port trunk permit vlan 10 20

The configuration of the Trunk port in the VLAN is over. I hope you can understand it.

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.