The Ethernet level

Posted by The Beyand | 7:21 AM | 0 comments »

Most of our networks these days use Ethernet. So now we have to describe Ethernet's
headers. Unfortunately, Ethernet has its own addresses. The people who designed
Ethernet wanted to make sure that no two machines would end up with the same Ethernet
address. Furthermore, they didn't want the user to have to worry about assigning
addresses. So each Ethernet controller comes with an address
builtin from the factory. In order to make sure that they would never have to reuse
addresses, the Ethernet designers allocated 48 bits for the Ethernet address. People who
make Ethernet equipment have to
register with a central authority, to make sure that the numbers they assign don't overlap
any other manufacturer.
Ethernet is a "broadcast medium". That is, it is in effect like an old party line telephone.
When you send a packet out on the Ethernet, every machine on the network sees the
packet. So something is needed
to make sure that the right machine gets it. As you might guess, this involves the Ethernet
header. Every Ethernet packet has a 14-octet header that includes the source and
destination Ethernet address, and
a type code. Each machine is supposed to pay attention only to packets with its own
Ethernet address in the destination field. (It's perfectly possible to cheat, which is one
reason that Ethernet communications are not terribly secure.)
Note that there is no connection between the Ethernet address and the Internet address.
Each machine has to have a table of what Ethernet address corresponds to what Internet
address. (We will describe how
this table is constructed a bit later.) In addition to the addresses, the header contains a
type code. The type code is to allow for several different protocol families to be used on
the same network. So you can
use TCP/IP, DECnet, Xerox NS, etc. at the same time. Each of them will put a different
value in the type field. Finally, there is a checksum. The Ethernet controller computes a
checksum of the entire
packet. When the other end receives the packet, it recomputes the checksum, and throws
the packet away if the answer disagrees with the original. The checksum is put on the end
of the packet, not in the
header.
When these packets are received by the other end, of course all the headers are removed.
The Ethernet interface removes the Ethernet header and the checksum. It looks at the type
code. Since the type
code is the one assigned to IP, the Ethernet device driver passes the datagram up to IP. IP
removes the IP header. It looks at the IP protocol field. Since the protocol type is TCP, it
passes the datagram
up to TCP. TCP now looks at the sequence number. It uses the sequence numbers and
other information to combine all the datagrams into the original file. The ends our initial
summary of TCP/IP. There are
still some crucial concepts we haven't gotten to, so we'll now go back and add details in
several areas. (For detailed descriptions of the items discussed here see, RFC 793 for
TCP, RFC 791 for IP, and RFC's
894 and 826 for sending IP over Ethernet.)

0 comments