On Thu, May 30, 2024 at 10:12:12PM +0000, Martin wrote: > I am currently using a home made router with OpenBSD which is connected > directly to my ISP's fiber router. The OpenBSD router is setup with a > fixed IP on the WAN port and I do internal NAT etc. > > In about a month a new ISP is going to provide internet via the fiber > and they are changing the equipment. > > What they have told me is that in order to use my own router, the > router has to support VLAN tagging. > > The statement I got was: > > "We send traffic out on VLAN 100 so your router needs to be tagged to > 100. Then all it has to do is to get an IP via DHCP." > > I have not done any VLAN stuff before and I am unsure exactly how to do > this. > > Is this possible and how exactly is that done? > > Thanks. >
Keeping it simple (change re1 to whatever is relevant in your case): # cat /etc/hostname.re1 up # cat /etc/hostname.vlan100 vnetid 100 parent re1 inet autoconf up So, in summary, (1) make sure the physical interface comes up and (2) create a VLAN interface, with 100 as the VLAN number, the physical interface as its parent. The rest is the same as for any other interface (inet autoconf and up). Incidentally, I am running this with an ISP that also provides VoIP over VLAN 101, which I don't want to filter, rather sending it straight to the VoIP phone they provided (which gets configured via DHCP). I achieved this by (1) creating an interface on VLAN 101, with the external physical interface as the parent: # cat /etc/hostname.vlan1010 <- the extra 0 at the end is not a typo vnetid 101 parent re1 up (2) creating another interface on the same VLAN, but with an internal interface as the parent: # cat /etc/hostname.vlan1011 <- note the extra 1 at the end vnetid 101 parent re2 up (3) bridging them together # cat /etc/hostname.veb101 add vlan1010 add vlan1011 up