Date post: | 31-Dec-2015 |
Category: |
Documents |
Upload: | jeremy-mills |
View: | 215 times |
Download: | 0 times |
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)
FragmentationFragmentation
Flags (3 bits)Flags (3 bits)– ““More” bitMore” bit– ““Don’t fragment” bitDon’t fragment” bit– UnusedUnused
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
144 16 68 117
255 255 255 0
144 16 68 0
Bit-wise AND
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.* eth0
144.16.68.* eth1
Routing table
Router operationRouter operation
Subnet mask: 255.255.255.0Subnet mask: 255.255.255.0
Router should store thisRouter should store this
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
SupernettingSupernetting
ExampleExample– C1: 194.51.2.0C1: 194.51.2.0– C2: 194.51.3.0C2: 194.51.3.0
33rdrd octet: octet:– 0000 00100000 0010– 0000 00110000 0011
Aggregation: 0000 Aggregation: 0000 001001
Single r.t. entry:Single r.t. entry:– 194.51. <194.51. <0000 001*>0000 001*>.*.*
Mask to be used: 23 Mask to be used: 23 bitsbits
SupernettingSupernetting
N/w C1 N/w C2 N/w C50
Aggr C
Core router
Aggr C
Core router
SupernettingSupernetting
Avoids routing table size explosionAvoids routing table size explosion
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
ClasslessClassless Inter-Domain Routing Inter-Domain Routing