0

I have developed a server using Linux. The server is a DHCP VLAN server consisting of two VLANs 110 and 120. I am trying to get it working to the client side.

My /etc/network/interfaces for VLAN 110

auto lo
iface lo inet loopback

#VLAN 110
auto enp0s9.110
iface enp0s9.110 inet static    
    address 192.168.110.1
    netmask 255.255.255.0
    network 192.168.110.0
    broadcast 192.168.110.255
    vlan_raw_device enp0s9

My /etc/default/isc-dhcp-server IPv4 Interface

INTERFACESv5="enp0s9.110 enp0s10.120"

My /etc/dhcp/dhcpd.conf configuration for VLAN 110

subnet 192.168.110.0 netmask 255.255.255.0 {
    option domain-name testdom.local;
    option domain-name-servers ns1.testdom.local;
    range 192.168.110.60 192.168.110.100;
    option routers 192.168.110.1;
    option broadcast-address 192.168.110.255;
}

My client side on Ubuntu terminal for VLAN 110

# VLAN 110 for Ubuntu Client
auto enp0s8
iface enp0s8 inet dhcp
     gateway 192.168.110.1

Rebooted the client machine...

I ran ip addr show enp0s8 and I get the address line of

inet 169.254.9.100/16 brd 169.254.255.255 scope link enp0s8:avahi
  • 2
    Is the client receiving tagged or untagged frames? ie: should there be a enp0s8.110 ? – A.B Feb 25 at 6:43
  • The client is supposed to get agged frames – ThomasJH Feb 25 at 11:34
  • 1
    And if the client is supposed to get tagged frames, you need an enp0s8.110 on the client, while enp0s8 either shouldn't exist,, or at least shouldn't have dhcp... – dirkt Feb 25 at 14:06
  • Just noticed there was still no answer while with your additional comment it could be answered – A.B Apr 2 at 17:42
0

Since, as told in a comment by OP, the client is supposed to get tagged frames, then it's up to the client's system to untag it for normal operations. That means the client needs an additional vlan interface to untag the frames.

The vlan package should be installed, mostly for its plugin vlan-interfaces provided to ifupdown. The untagged interface can then be configured by replacing the network settings with:

# VLAN 110 for Ubuntu Client
auto enp0s8.110
iface enp0s8.110 inet dhcp
     gateway 192.168.110.1

When following this convention (raw interface name + vlan id), the interface enp0s8 will be used by default as underlying raw/link interface. This raw interface should then never be assigned an IP because it doesn't make much sense (except if for example you also receive on the wire already untagged packets from an other VLAN, then that's fine).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.