slides for ip
TRANSCRIPT
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 1/40
Dept. of ECE, GMU, Dr. TCOM 509 - 20121
Lecture 1
Introduction (Chapter 1) &
Concept (Chapter 3) &
Classful Address (Chapter 4)
Qiang Lin, Ph.D
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 2/40
Dept. of ECE, GMU, Dr. TCOM 509 - 20122
Local Area Network (LAN)
A computer
network
cover ing a small
physical area,
like a home, off ice, or small
group of
buildings, such
as a school, or
an airport
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 3/40
Dept. of ECE, GMU, Dr. TCOM 509 - 20123
W ide Area Network ( W AN)
A computer
network that
covers a broad
area, i.e., any
network whose
communicationslinks cross
metropolitan,
regional, or
national
boundar ies
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 4/40
Dept. of ECE, GMU, Dr. TCOM 509 - 20124
W ide Area Network ( W AN) (cont)
A computer
network that
covers a broad
area, i.e., any
network whose
communicationslinks cross
metropolitan,
regional, or
national
boundar ies
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 5/40
Dept. of ECE, GMU, Dr. TCOM 509 - 20125
Internetworking (Internet) ± network of networks
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 6/40
Dept. of ECE, GMU, Dr. TCOM 509 - 20126
Inter net is a global computer network ± Consisting of a wor ldwide network of computer networks
± Using TCP/IP network protocols to f acilitate data tr ansmission and exchange
Often confused with Wor ld Wide Web, Inter net refers to: ± Combined collection of academic, commercial, and gover nment
networks connected over inter national telecommunication backbones
± Routed using IP addressing
Internetworking (Internet) ± definitions
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 7/40
Dept. of ECE, GMU, Dr. TCOM 509 - 20127
No single network har dware technology can satisfy all constr aints ± Economic and technical
± High speed and inexpensive LANs only cover short distances
± WANs that span long distances cannot supply local communications chea ply
Users desire universal interconnection ± Users wou ld like to communicate between any two points, not constr ained
by boundar ies of physical networks
T wo fundamental observations
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 8/40
Dept. of ECE, GMU, Dr. TCOM 509 - 20128
Based on TCP/IP (Tr ansmission Control Protocol/Inter net Protocol) suite to esta blish the basisto: ± Build a unif ied, cooper ative interconnection of networks
± Supports a universal communication service
± Within each network , computers will use under lying technology-dependent communication f acilities
± New software, inserted between technology-dependentcommunication mechanisms and a pplication progr ams, will hide low-level details and make collection of networks a ppear to be a single, lar ge network , called internetwork or internet -why lower case?
Internetworking (Internet) ± goals
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 9/40
Dept. of ECE, GMU, Dr. TCOM 509 - 20129
Based on TCP/IP (Tr ansmission Control Protocol/Inter net Protocol) suite to esta blish the basis to:
± Accommodate multi ple, diverse under lying har dwaretechnologies
± Accommodate a wide var iety of a pplications and arbitr ary
computer oper ating systems ± Interconnect millions of networks and billions of computer
± Not engineered from a single network ing technology because notechnology suff ices for all uses
± Hide details of network har dware so computers to communicateindependent of their physical network connection
Internetworking (Internet) ± objectives
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 10/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201210
Provide syntactic and semantic rules for communication ± Contain details of message formats
± Descr i be how a computer responds when a message arr ives
± Specify how a computer handles errors or other a bnormal conditions
Allow us to discuss computer communication independent of any particular vendor¶s network har dware
Improve productivity because of dealing with higher-level protocol a bstr actions
± Progr ammers do not need to lear n or remember details a bout a given har dware
± Progr ams do not need to be changed when computers or network har dware are replaced or reconf igured
± A pplications can provide direct communication between an arbitr ary pair of computers
T CP/IP Protocol ± features and benefits
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 11/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201211
Inter net a pplication progr ams exhi bit a high degree of interoper a bility
± Most users accessing Inter net by running a pplication progr ams withoutunderstanding
Types of computers being accessed
TCP/IP technology
Structure of under lying inter nets
Path the data tr avels to its destination
± Only a pplication progr ammers need to view a TCP/IP inter net as a network and need to understand some technology
T CP/IP Protocol ± interoperability and abstraction
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 12/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201212
Wor ld Wide Web ± Allows user to view documents that contain text and gr a phics and to
follow hypermedia links from one document to another
Electronic Mail (e-mail) allows users to
File tr ansfer allows users to send or receive data f iles ± The o ldest and still heavily used
Remote login and remote desktop allows a user sitting at onecomputer to connect to a remote machine and use it as local
± Keystrokes are sent to the remote machine ± Display from the remote machine a ppears on the user¶s screen
Internet application services
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 13/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201213
TCP/
IP provides two broad types of service that all a pplication progr ams use
± Connectionless packet delivery service Best-effort delivery
Not guar antee relia ble, in or der delivery
Extremely eff icient
± Relia ble stream tr ansport service, connection-or iented To recover tr ansmission errors, lost packets, or f ailures of switches
along the path between sender and receiver
Allows an a pplication on one computer to esta blish a ³connection´ withan a pplication one another computer
Then, to send a lar ge volume of data across the connection as if it were
permanent, direct connection
Network level Internet services
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 14/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201214
Ear ly concept tointerconnectheterogeneousnetworks througha pplication-level
progr ams called
a pplication gateways ± An a pplication-level
progr am executing on each computer in thenetwork
± It understands details of network connections
for that computer and interoper ates acrossthose connections witha pplication progr amson other computers
Application-level interaction
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 15/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201215
May seen natur al at f irst, but results in limited, cumbersomecommunication ± Adding new functionality means building a new a pplication progr am for such
computer
± Adding new network har dware means modifying existing progr ams or creating new progr ams for each possi ble a pplication
± On a given computer , each a pplication progr am must understand the network
connections for the computer , resulting in duplication of code
Once interconnections grow to hundreds or thousands of networks, it f ails to scale because ± No one can possi bly build all necessary a pplication progr ams
Application-level interaction (cont)
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 16/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201216
An alter native to a pplication-level interconnection ± Provides a mechanism that delivers small packets of data, instead of
f iles or lar ge messages, from source to ultimate destination withoutusing intermed iate a pplication progr am
Network-level interaction
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 17/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201217
It ma ps directly onto the under lying network har dware ± Make it extremely eff icient
Separ ates data communication activities from a pplication progr ams ± Permit intermediate computers to handle network tr aff ic without
understanding a pplications that are sending or receiving
Keep entire system f lexi ble ± Make it possi ble to build gener al purpose communication f acilities
Allows network managers to easily add new network technologies ± By modifying or adding a single piece of new network-level software
while a pplication progr ams remain unchanged
Network-level interaction (cont)
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 18/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201218
Internet architecture
How are networks interconnected to form an inter network? ± Physically, two networks can only be connected by a computer that attaches to
both of them
± However , a physical attachment does not guar antee interconnection becausecomputers may not cooper ate with others that wish to communicate
Need a special computers, routers, are willing to tr ansfer packets from one network to another
± Each network , net1, net2 and net3, can be either LAN or WAN
± Each may have many computers or a few attached
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 19/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201219
Routers ± small computers
An inter net includes many networks and routers
Each router needs to k now a bout the topology of the inter net beyond the networks to which it connects
± For a lar ge inter net composed of many networks, it is complex for routers todetermine where to send packets
Routers used with TCP/IP inter nets are usually small computers ± Have little disk stor age and modest main memor ies
± We c an build a small inter net router because routers use dest inat ionnetwork, not dest inat ion computer, when forward ing a packet
± Therefore, a router only needs to keep information proportional tonumber of networks in the inter net, not the number of computers
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 20/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201220
T wo views of internet
Host
User vi
TCP/IP treats all networks equally ± A LAN like an Ether net, a WAN used as a backbone or a point-to-point link
between two computers each count as one network
± Ensure each network is reacha ble
Inter net (inter net) ± Single lar ge (global) network
± User¶s computers are all attached directly
± No other structure visi ble
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 21/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201221
Source computer
± Gener ates a packet
± Sends across one network to a router
Intermediate router(s)
± Forwar ds (³routes´) packet to µµnext¶¶ router
Final router
± Delivers packet to destination
Packet transmission paradigm
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 22/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201222
T CP/IP history
The TCP/IP protocols were initially developed as part of the researchnetwork developed by the United States Defense Advanced ResearchProjects Agency (DARPA or ARPA). Initially, this f ledgling network , called the ARPAnet, was designed to use a number of protocols that had been ada pted from existing technologies. However , they all had f laws or limitations, either in concept or in pr actical matters such as ca pacity, when used on the ARPAnet. The developers of the new network recognized that
trying to use these existing protocols might eventually lead to problems asthe ARPAnet scaled to a lar ger size and was ada pted for newer uses and a pplications.
In 1973, development of a full-f ledged system of inter network ing protocolsfor the ARPAnet began. What many people don't realize is that in ear lyversions of this technology, there was only one core protocol: TCP. And in
f act, these letters didn't even stand for what they do today; they were for theTr ansmission Control Progr am. The f irst version of this predecessor of moder n TCP was wr itten in 1973, then revised and formally documented in R FC 675, Specif ication of Inter net Tr ansmission Control Progr am, December 1974.
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 23/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201223
T CP/IP timeline
1973 "A Partial Specif ication of an Inter national Tr ansmission Protocol" is wr itten by Vint Cerf. This pa per f irst makes a
reference to TCP. Fr agmentation and reassembly of messages, former ly done by node computers on the network , become the responsi bility of host computers.
Vint Cerf and Bob K ahn wr ite "A Protocol for Packet Network Interconnection", which is later published in 1974. Thisis the most detailed TCP outline to this point, and precursor to the f irst off icial specif ication.
1974 December: A 3-way handshake is adopted for TCP. Cerf , Yogen Dalal, and Car l Sunshine wr ite R FC 675, the f irstcomplete specif ication of TCP. The authors descr i be TCP in great depth, giving exact specif ications for all elements of the Tr ansmission Control Progr am.
1975 July: V. Cerf , A. McKenzie, R. Scantlebury and H. Zimmerman wr ite "Proposal For An Inter network End to End Protocol". The authors propose for a host to host protocol for computer networks being developed all over the wor ld.
1976 October: Birchf iel, Plummer and Tomlinson wr ite IE N 18, " Proposed Revisions to the TCP" which proposeschanges to the TCP previously specif ied in R FC 675. Tomlinson discovered that the f irst design of TCP lacked and needed a three-way handshake in or der to distinguish the start of a new TCP connection from old r andom duplicate
packets that showed up too late from an ear lier exchange.
1977 March: Cerf wr ites IE N 5, " TCP Version 2 Specif ication" .
July: The tr i ple network Inter net is demonstr ated for the f irst time. Cerf , K ahn and others link up 3 networks using TCP: packet r adio, ARPANET and SAT NET. Messages tr avel 94,000 miles from San Fr ancisco to London to Califor nia "without dropping a single bit".
August: Jon Postel wr ites IE N 2, in which he disusses inter net protocol as being formed by two components: a hop to
hop or iented protocol, and an end to end or iented protocol. 1978 January: Cerf and Postel wr ite IE N 21, "TCP Version 3 Specif ication" which begins the splitting of TCP into
TCP/IP. IP becomes in char ge of routing the packets, while TCP takes care of packeting, error control, re-tr ansmission and reassembly. TCP/IP ena bles f ast and inexpensive gateways to be built. Jon Postel wr ites the fourth version specif ication for both TCP and IP. This is the f irst time IP has it's own formal specifcation. No less than f ive 2-daymeetings are held this year to discuss TCP. Jon Postel wr ites the meeting notes, which are in IE N's 65-69.
1979 Postel wr ites new specif ications for TCP and IP which show up in IE N's 123, 124, 127, 128.
1980 January: R FC's 760 and 761 outline new specif ications for the two protocols.
Febuary: TCP/IP becomes the preferred military protocol.
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 24/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201224
Internet map in February 82
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 25/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201225
T CP/IP protocol suite
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 26/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201226
Acommunication system is said to supply universal communication service if
± The system allows any host computer to communicate with any other host
To make our communication system universal, it needs a globally accepted method of identifying each computer that
attaches to it Often, host identif iers are classif ied as names, addresses, or
routes ± Shoch [1978] suggests:
A name identif ies what an object is
An address identif ies where it is
A route tells how to get there
People prefer pronouncea ble names to identify machines
Software works more eff iciently with compact binaryrepresentations of identif iers k nown as TCP/IP address
U niversal identifiers
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 27/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201227
An
IP address is carefully chosen as a 32-bit integer to make packet forwar ding eff icient
± An IP address encodes the identif ication of the network to which a hostattaches as well as the identif ication of a unique host on that network
± A pref ix of an IP address identif ies a network
± The IP addresses in all hosts on a given network share a common pref ix
Conceptually, each IP address is a pair (netid, hostid) ± netid identif ies a network
± hostid identif ies a host on that network
In pr actice, the partition between pref ix and suff ix is not
uniform ± The or iginal IPv4 address is k nown as classful address
Does an IP address uniquely identify a host on inter net?
IPv4 address
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 28/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201228
IPv4 classful address
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 29/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201229
Classful addresses are self-identifying Consequences
± Can determine boundary between pref ix and suff ix from the addressitself
± No additional state needed to store boundary information
± Both hosts and routers benef it
Classful addresses
± Are computationally eff icient
First bits specify size of pref ix / suff ix
± Allows mixtures of lar ge and small networks
IPv4 classful address property and advantage
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 30/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201230
Special cases ± can an IP address identify a host?
± When a router attaches to two physical networks
± When a computer has two or more network connections
Because IP address encode both a network and a host on that
network , an address does not specify an individual computer ,
but a connection to a network
M yth about IP address
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 31/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201231
An IP address can refer to networks as well as hosts
± By convention, hostid 0 is never assigned to an individual host
± An IP address with hostid portion equal to zero refers to the network itself
Directed broadcast address
± When a packet sent to an address with hostid of all 1s, reserved as
directed broadcast address, routers along the path use the netid portion when choosing a path
± The immediate routers do not look at the host portion
± Only the last router attached to the destination network will examinethe host portion of a pack
Broadcast address does not guar antee eff icient delivery ± On Ether net, broadcasting is as eff icient as unicast tr ansmission?
± On ATM or Fr ame Relay?
Network and directed broadcast addresses
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 32/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201232
Directed broadcast address, a powerful mechanism
± Allows a remote system to send a single packet that will broadcast on the specif ied network
± However , to avoid potential problems, many sites conf igure routers toreject all directed broadcast packets
± Requires to k now the network address
Limited broadcast address, or local network broadcast addressconsists of thirty-two 1s
± Called ³all 1s´ broadcast address
± Used for startup procedure before a host lear ns its IP address or pref ixfor the network
± Prefer to use directed broadcast address after the host lear ns the correctIP address for the network
A gener al rule, TCP/IP restr icts broadcasting to the smallest possi ble set of machines
Limited broadcast
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 33/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201233
All zeros address
± Can only a ppear as source address
± Used dur ing bootstr a p before computer k nows its address
± Means µµthis¶¶ computer
Multicast
± IP allows Inter net multicast, but no Inter net-wide multicast ± delivery system currently in place
± Class D addresses reserved for multicast
± Each address corresponds to group of partici pating computers
± IP multicast uses har dware multicast when availa ble
All zeros IP address and multicast
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 34/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201234
Classful address worked as the or iginally planned, but did not
last long
± Requir ing a unique pref ix for each physical network would exhaust the
address space quick ly dur ing 1980s as LAN technologies became
popular and network prolifer ated?
Subnetting allows multi ple physical networks to share a singlenetwork pref ix
Classless addressing allows division between pref ix and suff ix
to occur at an arbitr ary point in the address
Super netting allows an ISP to assign an or ganization a block
of class C addresses instead of a single class B number
± One of the f irst uses of classless addressing
S ubnet and classless extensions
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 35/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201235
Most obvious disadvantage, addresses refer to network
connections, not to the host computer ± If a host computer moves from one network to another , its IP address
must change; how to solve this?
± Consider an example of a tr aveler who wishes to Disconnect his or her personal computer
Carry it on a tr i p, and
Reconnect it to the inter net after reaching the destination This computer cannot be assigned a permanent IP address because an IP
address identif ies the network to which the machine attaches
Ear ly binding ± Once a pref ix size is chosen, the max number of hosts on a network is
f ixed
± If the network grows beyond the or iginal bound, a new pref ix must beselected and all hosts on the network must be renumbered
± It is incredi bly time-consuming and diff icult to debug to change all hosts IP addresses
W eaknesses in IP address
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 36/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201236
Because forwar ding uses netid
of IP address, the paths taken by
packets with multi ple IP
addresses depend on the address
used
It may not be suff icient todeliver packets by merely
k nowing the destination¶s IP
address
± If interf ace I3 become
disconnected, A must use I5 to
reach B, sending packets through
router R
M ultiple IP addresses
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 37/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201237
When communicated to humans, either in documents or
a pplications, IP addresses are wr itten as four decimal integers
separ ated by decimal points
Dotted decimal notation
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 38/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201238
Not all values in an address space from a class of IPaddresses are assigned
± For example, 128.0.0.0 is not assigned
Network pref ix 127.0.0.0, a value from the class A r ange, is
reserved for loopback
± Intended for use in testing TCP/IP and inter-process communication
on the local computer
± When a progr am uses the loopback address as a destination, TCP/IP
will not send the data to any network
± Can a datagr am bear ing an IP address 127.x.x.x a ppear on any
network?
Loopback address
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 39/40
Dept. of ECE, GMU, Dr. TCOM 509 - 201239
Each network address pref ix within a given inter net must be unique
± There is no restr iction if an or ganization is to build a pr ivate
inter net!?
± An or ganization connecting to the global Inter net must not use
address pref ixes assigned to another or ganization
To ensure the uniqueness of netid in the global Inter net, all
Inter net address are assigned by a centr al author ity
± Until 1998, all netids had been assigned by the Inter net Assigned
Number Author ity (IANA)
± After 1998, a new or ganization, named Inter net Corpor ation for
Assigned Names and Numbers (ICANN) took over the assignment
W ho assigns IP addresses?
8/3/2019 Slides for IP
http://slidepdf.com/reader/full/slides-for-ip 40/40
Dept of ECE GMU Dr TCOM 509 - 201240
The actual assignment goes through a hier archy of:
± ICANN -> Ma jor ISPs ->local ISPs
Each host on a network has a unique suff ix
± Assigned locally
± Local administr ator must ensure uniqueness
W ho assigns IP addresses? (cont)