PDA

View Full Version : How to make it work with VLAN-trunking?


Seb74
06-26-2008, 08:32 AM
Do I need to enable some vlan-interface on my OpenBSD machine for it to act as a client, with specific settings and stuff, or can I just activate 802.1q on the switch and assign different ports to different vlans, configuring the ip-addresses accordingly, and it'll just plain work?

If my onboard 100Mb NIC understands those tags at all that is...dont know how to check, its onboard on a Via Mini-ITX.

EDIT: Or probably I can just set the switch to strip the tags before sending the frames out the port directly to the client.....right?
They only do good if being send through another hub/switch where the tag needs to remain.
That way the NIC wont have to care a bit about VLAN's, or even know they exist. Right?

ai-danno
06-27-2008, 11:01 PM
Assigning a VLAN to ports in a switch and tagging frames coming over a particular port on a switch are two different things. The switchport the OBSD box connects on can belong to a single VLAN that has an assigned ID but not have any knowledge of that VLAN ID itself. Only if the OBSD box needs to talk to other hosts off the switch within their specific L2 domains (as opposed to talking to them via the local router) will you need to enable trunking on both the switchport that the OBSD box connects on and the NIC of the OBSD box itself. That's where trunking of the ports becomes necessary- when the OBSd box will be communicating directly with multiple VLANs instead of routing that traffic via the local router.

If I'm not mistaken setting trunking on the OBSD box isn't dependent on the specific NIC on the OBSD box, it's done in the OS of the OBSD box itself (as long as the NIC supports trunking, which all modern NIC's should.)

Seb74
06-28-2008, 07:04 AM
Yeah maybe its common for NIC's to support VLAN's, but I have one windows-machine at home that has no settings for VLAN's (which all other "windows-NIC's" do).

But as you said, and I already found out, its not very likely a NIC has to know anything about VLAN's just to belong to a VLAN, if I set the switch to strip the tags before sending them out that port.

ai-danno
06-28-2008, 03:04 PM
If your connection on the switchport to your server is set to 'access' already then that 'access' functionality already strips the VLAN tag- hence why your box doesn't need to have knowledge of the particular VLAN of which it's connecting switchport belongs. However, having the switchport set to 'access' also means that only one VLAN (aside from perhaps the management VLAN- of which functionality varies from switch to switch) will be able to be assigned to your switchport.

If the switchport (and OBSD NIC) are set to 'trunk' then the OBSD NIC will have to be configured to talk to each VLAN that the connecting switchport is assigned to. Any VLANS that it is not specifically configured to talk to in this instance will not be available to communicate with.

ai-danno
06-28-2008, 03:08 PM
ps- you are posting networking questions all over the place (http://www.daemonforums.org/showthread.php?t=1106). Perhaps it's better to place them in the new networking section (http://www.daemonforums.org/forumdisplay.php?f=36) outside of the OBSD section.