You will need two VLANs, an external one between your modem and router, and an internal one between your router and 10.0.0.0/24 network. It's been years since I used a 2948G, but I believe it enumerates the GBIC ports as though they were in slot 1 of a Cat4000 chassis (e.g. 1/1, 1/2, ...), and the 48 copper ports as though they're in slot 2 (e.g. 2/1, 2/2, ...).
If we assume VLAN 1 for your internal network and VLAN 2 for the modem, your switch configuration would look like this (ignore lines starting with #
):
# create VLAN 2 and give it a name
set vlan 2 name Cable_Modem
# set descriptive names for the ports to use
set port name 2/1 Cable Modem
set port name 2/2 Router on a stick
# assign the cable modem to VLAN 2, untagged
set vlan 2 2/1
# make the router port a trunk port;
# by default, VLAN 1 is untagged, and all other VLANs are tagged
set trunk 2/2 on dot1q
On your router, you will need to configure the lone interface to do 802.1q VLAN trunking. I don't know how this is done on OpenBSD, but on Linux, you could do it on the CLI like this (as root, or with sudo
):
# load the 802.1q kernel module
modprobe 8021q
# enable trunking and add VLAN 2 to eth0
vconfig add eth0 2
You'll end up with two interfaces to configure:
- eth0 - the parent interface for untagged frames; this will handle VLAN 1 from your internal network
- eth0.2 - the subinterface for frames tagged for VLAN 2, which will talk to the cable modem