Results 1 to 4 of 4

Thread: VLAN Help

  1. #1
    Join Date
    Dec 2018
    Beans
    29

    VLAN Help

    Hi all!

    As I am still a beginner when it comes to networking I am attempting to play around and configure multiple VLANs utilizing my ubuntu isc-dhcp server that is connected to a managed TP-Link switch (TL-SG108E).

    I have my DHCP server up and running but it does not seem like the created VLANs are working as I am unable to get a test device that is connected to a port that is configured for a VLAN (VLAN20) to work. When I set the device to use DHCP network settings it still gets assigned an IP Address in the old (pre VLAN/subnet) 192.168.0.x subnet/VLAN and not the correct subnet/VLAN that I configured for (10.0.0.x).

    Currently playing around with just one VLAN (VLAN20) that I am trying to configure for 10.0.0.x subnet.

    My current isc-dhcp configurations:

    Code:
    subnet 192.168.0.0 netmask 255.255.255.0 {range 192.168.0.1 192.168.0.253;
    authoritative;
    filename "grubx64.efi";
    option routers 192.168.0.1;
    option domain-name-servers 192.168.0.200, 192.168.0.201, 8.8.8.8, 8.8.4.4;
    option domain-name "mwei.dns";
    }
    
    
    
    
    #VLAN20 (need a managed router to enable)
    subnet 10.0.0.0 netmask 255.255.255.224 {
    authoritative;
    option routers 10.0.0.1;
    option domain-name-servers 8.8.8.8, 8.8.4.4;
    range 10.0.0.1 10.0.0.30; 
    }

    /etc/default/isc-dhcp-server

    Code:
    INTERFACESv4="wlp2s0 enp0s31f6"

    netplan configuration



    Code:
    network:  version: 2
      #renderer: networkd
      ethernets:
        enp0s31f6:
         dhcp4: no
         addresses: [ 192.168.0.200/24 ]
         routes:
         - to: default
           via: 192.168.0.1 
    
    
      vlans:
        vlan.20:
          id: 20
          link: enp0s31f6
          addresses: [ 10.0.0.1/27 ]
    Please advise. Did I misconfigure something?

    Thanks,
    Max

  2. #2
    Join Date
    Dec 2018
    Beans
    29

    Re: VLAN Help

    Attached are screenshots of my current TP-Link Switch VLAN configurations.

    port 6- test system
    port 7- DHCP server
    port 8- gateway/router
    Attached Images Attached Images
    Last edited by DuckHook; July 16th, 2023 at 01:21 AM. Reason: Deleted large images

  3. #3
    Join Date
    Dec 2018
    Beans
    29

    Re: VLAN Help

    Just an update as I'm playing around more with the configurations...

    I was finally able to get the test DCHP client/test system to get assigned the correct 10.0.0.x IP range!

    However, no matter what I do/try I am unable to get the DNS to resolve/work within the VLAN. I even attempted to create a new bind9 DNS server in the VLAN to no success.

    I am able to ping my 10.0.0.1 gateway alongside my original DNS server (192.168.0.200) from the new VLAN but am unable to ping 8.8.8.8.

    Please advise, am I missing something to get the DNS to resolve from the new VLAN?

  4. #4
    Join Date
    Dec 2018
    Beans
    29

    Re: VLAN Help

    Finally figured it out after going through many many articles, guides, forums, and googling, LOL!

    I was just missing the iptables configuration part. Once I created the appropriate iptable rules everything started to work flawlessly!

    These were the steps that I followed, from online documentation. that got everything to work (did some fine tuning afterwards):

    Code:
    iptables -A FORWARD -j ACCEPT
    iptables -t nat -A POSTROUTING -j MASQUERADE
    

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •