Thanks to:
for the contents of these slides.
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
| Version | IHL | Type of service | Total length | ||||||||||||||||||||||||||||
| Identification | Flags | Fragment offset | |||||||||||||||||||||||||||||
| Time to live | Protocol | Header checksum | |||||||||||||||||||||||||||||
| Source IP address | |||||||||||||||||||||||||||||||
| Destination IP address | |||||||||||||||||||||||||||||||
| Options (optional) | |||||||||||||||||||||||||||||||
| IP data payload (many bytes) | |||||||||||||||||||||||||||||||
The problem:
┌───────────┐ ┌──────────────┐ │ Dr. McCoy │···· ····│ Dr. Faustus │ └───────────┘ : : └──────────────┘ ┌───────────┐ : : ┌──────────────┐ │ Dr. Evil │···: :···│ Dr. Jekyll │ └───────────┘ : : └──────────────┘ ┌───────────┐ : : ┌──────────────┐ │ Dr. Who │···: :···│ Dr. Pepper │ └───────────┘ : : └──────────────┘ ┌───────────┐ : ┌───────┐ : ┌──────────────┐ │ Dr. Zaius │···:···│ PBX │···:···│ Dr. Dolittle │ └───────────┘ : └───────┘ : └──────────────┘ ┌───────────┐ : : : ┌──────────────┐ │ Dr. Doom │···: : :···│ Dr. Zoidberg │ └───────────┘ : phone : └──────────────┘ ┌───────────┐ : network : ┌──────────────┐ │ Dr. Teeth │···· ····│ Dr. Watson │ └───────────┘ └──────────────┘
Consider a doctors’ office. It has a dozen doctors. Each doctor has an office with a phone.
The solution: an internal phone exchange (PBX).
Internet ┌────────┐ ┌─────────────┐
··············│ NAT │·······│ 192.168.1.2 │
203.0.113.9 │ router │ : └─────────────┘
└────────┘ : ┌─────────────┐
:···│ 192.168.1.3 │
: └─────────────┘
: ┌─────────────┐
····│ 192.168.1.4 │
└─────────────┘
Similarly, NAT hides many hosts behind a NAT router.
| CIDR range | Number of hosts |
|---|---|
| 10.0.0.0/8 | 224 (~16 million) |
| 172.16.0.0/12 | 220 (~1 million) |
| 192.168.0.0/16 | 216 (~65 thousand) |
Internet ┌────────┐ ┌─────────────┐
···············│ NAT │·······│ 192.168.1.2 │
203.0.113.9 │ router │ : └─────────────┘
└────────┘ : ┌─────────────┐
:···│ 192.168.1.3 │
: └─────────────┘
: ┌─────────────┐
····│ 192.168.1.4 │
└─────────────┘
If example.com connects via ssh to denver.cs.colostate.edu, the connection looks like this:
(example.com,6234) ◀────▶ (denver.cs.colostate.edu,22)
Why have the port 6234? So that when a reply packet from denver arrives, we know which program to send the reply to: the program listening on port 6234.
How does a typical transaction occur without NAT?
Internet ┌────────┐ ┌─────────────┐
··············│ NAT │·······│ 192.168.1.2 │
203.0.113.9 │ router │ : └─────────────┘
└────────┘ : ┌─────────────┐
:···│ 192.168.1.3 │
: └─────────────┘
: ┌─────────────┐
····│ 192.168.1.4 │
└─────────────┘
| WAN | LAN |
|---|---|
| ebay.com, 3345 | 192.168.1.4, 5001 |
| hp.com, 8765 | 192.168.1.3, 5010 |
A NAT router must:
┌─────────────┐ ┌────────┐ ┌─────────────┐ │ denver.cs.… │·····│ NAT │·····│ 192.168.1.2 │ └─────────────┘ │ router │ └─────────────┘ 129.82.44.141 └────────┘ example.com
How does a typical transaction occur with NAT?
|
Modified: 2017-10-31T16:00 User: Guest Check: HTML CSSEdit History Source |
Apply to CSU |
Contact CSU |
Disclaimer |
Equal Opportunity Colorado State University, Fort Collins, CO 80523 USA © 2015 Colorado State University |
|