The frame are tagged with a 4 Bytes field.
Possible VLAN are 4094 VLANs
There are three types of ports. Access, trunk or Hybrid.
- An access port is called "untagged port"
- An Trunk port is called "tagged port"
- An Hybrid type permit to remove the tagging from one frame allowing an END device receive multiple traffic from multiples VLAN. (It is like a trunk with end devices).
Hybrid port is the DEFAULT TYPE of port.
To configure VLANs
[SWT] vlan batch 10 to 20 (To create all the VLAN between 10 to 20).
[SWT] display vlan 10 verbose (To show more details including the interfaces added to the VLAN).
[SWT] display vlan summary
To configure a trunk use
[Interface G0/1] port link-type TRUNK
[Interface G0/1] port trunk allow-pass vlan all
There are two ways to assigned a port to a VLAN
- Accessing to the VLAN and add the ports
[SWT] vlan 2
[SWT] port GigabithEthernet 0/1
- Accessing to the interface and added to the VLAN
[SWT] interface G/01
[SWT] port default vlan 2
[swt] Display vlan
The total number of vlans is : 4
VID |
TYPE |
PORTS |
1 |
Common |
UT:GE0/0/1 (U) |
El VLAN ID |
|
El "UT" significa "untagged" que puede ser porque el puerto esta en modo Access o Hybrid El "U" significa "UP" could be "D" from DOWN |
Define a trunk port
[G0/1] port link-type trunk |
Define the trunk mode |
[G0/1] port trunk pvid vlan 10 |
Define the default VLAN of the trunk. |
[G0/1] port trunk allow-pass vlan 2 3 |
Define the allowed VLAN's. You should add to VLAN 10 if you want to permit the traffic in that VLAN because even when is the default VLAN for the previous command won't be allowed if isn't in this list. |
Define a hybrid Port
This kind of ports permit multiple VLANs to be untagged in the same port not only 1
[G0/1] port link-type hybrid |
(By default are Hybrid mode so this command isn't necessary if the port has default configuration). |
[G0/1] port hybrid pvid vlan 3 |
Define the default PVID that could be tagged or untagged. The PVID on a trunk like defines only the tagging behavior that will be applied at the trunk interface. ALL untagged traffic is tagged to VLAN 3. So from this example all traffic that came from VLAN 2 or VLAN 3 would be delivery tagged at VLAN 3. |
[G0/1] port hybrid untagged vlan 2 to 3 |
Define which VLAN
goes untagged. This means that any traffic forwarded from a host with VLAN 2
or 3 to an end system connected in this interface can be delivery |
Create subinterfaces in a router
[Router] interface G0/1.1 |
Create the subinterface. |
[G0/1.1] dot1q termination vid 2 |
When received a packet, it will untagged and analyzed at level 3 to forwarding decision. When send a packet, it will tagged the packet out with the current VID 2. |
[G0/1.1] ip address 192.168.1.1 24 |
|
[G0/1.1] arp broadcast enable |
It is necessa****ecause Broadcast ARP is disable by default in the subinterfaces. |
Create a VLAN Interface
[SWT] Interface vlanif 2 |
To create the interface VLAN |