ip : internet protocol addresses rsc.asst.kamil serhan bilman 2000900595
TRANSCRIPT
IP : Internet Protocol IP : Internet Protocol AddressesAddresses
Rsc.Asst.Kamil Serhan BilmanRsc.Asst.Kamil Serhan Bilman
20009005952000900595
What is an IP address?What is an IP address?
An IP address is a unique global address An IP address is a unique global address for a network interfacefor a network interface
An IP address:An IP address: is a is a 32 bit long 32 bit long identifieridentifier encodes a network number encodes a network number (network prefix(network prefix) )
and a and a host numberhost number
The Abstract AddressesThe Abstract Addresses
To provide uniform addressing in an To provide uniform addressing in an internet, protocol software defines an internet, protocol software defines an abstract addressing scheme that assigns abstract addressing scheme that assigns each host a unique address.each host a unique address.
Users, application programs, and higher Users, application programs, and higher layers of protocol software use the layers of protocol software use the abstract addresses to communicate.abstract addresses to communicate.
The IP Addressing SchemeThe IP Addressing Scheme
Each host is assigned a unique 32-bit Each host is assigned a unique 32-bit number known as the host’s Internet number known as the host’s Internet Protocol address.Protocol address.
To transmit information across a TCP/IP To transmit information across a TCP/IP (Transmission control protocol) internet, a (Transmission control protocol) internet, a computer must know the IP addres of the computer must know the IP addres of the destination and the source.destination and the source.
Important Properties of IPv4Important Properties of IPv4
32-bit address32-bit address HierarchicalHierarchical
Network, subnet, host hierarchyNetwork, subnet, host hierarchy Each computer is assigned a unique addressEach computer is assigned a unique address Network number assignments must be coordinated Network number assignments must be coordinated
globally.globally. Divided into two parts : prefix and suffixDivided into two parts : prefix and suffix
Different physical networks – different prefixesDifferent physical networks – different prefixes Same physical network – different suffixesSame physical network – different suffixes
Dotted Decimal NotationDotted Decimal Notation
IP addresses are written in a so-called IP addresses are written in a so-called dotted decimal dotted decimal notationnotation
Each byte is identified by a decimal number in the range Each byte is identified by a decimal number in the range [0..255]:[0..255]:
Classes of IP AddressesClasses of IP Addresses
ClassClass FromFrom ToTo
AA 0.0.0.00.0.0.0 127.255.255.255127.255.255.255
BB 128.0.0.0128.0.0.0 191.255.255.255191.255.255.255
CC 192.0.0.0192.0.0.0 223.255.255.255223.255.255.255
DD 224.0.0.0224.0.0.0 239.255.255.255239.255.255.255
EE 240.0.0.0240.0.0.0 255.255.255.255255.255.255.255
Special IP AddressesSpecial IP Addresses
Reserved addressesReserved addresses 127.0.0.1127.0.0.1 loopback addressloopback address Suffix is all 0sSuffix is all 0s name of the networkname of the network Suffix is all 1sSuffix is all 1s broadcast on the networkbroadcast on the network Prefix & suffix 0sPrefix & suffix 0s this computerthis computer
Special addresses are reserved and Special addresses are reserved and should never be assigned to host should never be assigned to host computers.computers.
ProblemsProblems
Too few network addresses for large networksToo few network addresses for large networks Class A and Class B addresses are goneClass A and Class B addresses are gone
Two-layer hierarchy is not appropriate for large networks Two-layer hierarchy is not appropriate for large networks with Class A and Class B addresses.with Class A and Class B addresses.
SubnettingSubnetting InflexibleInflexible.. Exploding Routing Tables: Routing on the backbone Exploding Routing Tables: Routing on the backbone
Internet needs to have an entry for each network Internet needs to have an entry for each network address. In 1993, the size of the routing tables started to address. In 1993, the size of the routing tables started to outgrow the capacity of routers.outgrow the capacity of routers.
The Internet is going to outgrow the 32-bit addressesThe Internet is going to outgrow the 32-bit addresses IP Version 6IP Version 6
SubnettingSubnetting
Part of the host number (suffix) can be used to identify a Part of the host number (suffix) can be used to identify a (sub) network(sub) network
IP address space has a 3-level hierarchyIP address space has a 3-level hierarchy Hosts and routers need to know the subnetmaskHosts and routers need to know the subnetmask
Subnetting with mask 255.255.255.0 is quite common.Subnetting with mask 255.255.255.0 is quite common.
Advantages of SubnettingAdvantages of Subnetting Improves efficiency of IP addresses by not Improves efficiency of IP addresses by not
consuming an entire Class B or Class C address consuming an entire Class B or Class C address for each physical networkfor each physical network
Reduces router complexity. Since external Reduces router complexity. Since external routers do not know about subnetting, the routers do not know about subnetting, the complexity of routing tables at external routers is complexity of routing tables at external routers is reduced.reduced.
With subnetting, IP addresses use a 3-layer With subnetting, IP addresses use a 3-layer hierarchy:hierarchy: NetworkNetwork SubnetSubnet HostHost
IPv4 Address ModelIPv4 Address Model
IP addressesIP addresses Decimal-dot notationDecimal-dot notation Host in class A networkHost in class A network
• 56.0.78.10056.0.78.100 www.usps.govwww.usps.gov Host in class B networkHost in class B network
• 128.174.252.1128.174.252.1 www.cs.uiuc.eduwww.cs.uiuc.edu Host in class C networkHost in class C network
• 198.182.196.56 198.182.196.56 www.linux.orgwww.linux.org
Internet domain namesInternet domain names ASCII strings separated by periodsASCII strings separated by periods Provides some administrative hierarchyProvides some administrative hierarchy
• host.subdomain.domain.domain_type (com, edu, gov, org, …)host.subdomain.domain.domain_type (com, edu, gov, org, …)• host.domain.country (us, de, jp, …)host.domain.country (us, de, jp, …)
IPv4 Address TranslationIPv4 Address Translation
IP addresses to LAN physical addressesIP addresses to LAN physical addresses ProblemProblem
• An IP route can pass through many physical networksAn IP route can pass through many physical networks• Data must be delivered to destination’s physical networkData must be delivered to destination’s physical network• Hosts only listen for packets marked with physical interface Hosts only listen for packets marked with physical interface
namesnames SolutionSolution
• Translate from IP address to physical addressTranslate from IP address to physical address• Address Resolution Protocol (ARP)Address Resolution Protocol (ARP)
Internet domain name to IP addressInternet domain name to IP address Domain to IP translationDomain to IP translation
• Domain Name Service (DNS)Domain Name Service (DNS)
IP to Physical AddressIP to Physical AddressTranslationTranslation
Hard-codedHard-coded Encode physical address in IP addressEncode physical address in IP address Ex: Map Ethernet addresses to IP addressesEx: Map Ethernet addresses to IP addresses
• Makes it impossible to associate address with topologyMakes it impossible to associate address with topology
Fixed tableFixed table Maintain a central repository and distribute to hostsMaintain a central repository and distribute to hosts
• Bottleneck for queries and updatesBottleneck for queries and updates
Automatically generated tableAutomatically generated table Use ARP to build table at each hostUse ARP to build table at each host Use timeouts to clean up tableUse timeouts to clean up table
ARPARP Check table for physical addressCheck table for physical address If address not presentIf address not present
Broadcast a query, include host’s translationBroadcast a query, include host’s translation Wait for a responseWait for a response
Upon receipt of ARP query/responseUpon receipt of ARP query/response Targeted host responds with address translationTargeted host responds with address translation If address already presentIf address already present
• Refresh entry and reset timeoutRefresh entry and reset timeout If address not presentIf address not present
• Add entry for requesting hostAdd entry for requesting host• Ignore for other hostsIgnore for other hosts
Timeout and discard entriesTimeout and discard entries
ARP PacketARP Packet
Hardware typeHardware type Type of physical network (e.g. Ethernet)Type of physical network (e.g. Ethernet)
Protocol typeProtocol type Higher layer protocol (e.g. IP)Higher layer protocol (e.g. IP)
HLENHLEN Hardware (link-layer) address lengthHardware (link-layer) address length
PLENPLEN Protocol address lengthProtocol address length
OperationOperation Request or responseRequest or response
Source and target hardware addressSource and target hardware address Source and target protocol addressSource and target protocol address
IP Packet FormatIP Packet Format
4-bit version4-bit version IPv4 = 4, IPv6 = 6IPv4 = 4, IPv6 = 6
4-bit header length4-bit header length Counted in words, minimum of 5Counted in words, minimum of 5
8-bit type of service field (TOS)8-bit type of service field (TOS) Mostly unusedMostly unused
16-bit data length16-bit data length Counted in bytesCounted in bytes
IP Packet FormatIP Packet Format
Fragmentation supportFragmentation support 16-bit packet ID16-bit packet ID
• All fragments from the same packet have the same IDAll fragments from the same packet have the same ID 3-bit flags3-bit flags
• 1-bit to mark last fragment1-bit to mark last fragment 13-bit fragment offset into packet13-bit fragment offset into packet
• Counted in wordsCounted in words
8-bit time-to-live field (TTL)8-bit time-to-live field (TTL) Hop count decremented at each routerHop count decremented at each router Packet is discard if TTL = 0Packet is discard if TTL = 0
IP Packet FormatIP Packet Format 8-bit protocol field8-bit protocol field
TCP = 6, UDP = 17TCP = 6, UDP = 17 16-bit IP checksum on header16-bit IP checksum on header 32-bit source IP address32-bit source IP address 32-bit destination IP address32-bit destination IP address OptionsOptions
Variable sizeVariable size Source-based routingSource-based routing Record routeRecord route
PaddingPadding Fill to 32-bit boundariesFill to 32-bit boundaries
IP Fragmentation andIP Fragmentation andReassemblyReassembly
ProblemProblem Different physical layers provide different limits on Different physical layers provide different limits on
frame lengthframe length• Maximum transmission unit (MTU)Maximum transmission unit (MTU)
Source host does not know minimum valueSource host does not know minimum value• Especially along dynamic routesEspecially along dynamic routes
SolutionSolution When necessary, split IP packet into acceptably sized When necessary, split IP packet into acceptably sized
packets prior to sending over physical linkpackets prior to sending over physical link QuestionsQuestions
• Where should reassembly occur?Where should reassembly occur?• What happens when a fragment is damaged/lost?What happens when a fragment is damaged/lost?
IP Fragmentation andIP Fragmentation andReassemblyReassembly
Fragments are self-contained IP packetsFragments are self-contained IP packets Reassemble at destination to minimize Reassemble at destination to minimize
refragmentationrefragmentation Drop all fragments in packet if one or more Drop all fragments in packet if one or more
fragments are lostfragments are lost Avoid fragmentation at source hostAvoid fragmentation at source host
Transport layer should send packets small enough to Transport layer should send packets small enough to fit into one MTU of local physical networkfit into one MTU of local physical network
• Must consider IP headerMust consider IP header
Host ConfigurationHost Configuration What configuration information does a host What configuration information does a host
need?need? Its IP addressIts IP address Default router addressDefault router address
Reverse Address Resolution Protocol (RARP)Reverse Address Resolution Protocol (RARP) Translate physical address to IP addressTranslate physical address to IP address Used to boot diskless hostsUsed to boot diskless hosts Host broadcasts request to bootHost broadcasts request to boot RARP server tells host the host’s own IP addressRARP server tells host the host’s own IP address
Implementation at a higher levelImplementation at a higher level DHCPDHCP
Dynamic Host ConfigurationDynamic Host ConfigurationProtocol (DHCP)Protocol (DHCP)
A simple way to automate configuration A simple way to automate configuration informationinformation Network administrator does not need to enter Network administrator does not need to enter
host IP address by handhost IP address by hand Good for large and/or dynamic networksGood for large and/or dynamic networks
Internet Control MessageInternet Control MessageProtocol (ICMP)Protocol (ICMP)
Handles error and control messagesHandles error and control messages Error MessagesError Messages
Host unreachableHost unreachable Reassembly failedReassembly failed IP checksum failedIP checksum failed TTL exceeded (packet dropped)TTL exceeded (packet dropped) Invalid headerInvalid header
Control MessagesControl Messages Echo/ping request and replyEcho/ping request and reply Echo/ping request and reply with timestampsEcho/ping request and reply with timestamps Route redirectRoute redirect
IPv6 – IP version 6IPv6 – IP version 6
Is the successor to the currently used IPv4Is the successor to the currently used IPv4 Specification completed in 1994Specification completed in 1994 Makes improvements to IPv4 (no revolutionary changes)Makes improvements to IPv4 (no revolutionary changes)
One feature of IPv6 is a significant increase of the IP One feature of IPv6 is a significant increase of the IP address to 128 bits (16 bytes)address to 128 bits (16 bytes)
IPv6 will solve – for the foreseeable future – the problems with IPv6 will solve – for the foreseeable future – the problems with IP addressingIP addressing
IPv6 versus IPv4IPv6 versus IPv4
IPv4 has a maximum ofIPv4 has a maximum of 2232 32 ~~ 4 billion addresses 4 billion addresses
IPv6 has a maximum ofIPv6 has a maximum of 22128128 ~~ (2 (23232))44
4 billion x 4 billion x 4 billion x 4 billion 4 billion x 4 billion x 4 billion x 4 billion addressesaddresses