다음을 통해 공유


How TCP/IP Works, Part 2: Protocols

Inside each layer of the TCP/IP networking stack, there are many protocols to transmit and route information at that level. Today's post has some of the more popular protocols that play a role in helping your WCF applications work, as well as a few protocols that were originally useful but have fallen out of style in the last few years.

Link layer protocols

Address Resolution Protocol (ARP): ARP is used to translate the Internet address of a computer to its address on an Ethernet network. Internet addresses are actually totally independent of the adapter address used on the local network. This was more useful in a time when TCP/IP was not as prevalent and you had machines using TCP/IP and machines using some other network stack on the same physical cable, but using ARP is still a basic part of doing networking. The specification for ARP is RFC 826.

Reverse Address Resolution Protocol (RARP): RARP is the complement of ARP. It translates from the hardware interface address to the Internet address of the computer. RARP was originally used for getting the address of a computer when booting off the network, but there have been several successive technologies that solve this problem better. The specification for RARP is RFC 903.

Network layer protocols

Internet Protocol (IP): IP is the primary means of moving data around. The remaining protocols I'll talk about today are all transmitted using IP. When using IP, there's actually no guarantee that your data will be delivered in the right order or even at all. IP will just throw away data it doesn't understand and might send back an ICMP error message if you're lucky. Connection state and reliability are services that other protocols provide on top of IP. The current popular specification for IP (IPv4) is RFC 791. The IP specification is where Internet addresses come from. IPv6 is the successor to IPv4 although adoption has been slow.

Internet Control Message Protocol (ICMP): ICMP is the protocol that machines use to give feedback about the IP network. ICMP is used for error-reporting and supplying point-to-point routing information. You can't have IP without ICMP helping. The specification for ICMP is RFC 777.

Internet Group Management Protocol (IGMP): IGMP is a much less frequently used protocol that controls IP multicasting. Hosts use IGMP to control membership of multicast groups. There have been several versions of IGMP used over the years. The current specification for IGMP is RFC 3376.

Transport layer protocols

Transmission Control Protocol (TCP): TCP is built on top of IP and supplies both reliable delivery and a continuous connection session. TCP used to be considered an expensive protocol because it does take a lot of work to make these guarantees from the fundamentally unreliable IP. Today, most application level protocols are built on top of TCP because user expectations for reliability have increased. Using TCP allows you to avoid reimplementing these services yourself. TCP is one of the standard transports in WCF. The specification for TCP is RFC 793.

User Datagram Protocol (UDP): UDP is the unreliable cousin of TCP. Using UDP is a lot more like using IP directly than TCP. UDP is not one of the standard transports in WCF although we have it available as a sample. The specification for UDP is RFC 768.

Next time: How TCP/IP Works, Part 3: Framing Data

Comments

  • Anonymous
    April 10, 2006
    When you use WCF, you take for granted a lot of the infrastructure that actually moves data from place...
  • Anonymous
    April 12, 2006
    As someone that just uses WCF to get a job done, you may be wondering why it's important to know about...
  • Anonymous
    April 17, 2006
    The AppDev: Something You Should Know is a great blog to read/subscribe to, it has loads of useful...