Switched Networks
Packet Switching
Packet switching is the core communication method of the Internet. In this model, messages are broken down into smaller, manageable units called packets.
Each packet contains a header (with destination IP, sequence number, etc.) and a payload (a piece of the original message).
Packets are sent independently and can take different routes through the network.
Packet switches, such as routers and switches, direct the packets toward their destination.
The time it takes to push a packet of L bits onto a link with a transmission rate of R is calculated as
L/R
seconds.
Store-and-Forward Transmission:
A key mechanism in packet switching is store-and-forward, where a router must receive an entire packet before it can begin transmitting it to the next link. This introduces a delay at each hop.
For a simplified network of N links, the total end-to-end delay is approximately N * (L/R).
Circuit Switching
Circuit switching is an alternative communication method where a dedicated, end-to-end connection (a "circuit") is established between two nodes before any data is transferred.
Resources like bandwidth and buffers are reserved for the entire duration of the session.
Once the circuit is established, data is transmitted at a constant, guaranteed rate.
This method is famously used in traditional telephone networks.
This method ensures reliability and predictability, but can be inefficient when resources are unused during silence or inactivity.
Phases of Circuit Switching:
Connection Establishment: A dedicated path is set up.
Data Transfer: Data is transmitted over the dedicated path.
Connection Teardown: The circuit is disconnected, and the resources are released.
Multiplexing in Circuit-Switched Networks
To efficiently use a single link, circuit-switched networks use multiplexing to carry multiple connections.
Frequency-Division Multiplexing (FDM):
The link's frequency spectrum is divided into smaller bands.
Each connection is allocated its own dedicated frequency band for the duration of the session.
Time-Division Multiplexing (TDM):
Time is divided into frames, and each frame is divided into a fixed number of time slots.
Each connection is assigned a specific time slot in every frame.
Comparison: Packet Switching vs. Circuit Switching
Feature | Packet Switching | Circuit Switching |
---|---|---|
Resource Allocation | Resources are shared and allocated on demand. | Resources are reserved for the entire session. |
Efficiency | Highly efficient, as resources are only used when there is data to send. | Can be inefficient, as reserved resources are idle during periods of inactivity. |
Data Path | Packets may travel along different paths. | The path is fixed for the duration of the session. |
Setup | No initial setup is required. | A connection must be established before data transfer can begin. |
Delay | Delay can be variable and is affected by network congestion. | Delay is constant and predictable once the circuit is established. |
Example Use | The Internet, email, and file transfers. | Traditional telephone networks and dedicated video conferencing. |
Robustness | High; can reroute around failures | Low; failure in the circuit breaks the connection |
Scalability | Highly scalable even with bursty and large traffic | Less scalable due to fixed resource allocation |
Cost | Typically lower due to shared usage | Typically higher due to resource reservation |
The Internet as a Network of Networks
The Internet is not a single, monolithic network. It is a "network of networks," a complex, hierarchical structure of interconnected Internet Service Providers (ISPs).
Access ISPs: These are the local providers that connect end-users (homes, schools, businesses) to the internet. Cannot directly connect to every ISP worldwide.
Regional ISPs: These larger networks connect multiple access ISPs within a specific geographic area. Provide a bridge between access ISPs and Tier-1 networks.
Tier-1 ISPs: These are the major, global backbones of the internet. They are large, international companies that own and operate vast networks of fiber optic cables. They peer with each other to provide global connectivity.
Internet Exchange Points (IXPs): These are physical locations where different ISPs connect and exchange traffic directly, which can reduce costs and improve performance.
Delay, Loss, and Throughput in Networks
Types of Network Delay
When a packet travels from a source to a destination, it experiences several types of delays at each router, or "hop," along the way.
Processing Delay: The time it takes a router to examine a packet's header and determine where to forward it. This is typically in the order of microseconds.
Queuing Delay: The time a packet spends waiting in a queue (or buffer) at a router before it can be transmitted. This delay is highly variable and depends on the level of network congestion.
Transmission Delay: The time required to push all of the packet's bits onto the link. It is calculated as
Packet Length (L) / Link Bandwidth (R)
.Propagation Delay: The time it takes for a bit to travel from one end of the link to the other. It is calculated as
Distance (d) / Propagation Speed (s)
.
The total nodal delay is the sum of these four delays.
d_nodal = d_proc + d_queue + d_trans + d_prop
Queuing Delay and Packet Loss
Queuing Delay: This is the most variable type of delay. It is directly related to traffic intensity, which is the rate at which data arrives at a link versus the link's capacity. As traffic intensity approaches 100%, queuing delays can grow exponentially.
Traffic intensity = La / R
L = packet length (bits)
a = average arrival rate (packets/sec)
R = link transmission rate (bps)
Packet Loss: Routers have finite buffer space. If a packet arrives when the queue is full, the router will drop the packet. This is known as packet loss. Reliable protocols like TCP are designed to detect and retransmit lost packets.
Transmission Modes
This refers to the direction of signal flow between two devices.
Simplex: Communication is unidirectional, like in a television broadcast.
Half-Duplex: Each device can both transmit and receive, but not at the same time, like with a walkie-talkie.
Full-Duplex: Devices can transmit and receive simultaneously, as in a telephone conversation.