Networking

The need for multiplexing and switching

Multiplexing

Multiplexing is the process of combining multiple signals into one and then transmitting them over a single channel, which is a lot more convenient than needing a transmission medium per device.

Switching

Switching is the process of directing a signal/data toward a particular destination. The ones to learn are packet and circuit switching.

Circuit switching

Circuit switching is when a temporary, dedicated link of fixed bandwidth is reserved for a connection, and lasts until the transmission is complete.

Packets

Data is split up into small chunks called packets when sent across a network. The packets are reassembled at the receiving end. This increases network efficiency and reliability, and you will know why when shortly.

Packet switching

Packets are often sent across networks with multiple links and routes towards a destination.

In packet switching, each packet is sent individually at the same time. Each packet will hop from router to router towards its destination.

Each packet may go down a slightly different route depending on what’s the fastest for each one, so they may arrive out of order. Therefore, they must be reassembled at the destination.

Routing

Routers forward packets from one network to another. Each router stores data about the available routes to the destination node.

When a packet arrives at a router, it looks up the destination IP address in its routing table and finds the most suitable next router (or the destination if that’s next).

Each time the packet moves from one router to another, it’s called a hop.

Circuit vs packet switching

Circuit switching is good if a constant, reliable connection between two points is needed, such as during a video call. The problems are that circuit switching often makes poor use of the bandwidth, since only one connection can use a certain route at a time. Circuit switching also responds poorly if parts of the network fail.

Packet switching allows one to take full advantage of a network’s bandwidth since multiple people can use the same routes simultaneously. It’s also more reliable since it can respond to network failures better by simply sending packets through alternate routes. However, the delay with which each packet arrives is not uniform, so it isn’t suitable for uses like voice communication.

Circuit switching does not support store-and-forward transmission, which is where routers store a packet and then forward it along. Packet switching does.

Time of travel

Latency is the time between a packet being sent and a packet being received. Latency would increase the further a packet is sent.

A packet of data from London to Sydney, Australia, may only take 40ms to arrive, whereas a packet from London to Paris may only take 5ms.