ā03-13-2015 07:34 AM - edited ā03-07-2019 11:04 PM
I have a new cisco 2960s PoE switch that I need help configuring. I have 8 Cisco Aironet 700's that I have to connect to the new 2960s for our wireless network. I need to configure 8 ports for trunking and 802.1q encapsulation. Can someone tell me what the configuration commands are to set that up? I'm just beginning to learn the Cisco CLI. I think that's one of the things I need to setup to connect the AP's to the switch. If you need any additional information, please let me know.
Thank You very much.
ā03-13-2015 08:34 AM
conf t
interface x/x
switchport
switchport trunk encapsulation dot1Q ---> this may be the default already
switchport mode trunk
switchport trunk allowed vlan x,x,x,x ---> these are vlans you want on the AP
ā03-13-2015 11:23 AM
Thank You for the help. I have two questions. I do know the basics of the Cisco CLI, and I did the initial and the SSH configuration on this switch. If I do a show running config, I should be able to see if there is a trunking configuration on the switch, yes? Also, should I configure each port individually, or can I use the range command to configure gi1/0/2 through gi1/0/9 at the same time? I think I know what the range command is, but can you tell me what that command is? I'm new to the Cisco CLI and I just want to make sure I'm doing it correctly.
I'm not sure what this switchport command is.
Thank You.
ā03-14-2015 07:26 PM
Hi Clay,
switchport command is to make a port a switch port. Use the ? mark if you get stuck. Glen configuration is correct.
ā03-16-2015 06:40 AM
Ok. Thanks.
ā03-16-2015 07:48 AM
Hi Clay,
when you type a switchport command alone it is not complete. You have to specify the mode of the switch port, such as access, or trunk. type switchport and "?" and it will show many option to choose from.
ā03-16-2015 07:54 AM
Hi Sammy
Don't want to confuse Clay any more than necessary :-)
You can type "switchport" on it's own and it is a valid command because there is the option of "no switchport" which makes it a L3 port.
Jon
ā03-16-2015 08:02 AM
I know it is. But he keeps getting incomplete command error. Please explain how am confusing him?
ā03-16-2015 08:06 AM
Because he is using Packet Tracer to test and that software doesn't always replicate real switches.
Jon
ā03-14-2015 10:46 PM
Hi Clay,
The 'switchport' command is used to make an interface L2 switchport or L3 routing port in an Layer3 capable switch.
For example the below config will make a switchport and L3 routing port.
int gi0/0
no switchport
ip add 10.1.1.1 255.255.255.0
Now this port can participate in L3 routing.
----------------------------------------------------------------------------------
The below config can make the same switchport a normal L2 port.
int gi0/0
switchport
Here you can't assign an IP address or do routing.
Keep in mind that all above mentioned configs are done in a Layer3 switch.
CF
ā03-16-2015 06:25 AM
Thank you for the help. I am doing this configuration on a Cisco 2960s switch, which will used as just a Layer2 switch. I am just starting to learn the Cisco CLI commands so I wanted to try it first in Packet tracer. When I entered the switchport command, in packet tracer, is says" incomplete command". Why does it say "incomplete command? I think your saying, that if I use the switchport command on the real 2960s switch, it will work. I've never done this before and I have to do it correctly. Please advise.
Thank You.
ā03-16-2015 06:37 AM
Try not to worry too much, the switch isn't going to blow up or anything :-)
Packet Tracer is a useful tool but it doesn't always replicate exactly what is on a real switch.
If you are on the CLI then just use a ? to see what commands are available.
So if under the interface configuration you did -
2960(config-if)# switchport ?
you will see all the options plus an option to simply hit enter because it is a valid command.
Use Glen's commands although as he says I don't believe you need the "switchport trunk encapsulation dot1q" command because the switch only supports that so it isn't an option.
If you are configuring these ports for APs the worst that can happen is that it just doesn't work (connecting to other switches is different).
So configure one port as a test and then do "sh int trunk" on the switch and it should show you the port you have configured as a trunk and forwarding traffic for all vlans or the vlans you have allowed if you add that command.
Jon
ā03-16-2015 06:37 AM
Thanks. It's that I've never done this before, and if I don't do it correctly, I will lose my job. I will follow your advice and try it on the real switch.
ā03-16-2015 06:40 AM
and if I don't do it correctly, I will lose my job
Sounds a bit harsh. You have never done it but you will lose your job if you get it wrong.
Give it a try and if it doesn't work then come back here.
Jon
ā03-16-2015 06:43 AM
Yes it is a bit harsh, and the funny thing is my supervisor doesn't know how to do it either. I don't have to have this ready until Thursday, and I have to go on to another job, but I will try it on Tuesday and I'll let you know what happens. Thank You again.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide