Discussion:
[Dnsmasq-discuss] clients getting wrong gateway
Keith Lyons
2017-06-28 12:25:50 UTC
Permalink
I have Dnsmasq configured for option 82 for three different subents:
10.192.4.x, 10.192.5.x and 10.192.9.x, all of the clients get the proper
IP's as expected via the Option 82 statements, but the 10.192.5 and
10.192.9.x clients are getting the Gateway for the 10.19.4.x subnet.

We are using Juniper switches and they are setup for DHCP relay, and only
one nic on the dnsmasq instance. Dnsmasq is running on a Centos 7 virtual
machine.

For each subnet declared I am declaring the corresponding gateway like this:
dhcp-option=option:router,10.192.4.1
dhcp-option=option:router,10.192.5.1
dhcp-option=option:router,10.192.9.1

Any insight on how to do this so that the clients each get the proper
gateway would be greatly appreciated.

I can post the full conf file if that would be helpful

Thanks,

Keith
Simon Kelley
2017-06-28 21:24:59 UTC
Permalink
Post by Keith Lyons
10.192.4.x, 10.192.5.x and 10.192.9.x, all of the clients get the proper
IP's as expected via the Option 82 statements, but the 10.192.5 and
10.192.9.x clients are getting the Gateway for the 10.19.4.x subnet.
We are using Juniper switches and they are setup for DHCP relay, and
only one nic on the dnsmasq instance. Dnsmasq is running on a Centos 7
virtual machine.
dhcp-option=option:router,10.192.4.1
dhcp-option=option:router,10.192.5.1
dhcp-option=option:router,10.192.9.1
Any insight on how to do this so that the clients each get the proper
gateway would be greatly appreciated.
I can post the full conf file if that would be helpful
Thanks,
Keith
The solution might be a simple as removing the
dhcp-option=option:router,....... lines completely. If the DHCP relay is
running on the router (and it sounds like it is) then the defaults will
just do the right thing.


Failing that, you're going to need to learn about DHCP tags, and
selecting the correct router option using tags set from the option 82 data.



Cheers,

Simon.
Keith Lyons
2017-06-29 13:29:28 UTC
Permalink
Hi Simon,

That is correct we are using dhcp-relay on our switches

My concern with removing them completely is that the devices will no longer
respond to ping, we use a Web based systems to send dat to them (they are
label printers) that depends on the device to be ping-able to send the
print jobs to them.

As for tagging - Are you saying i would be able to tag the correct gateway
to correspond with my Option 82 statements? below is part of my
dnsmasq.conf file



dhcp-circuitid=set:01_port_01,temp-2b.plant.ldn01:ge-0/0/12.0:pack1-5-302
dhcp-circuitid=set:02_port_02,temp-2b.plant.ldn01:ge-0/0/6.0:pack1-5-302
dhcp-circuitid=set:03_port_03,temp-2b.plant.ldn01:ge-0/0/2.0:pack1-5-302
dhcp-circuitid=set:04_port_04,temp-2b.plant.ldn01:ge-0/0/18.0:pack1-5-302
dhcp-circuitid=set:05_port_05,temp-2b.plant.ldn01:ge-0/0/9.0:pack1-5-302

dhcp-range=net:01_port_01,temp-2b.plant.ldn01:ge-0/0/12.0:pack1-5-302,10.192.4.11,10.192.4.11,255.255.255.0
dhcp-range=net:02_port_02,temp-2b.plant.ldn01:ge-0/0/6.0:pack1-5-302,10.192.4.21,10.192.4.21,255.255.255.0
dhcp-range=net:03_port_03,temp-2b.plant.ldn01:ge-0/0/2.0:pack1-5-302,10.192.4.31,10.192.4.31,255.255.255.0
dhcp-range=net:04_port_04,temp-2b.plant.ldn01:ge-0/0/18.0:pack1-5-302,10.192.4.41,10.192.4.41,255.255.255.0
dhcp-range=net:05_port_05,temp-2b.plant.ldn01:ge-0/0/9.0:pack1-5-302,10.192.4.51,10.192.4.51,255.255.255.0


Thanks!
Post by Simon Kelley
Post by Keith Lyons
10.192.4.x, 10.192.5.x and 10.192.9.x, all of the clients get the proper
IP's as expected via the Option 82 statements, but the 10.192.5 and
10.192.9.x clients are getting the Gateway for the 10.19.4.x subnet.
We are using Juniper switches and they are setup for DHCP relay, and
only one nic on the dnsmasq instance. Dnsmasq is running on a Centos 7
virtual machine.
For each subnet declared I am declaring the corresponding gateway like
dhcp-option=option:router,10.192.4.1
dhcp-option=option:router,10.192.5.1
dhcp-option=option:router,10.192.9.1
Any insight on how to do this so that the clients each get the proper
gateway would be greatly appreciated.
I can post the full conf file if that would be helpful
Thanks,
Keith
The solution might be a simple as removing the
dhcp-option=option:router,....... lines completely. If the DHCP relay is
running on the router (and it sounds like it is) then the defaults will
just do the right thing.
Failing that, you're going to need to learn about DHCP tags, and
selecting the correct router option using tags set from the option 82 data.
Cheers,
Simon.
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Continue reading on narkive:
Loading...