[Dnsmasq-discuss] Doing something wrong with dhcp-option=option:router
Bernard Higonnet
bthigonnet at gmail.com
Mon Aug 27 15:33:47 BST 2012
Hello,
I did try tcpdump but was not able to get the easy-to-read output you
showed.
However, turning on --log-dhcp provided that information in the dnsmasq
log file.
Turns out that dnsmasq is doing what I asked it to do. It would appear
that I ignored this in the manual: "SIGHUP does NOT re-read the
configuration file. " which makes a difference...
Thanks!
Bernard Higonnet
On 26/08/2012 21:48, Ryan Chapman wrote:
> Hi Bernard,
>
>> 2) can someone indicate simple way to see what either FreeBSD or Windows machines receive?
> You can use tcpdump on the machine running dnsmasq to see what the DHCP response looks like
>
> tcpdump -s 0 -vv -ni <interface> port bootpc or port bootps
>
>
> As an example, I just tested:
>
> dnsmasq is running on 10.16.1.5 (netmask 255.255.255.0), handing out addresses in the range 10.16.1.190 to 10.16.1.200, the router is at 10.16.1.1. --port 0 is given to turn off dns
>
> [root at pxe01 etc]# dnsmasq --port 0 --dhcp-range=10.16.1.190,10.16.1.200 --dhcp-option=option:router,10.16.1.1
> [root at pxe01 etc]# tcpdump -s 0 -vv -ni eth0 port bootpc or port bootps
> tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
> 15:34:35.390104 IP (tos 0x0, ttl 20, id 0, offset 0, flags [none], proto: UDP (17), length: 576) 0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from 00:50:56:9c:75:ce, length: 548, xid:0x579c75ce, secs:4, flags: [Broadcast] (0x8000)
> Client Ethernet Address: 00:50:56:9c:75:ce
> Vendor-rfc1048:
> DHCP:DISCOVER
> PR:SM+TZ+DG+IEN+NS+RL+HN+BS+DN+SS+RP+EP+VO+SID+VC+BF+T128+T129+T130+T131+T132+T133+T134+T135
> MSZ:1260
> GUID:0.66.28.81.31.120.27.85.238.229.243.224.197.110.93.30.108
> ARCH:0
> NDI:1.2.1
> VC:"PXEClient:Arch:00000:UNDI:002001"
> 15:34:37.505455 IP (tos 0x0, ttl 20, id 1, offset 0, flags [none], proto: UDP (17), length: 576) 0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from 00:50:56:9c:75:ce, length: 548, xid:0x589c75ce, secs:6, flags: [Broadcast] (0x8000)
> Client Ethernet Address: 00:50:56:9c:75:ce
> Vendor-rfc1048:
> DHCP:DISCOVER
> PR:SM+TZ+DG+IEN+NS+RL+HN+BS+DN+SS+RP+EP+VO+SID+VC+BF+T128+T129+T130+T131+T132+T133+T134+T135
> MSZ:1260
> GUID:0.66.28.81.31.120.27.85.238.229.243.224.197.110.93.30.108
> ARCH:0
> NDI:1.2.1
> VC:"PXEClient:Arch:00000:UNDI:002001"
> 15:34:38.139657 IP (tos 0x0, ttl 64, id 1952, offset 0, flags [none], proto: UDP (17), length: 328) 10.16.1.5.bootps > 255.255.255.255.bootpc: [bad udp cksum 47eb!] BOOTP/DHCP, Reply, length: 300, xid:0x579c75ce, secs:4, flags: [Broadcast] (0x8000)
> Your IP: 10.16.1.193
> Server IP: 10.16.1.5
> Client Ethernet Address: 00:50:56:9c:75:ce
> Vendor-rfc1048:
> DHCP:OFFER
> SID:10.16.1.5
> LT:3600
> RN:1800
> RB:3150
> SM:255.255.255.0
> BR:10.16.1.255
> BR:10.16.1.255
> NS:10.16.1.5
> DG:10.16.1.1
>
>
> The DG (default gateway) is what is of interest here.
>
>
>
>
>
> On Aug 26, 2012, at 11:36 AM, Bernard Higonnet <bthigonnet at gmail.com> wrote:
>
>> Hello,
>>
>> I want a machine getting an IP through DHCP to have a specific gateway and not go through the machine running dnsmasq.
>>
>> In my dnsmasq.conf I have
>>
>> dhcp-option=option:router,192.168.4.1
>>
>>
>> running dnsmasq --test says syntax is OK.
>>
>> but it would appear (sic) that this isn't working. Both a FreeBSD machine and a Windows7 machine are using the address of the machine running dnsmasq.
>>
>> Questions:
>>
>> 1) is there some variant of --test which shows what will be sent in reply to a DHCP request?
>> 2) can someone indicate simple way to see what either FreeBSD or Windows machines receive?
>>
>> TIA
>> Bernard Higonnet
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
More information about the Dnsmasq-discuss
mailing list