Wednesday, September 05, 2012

Part Three: Compare and Contract Key Characteristics of LAN Environments

Network Topologies: Networks are organised in a physical topology, an arrangement of machines that are connected to each other. Different terms are used to describe different "shapes" of topologies.
  • Bus: All devices are connected along one single arterial cable. 
  • Ring: Each host is connected to one other host on either side, forming a closed loop.
  • Star: All hosts are connected to a hub or switch in the center.
  • Extended Star: Hosts are connected to a hub or switch that is in turn connected to another hub or switch at the center. 
  • Hierarchical: As described previously, this can be described as a pyramid, with different devices at different levels. Core routers and switches would be present at the top of the pyramid, with Distribution layer switches below, and access-layer switches at the bottom. The topology typically takes the form of a pyramid of extended-star networks.
  • Partial Mesh: Some hosts are directly connected to other hosts, with little or no centralisation of links.
  • Full Mesh: All hosts are directly connected to all other hosts. 
 Logical topologies determine how hosts communicate. They define the fundamental way that the network runs. The two most common types of logical topology are token-passing, and broadcast.
  •  Ring-Passing topologies, like token-ring function by having a "token" passed from one host to the next, to the next. When a host wants to send data, it must wait until it has possession of the token, before it is able to transmit. Despite the name, token-ring LANs do not need to be in a ring physical topology.FDDI (Fiber Distributed Data Interface) is a ring-passing technology.
  • Broadcast topologies like Ethernet do not require rings. Ethernet itself uses CSMA/CD to avoid collisions on the media.
Networks operate in accordance with a set of rules that determine how they communicate. These rules are called Protocols. Network protocols exist to control the type of connection, how data is transmitted, and how to handle errors, among other things.

MAC Addresses: Mac Addresses (also known as BUIs - Burned-In Addresses) are in 48 bit hexadecimal format, and are divided into six groups of two hexadecimal digits.
The first three groups, that is, the first six numbers, are assigned to the manufacturer of a device by the IEEE. The first six numbers are the same for all devices manufactured by that company.
The last six numbers are called the organisational unique identifier, and are assigned by the manufacturer themselves.
A frame that any host sends over the LAN includes a destination MAC address. Any host without the matching MAC address drops the frame.

Ethernet: Ethernet frames didn't always have a length field. Before the Ethernet standard that we know now, DIX (Digital Intel and Xerox - What an unfortunate acronym for anyone with a mental age of 14 (like me)) not only combined the preamble and start of frame delimiter, but also listed the length/type field as just type.
Ethernet today uses the length/type field to identify the upper-layer protocol in use.

Ethernet Frames: From end to end.
  • Preamble made of alternating 1s and 0s "Hey, I'm about to transmit".
  • Start of Frame Delimiter "10101011" "Heh, tricked you".
  • Destination Address, Source Address.
  • Length/Type, this is an important one. If the field is less than 0x600 hex (a really crappy bike meet), it represents the length of the data in the data field. If it is 0x600 or greater, this field represents the type of protocol; 0x800 Hex is IP.
  • Data: This contains the payload of the frame, which is intended for the higher layers.
  • Frame Check Sequence: This allows for error checking of the frame.
 Helpful Reminder: Routers are useful for segmenting LANS. They only forward traffic outside a LAN if it is deliberately intended for another network. As a result, they block broadcasts.

The History of LANs: When ethernet networks started appearing, they started as simple networks connected at the center with a hub connecting them, and over time evolved into sophisticated topologies that operated on many layers of the OSI model.
Originally, LANs operated on a bus topology, using thick and thin Ethernet. Hubs (also known as multiport repeaters) became common in networks, as a way to retime and amplify signals now in a star topology.
The problem with hubs is that all signals travel to all devices, so the potential for a collision is high.

Eventually though, Bridges were introduced, which segmented the network into two separate collision domains.

Nowadays, we use switches, which are superior to hubs and to bridges. Switches filter by MAC address, and essentially, every connection between the switch and a host becomes its own collision domain. Switches, bridges and hubs do not filter broadcasts. The process of dividing a network into multiple collision domains is called microsegmentation.

Ethernet networks that operate only in half duplex can only allow one host to transmit or receive at a time. Collisions occur when two devices attempt to transmit or receive at the same time. When this happens, the device that first witnesses the collision transmits a jam signal. All devices invoke a backoff algorithm, and wait a certain amount of time before attempting to use the network again.
the more devices connected to a hub, the higher the potential for a collision.

Network latency slows connectivity, and is an especially unpopular thing with network gamers. The time it takes a NIC to receive or place a signal on the medium, and the time it takes that signal to travel across the network contributes to latency.
Layer 3 devices can increase latency, because they take more time than a layer 2 device to process network data.

Switches: Switches use MAC addresses to create direct virtual connections between two hosts on a network. These connections are awesome, because they allow each host to transmit and receive at the same time. Full duplex communications uses the bandwidth in both directions, allowing for a 20mbps connection on a  10mbps link.

Switches can operate in one of three forwarding modes:
  • Store and Forward: The switch receives and processes the entire frame before forwarding it.
  • Cut-Through: The switch forwards the frame as soon as it either reads the destination MAC address (default), or reads the first 64 bytes and then forwards the frame. The second mode is called Fragment-Free, and as the name suggests, exists to reinforce the integrity of transmitted data.
  • Adaptive Cut Through mode. Initially, the switch operates in cut-through, until there are a certain number of errors detected. Once this threshold is reached, the switch moves to store-and-forward.
 [I am having trouble finding information on how to configure these different switching modes on my catalyst 2950s. Either the 2950s do not support them (my 3550 definitely should) or operating in multiple forwarding modes is now a historical artefact. From what I can see on various cisco sites, as switches have become faster, the advantage of cut-through switching has diminished. This may or may not be correct, and further research is required].

 Routers, Bridges and Switches improve network functionality because they protect hosts from unnecessary traffic. Routers filter broadcasts and only forward packets that are destined for other networks to other ports. Switches divide collision domains substantially, and only pass frames over the wire to hosts with the proper destination MAC address.

Broadcasts: Remember, devices can send out layer 2 broadcasts to all hosts, by sending out frames with a destination address of FF-FF-FF-FF-FF-FF. Switches do not divide broadcast domains (remember broadcast storms).

When designing a network, it is important to bear in mind the number of broadcast and the number of collision domains that your design will have.

No comments: