r/ccna • u/betephreeque CCNA R/S :: Sec+ :: Net+ :: A+ • May 02 '17
Multiple VLAN access per port
Ok wonderful brains of Reddit, need help solving a problem that may not be solve-able.
I have a test environment where a single port is needed to test systems that may need to be on different VLAN's.
The need is to switch between VLAN's based on the current need.
Before we get to far, let's consider this is the only option. I realize there are ways to fix this i.e. run new dedicated cable, etc.
So my question, is there a way to configure a port to allow multiple VLAN access and that will allow DHCP address assignment?
My first thought was that I configure port as trunk, and simply define the allowed VLAN's, however this did not work as intended.
I thought it may be able to work if I configure the native VLAN, but I'm still thinking there is a logical obstacle.
My understanding is that a Trunk requires the data to be tagged already, so if the device connected to the trunk is not configured to tag VLAN's, then my approach will not work.
Does this sound correct?
In an access port configuration, the port tags the traffic which allows it to traverse the trunk, so my thought is that what I'm trying to do really is going to be extremely unlikely to work.
TL;DR - how to configure port for multiple VLAN's?
edit: for clarity
3
u/chuckbales CCNP|CCDP May 02 '17
Are you trying to have a switchport where you can plug different devices in, and they'll end up in different VLANs? That would require dynamic VLAN assignment, which would typically involve an 802.1x deployment. A normal access port will put any client connected to that port into the access VLAN. A trunk port can support multiple VLANs on one port, but can only have 1 untagged VLAN so devices not in that native VLAN need to be tagging their own traffic.
Or you can change the VLAN configuration on the port as different devices connect, which involves a lot of manual changes.
3
u/the-packet-thrower Meow 🐈🐈Meow 🐱🐱 Meow Meow🍺🐈🐱Meow A+! May 02 '17 edited May 02 '17
You can use Smart Macro to script the port getting different vlans based on what the device is / the device mac.
You can also use 802.1x for dynamic vlan assignments
Or depending on your test you can use a trunk port and change the tag on the host side as required.
Though this could be just as easily solved by manually changing the vlan when needed or running different cables for each vlan needed.
2
u/The_Real_Bender May 02 '17
Something to consider, configure access to the web GUI (depending on the model switch) and allow the techs to change the VLAN on the port to what they need when they need access to the port via the GUI. If I remember correctly this can be done without providing enable access via CLI and they can make that simple change without bugging the network admin constantly. Depending on your TACACS configuration you can even limit the account they use to very specific commands.
1
u/betephreeque CCNA R/S :: Sec+ :: Net+ :: A+ May 03 '17
Any recommendations on a source for dynamic vlans? Besides cisco papers of course, I'll read those but it's nice to have pictures sometimes too lol
1
u/Uranusistormy May 02 '17
I didn't understand what you are saying. So I'll respond to the tl;dr. If the ports is an access port and you want to allow multiple vlans, use the switchport access vlan (vlan number) command. If it's a trunk use the switchport trunk allowed vlan (number) command. If you want to allow untagged traffic onto the network, use the switchport trunk native vlan (number command). Access ports won't accept tagged traffic.
1
u/abandteddy May 02 '17
Trunking is the way to go. Logically and physicially, you would make the switchport a trunk port with your allowed VLAN's and you would then connect another switch to this port where you can configure your access ports in their respective VLANs
2
u/efro4472 CCNA R&S May 02 '17
You should be able to set it up as a trunk port and configure the host device to work with it. I'm not sure how doable this is (probably way easier on a Linux machine) but dot1q encapsulation is purely limited by software/drivers on a host machine and has nothing to do with hardware. Configure your host machine to support dot1q so that it can send/receive tagged frames and then configure subinterfaces for each VLAN you'd like to participate in.
What I haven't seen suggested is: Why not just route between the VLANs? If not using a layer 3 switch, then set up ROAS. This is assuming you don't need the devices to participate in the same layer 2 domain but even then I think there are protocols at your disposal to configure that kind of setup. If you're avoiding routing between VLANs for security reasons, you could easily apply a simple standard ACL and problem solved
1
u/Uranusistormy May 02 '17
If your question is: how to allow multiple devices to connect to the network through the same switchport but separate them using vlans while allowing DHCP address assignment, then you'll simply need to connect up another switch to the existing switch.
1
u/kosjubrmod May 02 '17
There are ways that are more "right" than others, it all depends on business need.
If this is an IT user, and there is a set number of vlans at hand, I would configure a small switch (like the 3560C-8port) for the user's testing environment. Use your one port you have now as a trunk, and then set the eight ports up with static vlan assignments. This way, the user can move between the vlans at his luxury.
Without providing the IT user with a switch at thier desk, you would be looking at 802.1x with dynamic vlans. My personal preference would be this solution, and then use the test environment as the use case for deploying 802.1x to the entire network.
If you are really in a bind, before 802.1x there was a technology called "VLAN Management Policy Server (VMPS)". I remember seeing documentation for CatOS, and I think it was in 12.2 when I looked.
1
u/binarycow CCNA R/S + Security May 03 '17
Dynamic VLANs with MAC Address Bypass is probably the easiest solution.
0
u/[deleted] May 02 '17
Purchase another brand of switch? I believe with a managed Netgear you can select which specific VLANs are tagged and untagged per port. There is no specific trunk or access mode.