Download presentation
Presentation is loading. Please wait.
1
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 1 Internet Protocol (IP)
2
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 2 Outline Motivation of Internetworking Internet Protocol (IP) IP Packets Classes of Internet Address Datagram Forwarding IP Encapsulation and Address Resolution Fragmentation and Reassembly
3
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 3 Motivation of Internetworking LANs –low cost –limited distance WANs –higher cost –unlimited distance No single networking technology is suitable for all applications Organizations ended up with multiple standalone networks, each designated for a specific task
4
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 4 Universal Service Fundamental concepts in networking Pioneered by telephone system Arbitrary pair of computers can communicate Desirable Difficult in a heterogeneous world – hardware + software, addressing scheme
5
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 5 Incompatibility Many different types of network technologies are in wide-spread use today. –They are incompatible. LAN TechnologiesWAN Technologies EthernetX.25 FastEthernetSMDB Gigabit EthernetFrame Relay Token RingISDN, BISDN Token Bus Phonenet FDDI HIPPI Fibre Channel FireWireATM Transport Layer Network Layer LLC layer MAC Layer
6
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 6 Heterogeneity and Universal Service Incompatibility among networks: –electrical properties –singalling and data encoding –packet formats –addressing schemes –network access mechanisms –routing techniques Incompatibilities among network hardware and physical addressing prevent an organization from building a bridged network that includes arbitrary technologies
7
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 7
8
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 8 An Internetwork Begins with heterogeneous networking technologies Connect the physical networks Using networking software to have a system appears to be homogeneous An internetwork or internet
9
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 9 Connecting Heterogeneous Networks Computer system used –Special-purpose –Dedicated –works with LAN or WAN technologies –Known as internet gateway internet router or, simply, router
10
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 10 Illustration of an Internet Router Cloud denotes arbitrary network technology One interface per network
11
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 11 Important Idea A router can interconnect networks that use different technologies, including different media, media access techniques, physical addressing schemes, or frame formats
12
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 12 Internet Architecture Multiple networks are interconnected by multiple routers Host computer connects to a network Single router for multiple networks may lack reliability and insufficient –CPU power and memory –I/O capability
13
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 13 Goal of Internetworking Enable communication systems to be –Seamless –General purpose –Universal –Hides heterogeneity from users
14
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 14 The Internet Concept
15
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 15 To Hide Heterogeneity Create ‘virtual” network Invent –addressing scheme –naming scheme Implement networking protocol software Protocol software are needed on both the hosts and routers
16
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 16 Outline Motivation of Internetworking Internet Protocol (IP) IP Packets Classes of Internet Address Datagram Forwarding IP Encapsulation and Address Resolution Fragmentation and Reassembly
17
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 17 Internet: History & Developments In mid-1960s, mainframe computers were standalone devices, hardly any communications between computers from different manufacturers In 1960s US Defense Department’s Advance Research Projects Agency (ARPA) commissioned a project to link computers together.
18
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 18 Internet: History & Developments In 1967, idea for ARPANET was formed In 1969, ARPANET linked 4 nodes together In 1973, Vint Cerf and Bob Kahn outlined Transmission Control Protocol (TCP) In 1977, TCP was split into 2 protocols (TCP/IP) with TCP responsible for reliable transfer of data
19
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 19 Internet: History & Developments While Internet Protocol (IP) handles the format and routing of datagram (independent packet) TCP became more popular as UC Berkeley modified the UNIX operating system to include TCP/IP in 1981
20
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 20 INTERNET Protocols Commonly known as TCP/IP Many protocols comprise a suite Designed to work together Divided into five conceptual layer
21
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 21 Layering used with TCP/IP Note: presentation and session layers of the OSI model do not exist in TCP/IP
22
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 22 TCP/IP Protocols Suite * * * *
23
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 23 Internet Protocol (IP) The only layer 3 protocol in the suite Fundamental in the suite Facilitate to send packets across internet composed of multiple routers Defines: –Internet addressing –Internet packet format –Internet routing
24
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 24 IP Semantics IP is connectionless –packet contains destination address –each packet sent/handled independently Routes between sender and receivers can change at any time
25
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 25 IP Semantics (Cont’d) Allows packet to be –delayed –duplicated –delivered out-of-order –lost Called best effort service It is the responsibility of the next higher layer (eg: TCP) to recover from any errors that occur Motivation: accommodate all possible networks
26
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 26 Outline Motivation of Internetworking Internet Protocol (IP) IP Packets Classes of Internet Address Datagram Forwarding IP Encapsulation and Address Resolution Fragmentation and Reassembly
27
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 27 Motivation for IP Packets Because it connect heterogeneous networks, a router cannot transmit a copy of a frame that arrives on one network across another without changing the frame. To accommodate heterogeneity, an internet must define a hardware-independent packet format.
28
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 28 Internet Packets Created and understood by the networking software Contains sender and destination addresses Size depends on data being carried Called IP datagrams
29
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 29 The Two Parts of an IP Datagram Header –20 octets –contains sender and destination addresses –fixed-size fields Payload –variable size, header+payload up to 64K octets –no minimum size
30
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 30 IP Packet Header Three Key fields –source IP address –destination IP address –type (of data)
31
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 31 Outline Motivation of Internetworking Internet Protocol (IP) IP Packets Classes of Internet Address Datagram Forwarding IP Encapsulation and Address Resolution Fragmentation and Reassembly
32
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 32 IP Addressing Independent of hardware addressing Used by –higher layer protocols –applications
33
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 33 IP Address Used for all communications a 32-bit binary number Unique value for each network interface –An IP address does not identify a specific computer. –Each IP address identifies a connection between a computer and a network. A computer with multiple network connections (eg. a router) have one IP address for each connection
34
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 34 IP Address Divided into two parts –Prefix identifies network –Suffix identifies host Global authority assigns unique prefix to network Local administrator assigns unique suffix to host
35
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 35 Classes of Addressing Scheme Initial bits determine class Class determines boundary between prefix and suffix
36
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 36 Dotted Decimal Notation Shorthand for IP Address Use decimal instead binary numbers Represents each octet in decimal separated by dots NOT the same as names like www.somewhere.com
37
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 37 Example of Dotted Decimal Notation Four decimal values per 32-bit address Each decimal number –represents eight bits –between 0 to 255 Question: 144.214.40.135 is an IP address belonging to CityU. What is CityU’s network class type and network number?
38
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 38 Classes and Network Sizes Maximum network size determined by class of address Class A – (0 - 127) large Class B – (128 -191) medium Class C – (192 - 223) small Class D – (224 – 239) multicasting Class E – (240 – 255) reserved for future use
39
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 39 Addressing Example
40
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 40 Illustration of Router Addresses Address prefix identifies network Need one IP address per interface
41
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 41 Special Addresses Addresses never assigned to host
42
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 42 Outline Motivation of Internetworking Internet Protocol (IP) IP Packets Classes of Internet Address Datagram Forwarding IP Encapsulation and Address Resolution Fragmentation and Reassembly
43
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 43 IP Datagram Forwarding Performed by routers table-driven*, entry specifies next hop next-hop is either router or destination *how to construct routing tables is discussed in IP Routing Protocols Conceptual routing table of R 2 :
44
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 44 Example of an IP routing Table Table (b) is for center router in part (a)
45
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 45 Routing Table Size Because each destination in a routing table corresponds to a network, the number of entries in a routing table is proportional to the number of networks in an internet In practice, a routing table contains a default route that corresponds to all destinations not explicitly listed. This technique keeps routing table sizes small.
46
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 46 Datagram Forwarding Given a datagram extracts destination address field, D find entry i such that ((Mask[i] AND D) == Destination[i]) and forward to NextHop[i] If no such an entry can be found, use the default route example: given D is 192.4.10.3, based on the example routing table, 255.255.255.0 AND 192.4.10.3 == 192.4.10.0 128.1.0.9 is the next hop address. The use of mask in here seems trivial, but it is useful when subnetting is deployed.
47
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 47 Key Concept The destination address in a datagram header always refers to the ultimate destination. When a router forwards the datagram to another router, the address of the next hop does not appear in the datagram header
48
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 48 Outline Motivation of Internetworking Internet Protocol (IP) IP Packets Classes of Internet Address Datagram Forwarding IP Encapsulation and Address Resolution Fragmentation and Reassembly
49
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 49 Datagram Delivery over a Single Network Once a next hop address has been found, IP software transfers the packet across ONE physical network to the selected host or router This is done by encapsulating the datagram in a physical frame and sends the resulting frame directly to the selected host or router
50
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 50 An Example
51
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 51 Illustration of IP Encapsulation Entire datagram treated like data Frame type identifies contents as IP datagram Frame destination address needs next hop hardware address Note that the datagram AND the next hop IP address are passed to the network interface hardware for packet delivery
52
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 52 Problem IP address cannot be used when transmitting frames across physical network because the interfacing hardware does not understand IP addressing Hardware only recognizes physical address Consequence: software needed to perform address translation –part of network interface –known as address resolution
53
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 53 Address Resolution Layer 2 protocol Given –a locally connected network, N –IP address C of host/router on N Find –physical address for C Technique –Address Resolution Protocol
54
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 54 Address Resolution Protocol (ARP) Keep address bindings in table Table entry contains pair of addresses for one computer –IP address –physical address Build table automatically as needed
55
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 55 ARP Table Only contains entries for computers on local networks IP network prefix in all entries identical
56
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 56 ARP Look-up Algorithm Look for IP address, T, in ARP table If not found –broadcast ARP request message –receive reply with T’s hardware address –add entry to table
57
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 57 Illustration of ARP Exchange W needs Y’s hardware address Request sent via broadcast Reply sent via unicast
58
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 58 ARP Message Format (for Ethernet) Length of hardware address fields depend on network type Ethernet use 48-bit addresses
59
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 59 Sending an ARP Message ARP message sent in payload area of frame
60
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 60 Frame Type Frame type identifies message as ARP Receiver examines frame type to decide what action should be taken
61
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 61 Important Note Because ARP software is part of the network interface software, all higher layer protocols and applications can use IP addresses exclusively, and completely unaware of hardware addresses
62
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 62 Outline Motivation of Internetworking Internet Protocol (IP) IP Packets Classes of Internet Address Datagram Forwarding IP Encapsulation and Address Resolution Fragmentation and Reassembly
63
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 63 Internet Transmission Paradigm (General Case) Source host –forms datagram –includes destination address –sends to nearest router Intermediate router –forward datagram to next router Final router –delivers to destination host
64
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 64 Illustration of Frame Headers Used for Datagram Transmission Each hop extracts datagram and discards frame
65
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 65 Maximum Frame Size Each network technology imposes maximum frame size called Maximum Transmission Unit (MTU) In general, MTUs are different for different networks Internet –contains heterogeneous technologies –must accommodate multiple MTUs
66
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 66 How Two MTUs Cause a Problem for IP? Host 1 –creates datagram for host 2 –chooses datagram size of 1500 octets –transmits datagrams across network 1 Router R –receives datagram over network 1 –must send datagram over network 2 –employs fragmentation
67
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 67 Datagram Fragmentation Performed by routers Needed when datagram is larger than MTU of network Divides datagram into pieces called fragments Each fragment has datagram header Fragments are sent separately Ultimately destination reassembles fragments
68
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 68 Illustration of Datagram Fragmentation Each fragment has the same IP datagram header Header fields –identify the original datagram –indicate where this fragment fits (Fragment Offset)
69
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 69 Example of Reassembly Host H 1 generates 1500-octet datagram Router R 1 fragments Router R 2 transmits fragments Host H 2 reassembles
70
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 70 Identifying a Datagram Fragments of a datagram may arrive out of order, destination needs to know how to identify them Source places a unique ID in the IDENTIFICATION field of each outgoing datagram When fragments are created, the ID is retained A bit in the FLAGS field indicate whether the datagram is a fragment Destination identifies fragments based on the ID and source IP address the FRAGMENT OFFSET tells receiver how to order fragments IP specifies a max time to hold fragments (avoid in waiting lost fragments)
71
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 71 Multiple Fragmenting Points Let MTUs along internet be –1500 –1000 –1500 –576 –1500 Result: fragmentation can occur twice
72
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 72 Fragmenting a fragment Needed when fragment is too large for network MTU Arbitrary sub-fragmentation possible Router divides fragments into smaller pieces All fragments are at the same “level” –Offset given with respect to original datagram –Destination cannot distinguish sub-fragments
73
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Internet Protocol (IP) Slide 73 Fragment Loss Receiver –collects incoming fragments –reassembles when all fragments arrive –cannot identity the router which performed the fragmentation –cannot request missing pieces Consequences: loss of one fragment means the entire datagram is lost
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.