Professional Documents
Culture Documents
7 Network Layer IPv4
7 Network Layer IPv4
7 Network Layer IPv4
OPM
OPM
OPM
IPv4
IPv4 was described in RFC 791 (September 1981).
IPv4 is a connectionless protocol for use on Packet switched
networks.
OPM
IPv4 (cont.)
IPv4 uses 32 bits addresses, which limits the address space
to 4294967296 (232) addresses.
IPv4 address exhaustion (occurred on February 3, 2011)
significantly delayed by following addressing changes such as
OPM
OPM
These IP addresses are not routable outside of private networks, and private
machines cannot directly communicate with public networks.
They can, however, do so through network address translation (NAT).
OPM
OPM
OPM
10
OPM
11
OPM
12
OPM
13
OPM
14
OPM
15
NAT implementation
OPM
16
Addresses in a NAT
OPM
17
OPM
18
OPM
19
7 8
version
header
length
15 16
ECN
DS
Identification
time-to-live (TTL)
23
D M
F F
protocol
Fragment offset
header checksum
source IP address
destination IP address
options (0 to 40 bytes)
payload
4 bytes
24
31
OPM
21
OPM
22
OPM
23
24
25
26
Destination address: This field is the IPv4 address of the receiver of the packet. As with the
source address, this may be changed in transit by a Network Address
Translation device.
OPM
27
Copy : Set to 1 if the options need to be copied into all fragments of a fragmented packet.
Option Class : options category. 0 is for datagram or network control" options, and 2 is
for "debugging and measurement". 1, and 3 are reserved.
Option Number : value 0 for end of option list, 3 for loose source route, 7 for record
route, 9 for strict source route, 11 for MTU probe, 18 for traceroute program to find
routers along a path etc.
OPM
28
Address spoofing
Sender can put any source address in packets he sends:
Can be used to send undesired return traffic to the spoofed address
Can be used to bypass filters to send undesired traffic to the destination
OPM
29
Fragmentation
May need to fragment an IP packet if one data link along the way
cannot handle the packet size
Perhaps path is a mix of different Hardwares.
Perhaps unexpected encapsulation makes the packet larger than the source
expected
Hosts try to understand Maximum Transmission Unit (MTU) to avoid the
need for fragmentation (which causes a performance hit)
Any device along the way can fragment (in IPv4 only)
OPM
30
To route a packet, take the destination address and find the best match
network in the table. In case of a tie look at the metric
Use the corresponding next hop address and interface to send the packet on.
The next hop address is on the same link as this device, so you use the next
hops data-link address, e.g. ethernet MAC address
Decrement time to live field in IP header at each hop. Drop packet when
it reaches 0
OPM
31
OPM
32
OPM
33