A trunk, what is it?
A trunk is a link between two devices, him more often between two switch, configured so that you can move frames Ethernet modified comprising information on the VLAN on which they pass.
 How to configure trunk port on cisco switches, two switch are connected one to the other, each having been configured with 2 VLANS, VLAN 1 and VLAN 2...

Trunk topology
VLAN
The goal here is that the left VLAN1 traffic circulation on the right and same goes for the VLAN2 VLAN1. So that this to be possible, he must set up the binding between the two switch in 'trunk'... or specifically configure an encapsulation of frames when they pass on the link so that the switch that receives it can then relay it in the correct VLAN.

What protocols?
When we talk about encapsulation, it must necessarily appeal to a protocol. On the side of Cisco, two protocols exist for the encapsulation of data on a trunk:
  1.    ISL (Inter Switch Link) which is a Cisco proprietary protocol that tends to disappear.
  2. dot1Q (IEEE 802 .1Q) the standard protocol defined by the IEEE.
We'll just see dot1q in this case. However it is good to know that each has its own functioning. ISL on all encapsulates frames, regardless of the VLAN. dot1Q, him that insert a tag (a marker) in header... and only on the other VLAN Ethernet frame that the VLAN native. (The VLAN native is used by protocols such as CDP for example to exchange information).
How to configure trunk port on Cisco switch

The first thing to know is that both ends of the link must be configured adequately so that the trunk works. You can either force the trunk... mode or arrange for equipment are negotiating.
 Depending on the mode configured on each side of the link, the result will vary.

SW1(config-if)#switchport mode

There are four modes:
  1. access: typically the mode of a port planned for the connection of a PC, a server..
  2. trunk: force operating in trunk mode
  3. dynamic auto: authorizes the negotiation
  4. dynamic desirable: authorizes the negotiation with a preference for the passage in the trunk if possible.
 The table below shows the operating status of the link depending on the configuration of the mode at both ends:

Trunking Modes  Behavior
Trunking modes Behavior Table
Concrete example
Based on the first scheme, this is manipulation that should be done on SW1 and SW2 so that the laison is forced in trunk:

On SW 1

SW1#configure terminal
SW1(config)#interface fastethernet 0/1
SW1(config-if)#switchport mode trunk
SW1(config-if)#^Z
SW1#

On SW2 (exactly the same manipulation).

SW2#configure terminal
SW2(config)#interface fastethernet 0/1
SW2(config-if)#switchport mode trunk
SW2(config-if)#^Z
SW2#

We now have to verify that the trunk is operational:

SW1#show interface fastEthernet 0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
SW1#

The administrative mode... it is configured, the operational mode, this is the mode of operation as a result of the link configuration.

Note that on some versions of switch, when you force a trunk, it must have previously defined encapsulation to use:

SW2(config-if)#switchport trunk encapsulation dot1q

You can also have other information:

SW1#show interfaces trunk

Port        Mode         Encapsulation  Status        Native vlan
Fa0/1       on           802.1q         trunking      1

Port      Vlans allowed on trunk
Fa0/1       1-4094

Port        Vlans allowed and active in management domain
Fa0/1       1,10,20,30

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/1       1,10,20,30
SW1#

We have here the summary of the ports operating in trunk as well as news relating to VLANs which may or may not pass on the link.

Note that in 'Mode' has the State of the trunk resulting from the config. For example if we were negotiating, the command would then display 'desirable' for example.

As we see, there is not much you can do to make a trunk established. Where the going gets tough it is we want to manage the vlans that are allowed on the trunk or not, or when you activate the milling, feature that is designed to not propagate frames on a link as it seems that the vlan in question is not used beyond it.


0 comments:

Post a Comment

 
Top