Networking / Beginners

Ethernet

The Ethernet standard was defined in 1982 by DEC, Intel and Xerox. It uses a method called Carrier Sense, Multiple Access with Collision Detection, or CSMA/CD, and runs at 10Mb. That is, 10Mb/s is the signalling rate, namely the rate of the physical bits on the wire. The rate available to the user is less, as we shall see. Each host on an Ethernet (technically, each interface, as a host might well have more than one network interface) has a 48 bit address that uniquely identifies it.

A couple of years later the IEEE published another standard, 802.3, which is almost but not quite the same as Ethernet. It is sufficiently different that they do not interoperate, though you can have packets from both standards on the same wire without interference. Ethernet is by far more popular.

This being the link layer, we must define how bits are laid out on the wire. An Ethernet frame (aka packet) starts with two 6 byte fields containing 48 bit hardware addresses (also known as a Media Access Control or MAC address): first destination, then source (Figure below). Every Ethernet chip in the world has its own unique 48 bit hardware address burned in at the time of manufacture. For example, a typical address could be 0:20:48:40:2e:4d, written as a sequence of six hexadecimal numbers.

Ethernet frame

The top 22 bits of this 48 bit address identify the vendor of the Ethernet chip, while 24 bits form a serial number set by the vendor. One bit is used to indicate a broadcast or multicast address and the last bit is used to indicate a 'locally administered address', where the address has been reassigned to fit some local policy.

Next in the frame is the 2 byte type field. This is a number that indicates what kind of data follows: for example, (hex) 0800 indicates an IP packet, while 0806 indicates an ARP packet. These numbers are defined in RFC 1700 et seq. This allow the RFC 1700 system to pass the data quickly to the relevant program in the next layer.

Then comes the actual data. This can be up to 1500 bytes. Curiously, there is also a minimum size of 46 bytes. The reason for this will be explained shortly. If the data section would be less than 46 bytes, it is padded out with 0 bytes. Somehow the data field must itself encode how long its real data part is (which is somewhat against the spirit of layering).

Finally there is a 4 byte checksum (aka cyclic redundancy check, CRC). This is a simple function of all the bytes in the frame and is intended to catch errors in transmission. It is computed by the source host just before sending the frame. On receipt, the destination recomputes the checksum on what it got. If an error occurred in the transmission of the frame this should show up as a difference in the values of the received and computed values of the checksum. If this happens the packet is assumed corrupted and the frame is dropped. In Ethernet it is up to a higher layer to realize this has happened and to take corrective action.

One Ethernet address is special: all ones, or ff:ff:ff:ff:ff:ff. This is the broadcast address: the packet goes to all machines on the (local) network. One or more machines may choose to reply. This will later be seen to be useful when bootstrapping other parts of the IP.

[Contents] [Next]