Trunk ports –
These switch ports belongs to and carry the traffic of more than one VLAN. This is a great advantage as to carry the traffic of group of VLAN, a single switch port can be used. These are of great use if user wants to exchange traffic between more than one switches having more than one vlan configured.To identify traffic belongs to which vlan, VLAN identification method (802.1q or ISL) are used. Also, to carry traffic between more than one vlan, then inter vlan routing is required, in which the link between router and switch is configured as trunk as the link has to carry the traffic of more than one VLAN (in case of router on a stick configuration not in inter vlan routing by layer 3 switches).
Note: Trunk links can carry the traffic of different VLANs across them but by default, if the links between switches are not trunk then only information from the configured access VLAN will be exchanged.
Here is a simple topology in which 2 switches are connected and VLANs 2 and 3 are configured on both switches as shown.
As user has not assigned any VLANs to other ports of switches therefore the other ports will be in VLAN 1 by default.
Now, note that the link between the switches has to be configured as trunk port because here more than one VLAN (VLAN 1, 2, 3) frame has to be exchanged between the switches. Now assigning IP address to PC1-22.214.171.124/24, PC2-192.168.2.1/24, PC3-192.168.1.2/24, PC3-192.168.2.2/24.