On Thu, 21 Oct 2021 at 03:04, Geert Stappers via Dnsmasq-discuss <
dnsmasq-discuss@lists.thekelleys.org.uk> wrote:

> On Wed, Oct 20, 2021 at 10:56:02PM +0200, Geert Stappers wrote:
> > On Wed, Oct 20, 2021 at 02:48:27PM +0530, Shrenik Bhura wrote:
> > > On Wed, 20 Oct, 2021, 11:21 Geert Stappers wrote:
> > > > On Wed, Oct 20, 2021 at 07:50:58AM +0530, Shrenik Bhura wrote:
> > > > > There isn't anything specific in the configuration that serves the
> > > > > hostname. I am aware of this feature and when defined it works as
> desired.
> > > > > But when nothing is explicitly defined to serve hostnames, it is
> defaulting
> > > > > to 192 as visible in the logs, and only in the case of an RPi.
> > > > > When checked on the client with the hostname command, it shows the
> full
> > > > > hostname - 192.168.67.53
> > > >
> > > > Such hostname do I call  IPaddress.
> > > >
> > > >
> > > > > The same configuration works fine with a x86 system as no hostname
> is being
> > > > > served when none is defined.
>
> Yes, dnsmasq works great.
>
>
> > > > > Have attached the config files involved.
> > > >
> > > > Make a packet capture and put the .pcap on a server.
> > > > Then tell here how to fetch the file.
> > > > Next can those who care examine the .pcap with their tool.
> > > > (wireshark / tcpdump)
> > > >
> > > > > Once again, do note that this is the case only for an RPi. So
> there is some
> > > > > specific logic in dnsmasq coming into play for an RPi that seems
> to be
> > > > > serving the IP address as the default hostname when none is
> present.
> > > >
> > > > So beside the
> > > >    /sbin/tcpdump  -w rpi.pcap ether host dc:a6:32:78:98:ae
> > > > also
> > > >    /sbin/tcpdump  -w worksfine.pcap ether host
> MAC_address_of_known_good
> > > >
> > >
> > > Herein is the link to the related packet captures of an RPi and x86
> system
> > > -
> > >
> https://drive.google.com/file/d/11RwpCdbE8W0ohS2QDj4BarZ_VHnEhwfs/view?usp=sharing
> > >
> >
> > The "works fine" is/was captured different as the Raspi capture.
> > Luckly is the Raspi packet capture the better one, it contains replies.
> >
> > What `tshark` says about it.
> > Note the packet count and the time offset (columns 1 and 2)
> > and that there are three transactions.
> >
> >
> > |$ tshark -nr rpi.pcap | grep DHCP
> > |    1   0.000000      0.0.0.0 → 255.255.255.255 DHCP 364 DHCP Discover
> - Transaction ID 0x6e9ddeb7
> > |    2   0.001666 192.168.67.1 → 192.168.67.53 DHCP 425 DHCP Offer
> - Transaction ID 0x6e9ddeb7
> > |    3   0.059905      0.0.0.0 → 255.255.255.255 DHCP 351 DHCP Request
> - Transaction ID 0x6e9ddeb7
> > |    7   0.106212 192.168.67.1 → 192.168.67.53 DHCP 344 DHCP ACK
> - Transaction ID 0x6e9ddeb7
>
> > |119315  40.665138      0.0.0.0 → 255.255.255.255 DHCP 590 DHCP Discover
> - Transaction ID 0x378f8d8b
> > |119316  40.668636 192.168.67.1 → 192.168.67.53 DHCP 342 DHCP Offer
> - Transaction ID 0x378f8d8b
> > |119317  40.673119      0.0.0.0 → 255.255.255.255 DHCP 590 DHCP Request
> - Transaction ID 0x378f8d8b
> > |119318  40.727456 192.168.67.1 → 192.168.67.53 DHCP 342 DHCP ACK
> - Transaction ID 0x378f8d8b
>
> > |119324  44.861769      0.0.0.0 → 255.255.255.255 DHCP 342 DHCP Discover
> - Transaction ID 0x6f84b210
> > |119325  44.866031 192.168.67.1 → 192.168.67.53 DHCP 342 DHCP Offer
> - Transaction ID 0x6f84b210
> > |119326  44.866612      0.0.0.0 → 255.255.255.255 DHCP 342 DHCP Request
> - Transaction ID 0x6f84b210
> > |119327  44.911006 192.168.67.1 → 192.168.67.53 DHCP 343 DHCP ACK
> - Transaction ID 0x6f84b210
> > |$
> >
> >
> > Tcpdump Verbose, `-v`, of that:
> >
> > $ tcpdump -nr rpi.pcap -v port bootpc
> > reading from file rpi.pcap, link-type EN10MB (Ethernet), snapshot length
> 262144
> > 10:48:00.072173 IP (tos 0x0, ttl 64, id 20588, offset 0, flags [none],
> proto UDP (17), length 350)
> >     0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
> dc:a6:32:78:98:ae, length 322, xid 0x6e9ddeb7, Flags [none]
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: Discover
>
> DHCP Discover
>
> >           Parameter-Request (55), length 14:
> >             Subnet-Mask (1), Default-Gateway (3), Vendor-Option (43),
> Vendor-Class (60)
> >             TFTP (66), BF (67), Unknown (128), Unknown (129)
> >             Unknown (130), Unknown (131), Unknown (132), Unknown (133)
> >             Unknown (134), Unknown (135)
> >           Vendor-Class (60), length 32:
> "PXEClient:Arch:00000:UNDI:002001"
> >           ARCH (93), length 2: 0
>
> And  ARCH 0  is "PC" ...
>
>
> >           NDI (94), length 3: 1.2.1
> >           GUID (97), length 17:
> 0.82.80.105.52.18.49.192.0.50.120.152.174.94.119.158.94
> > 10:48:00.073839 IP (tos 0xc0, ttl 64, id 5852, offset 0, flags [none],
> proto UDP (17), length 411)
> >     192.168.67.1.67 > 192.168.67.53.68: BOOTP/DHCP, Reply, length 383,
> xid 0x6e9ddeb7, Flags [none]
> >         Your-IP 192.168.67.53
> >         Server-IP 192.168.67.1
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: Offer
>
> DHCP Offer
>
>
> >           Server-ID (54), length 4: 192.168.67.1
> >           Lease-Time (51), length 4: 43200
> >           BF (67), length 19: "ltsp/undionly.kpxe^@"
> >           RN (58), length 4: 21600
> >           RB (59), length 4: 37800
> >           Subnet-Mask (1), length 4: 255.255.255.0
> >           BR (28), length 4: 192.168.67.255
> >           Default-Gateway (3), length 4: 192.168.67.1
> >           Vendor-Class (60), length 9: "PXEClient"
> >           GUID (97), length 17:
> 0.82.80.105.52.18.49.192.0.50.120.152.174.94.119.158.94
> >           Vendor-Option (43), length 44:
> 6.1.3.10.4.0.80.88.69.8.7.128.4.1.192.168.67.1.9.23.128.4.20.82.97.115.112.98.101.114.114.121.32.80.105.32.66.111.111.116.32.32.32.255
> > 10:48:00.132078 IP (tos 0x0, ttl 64, id 20590, offset 0, flags [none],
> proto UDP (17), length 337)
> >     0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
> dc:a6:32:78:98:ae, length 309, xid 0x6e9ddeb7, Flags [none]
> >         Server-IP 192.168.67.1
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: Request
>
> DHCP Request
>
>
> >           Requested-IP (50), length 4: 192.168.67.53
> >           Server-ID (54), length 4: 192.168.67.1
> >           Vendor-Class (60), length 32:
> "PXEClient:Arch:00000:UNDI:002001"
> >           GUID (97), length 17:
> 0.82.80.105.52.18.49.192.0.50.120.152.174.94.119.158.94
> > 10:48:00.178385 IP (tos 0xc0, ttl 64, id 5869, offset 0, flags [none],
> proto UDP (17), length 330)
> >     192.168.67.1.67 > 192.168.67.53.68: BOOTP/DHCP, Reply, length 302,
> xid 0x6e9ddeb7, Flags [none]
> >         Your-IP 192.168.67.53
> >         Server-IP 192.168.67.1
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: ACK
>
> DHCP Acknowledge
>
>
> >           Server-ID (54), length 4: 192.168.67.1
> >           Lease-Time (51), length 4: 43200
> >           RN (58), length 4: 21600
> >           RB (59), length 4: 37800
> >           Subnet-Mask (1), length 4: 255.255.255.0
> >           BR (28), length 4: 192.168.67.255
> >           Default-Gateway (3), length 4: 192.168.67.1
> >           LOG (7), length 4: 192.168.67.1
> >           Domain-Name-Server (6), length 8: 8.8.8.8,8.8.8.8
>
> First "DHCP Cycle" is complete.
> Next DHCP Cycle starts.
>
> > 10:48:40.737311 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
> UDP (17), length 576)
> >     0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
> dc:a6:32:78:98:ae, length 548, xid 0x378f8d8b, Flags [none]
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: Discover
>
> DHCP Discover
>
>
> >           Parameter-Request (55), length 9:
> >             Subnet-Mask (1), Default-Gateway (3), Domain-Name-Server
> (6), Hostname (12)
> >             Domain-Name (15), RP (17), MTU (26), YD (40)
> >             NTP (42)
> > 10:48:40.740809 IP (tos 0xc0, ttl 64, id 3785, offset 0, flags [none],
> proto UDP (17), length 328)
> >     192.168.67.1.67 > 192.168.67.53.68: BOOTP/DHCP, Reply, length 300,
> xid 0x378f8d8b, Flags [none]
> >         Your-IP 192.168.67.53
> >         Server-IP 192.168.67.1
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: Offer
>
> DHCP Offer
>
>
> >           Server-ID (54), length 4: 192.168.67.1
> >           Lease-Time (51), length 4: 43200
> >           RN (58), length 4: 21600
> >           RB (59), length 4: 37800
> >           Subnet-Mask (1), length 4: 255.255.255.0
> >           BR (28), length 4: 192.168.67.255
> >           Default-Gateway (3), length 4: 192.168.67.1
> >           Domain-Name-Server (6), length 8: 8.8.8.8,8.8.8.8
> > 10:48:40.745292 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
> UDP (17), length 576)
> >     0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
> dc:a6:32:78:98:ae, length 548, xid 0x378f8d8b, Flags [none]
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: Request
>
> DHCP Request
>
>
> >           Server-ID (54), length 4: 192.168.67.1
> >           Requested-IP (50), length 4: 192.168.67.53
> >           Parameter-Request (55), length 9:
> >             Subnet-Mask (1), Default-Gateway (3), Domain-Name-Server
> (6), Hostname (12)
> >             Domain-Name (15), RP (17), MTU (26), YD (40)
> >             NTP (42)
> > 10:48:40.799629 IP (tos 0xc0, ttl 64, id 3788, offset 0, flags [none],
> proto UDP (17), length 328)
> >     192.168.67.1.67 > 192.168.67.53.68: BOOTP/DHCP, Reply, length 300,
> xid 0x378f8d8b, Flags [none]
> >         Your-IP 192.168.67.53
> >         Server-IP 192.168.67.1
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: ACK
>
> DHCP Acknowledge
>
>
> >           Server-ID (54), length 4: 192.168.67.1
> >           Lease-Time (51), length 4: 43200
> >           RN (58), length 4: 21600
> >           RB (59), length 4: 37800
> >           Subnet-Mask (1), length 4: 255.255.255.0
> >           BR (28), length 4: 192.168.67.255
> >           Default-Gateway (3), length 4: 192.168.67.1
> >           Domain-Name-Server (6), length 8: 8.8.8.8,8.8.8.8
>
> Second "DHCP Cycle" is complete.
> > |119318  40.727456 192.168.67.1 → 192.168.67.53 DHCP 342 DHCP ACK
> - Transaction ID 0x378f8d8b
>
> > }  Five  ICMPv6 packets
>
> > |119324  44.861769      0.0.0.0 → 255.255.255.255 DHCP 342 DHCP Discover
> - Transaction ID 0x6f84b210
> Next DHCP Cycle starts.
>
> > 10:48:44.933942 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none],
> proto UDP (17), length 328)
> >     0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
> dc:a6:32:78:98:ae, length 300, xid 0x6f84b210, Flags [none]
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: Discover
>
> DHCP Discover
>
>
> >           Hostname (12), length 13: "192.168.67.53"
>
> Client says "My hostname is '192.168.67.53'"
>
> >           Parameter-Request (55), length 13:
> >             Subnet-Mask (1), BR (28), Time-Zone (2), Default-Gateway (3)
> >             Domain-Name (15), Domain-Name-Server (6), Unknown (119),
> Hostname (12)
> >             Netbios-Name-Server (44), Netbios-Scope (47), MTU (26),
> Classless-Static-Route (121)
> >             NTP (42)
> > 10:48:44.938204 IP (tos 0xc0, ttl 64, id 3933, offset 0, flags [none],
> proto UDP (17), length 328)
> >     192.168.67.1.67 > 192.168.67.53.68: BOOTP/DHCP, Reply, length 300,
> xid 0x6f84b210, Flags [none]
> >         Your-IP 192.168.67.53
> >         Server-IP 192.168.67.1
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: Offer
>
> DHCP Offer
>
>
> >           Server-ID (54), length 4: 192.168.67.1
> >           Lease-Time (51), length 4: 43200
> >           RN (58), length 4: 21600
> >           RB (59), length 4: 37800
> >           Subnet-Mask (1), length 4: 255.255.255.0
> >           BR (28), length 4: 192.168.67.255
> >           Default-Gateway (3), length 4: 192.168.67.1
> >           Domain-Name-Server (6), length 8: 8.8.8.8,8.8.8.8
> > 10:48:44.938785 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none],
> proto UDP (17), length 328)
> >     0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
> dc:a6:32:78:98:ae, length 300, xid 0x6f84b210, Flags [none]
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: Request
>
> DHCP Request
>
>
> >           Server-ID (54), length 4: 192.168.67.1
> >           Requested-IP (50), length 4: 192.168.67.53
> >           Hostname (12), length 13: "192.168.67.53"
>
> Client says "My hostname is '192.168.67.53'"
>
> >           Parameter-Request (55), length 13:
> >             Subnet-Mask (1), BR (28), Time-Zone (2), Default-Gateway (3)
> >             Domain-Name (15), Domain-Name-Server (6), Unknown (119),
> Hostname (12)
> >             Netbios-Name-Server (44), Netbios-Scope (47), MTU (26),
> Classless-Static-Route (121)
> >             NTP (42)
> > 10:48:44.983179 IP (tos 0xc0, ttl 64, id 3934, offset 0, flags [none],
> proto UDP (17), length 329)
> >     192.168.67.1.67 > 192.168.67.53.68: BOOTP/DHCP, Reply, length 301,
> xid 0x6f84b210, Flags [none]
> >         Your-IP 192.168.67.53
> >         Server-IP 192.168.67.1
> >         Client-Ethernet-Address dc:a6:32:78:98:ae
> >         Vendor-rfc1048 Extensions
> >           Magic Cookie 0x63825363
> >           DHCP-Message (53), length 1: ACK
>
> DHCP Acknowledge
>
>
> >           Server-ID (54), length 4: 192.168.67.1
> >           Lease-Time (51), length 4: 43200
> >           RN (58), length 4: 21600
> >           RB (59), length 4: 37800
> >           Subnet-Mask (1), length 4: 255.255.255.0
> >           BR (28), length 4: 192.168.67.255
> >           Default-Gateway (3), length 4: 192.168.67.1
> >           Hostname (12), length 3: "192"
>
> Server says "Your hostname is '192'"
>

