# Trunk Port(Tag Port)

## 1-1 What's Trunk port?

&#x20;A trunk port is a port that is assigned to carry traffic for all the VLANs.Trunk send Untagged and Tagged information. There are two standards for Trunking:

* ISL(Cisco)
* 802.1Q(Industry Standard) is 4 Byte which is considered without Native Vlan

**Example:**

![Trunk between two switches](/files/-LAPD517Yheb1Bx_qoVt)

```
sw1(config)# int fa0/1
sw1(config-if)# switchport mode trunk
```

```
sw2(config)# int fa0/1
sw2(config-vlan)# switchport mode trunk
```

{% hint style="info" %}
In older version of Cisco devices first you have to write:

&#x20;*switchport encapsulation dot1q*&#x20;

then &#x20;

*switchport mode trunk*
{% endhint %}

## 1-2 Changing Native Vlan

For changing Native Vlan just write:

```
sw1(config)# int fa0/1
sw1(config-if)# switchport trunk native vlan 20
```

## 1-3 Allow Specific Vlan

To allow specific vlan just write:

```
sw1(config)# int fa0/1
sw1(config-if)# switchport allowed vlan 10,20,30
```

In above-mentioned code, just vlan 10, 20, 30 allowed through trunk port

{% hint style="info" %}
You can use switchport command with add/all/except/none&#x20;

```
sw1(config-if)# switchport allowed vlan 10,20,30
sw1(config-if)# switchport allowed vlan add/all/except/none 10,20,30
```

{% endhint %}

## 1-4 How to see trunk port

```
switch# show interface trunk
or 
switch# show interface fa0/1 switchport
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hamidsec.gitbook.io/cisco/trunk-port-tag-port.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
