How to configure trunk on Cisco Catalyst Switch

Have you gave the switch an IP address? I believe you need to give the switch an IP address with the commands in global config and interface config mode.

int vlan 50
ip add 192.168.1.x 255.255.255.0

Please let me know if this helps or if you already have assigned an IP to the switch.

Hello Jagdeep.

Kevin is right. You should have an IP address set up on the switch itself, specifically on the vlan 50 interface. Once you assign that VLAN to the access port 0/1 and the port comes up, the VLAN interface should become pingable, and you should be able to ping the laptop from the switch.

I hope this has been helpful!

Laz

Thanks, I will give it a go, I have not done that. I was speaking to a guy in my office and he was explaining that, although I had added VLAN 50, at layer 2 level. I would still need to give the VLAN an address to allow layer 3 routing.

1 Like

I have got it to work with the suggestions made, the mistake I made was not entering int vlan 50 as I was entering vlan 50 on its own and then trying to add the ip address which fails.

2 Likes

Hi Guys - I’m currently studying for a CCDA and the book states that best practice for designing the access layer is to set trunks to ON and ON with no-negotiate. I get the no-negotiate part but can’t figure out what the ‘On and ON’ part relates to? Thanks - Gareth.

image

could be wrong, but i think there is a typo here in this image. I believe the top box is supposed to be SW1 configs, and bottom is supposed to be SW2.

1 Like

Hello Gareth

The following are the options that you can use for configuring a switchport. These are taken from this Cisco documentation.

  • switchport mode access: Puts the interface (access port) into permanent nontrunking mode and negotiates to convert the link into a nontrunk link. The interface becomes a nontrunk interface, regardless of whether the neighboring interface is a trunk interface.
  • switchport mode dynamic auto: Makes the interface able to convert the link to a trunk link. The interface becomes a trunk interface if the neighboring interface is set to trunk or desirable mode. The default switchport mode for newer Cisco switch Ethernet interfaces is dynamic auto. Note that if two Cisco switches are left to the common default setting of auto, a trunk will never form.
  • switchport mode dynamic desirable: Makes the interface actively attempt to convert the link to a trunk link. The interface becomes a trunk interface if the neighboring interface is set to trunk, desirable, or auto mode. This is the default switchport mode on older switches, such as the Catalyst 2950 and 3550 Series switches.
  • switchport mode trunk: Puts the interface into permanent trunking mode and negotiates to convert the neighboring link into a trunk link. The interface becomes a trunk interface even if the neighboring interface is not a trunk interface.
  • switchport nonegotiate: Prevents the interface from generating DTP frames. You can use this command only when the interface switchport mode is access or trunk. You must manually configure the neighboring interface as a trunk interface to establish a trunk link.

Now the terminology used to describe the configuration as “ON” and “ON” is an unfortunate and confusing use of a terminology that is more often used for etherchannel. Etherchannel also has an autoconfiguration feature where you can configure the etherchannel on both ends with any of the following commands:

channel-group 1 mode on
channel-group 1 mode auto
channel-group 1 mode desirable

The first of these commands hardwires etherchannel to function without negotiation. This is an “ON” and “ON” configuration situation.

Once again, unfortunately, the same terminology is used for Dynamic Trunking Protocol (DTP). To answer your question, an “ON and ON” configuration simply means nothing more than configuring both ends of the trunk as switchport mode trunk and using the switchport nonegotiate command on both ends of the trunk.

I hope this has been helpful!

Laz

Hello Austin

Yep, you are correct, the bottom box should have SW2(config)# prompt on both lines.

I’ll let @ReneMolenaar know.

Thanks again!

Laz

1 Like

Thanks @alanderson2 I fixed it.

1 Like

Great answer - thanks Laz. The guys at Cisco should get together to once in a while to review their terminology! I guess this is best practice for security reasons which kind of makes sense.

Hi,
I think we don’t need a trunking port on both the switches to establish communication between same vlans(I checked it in my gns3). However, we need trunk ports to communicate between different vlans (router on a stick model). But in this lessen you have created trunk ports on both switches which has same vlans both sides.

i configured that f0/14 on both switches as access ports but not the trunk port, its working fine. can i know why you created trunk ports to communicate between same vlans?

Hello Pradeep

If you just want to share one VLAN, you’re ok, but if you want to share multiple VLANs, you need a trunk.

A trunk is not used to establish communication between different VLANs. A trunk is configured between two switches in order to carry MULTIPLE VLANs over the same physical link. These multiple VLANs must be the same on both ends of the link. So if SW1 and SW2 have a trunk link between them, and they each have, say four VLANs, 2, 3, 4 and 5, then traffic from all of those VLANs can traverse the trunk, but not traffic from VLAN 6 for example.

Now if you want to have communication BETWEEN VLANs, then you require either a router on a stick as you mention, or inter VLAN routing, both of which you can read about at these lessons:

I hope this has been helpful!

Laz

Thank you so much for the answer. That explains more clear.

Hello, Rene

I am a new Student in your networklesson.
I practiced to execute the command line, but my switch and router’s command is a little different from your scripts.
Which stitch model could I have to repeat the command lines as in this lesson ?

Note: my switch/router using GNS3 is C1700, C7200 and C2691.
What can I do to have C2950 IOS as in the lesson ?

Thanks you !

Hello Ngoy

The devices 1700, 7200, and 2691 are all routers and do not have the capability of creating trunk ports in the same manner as in a switch. This is why you see a different set of commands.

All Cisco switches function the same for the commands described in this lesson, so you can use any switch model you like that is available for GNS3. In order to get switching working on GNS3, take a look at this GNS3 article that explains it in detail.

I hope this has been helpful!

Laz

1 Like

Can we know what program and fonts you are using in this lesson. The display is very clear and the background also. Is this Linux with a terminal session?

It looks like it may be fedorah, maybe?

Hello Lisandro,

It’s been a while since I recorded this video. When I use Linux, I usually stick to Ubuntu (or Linux Mint).

This is gnome-terminal or mate-terminal.

Nowadays I SecureCRT for my console. I like the looks of gnome-terminal / mate-terminal but SecureCRT makes it easy to manage connections and to run scripts.

I’m not 100% sure what font I used in the video but nowdays, I always use Consolas:

Hope this helps!

Rene

Yes, that helps and by the way, I just passed my CCNA/ICND2 test today. I revised my studying with your site and have to say that I REALLY got EIGRP through your lessons. Your instructions are just so easygoing and clear!

Thanks for making networking manageable and easier to fathom!

1 Like

Hello Lisandro

Congratulations on passing! That’s a great achievement and it’s good to hear that we have been of help. We wish you success in your future certification journey, and we hope that we can continue to support you in your future endeavours.

Laz

Hi, thanks for the article, very well explained.

I have a question. I use the latest version of Packet Tracer and the command “switchport trunk encapsulation ?” does not allow me. In fact, it does allow me the “switchport mode trunk”. Is this an emulator issue or have you changed the way you set up the trunk mode?