Static IPs on VLANS [Solved]

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1080
Location: WV, USA

PostPosted: Mon Nov 27, 2023 6:04    Post subject: Static IPs on VLANS [Solved] Reply with quote
I have a Media VLAN on the 10.2.0.x subnet. It has its own DHCP server. I want my Roku TVs, which are on this subnet to have static IPs assigned by my EA8500. I have added this to dnsmasq Addition Options section:
Code:

#---------Media Devices--
dhcp-host=C8:FF:28:xx:xx:xx,Roku-LRoom,10.2.0.10,infinite
dhcp-host=44:D8:78:xx:xx:xx,Roku-MBRoom,10.2.0.11,infinite
dhcp-host=38:E7:C0:xx:xx:xx,Roku-75Garage,10.2.0.12,infinite
#dhcp-host=8C:49:62:xx:xx:xx,RokuEx_Garage,10.2.0.13,infinite
#---------End Media Devices--

It doesn't seem to be working but I think this is because this would actually be the main dhcp server options, and not the dhcp server options for the 10.2.0.x subnet. How to I add these options to the secondary dnsmasq server?

_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Wireless 5ghz only

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r55779
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r55799

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port. DD-WRT r55779

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248


Last edited by lexridge on Mon Nov 27, 2023 20:26; edited 1 time in total
Sponsor
foz111
DD-WRT Guru


Joined: 01 Oct 2017
Posts: 707
Location: Earth

PostPosted: Mon Nov 27, 2023 9:20    Post subject: Reply with quote
This should be working, well it does for me on R7800 r53445 using conf-file=/jffs/dnsmasq.custom
I even have the same mac address of my firesticks on both subnets in this file (without causing any issues) just in case they ever connect to the wrong SSID so they're always forced via PBR to route through the vpn.
Did you reboot router or restart dnsmasq after entry?

_________________
Netgear R7800 PPPoE Main Router
Network IPV4 - Isolated Vlan's with IoT Devices. Unifi AC-Pro x 3 AP's, Router Wi-Fi Disabled. OVPN Server With Paid Commercial Wireguard Client's. Gateway Mode, DNSMasq, Static Leases & DHCP, Pi-Hole DNS & Running Unbound.

No one can build you the bridge on which you, and only you, must cross the river of life!
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3006
Location: Germany

PostPosted: Mon Nov 27, 2023 9:21    Post subject: Reply with quote
There is only one DHCP server that listens on different interfaces.

The static DHCP leases are configured in exactly the same way as for the main LAN.
(with the difference that an IP address from a different subnet is used)

_________________
Quickstart guides:
use Pi-Hole as simple DNS-Server with DD-WRT
VLAN configuration via GUI - 1 CPU port
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc)

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 23.05.3 - Gateway
Qualcomm IPQ8065 - R7800 - DD-WRT - WAP
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6447
Location: UK, London, just across the river..

PostPosted: Mon Nov 27, 2023 13:08    Post subject: Reply with quote
Ive never had any issues to save my static leases from different subnets either via
GUI or advanced DNSmasq box (static IP lines)

just dont use the # in advanced DNSmasq rules as it messes things around...
for DNSmasq # means port...

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6447
Location: UK, London, just across the river..

PostPosted: Mon Nov 27, 2023 15:47    Post subject: Reply with quote
Alozaros wrote:
Ive never had any issues to save my static leases from different subnets either via
GUI or advanced DNSmasq box (static IP lines)

just dont use the # in advanced DNSmasq rules as it messes things around...
for DNSmasq # means port...


as well -- those have a meaning too...so better remove any unnecessary symbols
#---------Media Devices-- and # ...ect...

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1080
Location: WV, USA

PostPosted: Mon Nov 27, 2023 16:02    Post subject: Reply with quote
So if "#" and "--" cannot be used for comments, what can I use for my notes there? Semicolons?
This list consists of about 75 devices. I need to sort them with comments somehow.

_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Wireless 5ghz only

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r55779
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r55799

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port. DD-WRT r55779

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3006
Location: Germany

PostPosted: Mon Nov 27, 2023 16:46    Post subject: Reply with quote
Have you tested it?
According to the documentation, comments are allowed

https://github.com/imp/dnsmasq/blob/master/dnsmasq.conf.example


Code:
# Uncomment these to enable DNSSEC validation and caching:
# (Requires dnsmasq to be built with DNSSEC option.)
#conf-file=%%PREFIX%%/share/dnsmasq/trust-anchors.conf
#dnssec


Code:
# you may want to uncomment some or all of them if you use
# Windows clients and Samba.
#dhcp-option=19,0           # option ip-forwarding off
#dhcp-option=44,0.0.0.0     # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
#dhcp-option=45,0.0.0.0     # netbios datagram distribution server
#dhcp-option=46,8           # netbios node type


Rolling Eyes

_________________
Quickstart guides:
use Pi-Hole as simple DNS-Server with DD-WRT
VLAN configuration via GUI - 1 CPU port
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc)

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 23.05.3 - Gateway
Qualcomm IPQ8065 - R7800 - DD-WRT - WAP
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1080
Location: WV, USA

PostPosted: Mon Nov 27, 2023 20:24    Post subject: Reply with quote
It's working. The problem was the TVs had to be rebooted because they had retained their previous IP addresses. After doing that and rebooting the router again, all is good now. Thanks and glad we got the comments question cleared up.
_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Wireless 5ghz only

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r55779
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r55799

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port. DD-WRT r55779

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum