RFC 894 specifies how an IP packet is encapsulated in an Ethernet frame. An Ethernet frame is composed of two addresses, some data, a type field, and a checksum (CRC) trailer. As shown below.
Bytes: 6 6 2 46-1500 4
+---------+---------+-------+--------------------+------+
|Dest addr| Src addr| Type | Data | CRC |
+---------+---------+-------+--------------------+------+
Ethernet addresses are 48-bit addresses and are typically
written in hexadecimal form with each byte separated by a
'-'. e.g. XX-XX-XX-XX-XX-XX. An Ethernet frame is given
a minimum length, thus the minimum data length of 46 bytes
and a total minimum frame size fo 64 bytes. The Type field
is given the value of 0x0800 for an IP datagram and
0x0806 for ARP frames. RFC 1340 specifies different type
field values for various network protocols.
The IEEE developed subcomittees to handle standardizing different pieces of the standard. These subcomittees are:
Bytes: 6 6 2 | 1 1 1 | 3 2 38-1492 4
+----+---+---+----+----+----+---+----+--------+------+
|Dest|Src|Len|DSAP|SSAP|cntl|org|type| Data | CRC |
+----+---+---+----+----+----+---+----+--------+------+
802.3 MAC | 802.2 LLC | 802.2 |
SNAP
SNAP stands for Subnetwork Access Protocol. DSAP stands for
Destination Service Access Point (and is set to 0xAA). SSAP
stands for Source Service Access Point (and is set to 0xAA).
The cntl field is set to 0x03 and the org code field is
set to 0x00.
The Type field is set to the same value as used in Ethernet.
Notice that the first 14 bytes of Ethernet and IEEE are
similar, but the 13th and 14th bytes distinquish the
protocols. In fact, Internet hosts must be able to
accept both RFC 894 and 1042 frames.
Bytes: 1 1 1 2 <1500 2 1
+----+----+-------+--------+------+-----+----+
|Flag|addr|Control|Protocol| Data | CRC |Flag|
+----+----+-------+--------+------+-----+----+
The Flag field is set to the special value of 0x7E. This
serves to mark the frame boundaries. The addr field is set to
0xFF. The control field is set to 0x03. The Protocol
field is set to 0x0021 to signify an IP datagram,
0xC021 to signify link control data, or 0x8021 to
signify network control data. The data may be up
to 1500 bytes in length.
The flag value of 0x7E must be 'escpaped' if it appears in the data field. Why? no length field. This escaping must also be done for ASCII control sequences. Escpaping is done by using 0x7D to signify the value and then changing the next character by complementing its sixth bit a specific way. This helps to ensure that the escaping does not create a value that would have to be escaped.
The LCP might negotiate to compress the header. This can be done by omitting the address and control fields and shrinking the protocol field to 1 byte. The NCP might negotiate to compress the specific network header used. Dramatic savings can be seen. For example, it is possible to shrink the IP and TCP headers (40 bytes) to 3 or 5 bytes. This can be done by using a table setup and indexing into the table. Also, the NCP can get an IP address dynamically.
The simplest bridge would be a "No Frills" bridge. This bridge functions very simply by listening promiscuously to every packet transmitted and store every packet received until it can be transmitted on the LANs other than the one on which it was received. In other words, just copy each packet to all the other networks. But, the bridge can't change any piece of the frame and this might change the delay characteristics of the LAN. However, bridging can extend the length limit of a LAN. This is done by treating each single LAN as a unit and letting the bridge function independently on each LAN. Thus the bridge controls access on only each LAN.
A smarter method would be to build a "Learning Bridge". Suppose we knew who was on each LAN, the bridge could then only forward frames it knew where needed on other LANs and not forward frames that were not. This turns out to be very easy. It is done like this:
A-+
| LAN 1
+---+---+---+----
| | |
+B1 +B2 +B3
| | |
----+---+---+---- LAN 2
What happens when A sends a frame. It doesn't matter to who.
The frame loops and generates duplicates. This is very
pathological.
One way to fix this is to not allow trees, but that is somewhat undesirable and loops may not be intentional or easy to determine. Bridges have an algorithm designed into them that prunes the topology into a loop-free subset (spanning tree). This algorithm is:
ATM is designed to support various QoS applications. The key to doing this effectively is a layered architecture. An example of the layers involved with ATM for three applications are shown below.
+--------+---------+------------+
| IP | Video | Higher LLC |
+--------+---------+------------+
| AAL-5 | LANE |
+------------------+------------+
| ATM |
+-------------------------------+
| Physical |
+-------------------------------+
AAL stands for ATM Adaptation Layer.
This layer involves the packetization into ATM packets,
or cells. This layer also involves some control information
exchange. The ATM layer is responsible for controlling
the sending rate of a source. This is typically done using
a leaky bucket scheme. LANE stands for LAN Emulation
Layer. It is responsible for allowing higher level
LLCs (such as Ethernet or IEEE 802) to run ont top of
ATM transparently.
ATM works well by reserving resources in the network. These reservations are not based on 'peak' usage, but on average usage. This gain from peak usage to average usage is called "statistical multiplexing gain".
An ATM cell is 53-bytes in length with 5 bytes of header. The reason behind this length is due to the delay in packetizing voice data and the interactivity that it effects. (48 bytes data X 8 bits)/(64 Kbps) = 6 msec. delay. The ATM cell is shown below.
Bits: 4 8 16 3 1 8 <384
+---+---+---+----+-----+-----+-----------+
|GFC|VPI|VCI| PT | CLP | HEC | Data |
+---+---+---+----+-----+-----+-----------+
1 1
A---\ C /---D
a 1 b1 2 b
Xc-------aYc---------aZ
b 2 1 c
B---/ \---E
1 1
In the topology above, we have 3 connections, one from
A to C, one from C to D, and one from B to E. The three
routers X, Y, and Z have tables that show (port,number)
going to (port,number). X has a table with two entries:
(a,1)->(c,1) and (b,1)->(c,2). Y has (a,1)->(b,1) and
(a,2)->(c,1). Z has (a,1)->(c,1) and (a,2)->(b,1). These
entries specify all three connections. So, for the connection
from A to C, the X entry of (a,1)->(c,1) is used and for
Y the entry (a,1)->(b,1) is used.
53 bytes may seem pretty small for IP fragmentation. It is. So, AAL-5 puts an IP packet over a series of cells to minimize the waste from multiple ATM cell headers.
ATM has a set of QoS attributes. These are: Cell Loss Ratio (CLR), Cell Delay Variation (CDV), Maximum Cell Transfer Delay (MaxCTD), Mean Cell Transfer Delay (MeanCTD), and Minimum Cell Rate (MCR).