• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Don't get VLAN (DHCP) ip address on my Virtual Machine Guest

L2/Switching/VLANs
vlan to lan
2
6
1.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    maartenv
    last edited by maartenv Oct 22, 2020, 8:14 PM Oct 22, 2020, 7:38 PM

    For my office I am trying to set up a VLAN for a (Nextcloud) VM which is running on top of a FreeBSD server, which is running behind a pfSense firewall and a Mikrotik Switch.

    The VLAN 30 is created on the pfSense firewall and is connected to a DHCP server on pfSense. (See the ifconfig of pfSense on the left column on enclosed picture. The VLAN (ix1.30) config is encircled in red.)

    login-to-view click picture to enlarge

    On the Mikrotik Switch the 30 ID TAG is enabled (and recognized) on both the incoming (SFP1) and outgoing (S01-IGB0) port. (See the top middle column on enclosed picture encircled in red.)

    As the DHCP server is on the pfSense machine, on Freebsd I only generated a (virtual) nic with the following command:

    ifconfig igb0.30 create vlan 30 vlandev igb0

    Which activated the (virtual) nic (on enclosed picture encircled in red on the bottom middle column.)

    In the network settings of the (Nextcloud) VM, I actived igb0.30 as the nic to be used.

    But when I boot the VM, it is waiting several minutes for the network to be configured, which never happens. (See enclosed picture encircled in red on the bottom right column)

    Therefor it is my impression that the VM does not get an IP-Address from the (pfSense) DHCP server. But as there is very little documentation about setting up VLAN's on Freebsd, especially about this situation where Freebs is NOT the DHCP server, but just functions as a pass trough station, I don't know what and where I did something wrong.

    I would appreciate it very much if somebody could enlighten what I might be doing wrong in the pfSense/MikroTik/FreeBSD/VM chain.

    1 Reply Last reply Reply Quote 0
    • K
      kiokoman LAYER 8
      last edited by Oct 23, 2020, 11:58 AM

      how about microtik vlan and vlans tab ?
      is freebsd able to get a dhcp response?

      ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
      Please do not use chat/PM to ask for help
      we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
      Don't forget to Upvote with the 👍 button for any post you find to be helpful.

      M 1 Reply Last reply Oct 23, 2020, 12:23 PM Reply Quote 0
      • M
        maartenv @kiokoman
        last edited by Oct 23, 2020, 12:23 PM

        @kiokoman

        I could get it working in a very strange way. Not according to the FreeBSD manual, but with the following command on the FreeBSD CLI

        ifconfig vlan30 create
        ifconfig vlan30 192.168.30.1 netmask 255.255.255.0 vlan 30 vlandev igb0
        

        and making it persistent by adding to /etc/rc.conf only!

        ifconfig vlan30=up
        

        So I used vlan30 instead of igbo.30 as the way it should work according to FreeBSD

        I really don't understand why it works this way and I also am in a discussion with the FreeBSD administrator SirDice on https://forums.freebsd.org/threads/dont-get-vlan-dhcp-ip-address-on-my-virtual-machine-guest.77426/

        So now I am very curious what is happening here. Is this the result of something pfSense or my Ubuntu 20.04 VM does (wrong?)

        I really got crazy because I have spent days on this problem. I only found (by incident) a solution by trying everything I could think of, over and over again. But I really have no explanation why it works like this.

        Maybe somebody at pfSense has an answer to this?

        1 Reply Last reply Reply Quote 0
        • K
          kiokoman LAYER 8
          last edited by kiokoman Oct 23, 2020, 12:46 PM Oct 23, 2020, 12:36 PM

          uhm i can be wrong but I have the impression that your vlan30 is arriving untagged

          with
          ifconfig vlan30 192.168.30.1 netmask 255.255.255.0 vlan 30 vlandev igb0
          you are taking untagged stuff from igb0 and adding the tag vlan30 yourself instead of transporting it

          ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
          Please do not use chat/PM to ask for help
          we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
          Don't forget to Upvote with the 👍 button for any post you find to be helpful.

          1 Reply Last reply Reply Quote 0
          • M
            maartenv
            last edited by Oct 23, 2020, 12:44 PM

            If you take a look at the Mikrotik picture of the connected hosts to the Port S01-IGB0 with MAC 08:00:27:79.03:39 it is clearly stated that the VLAN ID = 30.
            And that still is the same with VLAN30

            1 Reply Last reply Reply Quote 0
            • K
              kiokoman LAYER 8
              last edited by kiokoman Oct 23, 2020, 1:10 PM Oct 23, 2020, 1:05 PM

              emp0s3 is using vlanid30 but i'm not so sure about igb0.30
              sorry it's only what is coming on my mind could be stupid, as I'm not in front of your stuff and i don't own a microtick i can't tell you exactly where to look but if i was me i will trace back until i see where the vlan30 stop working, tcpdump also can help

              ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
              Please do not use chat/PM to ask for help
              we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
              Don't forget to Upvote with the 👍 button for any post you find to be helpful.

              1 Reply Last reply Reply Quote 0
              3 out of 6
              • First post
                3/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.