need help with dns
Posted: Wed Jan 28, 2009 11:54 am
for now, i've arp running, in my os (it can send request over the network to get MAC addr , and store the ip and the mac into a table), it work under qemu, (qemu emulate an gateway with ip:10.0.2.2)
now i try to implement DNS,
to do it, i believe that the dns query must be encapsulated into an udp datagram witch is encapsulated into the ip datagram witch is encapsulated into the ethernet datagram. I mus also pay attention to the endianness (byte order) (x86 are little-endian but network datagram are big-endian).
in practice i dont get it to work, ... i send a request to 10.0.2.2 (the gateway in qemu) the os in qemu says that the packet is transfered , but i never get a reply from the gateway
i've displayed an hexadecimal dump of the whole packet frame , i don't see something wrong. i work night and day to resolve the problem unsuccessful
there is a screen shot where you can see the dns query in hex numbers, and all the header (dns, udp,ip)
i dont show the ether header in the screen dump because i'm sure it's correct (6byte for the dst mac, 6byte for my mac and 2bytes for the proto: 0x0800 (0x0008 in little endian);
now i try to implement DNS,
to do it, i believe that the dns query must be encapsulated into an udp datagram witch is encapsulated into the ip datagram witch is encapsulated into the ethernet datagram. I mus also pay attention to the endianness (byte order) (x86 are little-endian but network datagram are big-endian).
in practice i dont get it to work, ... i send a request to 10.0.2.2 (the gateway in qemu) the os in qemu says that the packet is transfered , but i never get a reply from the gateway
i've displayed an hexadecimal dump of the whole packet frame , i don't see something wrong. i work night and day to resolve the problem unsuccessful
there is a screen shot where you can see the dns query in hex numbers, and all the header (dns, udp,ip)
i dont show the ether header in the screen dump because i'm sure it's correct (6byte for the dst mac, 6byte for my mac and 2bytes for the proto: 0x0800 (0x0008 in little endian);