VLAN and fixed IPs

Jan Lundmark jan.lundmark at guidelinegeo.com
Thu Sep 28 09:33:47 UTC 2017




Hi,

We have an application where we want the clients to  have fixed IPs and that the clients are all on the same subnet.
It is not practical for our application to use the MAC adresses of the clients.

This configuration below will assign a somewhat fixed IP based on the VLAN  subnets but it is not exactly what we want.
The point is that we want each client to receive a fixed IP address based on their port in the switch.

/etc/network/interfaces:
# VLAN 2
iface eth0.2 inet static
address 192.168.5.1
netmask 255.255.255.0
vlan_raw_device eth0

# VLAN 3
iface eth0.3 inet static
address 192.168.6.1
netmask 255.255.255.0
vlan_raw_device eth0

/etc/dhcp/dhcpd.conf
# VLAN 2DHCP
subnet 192.168.5.0 netmask 255.255.255.0 {
                range 192.168.5.50 192.168.5.200;
}

# VLAN 3
subnet 192.168.6.0 netmask 255.255.255.0 {
                range 192.168.6.50 192.168.6.200;
}


So, my question is:

Is there a way to assign fixed IP(v4) adresses in dhcpd.conf to clients based on their VLAN membership instead of their subnet?

Regards

Jan




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20170928/588930ce/attachment.html>


More information about the dhcp-users mailing list