| previous | contents | up | next |
Let's consider the case where you are trying to telnet to a machine on the local subnet (more about subnetting later), for example telnet lnxed1.ucs.indiana.edu in the Unix lab. To recap the DNS discussion, the telnet application is linked against the resolver library, which uses /etc/resolv.conf to contact the local DNS server and gets you the IP number for lnxed1.ucs.indiana.edu, which is 129.79.28.88. Is this information enough to get to the target?
Let's start by giving you the answer first: The IP number is still not enough to make a connection to the remote host. Why? Because another level of subtlety lies under TCP/IP. TCP/IP is actually a high-level network transport protocol. The real, "wire" protocol, the one which is responsible for carrying TCP/IP traffic (or IPX, or AppleTalk traffic for that matter), is called the ethernet.
What are NICs and what is MAC address? Each host must have a network interface card (NIC) (more popularly called a network or an ethernet card) to connect to the network. It turns out that each NIC has embedded in it a unique Media Access Control (MAC) address. MAC addresses are usually represented by a set of six numbers in hexadecimal notation separated by colons. The ethernet protocol requires the knowledge of the remote hosts' MAC address in order to connect.
Since you already have the IP number of the remote host (on the local subnet), all that is needed is a mechanism to convert it into a MAC address to get ethernet to carry the TCP/IP traffic over the wire. The mechanism which does this for you is called Address Resolution Protocol (ARP).
What is ARP? ARP is basically a broadcast mechanism. Your host does an ARP broadcast using the ethernet protocol. Every host on the local subnet sees this broadcast. (ARP broadcasts are limited to the local subnet; routers do not forward ARP broadcasts.) The broadcast query essentially says: "Here's my MAC address and here's an IP number I want to connect to. Does this IP number belong to one of you? If so, please return to me your MAC address so I can connect".
| The Unix command which shows you your current ARP table (a table of ARP requests which are cached on your machine for efficiency) is arp. You can display your ARP table under Linux by performing an /sbin/arp -a. Now telnet to or ping a machine on the local subnet which is not in the ARP table and check the ARP table again. What do you find? |
To summarize, knowing the IP number of the remote host (on the local subnet) is only an interim step in getting to it. An IP to ethernet (MAC) address translation (using ARP) must happen before you can connect.
| previous | contents | up | next |