Switch – How to configure a switchport for uplink

routerswitch

I'm setting up a network with the following configuration:

  • 48 port gigabit L2 switch (Cisco Catalyst 2948G)
  • Linux or OpenBSD router on a stick (1 gigabit NIC)
  • Cable modem
  • My network is small, I only need one vlan (as far as I know), 10.0.0.0/24

I just need to know how to configure the switchport that the modem is attached to. (I'm plugging it into the 48 port L2 switch) Do I do a separate VLAN for the modem? Or do I just put everything on one vlan?

Thanks for the help!

Best Answer

Yes, you'd use two VLANs:

  • EXTERNAL : cablemodem
  • INTERNAL : LAN (10.0.0./24)

The TRUNK port to the Linux router will carry both VLANs (tagging one or both.) The linux router would then have a physical interface (eth0) and one or two vlan interfaces (eth0.X and eth0.Y -- depending on the numbers you choose for your vlans) I suggest two tagged VLANs to avoid any confusion between eth0 (untagged) and eth0.#. From there, networking is the same as having multiple physical interfaces.

(NOTE: if you use wireshark/tcdump, there are many buggy nic drivers that continue to eat vlan tags in promisc mode. As a result, capturing eth0 may not include any dot1q tags making the traffic look like it's all on the same network. Also, some management adapters will remove tags, even if the system management board isn't there. Broadcom is well known for this.)

Related Topic