Multiplexing & Demultiplexing Lab

Configure your servers first. Then send data out to them as a sender (multiplexing). Then flip around and sort incoming traffic back to the right one (demultiplexing). Each tab unlocks once the one before it is done.

Animation speed 1.0x
Score: 3.0 / 3.0 Servers 1.0/1.0 · Multiplexing 1.0/1.0 · Demultiplexing 1.0/1.0

1. Configure Servers

Give each server a name, pick its IP, and set the port it listens on. No two servers may share the same IP:port. These servers become the destinations you'll multiplex data toward, and the sockets you'll later have to demultiplex incoming traffic into.

2. Multiplexing — combining flows onto one link

Three apps on this computer each need to reach one of the servers you just configured. For every app, pick which local IP it sends from and a source port, then pick the destination IP and port it actually needs. The far end is intentionally left abstract here — sending is all about getting your own addressing right.

Transport
Layer
(mux)
🌐
Network
Send All failing on the first try? (click for a hint)

Every app currently defaults to the same source IP and source port. A computer can't bind two sockets to the identical local address — that's not something multiplexing can work around. Give each app a unique source port, then make sure each one's destination IP/port actually matches the service it's trying to reach.

3. Demultiplexing — routing incoming data to the right process

Now you're standing at the server side. Network Layer and Transport Layer are stacked in the middle — only Network Layer starts active. Click a segment, then click the device you think it's addressed to: the packet routes through Network Layer to get there, right or wrong, because picking a device only ever needs the IP. Land on the right one and Transport Layer lights up and takes over, handing the segment to the right process by port.

Delivered: 0/0
Transport
Layer
Network
Layer
Notice Transport Layer starts grayed out? (click for a hint)

IP addresses route you to a machine, not a specific program on it — so picking a device is something Network Layer can do entirely on its own, correct or wrong, with Transport Layer disabled the whole time. Only once you land on the right device does Transport Layer light up and take over, stepping in to hand the segment to the right process using the port number — same idea as the earlier "no app listening here" case, just one layer deeper. If a device's IP matches but none of its processes use the segment's port, use "Nothing listening on this port" instead of guessing.

You'll see all 4 possible devices every round, each with up to 3 processes — some of those processes belong to servers you actually configured, others are just other things that happen to be running on that machine. Nothing on a device's card tells you which is which up front; only the port number the segment is actually addressed to can tell you. One segment each round is addressed to a real device on the wrong port, and one is addressed to an IP that isn't any of these 4 devices at all.