Show Lecture.Packet as a slide show.
CT320 Packet
It’s all packets.
Packets
- It’s all packets.
- If you fetch a 300MB file, it gets chopped into small packets,
each up to 64kB.
- Like a big text message being split into parts.
- Each packet is sent individually.
- The first one might arrive after the second one.
- The third one might fail and get re-sent.
- They are reassembled into one big file when they all arrive.
- Therefore, “all” the internet has to worry about is how
to transmit packets.
Reminder about networks
There are several classes of IP addresses
that we will use in the examples that follow:
- Reserved for CSU: 129.82/16
- Reserved for CSU CS: 129.82.44/23
- Reserved for private use: 10/8, 192.168/16
- The CSB 315 lab uses 192.168.110/24
- Reserved for documentation: 192.0.2/24, 198.51.100/24, 203.0.113/24
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
- There are two networks (LANs) present:
- On the left, lan1, 192.168.110/24, in the CSB 315 lab.
- This is part of 192.168.110/24, reserved for private networks.
- On the right, lan2, 129.82.44/23, the rest of the building.
- This is part of 129.82/16, allocated for CSU.
- The center box is a router, connected to both LANs.
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
- Our goal is to send a packet from ct320-1 to salem.
- How does that work?
- How can ct320-1 possibly even know where salem is?
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
One does not simply resolve a name with DNS
- ct320-1: DNS: What is the IP address of salem?
- DNS replies that salem is 129.82.44.169
- OK, truly, there was a lot of networking that we ignored there.
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
- ct320-1 knows that it’s part of the 192.168.110/24 network.
- ct320-1: 129.82.44.169’s not on my local network,
therefore I need to send the packet to my default gateway,
192.168.110.1.
- A gateway is where to send stuff when
you don’t know where it should go. It’s assumed that the gateway
knows more than you do, or, that it has even smarter friends.
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
- ct320-1: I need to send the packet to 192.168.110.1.
- Good, that’s part of my network 192.168.110/24. It’s on my LAN.
- I need a MAC address for this, not an IP address.
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
- ct320-1: ARP: What is the MAC address of 192.168.110.1?
- ARP: The MAC addr of 192.168.110.1 is 00:00:5E:00:53:32
- ct320-1: puts a packet on its LAN addressed to 00:00:5E:00:53:32
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
- Everybody on lan1 receives the packet; most ignore it.
- Router: Receives the packet on its lan1 port.
- Router: Looks at the MAC addr in the packet. Hey, it’s for me!
- Router: Looks at the IP addr in the packet, 129.82.44.169.
- Router: That’s on my (other) local network, so I can send that directly.
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
- Router: I need to send this packet to 129.82.44.169.
- Router: ARP: What’s the MAC addr of 129.82.44.169?
- ARP: 129.82.44.169 is 00:00:5E:00:53:21
- Router: sends a frame on the Ethernet connected to its lan2 port
to 00:00:5E:00:53:21
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
- Everyone on lan2 receives the packet; most ignore it.
- salem: Hey, that’s my MAC addr! That packet must be for me!
Sending a packet
┌─────────────────┐ ┌───────────────┐ ┌───────────────┐
│ ct320-1 │ lan1 │ router │ │ boise │
│ 192.168.110.101 │·······│ 192.168.110.1 │ ····│ 129.82.44.133 │
└─────────────────┘ : ├ ─ ─ ─ ─ ─ ─ ─ ┤ : └───────────────┘
┌─────────────────┐ : │ acushla │ : ┌───────────────┐
│ ct320-2 │ : │ 129.82.45.35 │·······│ salem │
│ 192.168.110.102 │···· └───────────────┘ lan2 │ 129.82.44.169 │
└─────────────────┘ └───────────────┘
- That was a ridiculous amount of work.
- In practice, ct320-1 may have remembered the IP address of salem
from a previous interaction. This is called caching.
- Also, ct320-1 would’ve cached the MAC address of the router.
- Similarly, the router would’ve cached 129.82.44.169’s MAC address.