[solved] no DNS response from real router
Posted: Sat Jan 28, 2023 6:30 am
I am currently testing my code on real machine. My router properly responds to DHCP and ARP protocol, however, when I send DNS query, there is no response. So far I checked:
- my driver: there surely is not problem, it is working perfectly
- ARP: router properly responds to ARP request for DNS server IP
- DNS query: I doubt that error is here, because my code works under QEMU and Virtualbox and there is no error shown in Wireshark.
What is quite strange, when I start Virtualbox with network option bridge, router responds to DNS query properly. However when I start my OS on real computer, there is no DNS reply. So I am wondering that maybe there is some overlooked aspect in initalizing communication with real router. Here is how my code works now on real computer:
- > I send DHCP Discover asking for IP 192.168.1.100, router IP and Domain Name Server IP
< - Router send DHCP Offer with IP 192.168.1.100, router IP 192.168.1.1 and Domain Name Server IP 192.168.1.1
- > I send DHCP Request for 192.168.1.100
< - Router send ARP Request for IP 192.168.1.100
- > I send ARP Reply to router
< - Router send DHCP Acknowledge
- > I send DNS query
< - In QEMU, Virtualbox and even Virtualbox bridge Router responds with DNS Reply, however on real hardware it do not
Am I missing something? Any help would be appreciated.
P.S. I am currently rewriting BleskOS to C, so code on GitHub is not my actual code
- my driver: there surely is not problem, it is working perfectly
- ARP: router properly responds to ARP request for DNS server IP
- DNS query: I doubt that error is here, because my code works under QEMU and Virtualbox and there is no error shown in Wireshark.
What is quite strange, when I start Virtualbox with network option bridge, router responds to DNS query properly. However when I start my OS on real computer, there is no DNS reply. So I am wondering that maybe there is some overlooked aspect in initalizing communication with real router. Here is how my code works now on real computer:
- > I send DHCP Discover asking for IP 192.168.1.100, router IP and Domain Name Server IP
< - Router send DHCP Offer with IP 192.168.1.100, router IP 192.168.1.1 and Domain Name Server IP 192.168.1.1
- > I send DHCP Request for 192.168.1.100
< - Router send ARP Request for IP 192.168.1.100
- > I send ARP Reply to router
< - Router send DHCP Acknowledge
- > I send DNS query
< - In QEMU, Virtualbox and even Virtualbox bridge Router responds with DNS Reply, however on real hardware it do not
Am I missing something? Any help would be appreciated.
P.S. I am currently rewriting BleskOS to C, so code on GitHub is not my actual code