Upload
phan-khanh-duy
View
26
Download
0
Embed Size (px)
DESCRIPTION
Internet Protocol
Citation preview
InternetInternet
Internet: Group of zones wherein equipmentsInternet: Group of zones wherein equipments can directly exchange dataA i t i i d ( )A equipment is assigned one (or more) “logical address” which is globally uniqueN t k l bl k t t b t dNetwork layer: enables a packet to be routed through several zones before reaching its desired destinationdesired destination
2
Simplified view of the InternetSimplified view of the Internet
3
Internet Protocol version 4Internet Protocol version 4
32bits address32bits addressSeveral services are provided including:
R iRoutingLoop avoidanceF t tiFragmentationService priorityCh kChecksumExtensions for future uses
4
I t t P t lInternet Protocol
5
Addressing in InternetworksAddressing in Internetworks
More than one physical networkMore than one physical networkDifferent LocationsLarger number of computersNeed structure in IP addresses
network part identifies which network in the internetwork (e.g. the Internet)host part identifies host on that network
6
Address Structure RevisitedAddress Structure RevisitedHierarchical Division in IP Address:
Network Part (Prefix)Host Part (Host Address)
describes which physical networkdescribes which host on that network
205 . 154 . 8 1
Network Number/Prefix Host Number
Boundary can be anywhereNetwork Host
11001101 10011010 00001000 00000001
7
Boundary can be anywherevery often NOT at a multiple of 8 bits
Classful AddressingClassful Addressing…Divided into 5Divided into 5 classesClass A 8 bits N/W id and 24 bits host id and so on B,C.W t f IPWastage of IP addresses by assigning blocks ofassigning blocks of addresses which fall along octet b d i
8
boundaries
Old-style classes of IP addresses
Just look at the address to tell what class it is.Cl A 0 0 0 0 t 127 255 255 255Class A: 0.0.0.0 to 127.255.255.255
binary 0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxClass B: 128.0.0.0 to 191.255.255.255C ass 8 0 0 0 to 9 55 55 55
binary 10xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxClass C: 192.0.0.0 to 223.255.255.255
binary 110xxxxxxxxxxxxxxxxxxxxxxxxxxxxxClass D: (multicast) 224.0.0.0 to 239.255.255.255
binary 1110xxxxxxxxxxxxxxxxxxxxxxxxxxxxbinary 1110xxxxxxxxxxxxxxxxxxxxxxxxxxxxClass E: (reserved) 240.0.0.0 to 255.255.255.255
9
Implied netmasks of classful ddaddresses
A classful network has a “natural” or “implied” prefixA classful network has a natural or implied prefix length or netmask:
Class A: prefix length /8 (netmask 255.0.0.0)Class B: prefix length /16 (netmask 255.255.0.0)Class C: prefix length /24 (netmask 255.255.255.0)
Old ti t ft d i li d t kOld routing systems often used implied netmasksModern routing systems always use explicit prefix lengths or netmaskslengths or netmasks
10
Traditional subnetting of classful networksclassful networks
Old routing systems allowed a classfulOld routing systems allowed a classful network to be divided into subnets
All subnets (of the same classful net) had to beAll subnets (of the same classful net) had to be the same size and have the same netmaskSubnets could not be subdivided any furtherSubnets could not be subdivided any further
None of these restrictions apply in modern systemssystems
11
Traditional supernettingTraditional supernetting
Some traditional routing systems allowedSome traditional routing systems allowed supernets to be formed by combining adjacent classful netsadjacent classful nets.
e.g. combine two Class C networks (with consecutive numbers) into a supernet withconsecutive numbers) into a supernet with netmask 255.255.254.0
Modern systems use more general classless y gmechanisms.
12
Classless addressingClassless addressing
Forget old Class A Class B Class CForget old Class A, Class B, Class C terminology and restrictionsInternet routing and address managementInternet routing and address management today is classlessCIDR = Classless Inter Domain RoutingCIDR = Classless Inter-Domain Routing
routing does not assume that class A,B,C implies prefix length /8 /16 /24implies prefix length /8,/16,/24
VLSM = Variable-Length Subnet Masksrouting does not assume that all subnets are
13
routing does not assume that all subnets are the same size
Classless addressing exampleClassless addressing example
A large ISP gets a large block of addressesA large ISP gets a large block of addressese.g., a /16 prefix, or 65536 separate addresses
Allocate smaller blocks to customerse.g., a /22 prefix (1024 addresses) to one customer, and a /28 prefix (16 addresses) to another customer
A i ti th t t /22 fi f th iAn organisation that gets a /22 prefix from their ISP divides it into smaller blocks
e g a /26 prefix (64 addresses) for one departmente.g. a /26 prefix (64 addresses) for one department, and a /27 prefix (32 addresses) for another department
14
Network MasksNetwork Masks
Define which bits are used to describe theDefine which bits are used to describe the Network PartDifferent Representations:Different Representations:
decimal dot notation: 255.255.224.0binary: 11111111 11111111 11100000 00000000binary: 11111111 11111111 11100000 00000000
hexadecimal: 0xFFFFE000number of network bits: /19number of network bits: /19
Binary AND of 32 bit IP address with 32 bit netmask yields network part of address
15
netmask yields network part of address
Example Prefixes
137 158 128 0/17 (netmask 255 255 128 0)
Example Prefixes
137.158.128.0/17 (netmask 255.255.128.0)
1000 1001 1001 1110 1 000 0000 00001111 1111 1111 1111 1 000
0000 0000 0000
1000 1001 1001 1110 1 000 0000
0000 0000
1111 1111 1111 1111 0000 0000 0000 0000198.134.0.0/16 (netmask 255.255.0.0)
1100 0110 1000 0110 0000 0000 0000 0000 1111 1111 1111 1111 0000 0000 0000 0000
1111 1111 1111 1111 1111 1111 11 00 0000 205.37.193.128/26 (netmask 255.255.255.192)
16
1100 1101 0010 0101 1100 0001 10 00 0000
Special AddressesSpecial Addresses
All 0’s in host part: Represents NetworkAll 0 s in host part: Represents Networke.g. 193.0.0.0/24e g 138 37 128 0/17e.g. 138.37.128.0/17
All 1’s in host part: Broadcaste g 137 156 255 255 (137 156 0 0/16)e.g. 137.156.255.255 (137.156.0.0/16)e.g. 134.132.100.255 (134.132.100.0/24)e g 190 0 127 255 (190 0 0 0/17)e.g. 190.0.127.255 (190.0.0.0/17)
127.0.0.0/8: Loopback address (127.0.0.1)0 0 0 0 V i i l
17
0.0.0.0: Various special purposes
CIDR Table EntryCIDR Table Entry…Extract the destination IP address.
Boolean AND the IP address with the subnet mask for each entry in the routing tablefor each entry in the routing table.
The answer you get after ANDing is checked with th b dd t di t th b tthe base address entry corresponding to the subnet mask entry with which the destination entry was Boolean ANDed.
If a match is obtained the packet is forwarded to the router with the corresponding base address
18
p g
Network Address TranslationNetwork Address Translation
Each organization- 3 Reserved rangessingle IP address
Within organization
10.0.0.0 – 10.255.255.255 (16,777,216 hosts)
172 16 0 0 – 172 31 255 255/12 (1 048 576 hosts)Within organization –each host with IP unique to the orgn.,
172.16.0.0 172.31.255.255/12 (1,048,576 hosts)
192.168.0.0 – 192.168.255.255/16 (65,536 hosts)
from reserved set of IP addresses
19
NAT ExampleNAT Example10.0.0.4
CC
B
10.0.0.1
SourceComputer
SourceComputer'sIP Address
SourceComputer's
Port
NAT Router'sIP Address
NAT Router'sAssigned
Port Number
A 10.0.0.1 400 24.2.249.4 1
B 10.0.0.2 50 24.2.249.4 2
20
C 10.0.0.3 3750 24.2.249.4 3
D 10.0.0.4 206 24.2.249.4 4
IP v4 problemsIP v4 problems
Need for more IP addressesNeed for more IP addressesDifficult to support mobile IPFragmentation is no longer a requirement
21
Features of IPv6Features of IPv6
Larger Address SpaceLarger Address SpaceAggregation-based address hierarchy
Efficient backbone routing– Efficient backbone routingEfficient and Extensible IP datagramStateless Address AutoconfigurationSecurity (IPsec mandatory)Mobility
22
128 bit IP 6 Add128-bit IPv6 Address3FFE:085B:1F1F:0000:0000:0000:00A9:12343FFE:085B:1F1F:0000:0000:0000:00A9:1234
8 groups of 16-bit hexadecimal numbers separated by “:”g p p y
Leading zeros can be removed
3FFE:85B:1F1F::A9:1234
:: = all zeros in one or more group of 16-bit hexadecimal numbers
23
Header comparison0 15 16 31
vers hlen TOS total length
identification flags flag offset
Removed (6)• ID flags flag offset
20bytes
identification flags flag-offset
TTL protocol header checksum
source address
destination address
• ID, flags, flag offset• TOS, hlen• header checksum
Ch d (3)
IPv4
des o dd ess
options and paddingChanged (3)
• total length => payload• protocol => next header• TTL => hop limit
vers traffic class flow-label
payload length next header hop limitAdded (2)
• TTL => hop limit
• traffic class40
bytessource address
destination addressExpanded
• flow label
dd 32 128 bi
24IPv6• address 32 to 128 bits
Major Improvements of j pIPv6 Header
No option field: Replaced by extensionNo option field: Replaced by extension header. Result in a fixed length, 40-byte IP header.No header checksum: Result in fast processing.processing. No fragmentation at intermediate nodes: Result in fast IP forwardingResult in fast IP forwarding.
25
Extension HeadersExtension HeadersRouting – Extended routing, like IPv4 loose list of routers to visitFragmentation – Fragmentation and reassemblyAuthentication – Integrity and authenticationAuthentication Integrity and authentication, security Encapsulation – ConfidentialityH b H O ti S i l ti th t iHop-by-Hop Option – Special options that require hop-by-hop processingDestination Options – Optional information to be examined by the destination node
26
27