-1

I know that when we first type an address on the URL and enter. The DNS query starts. I don't who initiates, but my guess is application will only initiate the DNS query. The DNS query already knows which IP to contact to get the information ( DNS server is preset). SO, the application will put the Domain name in the payload, the Transport layer will put as UDP or TCP ( I don't know , i.e.also the question), the src and destination IP will be put by Network layer. In DNS we already know the DNS server IP ( this is destination IP), a response will come back. This will be the destination IP. Now, the rest of the communication can happen. As we know that http is TCP. But, I don't know is DNS query a tcp or udp? Please correct my understanding also if you find something wrong here.

2

As many things, it depends.

DNS queries are generally handled over UDP. If you do an A record lookup for "www.google.com" (which is what happens when you go to www.google.com in your browser) the answer that comes back will be in a UDP packet.

If the query is for a large record (>512 bytes), like a big DKIM key, then the DNS request will use TCP.

| improve this answer | |
  • I have updated my question, please do respond. – dexterous Feb 13 '14 at 9:35
  • If you like my reworded question, then please remove my ban. – dexterous Feb 13 '14 at 9:59
  • Most DNS servers support EDNS0 these days so can negotiate a UDP max packet size, usually 4096 bytes. – milli Feb 15 '14 at 9:41
2

The PPPoE protocol has a way for the two ends of the protocol to negotiate with each other. The ISP offers you an IP address and your router accepts it. Then your ISP sends you a bunch of other parameters such as the name servers to use.

| improve this answer | |
  • How ISP can offer me an IP address, when I got connected for the first time? In my opinion, I would have done DHCPDISCOVER, and then things would have fallen at place. But, the question is at what address will I broadcast? This is also not known. Please throw some light on it. I am new to networking, please bear with me. – dexterous Feb 13 '14 at 13:56
  • 1
    @SHREYASJOSHI I think you need to do WAY more reading and narrow your problem scopes before asking questions, as your questions are border-line nonsensical. – Ƭᴇcʜιᴇ007 Feb 13 '14 at 16:47
  • @SHREYASJOSHI Why would you do a DHCPDISCOVER? Your link to your ISP doesn't use DHCP, it uses PPPoE. DHCP is, as you noted, a broadcast protocol. Your link to your ISP is point to point -- that's the "PPP" in PPoE. – David Schwartz Feb 13 '14 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.