Byte order
1. Endianness
2. Network Byte Order
- Different processors have different endianness
- Little endian: x86
- Big endian: ARM
- To interoperate, they need to agree how to represent multi-byte fields.
- Network byte order is big endian.
IPv4
1. Goal of Internet Protocol Addresses
- Stitch many different networks together.
- Need network-independent, unique address.
2. IPv4
3. Address Structure
Historical:
Today:
- CIDR(无分类域间路由选择)
4. IPv4 Address Assignment
Longest Prefix Match
1. Inside the Stream
2. Inside Each Hop
- Each router maintains a routing table.
ARP(Address Resolutioin Protocol)
ARP is used to transform the IP address to Hardware address.
Problems:如何通过IP地址找到使用该IP地址的设备的硬件地址?
- IP地址与硬件地址之间并不存在一个简单的映射关系。
- 在局域网中,经常地会有新主机加入,旧主机撤走。
ARP解决该问题的方法:
在主机的ARP高速缓存中维护一张从IP地址到硬件地址的动态更新的表。