Saturday, February 12, 2011

notes: Switchport : access, trunk, dtp, vlan

Layer 2 ports

1. access ports - default port configuration, belongs to one VLAN
2. trunk ports - carries multiple VLANs.

Layer 3 Routed Ports

1. Switched Virtual Interfaces (SVI) - Logical layer3 VLAN interface.
-use as a management interface and as gateway for VLAN subnets.
2. Native routed interfaces - Using switch ports as a standard layer 3 ports. This features is only available on L3 switches.

command to configure switch interface:
no switchport
ip address 1.1.1.1 255.255.255.0

Trunks

1. ISL - Cisco proprietary.
- traffic is encapsulated within a 30-bytes ISL frame (26-byte header and 4-byte trailer).
Configured with "sw trunk encapsulation isl".

2. 802.1q - Open standard.
- All traffic are tagged with 4-byte 802.1q, except the 'native' VLAN.
- The native VLAN is a VLAN for which frames are not tagged. Following are the aspects of the native VLAN:

1. The VLAN a port is in when not trunking.
2. The VLAN from which frames are sent untagged on an 802.1Q port.
3. The VLAN to which frames are forwarded if received untagged on an 802.1Q port.

Cisco switches produce errors if the native VLAN does not match at each end of the link.
The default native VLAN in Cisco devices is VLAN 1.

You can control the 802.1Q VLAN traffic sent over a trunk, which is possible for security purposes or load balancing.

The command that creates and controls trunks on Cisco IOS-based switches is the interface command:

switchport trunk {allowed vlan vlan-list} | {encapsulation {dot1q | isl | negotiate}} | {native vlan
vlan-id} | {pruning vlan vlan-list}

trunking mode:

1. Static Trunk - hardcode a port as a trunk
Command:
switchport mode trunk

2. DTP (Dynamic Trunking Protocol) -is a Cisco proprietary protocol that negotiates the trunking status of a switchport
- enabled by default

DTP port states

1. auto: Enables the switch to create a trunk if initiated from the other switch. A switch programmed with auto does not initiate a trunk but can form a trunk if the other side initiates. The trunk is formed with desirable and on.
2. desirable: Actively tries to create a trunk link with the peer. The trunk is formed with auto, desirable, and on.
3. on: DTP messages are sent, and a trunk will be formed unless the peer explicitly forbids it. The trunk is formed with auto, desirable, and on.
4. off: Trunking is not allowed on the switchport regardless of the DTP status of the peer.
nonegotiate: Disables DTP and will not form a trunk link with a peer which requires trunk negotiation. Trunk is formed with on and nonegotiate

platform default dtp port states

3550 - desirable
3560 - auto

command to disable dtp:
switchport nonenegotiate

Setting the interface to static mode with "sw mode access|trunk" will not disable DTP negotiations.

VLAN

global command

vlan #
name vlan-name
exit
Note: you must exit for the vlan to be created.

command to activate vlan
vlan config mode
state active

Allowed-list
- Limits which VLANs are allowed on a specific trunk link.

No comments:

Post a Comment