In the Internet, hosts send packets of data.
- Hosts send data:
- Application data is split into smaller chunks (i.e. packets which encapsulate application message) of length $L$ bits
- Packets are transmitted into access network at transmission rate $R$
- Link transmission rate - speed at which we can push bits to link - $\frac L R$ seconds to push data
- Network moves packets of data:
- Done via packet-switching - network forwards packets from one router to the next, across links on path from source to destination
There are 2 main functions of network-cores (i.e. interconnected routers):
- Forwarding (switching) - local action
- Move arriving packets from router’s input link to appropriate router output link
- Use local forwarding table to determining output link for a given header value
- Routing - global action
- Determines source-destination paths taken by packets
- Routing algorithm picks particular output link to send to
- Note there are different metrics you could design a routing algorithm around
A router will implement both forwarding and routing.
Packet-Switching: Store-and-forward
Packet switches move packets from some source to a destination.
- Each packet is completely independent - pieces are encapsulated in its own packet + switched independently
- Packet transmission delay: it takes $L/R$ seconds to transmit an $L$-bit packet into a link at $R$ bits/second
- Store & Forward ⇒ the entire packet must arrive at a router before it can be transmitted to the next link
- We can’t just look at the header, as more processing may be required
- e.g. bit flip errors, etc. - don’t forward packet if errors
As an entire packet must arrive at a router before it can be forwarded, a transmission delay occurs (due to wait time).
- Given $p$ routers, total delay time is $(p+1)L/R$ ($p$ routers ⇒ $p+1$ links) - single packet
- For $n$ packets and transmission rate of $R$ bits/second, delay is $pL/R + nL/R$ (assuming same delay between routers)
Packet-Switching: Queueing
Queueing occurs when packets arrive faster than they can be processed/serviced.