08-18-2009 12:58 PM - edited 03-06-2019 07:18 AM
We have VLAN 5 & 6 defined and created on Cisco router. e do have 3560G switch wherein all the VLAN5 and VLAN6 computers will be connected to this switch, therefore is it possible to assign multiple vlan ( like vlan 5 and vlan 6) to one port in cisco switch? Right now, on the switch port if we define switchport trunk allowed vlan 1-10 it doesn't work. Please advice on how to define this on the switch port.
08-18-2009 01:01 PM
Anand
Could you post config of switch and router ?
Are you trying to route vlans 5 & 6 on the router rather than on the 3560 switch.
Jon
08-18-2009 01:05 PM
Hello,
A port that belongs to multiple VLANs at the same time is by definition a trunk port. In order to be able to differentiate frames into proper VLANs, the frames must be either 802.1Q tagged or ISL encapsulated. That means, among others, that the device that is connected to a trunk port must be also capable of trunking and tagging the individual frames.
A trunk is created using the command
switchport trunk encapsulation dot1q
switchport mode trunk
optionally adding the "switchport trunk allowed vlan" command as you suggested but this command is not necessary for a trunk to work.
However, I would like to ask you about more information about your topology and the intended use of the trunk port. Defining a trunk port may or may not be a solution for what you plan to do. Can you share more information with us?
Best regards,
Peter
08-18-2009 02:11 PM
Peter,
This option has been tried already and still didn't work. Apparently PC's won't understand when it is configured as trunking. With this option the PC cannot ping to the default gateway of VLAN and therefore doesn't work.
As I said, the VLANs are created on router as int g0/0.5 and g0/0.6 and there is switch wherein all the computers will be connected to this switch.
08-18-2009 02:21 PM
Hello,
As Jon has suggested, we need to more in more detail about your network and your needs. Can you please post the configurations of the 3560 and your router?
Also, my question is: the 3560 is capable of routing between VLANs 5 and 6. Why do you need to route them using an external router - or better said, why are the subinterfaces gi0/0.5 and gi0/0.6 created on the router? The information we have from you are very confusing - you talk about PC connected to a trunk port, then about a router with two subinterfaces. It will be very helpful if you describe your network and what you are trying to achieve concisely and completely.
By the way, a PC without a special software can not work on a trunk port. A trunk port is not intended for connecting ordinary PCs.
Best regards,
Peter
08-18-2009 02:53 PM
Peter,
I understand " A trunk port is not intended for connecting ordinary PCs" and do apologize if there was any confusion. Basically what we are trying to do is, define two networks for one of our project. On the router, two vlans were defined, and this router is connected to the 3560 switch. The solution which I came up was to define few ports on the switch with VLAN5 and other few ports with VLAN 6, and that seem to work. Let me know if there is any alternate solution.
08-18-2009 03:03 PM
Anand
A simpler solution is to use the 3560 to route your vlans ie. on the 3560
int vlan 5
ip address 192.168.5.1 255.255.255.0
int vlan 6
ip address 192.168.6.1 255.255.255.0
then for the clients -
1) clients in vlan 5 should have an IP address from the 192.168.5.x network with their default-gateway of 192.168.5.1
2) clients in vlan 6 an IP address from 192.168.6.x network with their default-gateway of 192.168.6.1
Make sure you enable "ip routing" on the 3560 and there is no need for the router.
Jon
08-18-2009 03:33 PM
Jon,
Thanks, that eliminates the router, however what else need to be configured on the switch? For e.g if I can connect 192.168.6.x computer on port 6 of the switch, what I need to configure on that port, so that it auto senses the VLAN and routes accordingly.Please advice.
08-18-2009 03:38 PM
Anand
You would need to configure the port as follows
int gi0/1
switchport mode access
switchport access vlan 6
this will place that port into vlan 6. So you actually tell the switch which port the vlan is in.
Jon
08-18-2009 03:40 PM
Yes this is what we ended up doing, essentially if it's 48 port as in this case, we have to assign 20 ports for VLAN 5 and 20 ports for VLAN 6, Is there any other way to do this you might know of?
08-18-2009 03:44 PM
Anand
"Is there any other way to do this you might know of?"
You can do dynamic vlan assignment with an ACS server and 802.1x but it's a lot of hassle for one switch.
Don't forget you can use the int range command eg.
3650(config)# int range gi0/1 - 20
3650(config-if-range)# switchport mode access
3560(config-if-range)# switchport access vlan 6
the above will allocate all ports from gi0/1 - 20 into vlan 6.
Jon
08-18-2009 03:47 PM
Thanks again Jon, that was very helpful.
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