Networking

Talking Shop: Use the OSI reference model to aid in topology decisions

Use this starting point to fully understand OSI layers.


Knowing the seven layers of the Open Systems Interconnection (OSI) reference model and understanding where your network devices fit in that model can prove to be a valuable asset when it comes to adding devices to different segments of your network and placing devices between networks. This knowledge enables you to take control of your topology and keeps you from leaving your network design to your vendors. In this article, we’ll explore the most common network devices and discuss where they should reside in a good network topology.

Let’s break down the devices by layer and by their function on a network. Figure A provides a good overview.

Figure A
Where different devices operate on the OSI reference model


Layer 1, The Physical Layer: Bits
The Physical Layer provides the mechanical and electrical connections to the network. In other words, it sends bits down a wire.

Repeaters connect media segments and provide amplification and retransmission of signals with no filtering and will propagate all errors. Use them only for connecting long segments of wire.

Hubs connect multiple hosts to one segment of wire. All hosts share the same bandwidth. This means that there is one large collision domain. Use them at points where you would deploy a network sensor, so the device can see all the traffic on that portion of the network.

Layer 2, The Data Link Layer: Frames
The Data Link Layer splits data into frames for sending on the physical layer and receives acknowledgement frames. It performs error checking and retransmits frames not received correctly. It provides an error-free virtual channel to the Network Layer. The Data Link Layer is split into an upper sublayer, Logical Link Control (LLC), and a lower sublayer, Media Access Control (MAC).

Bridgesconnect different types of networks (token ring, Ethernet, etc.), filter network traffic based on MAC address, and remove errors from the network. Use them to connect different types of internal networks.

Switches, also known as Multiport Bridges, transfer data between different ports based on the destination addresses. Each segment or port connection is its own collision domain, but all ports are in the same broadcast domain. Switches can be used to connect multiple ports to the same destination (i.e., multiple uplink ports), but only one port can be active at a time. Historically, this is a hardware Layer 2 device and typically operates in one of three modes:
  • Store and Forward: This mode copies the entire frame into memory, computes the Cyclic Redundancy Check (CRC) for errors, and then looks up the destination MAC address and forwards the frame. This is slow but offers the best solution for error correction without affecting the entire backbone in retransmission.
  • Cut-through: This mode reads the destination address of the frame and forwards the frame to the port connected to that destination MAC address before the entire frame is seen. This is fast but provides very little error correction and will propagate errors from one collision domain to the next.
  • Modified Cut-through: This mode reads the first 64 bytes of the frame and then forwards the frame to a port based on MAC destination address. This is fast and efficient in error correction.

Use Layer 2 switches as your LAN subbackbone device with each host connected to a switched port. This dedicates bandwidth and segments the lowest layer of your internal network. Switches are also pretty inexpensive.

Layer 3, The Network Layer: Datagrams/Packets
The Network Layer determines the routing of packets of data from sender to receiver. Routes can be static or dynamic. The Network Layer provides sequencing and flow control of data, selects routes, and provides quality of service through error detection, recovery, and notification. It also segments collision and broadcast domains. This is where a MAC or hardware address is translated into Internet Protocol (IP) addresses (or other routable protocol addresses, such as IPX or AppleTalk).

Routers are basically software-based packet-forwarding engines. The Network Layer provides information to these devices, allowing them to base their forwarding decisions on criteria such as IP, link, or network node availability and performance. A router’s true advantage lies in its flexibility in network protocol.

Use routers for their intended purpose. They were born to bridge networks and separate broadcast domains. This is your “gateway” device to the Internet or your linking device between LANs or WANs.

Switches (Layer 3)are nothing more than wire-speed routers. They come in two basic models.
  • Port switches decide which physical port network traffic needs to go to and direct the traffic appropriately. Each lane is actually a backplane segment on the switch. Because the switching is performed locally via logic circuits and at wire speed, port switches are easier and cheaper to implement than frame switches but give many of the same benefits.
  • Frame switches examine each Ethernet packet, determine which segment it came from and where it is going, and send it on its way. These are more expensive than port switches but add a significant performance boost to your network. They are also known as Learning Switches.

Use these devices at the backbone of your network. They’re less expensive than routers and much faster. But read on: There’s another switch that might be a better solution for your network.

Layer 4, The Transport Layer: Segments
The Transport Layer (sometimes referred to as the Host Layer) determines how to use the Network Layer to provide a virtual point-to-point connection. It creates and dissolves connections between hosts. The most popular types of transport connection are TCP and UDP. TCP is a point-to-point connection protocol that delivers messages in the order in which they were sent and guarantees delivery. UDP is a connection-less protocol with no guarantee of delivery. The Transport Layer is a legitimate end-to-end layer. In other words, a program on the source machine carries on a conversation with a similar program on the destination machine.

Layer 4 Switches are sometimes called “session switches” because they track and maintain individual sessions from start to finish. (This doesn’t make them Layer 5 Switches; they’re just “aware” of sessions.) Layer 4 Switches make forwarding decisions based on session and application-layer information and provide load balancing across multiple servers. Layer 4 Switches determine (through different complex and weighted algorithms) the best server of a cluster to process a service request and bind the session to that server’s IP address until the session is terminated.

They also designate and prioritize traffic by application. Because they are “aware” at the session level, they have the ability to prevent unauthorized access to servers. Layer 4 Switches’ true selling point is handling all packet processing in hardware. They utilize custom application-specific integrated circuits (ASICs), making them extremely fast!

Substitute Layer 4 Switches for your Layer 3 Switches only if you intend to operate high-speed intranet application servers with multiple 100-Mbit or gigabit interfaces.

What you need and what you can afford
Do not let design and implementation of your network become dominated by one specific vendor. While no two networks are exactly alike, a variety of vendors exist. So don’t settle for a device from one vendor based solely on company name. Above Layer 2, most devices are very specific in the protocols and configurations they support. Know the intended purpose of your network and let budget and function dictate design.

What kind of network design tips do you have?
Do you use the OSI reference model for topology planning and troubleshooting? We look forward to getting your input and hearing your experiences regarding this topic. Join the discussion below or send the editor an e-mail.

 

Editor's Picks