May be the code that logs this line needs to be checked if it is just
printing part of the complete hostname i.e. IP address.


> >           Domain-Name-Server (6), length 8: 8.8.8.8,8.8.8.8
> >
> >
> > More in the next message.
>
> Done "in line"
>
>
> Back to:
> > > > On Wed, Oct 20, 2021 at 07:50:58AM +0530, Shrenik Bhura wrote:
> > > > > There isn't anything specific in the configuration that serves the
> > > > > hostname. I am aware of this feature and when defined it works as
> desired.
>
> Acknowledge on "it works as desired".
>
>
> > > > > But when nothing is explicitly defined to serve hostnames,
> > > > > it is defaulting to 192 as visible in the logs,
>
> There I tent to disagree.
>
>
> > > > > and only in the case of an RPi.
>
> I do read that as
>   "There are some more factors. There are yet unknown factors."
>

Nothing more to be shared from my end. With the inputs that I have shared,
anyone in possession of a RPi 4B or RPi 400 should be able to reproduce
this.


>
> > > > > When checked on the client with the hostname command,
> > > > > it shows the full hostname - 192.168.67.53
>
> Yes. And the question is:  How did it get there?
>
>
I have no clue. I have just reported the facts and nothing more, nothing
less. :)
You guys are the experts.

Groeten
> Geert Stappers
>
>
Regards
Shrenik
_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to