No internet connection
  1. Home
  2. Technical Support

Help with tagging TinyPilotPro with VLAN ID

By Bill W @BillW
    2024-06-26 15:44:55.277Zassigned to
    • @cghague

    Greetings,

    I have moved all HomeLab onto VLAN 101 on 10.1.1.0/24, and those (mainly Proxmox) are working but the TinyPilot plugged into the same switch with the same VLAN tagging configuration is not working. When I create an offline 10.1.1.0/24 subnet with a travel router and plug the TinyPilot into it I can access it from the laptop on travel router on 10.1.1.5, which is the static IP I set-up in the GUI. However, while my LAN router can see the IP client, I can't nmap scan it let alone SSH or HTTP/S into it when on the LAN.

    I set-up VLAN on the Tiny Pilot by:

    • sudo apt-get install vlan
    • adding the following to "/etc/network/interfaces.d/vlans"
    auto eth0.101
    	iface eth0.101 inet manual
    	  vlan-raw-device eth0
    

    However, ip a shows:

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        <redacted for brevity>
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether d8:3a:dd:31:5c:87 brd ff:ff:ff:ff:ff:ff
        inet 10.1.1.5/24 brd 10.1.1.255 scope global noprefixroute eth0
           valid_lft forever preferred_lft forever
        inet6 fe80::53de:7ea9:70e9:2bff/64 scope link 
           valid_lft forever preferred_lft forever
    3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether d8:3a:dd:31:5c:8a brd ff:ff:ff:ff:ff:ff
    4: eth0.101@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/ether d8:3a:dd:31:5c:87 brd ff:ff:ff:ff:ff:ff
        inet 169.254.84.39/16 brd 169.254.255.255 scope global noprefixroute eth0.101
           valid_lft forever preferred_lft forever
        inet6 fe80::7548:d515:befe:45c4/64 scope link 
           valid_lft forever preferred_lft forever
    

    If the IP config was in /etc/network/interfaces I could probably fix manually, but they don't appear there. Does anyone know either the supported or an unsupported way ensure the eth0 traffic is properly tagged with VLAN 101, i.e. ip a results in 10.1.1.5/24 showing under the eth0.101@eth0 entry?

    Thank you!

    Solved in post #2, click to view
    • 2 replies
    1. C

      Hi Bill W, thanks for your question about VLANs.

      Unfortunately, you can't configure VLANs from the TinyPilot web interface yet, but you can do it from the command line.

      The first step is to install VLAN support, which you can do by connecting over SSH and running the following command snippet:

      sudo apt install vlan &&
        sudo modprobe 8021q &&
        sudo sed \
          --in-place \
          "/8021q/d" \
          /etc/modules &&
        echo "8021q" | sudo tee --append /etc/modules
      

      The next step is to create the VLAN devices in /etc/network/interfaces.d/vlans:

      auto eth0.101
      iface eth0.101 inet manual
        vlan-raw-device eth0
      

      The final step is to add the IP address configuration to /etc/dhcpcd.conf:

      interface eth0.101
      static ip_address=10.1.1.5/24
      static routers=10.1.1.1/24
      static domain_name_servers=10.1.1.1
      

      I hope this is helpful!

      ReplySolution
      1. BBill W @BillW
          2024-06-29 18:16:41.630Z

          @cghague, thank you so very much. That did it!