configuring access & trunk ports

7
Title Configuring access & trunk ports

Upload: netprotocol-xpert

Post on 13-Apr-2017

356 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Configuring Access & Trunk Ports

Title

Configuring access & trunk ports

Page 2: Configuring Access & Trunk Ports

• To configure an interface to be an access interface, the switchport mode access interface command is used. This type of interface can be assigned only to a single VLAN.

 • To configure a trunk interface, the switchport mode

trunk interface command is used. This type of interface can carry traffic of multiple VLANs.

Page 3: Configuring Access & Trunk Ports

 An example will help you understand the concept.

Page 4: Configuring Access & Trunk Ports

• Host A and host B are in different VLANs, VLAN 1 and VLAN 2. These ports need to be configured as access ports and assigned to their respective VLANs by using the following sequence of commands:

Because the link between SW1 and SW2 needs to carry traffic of multiple VLANs, it needs to be configured as a trunk interface

Page 5: Configuring Access & Trunk Ports

This is done by using the following commands on both SW1 and SW2:

On SW1:

On SW2:

Now the link between SW1 and SW2 can carry traffic from both the VLAN1 and VLAN2.

Page 6: Configuring Access & Trunk Ports

You can verify that an interface is indeed a trunk interface by using the show interface Fa0/3 switchport command on

SW1:

Page 7: Configuring Access & Trunk Ports

• NOTE – VLAN 1 doesn't have to be created, it exists by default. Also, by default, all ports are in the VLAN 1, so Fa0/1 doesn't need the switchport access vlan 1 command.