Depending on the technology employed, a communication channel may be used by only two interlocutors forming a point-to-point connection, or it may be a shared medium accessed simultaneously by a number of interlocutors. In either case we talk of the channel as a link. Local Area Networks (LANs) use shared channels. The topology of a LAN can be bus, star, or ring. In addition to the original Ethernet protocol, a variety of standards 802.x set by IEEE regulate LANs and their use.
Ethernet
Each Ethernet segment can be up to 500 meters long (this distance will
depend on the kind of wire used).
When a node transmits the signal (it is a digital
signal encoded using the Differential Manchester code) it propagates from
the transmitter in both directions. Segments can be connected by repeaters
(repeaters operate at the physical level)
that propagate the physical signal in both directions (unfortunately this
means that also noise and errors are propagated; since a repeater sends
everything it receives from one side to the other side, one must make sure
not to create loops when using repeaters). There can be a maximum of
4 repeaters on any one path in an Ethernet network. Thus the maximum distance
on a Ethernet is 2500 meters. Maximum data rate used to be 10Mbps. Now
100Mbps Ethernet is available and Gigabit/sec Ethernet is becoming available.
Since signals propagate unimpeded in a segment and through repeaters,
simultaneous signals
may collide. That is, a signal transmitted from a node
can collide with the signal transmitted by a node that is on the same
LAN segment, or on a segment reacheable through repeaters. All nodes
whose signals may collide constitute a collision domain.
Since the communication channel is shared, there is a need to coordinate access to the channel, this is done in the Medium Access Control (MAC) sub-layer of the LAN protocols [the other sublayer is called Logical Link Control (LLC) - it controls how higher level protocols use the LAN]. Access follows the CSMA/CD protocol (Carries Sense Multiple Access - Collision Detection). That is, who wants to transmit waits that no signal is propagating in the channel, then it starts transmitting. As it transmits it listens to see if the signal is garbled, which is what happens when some other node has started to transmit at approximately the same time. If a collision is recognized, the recognizer sends a jam signal (48 bits) to warn all other nodes of the collision (it warns in particular the node that sent the packet which caused a collision with the recogniser's packet). The transmitter node that recognised the collision tries again in a random fraction of an interval T (T is equal to the time required to transmit 512 bits, i.e. at 10Mbps, about 51.2 microseconds). If it fails again, it will try in a random fraction of 2T, and then 4T etc. (exponential backoff) before finally giving up after 2^10*T. The longest elapsed time before a transmitter recognizes a collision is when a transmitter is at one end of the LAN, starts transmitting and just when it arrives at the other end of the LAN another node there starts transmitting. So the original transmitter will have a delay corresponding to the 5,000 meter round trip traversing 8 repeaters (each repeater has a delay of about 2 microseconds). This total time is less than 50 microseconds. At 10Mbps, this corresponds to the transmission of 500bits or about 64bytes. So the minimal size of an Ethernet frame will have to be at least 64 bytes (=512 bits) to make sure that a transmitter can detect a collision when it transmits (also to distinguish them from fragments of frames that are produced by collisions). [The detection of collision has to take place while we transmit a frame and the effect of the collision has to propagate back to the original transmitter while it is still transmitting.] If the transmission data rate, or the delay, increase, then the minimum size of frames has to be increased (or the size of segments and number of repeaters decreased) so as to remain able to detect collisions.
[Ethernet's CSMA/CD has as ancestor, the ALOHA system (pure Aloha, and slotted ALOHA) which was used to connect 7 institutions on 4 Hawaiian islands using microwave transmissions.] [In wireless LANs it is now possible to find used a variation of CSMA/CD, called CSMA/CA, where the CA stands for collision avoidance. It is founded on the fact that if computers A and B want to communicate with C, they may be both able to hear C but not each other. Thus they would find difficult to recognize collisions. In CA, A would send a request to C saying it wants to communicate. C would reply, and B would hear, that A can go ahead. Then A can go ahead.]
Computers are connected to the Ethernet using a Network Interface Card (NIC). Ethernet uses addresses that are 6 bytes long. These addresses are associated with the NIC, not with the computers. So if a computer has 3 NICs, it will have 3 Ethernet addresses. These addresses are usually assigned to the NICs by their manufacturers. Thus they are fixed once and for all at creation. An Ethernet address has the following format:
The NIC is built to operate in one of two modes, a normal mode and a promiscuous mode. In normal mode the NIC passes to the computer software only the packets that have that node as destination (or are broadcast, or, in more modern NICs, are multicast for a group that includes the current node). In promiscuous mode the NIC passes all frames to the computer. The promiscuous mode is/should-be used only by analyzers of network traffic (sniffers). Only root can put the interface into/out of the promiscuous mode.
The format of an Ethernet frame, in the original DIX standard, consists of:
Now common is the Ethernet frame format as set by IEEE with standard 802.3 for the header of the frame [8 bytes preamble, destination address, source address, two bytes for length of frame (notice that this length is bound to be at most Ox05DC, that is at most 1500, thus remaining compatible with the DIX format]. This header is followed by an IEEE 802.2 frame followed by a 4 byte CRC. An IEEE 802.2 frame consists of a three byte field, called Logical Link Control (LLC) field, which is used as type information, followed by a 5 byte field, called Sub Network Attachment Point (SNAP), partitioned in a 3 byte sub field that identifies a standard organization, and a two byte type sub field, followed by the data.
Ethernets have been implemented using (from oldest to most recent):
Hub: A box to which a number of connectors to computers can be attached. It behaves as if it were an Ethernet segment, thus collisions can arise and only one computer can transmit at a time.
We will later see Bridges that are used to interconnect LANs, moving information between nodes and restricting traffic so that frames go only to the intended segments.
Switch: A box to which a number of connectors
to computers (or to other switches and hubs) can be attached. It behaves
as if each pair of connectors was connected by a separate segment. Thus
any two disjoint pairs of connectors can communicate simultaneously. Signals
pass unchanged through the switch from sender to receiver as if they were
on a single segment.
In a modern ethernet lan twisted pairs are connected to a central
switch.
Distinct pairs of interlocutors can converse concurrently. No collisions
take place. Hence CSMA/CD does not apply to the whole switch.
Yet the traditional addresses
and data formats are used.
A switch is like a bridge except:
Token Rings Token rings were developed by IBM. They are regulated now by IEEE 802.5. Workstations are logically arranged on a ring, though physically they may be on a star. There is a special small frame, called a token. The frame can be free or busy (there is a bit used to this end). When a node receives a token it checks if it needs to send a frame, if not it forwards the token. If yes, it checks if the token is free. If not, it forwards the token. If yes, it changes the token to busy and forwards it with the data frame it wanted to transmit. The busy token + data will circulate until it reaches the destination that picks up the data and passes the token on until it gets back to its transmitter that will change the token to free and forward it. The data rate in a token ring is 4Mbps to 16Mbps.
The format of a token ring frame (IEEE 802.5) is:
1 1 1 6 6 4 1 Sizes +--+--+--+--------+--------+----------------+------+--+in bytes | | | | | | | | | +--+--+--+--------+--------+----------------+------+--+ ^ ^ ^ Destinat. Source Data or CRC ^ | | | Address Address Control | | | | End Delimiter+ | | +Frame control: says if data or control frame | +Access control = Priority+Reservation+MonitorBit+TokenBit +Start Delimiterwhere StartDelimiter + AccessControl + End Delimiter constitute the token.
A number of issues arise in token rings:
IEEE 802.5 allows the use of priorities (3 bit priority). Each node has its own priority. The token has a slot for reservation priority. That is, when a node receives a busy token, if the token priority is not set, or set lower that its priority, the node can set the token priority to its priority. Then a node will be able to take a free token only if it has no reservation priority or reservation priority not greater than the one of the current node.
A great advantage of token rings is that they can guaranty hard deadlines on the delivery of messages.
A fiber optic token ring technology that is used for backbones that interconnect regular LANs is Fiber Distributed Data Interface (FDDI). It can connect up to 1000 nodes over a distance of up to 200km, with a data rate of 100Mbits.
ingargio@joda.cis.temple.edu