Fragmentation Fragmentation Fragmentation and reassembly are done Fragmentation and reassembly are done by the IP layer by the IP layer Identification (16 bits) Identification (16 bits) – To identify fragments as pieces of the To identify fragments as pieces of the original (along with source and original (along with source and destination addresses, and “protocol” destination addresses, and “protocol” field) field)
22
Embed
Fragmentation Fragmentation and reassembly are done by the IP layer Fragmentation and reassembly are done by the IP layer Identification (16 bits) Identification.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
FragmentationFragmentation
Fragmentation and reassembly are done by Fragmentation and reassembly are done by the IP layerthe IP layer
Identification (16 bits) Identification (16 bits)
– To identify fragments as pieces of the original To identify fragments as pieces of the original (along with source and destination addresses, (along with source and destination addresses, and “protocol” field)and “protocol” field)
Offset (13 bits)Offset (13 bits)– Offset in 8-byte units from the beginning of Offset in 8-byte units from the beginning of
the payload of the originalthe payload of the original
FragmentationFragmentation
Id = abcd
Frag 1
Frag 2
Id = abcd,More = 1,Offset = 0
Id = abcd,More = 0,Offset = x
FragmentationFragmentation Each fragment becomes a packet on its ownEach fragment becomes a packet on its own
– Routed independently of othersRouted independently of others
Reassembly timer at receiverReassembly timer at receiver
– If all fragments do not arrive by the reassembly time-If all fragments do not arrive by the reassembly time-out, original packet cannot be obtainedout, original packet cannot be obtained
– ICMP error generatedICMP error generated
IP: RFC 791IP: RFC 791
Class B address: 144.16.x.y
144.16.68.22
144.16.68.25144.16.68.8
144.16.64.3
144.16.64.37
To theInternet
eth0
eth1
144.16.64.3 eth0
144.16.64.37 eth0
144.16.68.22 eth1
144.16.68.25 eth1
Routing table
ProblemProblem
Too many entriesToo many entries
No way to aggregateNo way to aggregate
Can we Can we “extend” “extend” the network-id the network-id somehow?somehow?
SubnettingSubnetting
The bits in the hostid part are further The bits in the hostid part are further divided:divided:
netid hostid
subnetid hostid
Subnet masksSubnet masks
To extract the To extract the netidnetid and and subnetidsubnetid parts parts from the IP addressfrom the IP address
String of 1-s with trailing 0-s in the String of 1-s with trailing 0-s in the hostid hostid partpart
Apply it to the D.A. field of incoming Apply it to the D.A. field of incoming packetpacket
Compare with 144.16.64.0 and Compare with 144.16.64.0 and 144.16.68.0144.16.68.0
ForwardingForwarding
Compact routing tableCompact routing table
Example was with a routerExample was with a router– Same considerations for a host with multiple Same considerations for a host with multiple
interfacesinterfaces
N/w C1 N/w C2 N/w C50
N/w C1 N/w C2 N/w C50
Without subnetting
C1
C2
…
C50
Core routerC1
C2
…
C50
Core router
SubnettingSubnetting
Imagine now that instead of 50 Class C Imagine now that instead of 50 Class C addresses, the organizations shared a addresses, the organizations shared a single Class B address with subnettingsingle Class B address with subnetting
With subnetting
B
Core routerB
Core router
B1
B2
…
B50
Edge router
Subnetting: drawbacksSubnetting: drawbacks The size of the routing tables in the The size of the routing tables in the core routers core routers
decreasesdecreases
But problem: a class B address is used up!But problem: a class B address is used up!
With 50 Class C addresses: 50x254=12700 hostsWith 50 Class C addresses: 50x254=12700 hosts
With a Class B address: 65534 hosts!With a Class B address: 65534 hosts!– Many addresses likely to be unusedMany addresses likely to be unused
Class B address space starting to get exhaustedClass B address space starting to get exhausted
Earlier example againEarlier example again
N/w C1 N/w C2 N/w C50
C1
C2
…
C50
Core routerC1
C2
…
C50
Core router
Aggregation again?Aggregation again?
What if the 50 Class C addresses are What if the 50 Class C addresses are allocated “nicely”, so that they can be allocated “nicely”, so that they can be aggregated?aggregated?
Leads to the idea of Leads to the idea of supernettingsupernetting
Also avoids wasted (unused) IP addressesAlso avoids wasted (unused) IP addresses
A “best of both worlds” solutionA “best of both worlds” solution
Key: allocate Class C addresses Key: allocate Class C addresses appropriately, so that aggregation is appropriately, so that aggregation is possiblepossible
CIDRCIDR With classes A, B and C, the number of With classes A, B and C, the number of
netid bits (i.e., “netmask length”) is netid bits (i.e., “netmask length”) is implicitly fixed: implicitly fixed: 8, 16 and 248, 16 and 24
But with aggregation, variable-length But with aggregation, variable-length netmasks are necessarynetmasks are necessary