network and ip technology

Upload: layyah2013

Post on 06-Jul-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/17/2019 Network and Ip Technology

    1/77

    Computer Networks

    and IP Technology

    Shen Jinlong

    Nanjing University of Posts and Telecommunications

    Septem er !""#

    1

  • 8/17/2019 Network and Ip Technology

    2/77

    Contents

    1 INT$%&UCTI%N'(' The &efinition a out Computer Network

    '(! Network )ardware and his classification

    '(* &evelopment of the telecoms networks in China

    2 N+T,%$- .$C)IT+CTU$+!(' The %SI $eference /odel

    !(! &ata Transmission in the %SI /odel

    !(* The TCP0IP $eference /odel

    * PU12IC &.T. N+T,%$-S T+C)N%234*(' 5(!6 Packet Switching Pu lic &ata Networks

    *(! 7rame $elay

    *(* 1road and IS&N and .T/

    8 2.N9/.N8(' 2.N .rchitecture

    8(! I+++ :"!(*0 +thernet

    8(* ,ireless 2.N

    6 INT+$N+T .N& INT$.N+T6(('( The IP Protocol

    6(! IP .ddresses and Su net

    6(* Internet Control Protocols

    # 1$%.&1.N& .N& IP ;%S#(' The Transport Service

    #(! The Internet Transport Protocols

  • 8/17/2019 Network and Ip Technology

    3/77

    ' INT$%&UCTI%N

    Each of the past three centuries has been dominated by a single technology. The 18th Centurywas the time of the great mechanical systems accompanying the Industrial Revolution. The 1 th

    Century was the age of the steam engine. !uring the 2"th Century# the $ey technology has beeninformation gathering# processing# and distribution. %mong other developments# we have seen theinstallation of worldwide telephone networ$s# the invention of radio and television# the birth andunprecedented growth of the computer industry# and the launching of communication satellites. !ue to rapid technological progress# these areas are rapidly converging# and the differences

    between collecting# transporting# storing# and processing information are &uic$ly disappearing.'rgani(ations with hundreds of offices spread over a wide geographical area routinely e)pect to

    be able to e)amine the current status of even their most remote outpost at the push of a button. %sour ability to gather# process# and distribute information grows# the demand for even moresophisticated information processing grows even faster. *1+ In the new century we are entering theera of Information Technology with would. '(' The &efinition a out Computer Network

    %lthough the computer industry is young compared to other industries ,e.g.# automobiles andair transportation-# computers have made spectacular progress in a short time. !uring the first twodecades of their e)istence# computer systems were highly centrali(ed# usually within a single largeroom. % medium si(e company or university might have had one or two computers# while largeinstitutions had at most a few do(en. It is called as the computer system based on /aster0 lavemodel as shown in ig. 1 1.

    ,d- concerntrator

    ,c- multiple)er

    ,b- point to multipoint comm.

    E3

    ,e- dial up

    4ost

    Multiplexer Multiplexer

    ,a- point to point comm..

    Modem

    PSTN

    Modem

    point to point lin$

    multipoint lin$

    Terminal

    ig.1 1 /aster0 lave computer system

    1

  • 8/17/2019 Network and Ip Technology

    4/77

    The merging of computers and communications has had a profound influence on the waycomputer systems are organi(ed. The concept of the 5computer center5 as a room with a largecomputer to which users bring their wor$ for processing is now totally obsolete. The old model of a single computer serving all of the organi(ation6s computational needs has been replaced by one

    in which a large number of separate but interconnected computers do the 7ob. These systems arecalled computer networks> as shown in ig.1 2.

    The term 5computer networ$5 is to mean an interconnected collection of autonomouscomputers. Two computers are said to be interconnected if they are able to e)change information.The connection need not be via a copper wire fiber optics# microwaves# and communicationsatellites can also be used. 9y re&uiring the computers to be autonomous# we wish to e)clude fromour definition systems in which there is a clear master0slave relation. If one computer can forciblystart# stop# or control another one# the computers are not autonomous. % system with one control

    unit and many slaves is not a networ$ nor is a large computer with remote printers and terminals. There is considerable confusion in the literature between a computer networ$ and a distributedsystem. The $ey distinction is that in a distributed system# the e)istence of multiple autonomouscomputers is transparent ,i.e.# not visible- to the user. 4e or she can type a command to run a

    program# and it runs. It is up to the operating system to select the best processor# find and transportall the input files to that processor# and put the results in the appropriate place. In other words# the user of a distributed system is not aware that there are multiple processorsit loo$s li$e a virtual uniprocessor. %llocation of 7obs to processors and files to dis$s# movement of files between where they are stored and where they are needed# and all other system functionsmust be automatic. :ith a networ$# users must e)plicitly log onto one machine# e)plicitly submit 7obs remotely#e)plicitly move files around and generally handle all the networ$ management personally. :ith adistributed system# nothing has to be done e)plicitly it is all automatically done by the systemwithout the users6 $nowledge. In effect# a distributed system is a software system built on top of a networ$. The softwaregives it a high degree of cohesiveness and transparency. Thus the distinction between a networ$ and a distributed system lies with the software ,especially the operating system-# rather than withthe hardware. ;evertheless# there is considerable overlap between the two sub7ects. or e)ample# both

    distributed systems and computer networ$s need to move files around. The difference lies in whoinvo$es the movement# the system or the user.

    ig.1 2 computer networ$s

    Comm. ubnet

    Resource ubnet

  • 8/17/2019 Network and Ip Technology

    5/77

    '(!( Network )ardware and his classification

    It is now time to focus on the technical issues involved in networ$ design. There is no generallyaccepted ta)onomy into which all computer networ$s fit# but two dimensions stand out as

    important= transmission technology and scale . :e will now e)amine each of these in turn. 9roadly spea$ing# there are two types of transmission technology= 9roadcast networ$s# 3ointto point networ$s.

    ,1- 9roadcast networ$s have a single communication channel that is shared by all themachines on the networ$. hort messages# called pac$ets in certain conte)ts# sent by any machineare received by all the others. %n address field within the pac$et specifies for whom it is intended.>pon receiving a pac$et# a machine chec$s the address field. If the pac$et is intended for itself# it

    processes the pac$et if the pac$et is intended for some other machine# it is 7ust ignored. 9roadcast systems generally also allow the possibility of addressing a pac$et to all destinations

    by using a special code in the address field. :hen a pac$et with this code is transmitted# it isreceived and processed by every machine on the networ$. This mode of operation is calledbroadcasting . ome broadcast systems also support transmission to a subset of the machines#something $nown as multicasting . 'ne possible scheme is to reserve one bit to indicatemulticasting. The remaining ,n 1- address bits can hold a group number. Each machine can5subscribe5 to any or all of the groups. :hen a pac$et is sent to a certain group# it is delivered toail machines subscribing to that group.

    ,2- 3oint to point networ$s consist of many connections between individual pairs of machines . To go from the source to the destination# a pac$et on this type of networ$ may have tofirst visit one or more intermediate machines. 'ften multiple mutes# of different lengths are

    possible# so routing algorithms play an important role in point to point networ$s. %s a generalrule ,although there are many e)ceptions-# smaller# geographicaily locali(ed networ$s tend to use

    broadcasting# whereas larger networ$s usually are point to point.%n alternative criterion for classifying networ$s is their scale. % classification of multiple

    processor systems arranged by their physical si(e is given in ig. 1 ?.

    Interprocessor 3rocessors located E)ample

    WAN

    WAN-MAN

    MAN

    Pico-Cell

    MAN-LANPAN

    LAN-PAN

    0km~50km ~2km ~10m

    Personal Operating Space

    ?

  • 8/17/2019 Network and Ip Technology

    6/77

    distance in same

    ".1m Circuit board !ata flow machine

    1m ystem /ulticomputer

    1"m Room 3%;# 3ersonal %rea ;etwor$

    1""m 9uilding

  • 8/17/2019 Network and Ip Technology

    7/77

    arious topologies are possible for broadcast

  • 8/17/2019 Network and Ip Technology

    8/77

    standard that defines it-. !G!9 consists of two unidirectional buses ,cables- to which all thecomputers are connected# as shown in ig. 1 D. Each bus has a bead end# a device that initiatestransmission activity. Traffic that is destined for a computer to the right of the sender uses theupper bus. Traffic to the left uses the lower one.

    % $ey aspect of a /%; is that there is a broadcast medium ,for 8"2. # two cables- to whichall the computers are attached. This greatly simplifies the design compared to other $inds of networ$s.

    '(!(*( ,ide .rea Networks

    % wide area networ$# or :%;# spans a large geographical area# often a country or continent. If contains a collection of machines intended for running user ,i.e.# application- programs. :e will

    follow traditional usage and call these machines hosts . The term end system is sometimes alsoused in the literature. The hosts are connected by a communication subnet # or 7ust subnet for short. The 7ob of the subnet is to carry messages from host to host# 7ust as the telephone systemcarries words from spea$er to listener. 9y separating the pure communication aspects of thenetwor$ ,the subnet- from the application aspects ,the hosts-# the complete networ$ design isgreatly simplified. In most wide area networ$s# the subnet consists of two distinct components= transmission linesand switching elements . Transmission lines ,also called circuits# channels# or trun$s- move bits

    between machines. The switching elements are speciali(ed computers used to connect two or more transmissionlines. :hen data arrive on an incoming line# the switching element must choose an outgoing lineto forward them on. >nfortunately# there is no standard terminology used to name thesecomputers. They are variously called packet switching nodes # intermediate systems# and dataswitching e)changes# among other things. %s a generic term for the switching computers# we willuse the word router# but the reader should be aware that no consensus on terminology e)ists here.In this model# each host is generally connected to a

  • 8/17/2019 Network and Ip Technology

    9/77

    to another via one or more intermediate routers# the pac$et is received at each intermediate router in its entirety# stored there until the re&uired output line is free# and then forwarded. % subnet usingthis principle is called a point to point# store and forward# or pac$et switched subnet. ;early allwide area networ$s ,e)cept those using satellites- have store and forward subnets. :hen the

    pac$ets are small and all the same si(e# they are often called cells.:hen a point to point subnet is used# an important design issue is what the router

    interconnection topology should loo$ li$e. igure 1 shows several possible topologies.

  • 8/17/2019 Network and Ip Technology

    10/77

    rates are often much higher# too# and the transmissions from different computers can interfere withone another.Typically they have a capacity of 11 /bps ,IEEE 8"2.11b-# which is much slower than wired

  • 8/17/2019 Network and Ip Technology

    11/77

    '(* &evelopment of the telecoms networks in China ?!@

    ince the inception of the open door policy# China6s telecoms networ$ has made astounding progress as it has pursued a policy of 5reform and development66. It has e)perienced growth at a

    pace that is unprecedented in the country and uni&ue in the world# and its overall standard has been raised to a historical high# and ma$ing a vital contribution to the national economy and socialadvancement.

    %fter many years of development# the overall capacity of China6s telecoms networ$ has beensignificantly enhanced. The long time problem of the under supply of phone services has beensolved. % state of the art# reliable and diversified telephone networ$ has gradually been put in

    place# thereby promoting the development of the country6s IT infrastructure# as shown in ig. 1 H .

    3ublic data and multimedia networ$s as well as the Internet are accessible nationwide. ;etwor$ platform resources have e)panded substantially# as port capacity for digital data networ$sand broadband access as well as the total bandwidth for international entry0e)it to the Internethave been significantly enhanced. The constraint of bandwidth 5bottlenec$5 has been effectivelyrelieved. The telecoms sector provides channels for information transfer for governmentdepartments# industries and business enterprises. % variety of services# such as leased-line access #VPN # web-hosting # system integration and network configuration, are provided to facilitate thedevelopment of e government# e business# remote learning# remote medical care# and businessinformation management. These developments have played a pivotal role in reengineeringtraditional industries# and in promoting the use of information in the society. Telecoms companieshave cooperated with relevant government departments to implement the three online pro7ects government online# enterprise online and home online by leveraging the e)isting resources in

    7oint efforts to e)pedite the construction of IT infrastructure.In the areas of finance# custom# ta)ation and foreign trade# the telecoms sector has

    ig. 1 H 9ac$bone of IT infrastructure in China

    Information 4omeElectrical 3roducts

    T/N

    ibers

    !4

    .T/.T/

    7$N

    &&N

    J.2D 3 3!;

    %ccess ;et%ccess ;et NAIS&N 0 PSTNNAIS&N 0 PSTN

    AatewayAateway

    Internet

    Enterprise ;et

    CC ;o.H

    I;

    TV

    Telephone

    atellite 0 /o ile

    C3;oC

  • 8/17/2019 Network and Ip Technology

    12/77

    collaborated with relevant government authorities to carry out a number of online pro7ects withsignificant results. Telecoms companies provide preferential# &uality services and networ$

    platform support to national financial information networ$s# electronic enforcement systems at ports and airports# and the information system of the ta) authorities. Currently# the 3eople6s 9an$

    of China and the Aeneral %dministration for Ta)ation are leasing 1"#""" lines from the telecomscompanies for various services. Industries and government departments configured more than 18Happlication systems using public telecoms networ$s. In pursuing the national strategy of IT drivenindustriali(ation and in advancing the construction of IT infrastructure# the telecoms sector hasmade a vital contribution# proving itself to be irreplaceable.

    In the past 2" odd years# China6s telecom country6s IT infrastructure services andcommunications capacity has increased enormously. Today# public telephone networ$s cover theentire country# giving access to the whole world. 9y the end of Kune 2""2# the total length of thefiber optic cable bac$bone of the system was 1. H million $m# and the length of long distancefiber optic cable was ?B"#""" $m. % number of terrestrial and undersea cables connecting Chinaand Kapan# %sia and Europe# and China and the %mericas had been built.

  • 8/17/2019 Network and Ip Technology

    13/77

    ! N+T,%$- .$C)IT+CTU$+

    ;ow that we have discussed layered networ$s in the abstract# it is time to loo$ at somee)amples. In the ne)t two sections we will discuss two important networ$ architectures# the ' Ireference model and the TC30I3 reference model.

    !('( The %SI $eference /odel

    The ' I model is shown in ig. 2 1 ,minus the physical medium-. This model is based on a proposal developed by the International tandards 'rgani(ation ,I '- as a first step towardinternational standardi(ation of the protocols used in the various layers ,!ay and Mimmermann#1 8?-. The model is called the I ' ' I ,'pen ystems Interconnection- Reference /odel

    because it deals with connecting open systems that is# systems that are open for communicationwith other systems. :e will usually 7ust call it the ' I model for short.

    9elow we will discuss each layer of the model in turn# starting at the bottom layer. ;ote thatthe ' I model itself is not a networ$ architecture because it does not specify the e)act servicesand protocols to be used in each layer. It 7ust tells what each layer should do. 4owever# I ' has

    also produced standards for all the layers# although these are not part of the reference model itself.Each one has been published as a separate international standard.

    AP _Application Process LSM _Local System Management

    _Implementation Module

    1

    2

    3

    4

    5

    6

    7

    1

    2

    3

    4

    5

    6

    7

    APA

    LSM

    1

    2

    3

    1

    2

    3

    Comm. Subnet

    Local System

    elay !pen System

    A real System

    A !pen eal System

    A !pen System B !pen System

    AP"

    LSM

    OSI environment

    #ost A

    " !pen eal System

    " eal System

    #ost "

    ig.2 1. The ' I reference model.

    11

  • 8/17/2019 Network and Ip Technology

    14/77

    !('(' The Physical 2ayer

    The physical layer is concerned with transmitting raw bits over a communication channel.The design issues have to do with ma$ing sure that when one side sends a 1 bit# it is received bythe other side as a 1 bit# not as a " bit. Typical &uestions here are how many volts should be usedto represent a 1 and how many for a "# how many microseconds a bit lasts# whether transmissionmay proceed simultaneously in both directions# how the initial connection is established and howit is tom down when both sides are finished# and how many pips the networ$ connector has andwhat each pin is used for. The design issues here largely deal with mechanical# electrical# and

    procedural interfaces# and the physical transmission medium# which lies below the physical layer.

    !('(! The &ata 2ink 2ayer

    The main tas$ of the data lin$ layer is to ta$e a raw transmission facility and transform it intoa line that appears free of undetected transmission errors to the networ$ layer. It accomplishes thistas$ by having the sender brea$ the input data up into data frames ,typically a few hundred or afew thousand bytes-# transmit the frames se&uentially# and process the ac$nowledgement framessent bac$ by the receiver. ince the physical layer merely accepts and transmits a stream of bitswithout any regard to meaning or structure# it is up to the data lin$ layer to create and recogni(eframe boundaries. This can be accomplished by attaching special bit patterns to the beginning and

    end of the frame. If these bit patterns can accidentally occur in the data# special care must be ta$en to ma$e sure these patterns are not incorrectly interpreted as frame delimiters.

    % noise burst on the line can destroy a frame completely. In this case# the data lin$ layer software on the source machine can retransmit the frame. 4owever# multiple transmissions of thesame frame introduce the possibility of duplicate frames. % duplicate frame could be sent if theac$nowledgement frame from the receiver bac$ to the sender were lost. It is up to this layer tosolve the problems caused by damaged# lost# and duplicate frames. The data lin$ layer may offer several different service classes to the networ$ layer# each of a different &uality and with adifferent price.

    %nother issue that arises in the data lin$ layer ,and most of the higher layers as well- is howto $eep a fast transmitter from drowning a slow receiver in data. ome traffic regulationmechanism must be employed to let the transmitter $now how much buffer space the receiver hasat the moment. re&uently# this flow regulation and the error handling are integrated.

    If the line can be used to transmit data in both directions# this introduces a new complicationthat the data lin$ layer software must deal with. The problem is that the ac$nowledgement framesfor % to 9 traffic compete for the use of the line with data frames for the 9 to % traffic. % clever solution ,piggybac$ing- has been devised we will discuss it in detail later.

    9roadcast networ$s have an additional issue in the data lin$ layer= how to control access tothe shared channel. % special sublayer of the data lin$ layer# the medium access sublayer# deals

    with this problem.

    12

  • 8/17/2019 Network and Ip Technology

    15/77

    !('(* The Network 2ayer

    The networ$ layer is concerned with controlling the operation of the subnet % $ey design issueis determining how pac$ets are routed from source to destination. Routes can be based on statictables that are 5wired into5 the networ$ and rarely changed. They can also be determined at the

    start of each conversation# for e)ample a terminal session. inally# they can be highly dynamic# being determined anew for each pac$et# to reflect the current networ$ load. If too many pac$ets are present in the subnet at the same time# they will get in each other6s way#forming bottlenec$s. The control of such congestion also belongs to the networ$ layer. ince the operators of the subnet may well e)pect remuneration for their efforts# there is oftensome accounting function built into the networ$ layer. %t the very least# the software must counthow many pac$ets or characters or bits are sent by each customer# to produce billing information.:hen a pac$et crosses a national border# with different rates on each side# the accounting can

    become complicated.:hen a pac$et has to travel from one networ$ to another to get to its destination# many

    problems can arise. The addressing used by the second networ$ may be .different from the firstone. The second one may not accept the pac$et at all because it is too large. The protocols maydiffer# and so on. It is up to the networ$ layer to overcome all these problems to allowheterogeneous networ$s to be interconnected.

    In broadcast networ$s# the routing problem is simple# so the networ$ layer is often thin or even none)istent.

    !('(' The Transport 2ayer

    The basic function of the transport layer is to accept data from the session layer# split it up into

    smaller units if need be# pass these to the networ$ layer# and ensure that the pieces all arrivecorrectly at the other end. urthermore# all this must be done efficiently# and in a way that isolatesthe upper layers from the inevitable changes in the hardware technology.

    >nder normal conditions# the transport layer creates a distinct networ$ connection for eachtransport connection re&uired by the session layer. If the transport connection re&uires a highthroughput# however# the transport layer might create multiple networ$ connections# dividing thedata among the networ$ connections to improve throughput. 'n the other hand# if creating or maintaining a networ$ connection is e)pensive# the transport layer might multiple) severaltransport connections onto the same networ$ connection to reduce the cost. In all cases# thetransport layer is re&uired to ma$e the multiple)ing transparent to the session layer.

    The transport layer also determines what type of service to provide the session layer# andultimately# the users of the networ$. The most popular type of transport connection is an error free

    point to point channel that delivers messages or bytes in the order in which they were sent.4owever# other possible $inds of transport service are transport of isolated messages with noguarantee about the order of delivery# and broadcasting of messages to multiple destinations. Thetype of service is determined when the connection is established.

    The transport layer is a true end to end layer# from source to destination. In other words# a program on the source machine carries on a conversation with a similar program on thedestination machine# using the message headers and control messages. In the lower layers# the

    protocols are between each machine and its immediate neighbors# and not by the ultimate sourceand destination machines# which may be separated by many routers. The difference between layers

    1?

  • 8/17/2019 Network and Ip Technology

    16/77

    1 through ?# which are chained# and layers B through H# which are end to end# is illustrated in ig.2 1.

    /any hosts are multiprogrammed# which implies that multiple connections will be enteringand leaving each host. There needs to be some way to tell which message belongs to which

    connection. The transport header is one place this information can be put.In addition to multiple)ing several message streams onto one channel# the transport layer

    must ta$e care of establishing and deleting connections across the networ$. This re&uires some$ind of naming mechanism# so that a process on one machine has a way of describing with whomit wishes to converse. There must also be a mechanism to regulate the flow of information# so thata fast host cannot overrun a slow one. uch a mechanism is called flow control and plays a $eyrole in the transport layer ,also in other layers-. low control between hosts is distinct from flowcontrol between routers# although we will later see that similar principles apply to both.

    !('(6 The Session 2ayer

    The session layer allows users on different machines to establish sessions between them. %session allows ordinary data transport# as does the transport layer# but it also provides enhancedservices useful in some applications. % session might be used to allow a user to log into a remotetimesharing system or to transfer a file between two machines. 'ne of the services of the session layer is to manage dialogue control. essions can allow trafficto go in both directions at the same time# or in only one direction at a time. If traffic can only goone way at a time ,analogous to a single railroad trac$-# the session layer can help $eep trac$ of whose turn it is. % related session service is to$en management. or some protocols# it is essential that both sides

    do not attempt the same operation at the same time. To manage these activities# the session layer provides to$ens that can be e)changed. 'nly the side holding the to$en may perform the criticaloperation. %nother session service is synchroni(ation. Consider the problems that might occur when tryingto do a 2 hour file transfer between two machines with a l hour mean time between crashes. %fter each transfer was aborted# the whole transfer would have to start over again and would probablyfail again the ne)t time as well. To eliminate this problem6# the session layer provides a way toinsert chec$points into the data stream# so that after a crash# only the data transferredafter the last chec$point have to be repeated.

    !('(# The Presentation 2ayer

    The presentation layer performs certain functions that are re&uested sufficiently often towarrant finding a general solution for them# rather than letting each user solve the problems. In

    particular# unli$e all the lower layers# which are 7ust interested in moving bits reliably from here tothere# the presentation layer is concerned with the synta) and semantics of the informationtransmitted.

    % typical e)ample of a presentation service is encoding data in a standard agreed upon way./ost user programs do not e)change random binary bit strings. They e)change things such as

    people6s names# dates# amounts of money# and invoices. These items are represented as character

    strings# integers# floating point numbers# and data structures composed of several simpler items.!ifferent computers have different codes for representing character strings ,e.g.# % CII and

    1B

  • 8/17/2019 Network and Ip Technology

    17/77

    >nicode-# integers ,e.g.# one6s complement and two6s complement-# and so on. In order to ma$e it possible for computers with different representations to communicate# the data structures to bee)changed can be defined in an abstract way# along with a standard encoding to be used 5on thewire.5 The presentation layer manages these abstract data structures and converts from the

    representation used inside the computer to the networ$ standard representation and bac$.

    !('(B The .pplication 2ayer

    The application layer contains a variety of protocols that are commonly needed. or e)ample#there are hundreds of incompatible terminal types in the world. Consider the plight of a full screeneditor# that is supposed to wor$ over a networ$ with many different terminal types# each withdifferent screen layouts# escape se&uences for inserting and deleting te)t# moving the cursor# etc. 'ne way to solve this problem is to define an abstract networ$ virtual terminal that editors andother programs can be written to deal with. To handle each terminal type# a piece of software must

    be written to map the functions of the networ$ virtual terminal onto the real terminal. or e)ample# when the editor moves the virtual terminal6s cursor to the upper left hand corner of thescreen# this software must issue the proper command se&uence to the real terminal to get its cursor there too. %ll the virtual terminal software is in the application layer. %nother application layer function is file transfer. !ifferent file systems have different filenaming conventions# different ways of representing te)t lines# and so on. Transferring a file

    between two different systems re&uires handling these and other incompatibilities. This wor$# too# belongs to the application layer# as do electronic mail# remote 7ob entry# directory loo$up# andvarious other general purpose and special purpose facilities.

    !(! &ata Transmission in the %SI /odel igure 2 2 shows an e)ample of how data can be transmitted using the ' I model The sending

    process has some data it wants to end to the receiving process. It gives the data to the applicationlayer# which then attaches the application header# %4 ,which may be null-# to the front of it and

    1

    2

    3

    4

    5

    6

    7

    1

    2

    3

    4

    5

    6

    7

    media

    "it stream

    LP$%

    NP$%

    TP$%

    SP$%

    PP$%

    AP$%

    &rame

    pac'et

    AP data

    AP A AP "

    +ndAtoAend

    ig. 2 2. %n e)ample of how the ' I model is used. ome of the headers may be null

    1D

  • 8/17/2019 Network and Ip Technology

    18/77

    gives the resulting item to the presentation layer. The presentation layer may transform this item in various ways and possibly add a header to thefront# giving the result to the session layer. It is important to reali(e that the presentation layer isnot aware of which portion of the data given to it by the application layer is %4# if any# and which

    is true user data. This process is repeated until the data reach the physical layer# where they are actuallytransmitted to the receiving machine. 'n that machine the various headers are stripped off one byone as the message propagates up the layers until it finally arrives at the receiving process. The $ey idea throughout is that although actual data transmission is vertical in ig. 2 2# eachlayer is programmed as though it were hori(ontal. :hen the sending transport layer# for e)ample#gets a message from the session layer# it attaches a transport header and sends it to the receivingtransport layer# rom its point of view# the fact that it must actually hand the message to thenetwor$ layer on its own machine is an unimportant technicality. %s an analogy# when a Tagalogspea$ing diplomat is addressing the >nited ;ations# he thin$s of himself as addressing the other assembled diplomats. That# in fact# he is really only spea$ing to his translator is seen as a technicaldetail.

    !(* The TCP0IP $eference /odel

  • 8/17/2019 Network and Ip Technology

    19/77

    letters into a mall bo) in one country# and with a little luc$# most of them will be delivered to thecorrect address in the destination country. 3robably the letters will travel through one or moreinternational mail gateways along the way# but this is transparent to the users. urthermore# thateach country ,i.e.# each networ$- has its own stamps# preferred envelope si(es# and delivery rules

    is bidden from the users. The internet layer defines an official pac$et format and protocol called I3 ,Internet 3rotocol-.The 7ob of the internet layer is to deliver I3 pac$ets where they are supposed to go. 3ac$et routingis clearly the ma7or issue here# as is avoiding congestion. or these reasons# it is reasonable to saythat the TC30I3 internet layer is very similar in functionality to the ' I networ$ layer. igure 2 ?shows this correspondence.

    !(*(! The Transport 2ayer

    The layer above the internet layer in the TC30l3 model is now usually called the transport layer.It is designed to allow peer entities on the source and destination hosts to carry on a conversation#the same as in the ' I transport layer.

    Two end to end protocols have been defined here. The first one# TC3 ,Transmission Control3rotocol- is a reliable connection oriented protocol that allows a byte stream originating on onemachine to be delivered without error on any 'ther machine in the internet. It fragments theincoming byte stream into discrete messages and passes each one onto the internet layer. %t thedestination# receiving TC3 process reassembles the received messages into the output stream. TC3also handles flow control to ma$e sure a fast sender cannot swamp a slow receiver with moremessages than it can handle.

    The second protocol in this layer# >!3 ,>ser !atagram 3rotocol-# is an unreliable#connectionless protocol for applications that do not want TC36s se&uencing or flow control andwish to provide their own. It is also widely used for one shot# client server type re&uest reply&ueries and applications in which prompt delivery is more important than accurate delivery# suchas transmitting speech or video. The relation of I3# TC3# and >!3 is shown in ig. 2 ?. ince the

    model was developed I3 has been implemented on many other networ$s.

    Internet 0 Intranet

    %pplication Telnet T3 /T3 !; 'thers

    Transport

    I3

    TC3 >!3 ; 3

    ;I<

    4ardware

  • 8/17/2019 Network and Ip Technology

    20/77

    !(*(* The .pplication 2ayer

    The TC30I3 model does not have session or presentation layers. ;o need for them was perceived# so they were not included. E)perience with the ' I model has proven this viewcorrect= they are of little use to most applications.

    'n top of the transport layer is the application layer. It contains all the higher level protocols.The early ones included virtual terminal ,TE

  • 8/17/2019 Network and Ip Technology

    21/77

    * PU12IC &.T. N+T,%$-S T+C)N%234

    *(' 5(!6 Packet Switching Pu lic &ata Networks

    /any older public data networ$s in the would follow a standard called J.2D It was developedduring the 1 H"s by IT> T,old name CCITT - to provide an interface protocol including threelevels between public pac$et switched networ$s ,!CE# !ata Communication E&uipment- andtheir customers,!TE# !ata Terminal E&uipment- #as shown in IA. ? 1.

    The physical layer protocol# called J.21# specifies the physical# electrical# and proceduralinterface between the host and the networ$. ery few public networ$s actually support thisstandard# because it re&uires digital# rather than analog signaling on the telephone lines. %s aninterim measure# an analog interface similar to the familiar R 2?2 standard was defined. The data lin$ layer , rame

  • 8/17/2019 Network and Ip Technology

    22/77

    J.2D is connection-oriented and supports both switched &irtual circuits !'V%" and permanent &irtual circuits!PV%" . % switched virtual circuit is created when one computer sends a pac$et to the networ$ as$ing to ma$e a call to a remote computer. !TE 0 !CE address number isassigned in term of J.121. 'nce established# pac$ets can be sent over the connection# always

    arriving in order. J.2D provides flow control# to ma$e sure a fast sender cannot swamp a slow or busy receiver. It is used to distinguish which the virtual circuit to use according to the

  • 8/17/2019 Network and Ip Technology

    23/77

    The difference between an actual leased line and a virtual leased line is that with an actualone# the user can send traffic all day long at the ma)imum speed. :ith a virtual one# data burstsmay be sent at full speed# but the long term average usage must be below a predetermined level.In return# the carrier charges much less for a virtual line than a physical one.

    In addition to competing with leased lines# frame relay also competes with J.2D permanentvirtual circuits# e)cept that it operates at higher speeds# usually 1.DBB /bps,T 1- or 2."B8/bps,E 1-# and provides fewer features. rame relay provides a minimal service# primarily a way to determine the start and end of eachframe# and detection of transmission errors. If a bad frame is received# the frame relay servicesimply discards it. It is up to the user to discover that a frame is missing and ta$e the necessaryaction to recover. >nli$e J.2D# frame relay does not provide ac$nowledgements or normal flowcontrol. It does have a bit in the header# however# which one end of a connection P=an set toindicate to the other end that problems e)ist. The use of this bit is up to the users.

    *(* 1road and IS&N and .T/

    Even if the above services become popular# the telephone companies are still faced with a far more fundamental problem= multiple networ$s. P()' !Plain (ld )elephone 'er&ice" and Tele)use the old circuit switched networ$. Each of the new data services such as '*$' and framerelay uses its own pac$et switching networ$. $+$ is different from these# and the internaltelephone company call management networ$ !''N " is yet another networ$. /aintaining allthese separate networ$s is a ma7or headache# and there is another networ$# cable television# thatthe telephone companies do not control and would li$e to. The perceived solution is to invent a single new networ$ for the future that will replace the

    entire telephone system and all the speciali(ed networ$s with a single integrated networ$ for all$inds of information transfer. This new networ$ will have a huge data rate compared to all e)istingnetwor$s and services and will ma$e it possible to offer a large variety of new services. This is nota small pro7ect# and it is certainly not going to happen overnight# but it is now under way.

    The new wide area service is called -I'$N ! roadband Integrated 'er&ices $igital Network" . It will offer &ideo on demand !V($" # live television from many sources# full motionmultimedia electronic mail# C! &uality music#

  • 8/17/2019 Network and Ip Technology

    24/77

    highly fle)ible and can handle both constant rate traffic ,audio# video- and variable rate traffic

    ,data- easily. econd# at the very high speeds envisioned ,gigabits per second are within reach-#digital switching of cells is easier than using traditional multiple)ing techni&ues# especially usingfiber optics. Third# for television distribution# broadcasting is essential cell switching can providethis and circuit switching cannot.

    %T/ networ$s are connection-oriented . /a$ing a call re&uires first sending a message to setup the connection. %fter that# subse&uent cells all follow the same path to the destination. Celldelivery is not guaranteed# but their order is. If cells 1 and 2 are sent in that order# then if botharrive# they will arrive in that order# never first 2 then 1.

    %T/ networ$s are organi(ed li$e traditional :%;s# with lines and switches ,routers-. The

    intended speeds for %T/ networ$s are 1DD .D2"/bps and 22."8" /bps# with the possibility of gigabit speeds later. The 1DD /bps speed was chosen because this is about what is needed totransmit high definition television. The e)act choice of 1DD.D2 /bps was made for compatibilitywith %TQT6s ';ET transmission system. The 22 /bps speed was chosen so four 1DD /bpschannels could be sent over it. 9y now it should be clear why some of the gigabit testbedsoperated at 22 /bps= they used %T/.

    :hen %T/ was proposed# virtually all the discussion ,i.e.# the hype- was about video ondemand to every home and replacing the telephone system# as described above. ince then# other developments have become important. /any organi(ations have run out of bandwidth on their campus or building wide

  • 8/17/2019 Network and Ip Technology

    25/77

    *(*(' The 1AIS&N .T/ $eference /odel

  • 8/17/2019 Network and Ip Technology

    26/77

    The other sublayer of the physical layer is the )% !)ransmission %on&ergence" sublayer. :hencells are transmitted# the TC layer sends them as a string of bits to the 3/! layer. !oing this iseasy. %t the other end# the TC sublayer gets a pure incoming bit stream from the 3/! sublayer. Its

    7ob is to convert this bit stream into a cell stream for the %T/ layer. It handles all the issues

    related to telling where cells begin and end in the bit stream. In the %T/ model# this functionalityis in the physical layer. In the ' I model and in pretty much all other networ$s# the 7ob of framing# that is# turning a raw bit stream into a se&uence of frames or cells# is the data lin$ layer6stas$. or that reason we will discuss it in this boo$ along with the data lin$ layer# not with the

    physical layer.%s we mentioned earlier# the %T/ layer manages cells# including their generation and

    transport. /ost of the interesting aspects of %T/ are located here. It is a mi)ture of the ' I datalin$ and networ$ layers# but it is not split into sublayers.

    The %%< layer is split into a 'A !'egmentation And eassembly" sublayer and a %' !%on&ergence 'ublayer" . The lower sublayer brea$s pac$ets up into cells on the transmission sideand puts them bac$ together again at the destination. The upper sublayer ma$es it possible to have%T/ systems offer different $inds of services to different applications ,e.g.# file transfer and videoon demand have different re&uirements concerning error handling# timing# etc.-.

    2B

  • 8/17/2019 Network and Ip Technology

    27/77

    8 2.N .N& /.N

    In this part# we e)amine local area networ$s ,

  • 8/17/2019 Network and Ip Technology

    28/77

    8('(' Protocol .rchitecture

    3rotocols defined specifically for

  • 8/17/2019 Network and Ip Technology

    29/77

    These are functions typically associated with ' I layer 2. The set of functions in the last bulleted item are grouped into a logical lin$ control ,

  • 8/17/2019 Network and Ip Technology

    30/77

    branching cable with no closed loops. The tree layout begins at a point $nown as the headend#where one or more cables start# and each of these may have branches. The branches in turn mayhave additional branches to allow &uite comple) layouts. %gain# a transmission from any station

    propagates throughout the medium and can be received by all other stations.

    *( $ing topologyIn the ring topology# the networ$ consists of a set of repeaters 7oined by point to point lin$s in aclosed loop. The repeater is a comparatively simple device# capable of receiving data on one lin$ and transmitting them# bit by bit# on the other lin$ as fast as they are received# with no buffering atthe repeater. The 6lin$s are unidirectional that is# data are transmitted in one direction only and allare oriented in the same way. Thus# data circulate around the ring in one direction ,cloc$wise or countercloc$wise-. Each station attaches to the networ$ at a repeater and can transmit data ontothe networ$ through that repeater.

    8( Star Topology

    In the star

  • 8/17/2019 Network and Ip Technology

    31/77

    The most commonly used medium access control techni&ue for bus0tree and star topologies is carrier sense multiple access with collision detection ,C /%0C!-. The original

    baseband version of this techni&ue was developed by Jero) as part of the Ethernet

  • 8/17/2019 Network and Ip Technology

    32/77

    I= data unit supplied by nshieldedTwisted 3air

    Coa)ial Cable,HD ohm-

    8D" nm 'pticaliber 3air

    ignaling

    techni&ue

    9aseband ,/anchester- 9roadband

    ,!3 @-

    /anchester

    'n off

    /a)imum

    segment

    length,m-

    D"" 18D 1"" 18"" D""

    ;odes per

    segment

    1"" ?" ??

    ast Ethernet refers to a set of specifications developed by the IEEE 8"2.? committee to provide a low cost# Ethernet compatible

  • 8/17/2019 Network and Ip Technology

    33/77

    1""9% E J uses optical fiber.In many buildings# each of the 1""9% E J options re&uires the installation of new cable.

    or such cases# 1""9% E TB defines a lower cost alternative that can use Category ?# voice grade>T3 in addition to the higher &uality Category D >T3.B To achieve the 1"" /bps data rate over

    lower &uality cable# 1""9% E TB dictates the use of four twisted pair lines between nodes# withthe data transmission ma$ing use of three pairs in one direction at a time.

    or all of the 1""9% E T options# the topology is similar to that of 1"9% E T# namely astar wire topology.

    or all of the transmission media specified under 1""9% E J# a unidirectional data rate of I"" /bps is achieved by transmitting over a single lin$ ,single twisted pair# single optical fiber-.

    or all of these media# an efficient and effective signal

    8(!(8 Gigabit Ethernet

    Aigabit Ethernet builds on top of the Ethernet protocol# but increases speed tenfold over astEthernet to 1""" /bps# or 1 gigabit per second ,Abps-. Aigabit Ethernet allows Ethernet to scalefrom 1"01"" /bps at the des$top to 1"" /bps up the riser to 1""" /bps in the data center.

    9y leveraging the current Ethernet standard as well as the installed base of Ethernet and astEthernet switches and routers# networ$ managers do not need to retrain and relearn a newtechnology in order to provide support for Aigabit Ethernet.

    In order to accelerate speeds from 1"" /bps ast Ethernet up to 1 Abps# several changesneed to be made to the physical interface. It has been decided that Aigabit Ethernet will loo$ identical to Ethernet from the data lin$ layer upward. The challenges involved in accelerating to1 Abps have been resolved by merging two technologies together= IEEE 8"2.? Ethernet and%; I J?T11 iber Channel. igure B H shows how $ey components from each technology have

    been leveraged to form Aigabit Ethernet.

    IEEE 8"2.? ,1""mbps-

    1""9ase J

    1""9ase TB1""9ase TJ 1""9ase J

    2 CategoryD >T3 2 'ptical fiber 2 T3B Category? or CategoryD >T3

    ig.B IEEE 8"2.? 1""9ase options

    ?1

  • 8/17/2019 Network and Ip Technology

    34/77

    ig. B H Aigabit Ethernet 3rotocol tac$

  • 8/17/2019 Network and Ip Technology

    35/77

    IEEE 8"2.I3 committee standardi(ed a means of individual end station re&uesting a particular Goof the networ$ and the networ$ being able to respond accordingly. This standard also specifiesmulticast group management.

    % new protocol is defined in 8"2.I3# generic attribute registration protocol ,A%R3-. A%R3 is

    a generic protocol that will be used by specific A%R3 applications for e)ample# A%R3 multicastregistration protocol ,A/R3-# and A%R3 interrupts# e)cessivenetwor$ broadcasts# or multitas$ing within the system. In this e)ample# the client sends out a

    pause frame and re&uests that the server delay transmission for a certain period of time. Thismechanism# though separate from the IEEE 8"2.?( wor$# complements Aigabit Ethernet by

    allowing gigabit devices to participate in this flow control mechanism.8( I+++ :"!(*a

    ??

  • 8/17/2019 Network and Ip Technology

    36/77

    The IEEE 8"2.?ab committee specified Aigabit Ethernet transmission over Category Dcopper cable ,1"""9% E T-. or more information# see 51"""9% E T= !elivering AigabitIntelligence on Copper Infrastructure.5

    http=00www.cisco.com0warp0public0cc0techno0lnty0etty0ggetty0tech01"""bNsd.htm

    Aigabit Ethernet is a viable technology that allows Ethernet to scale from 1"01"" /bps at thedes$top to 1"" /bps up the riser to 1""" /bps in the data center. 9y leveraging the currentEthernet standard as well as the installed base of Ethernet and ast Ethernet switches and routers#networ$ managers do not need to retrain and relearn a new technology in order to provide supportfor Aigabit Ethernet.

    8(* ,ireless 2.N

    % set of wireless

  • 8/17/2019 Network and Ip Technology

    37/77

    addressing capability be able to recogni(e the new location of the station.+SSAtransition( This is defined as a station movement from a 9 in one E to a 9within another E . This case is supported only in the sense that the tation can move./aintenance of upper layer connections supported by 8"2.11 cannot be guaranteed. In

    fact# disruption of service is li$ely to occur.

    8(*(' Physical /edium Specification

    Three physical media are defined in the current 8"2.11 standard=Infrared at 1 /bps and 2 /bps operating at a wavelength between 8D" and D" nm.!irect se&uence spread spectrum operating in the 2.B A4( I / band. >p to H channels#each with a data rate of 1 /bps or 2 /bps# can be used.

    re&uency hopping spread spectrum operating in the 2.B A4( I / hand. The details of this option are for further study=

    8(*(! /edium .ccess Control

    The 8"2.11 wor$ing group considered two types of proposals for a /%C algorithm=distributed-access protocols which# li$e C /%0C!# distributed the decision to transmit over

    all the nodes using a carrier sense mechanism and centrali/ed access protocols # which involveregulation of transmission by a centrali(ed decision ma$er.

    % distributed access protocol ma$es sense of an ad hoc networ$ of peer wor$stations andmay also be attractive in other wireless

  • 8/17/2019 Network and Ip Technology

    38/77

    transmit# it listens to the medium. If the medium is idle# the station may transmit otherwise# thestation must wait until the current transmission is complete before transmitting. The !C does notinclude a collision detection function ,i.e.# C /%0C!- because collision detection is not practicalon a wireless networ$. The dynamic range of the signals on the medium is very large# so that a

    transmitting station cannot effectively distinguish incoming wea$ signals from noise and theeffects of its own transmission.

    To ensure the smooth and fair functioning of this algorithm# !C includes a set of delays thatamounts to a priority scheme. sing an I # the rules for C /% access are as follows= ,1- % station with a frame to transmit senses the medium. If the medium is idle# the station waitsto see if the medium remains idle for a time e&ual to I # and# if this is so# the station mayimmediately transmit. ,2- If the medium is busy ,either because the station initially finds the medium busy or becausethe medium becomes busy during the I idle time-# the sta tion defers transmission and continuesto monitor the medium until the cur rent transmission is over. ,?- 'nce the current transmission is over# the station delays another I . If the medium remainsidle for this period# then the station bac$s off using a binary e)ponential bac$off scheme and againsenses the medium. If the medium is still idle# the station may transmit.

    %s with Ethernet# the binary e)ponential bac$off provides a means of handling a heavy load.If a station attempts to transmit and finds the medium busy# it bac$s off a certain amount and triesagain. Repeated failed attempts to transmit result in longer and longer bac$off times.

    The above scheme is refined for !C to provide priority based access by the simple

    e)pedient of using three values for I = 'I0' !short I0'" . The shortest I # used for all immediate response actions# ase)plained below.

    PI0' !point coordination function I0'"1 % mid length I # used by the centrali(edcontroller in the 3C scheme when issuing polls.

    $I0' !distributed coordination function I0'" # The longest I # used as a minimumdelay for asynchronous frames contending for access.

    igure B 12 illustrates the use of these time values. Consider first the I . %ny station usingI to determine transmission opportunity has# in effect# the highest priority# because it will

    always gain access in preference to a station waiting an amount of time e&ual to 3I or !I .

    ?

  • 8/17/2019 Network and Ip Technology

    39/77

    The I is used in the following circumstances= Acknowledgment !A%2" . :hen a station receives a frame addressed only to itself ,not multicast or broadcast- it responds with an %C@ frame after waiting only for an

    I gap this has two desirable effects. irst# because collision detection is not used#the li$elihood of collisions is greater than with C /%0C!# and the /%C level %C@

    provides for efficient collision recovery. econd# the I can be used to provideefficient delivery of an

  • 8/17/2019 Network and Ip Technology

    40/77

    remaining traffic# using C /%# contends for access. The point coordinator could issue polls in around robin fashion to all stations configured for polling. :hen a poll is issued# the polled stationmay respond using I . If the point coordinator receives a response# it issues another poll using3I . If no response is received during the e)pected turnaround time# the coordinator issues a poll.

    If the discipline of the preceding paragraph were implemented# the point coordinator wouldloc$ out all asynchronous traffic by repeatedly issuing polls. To prevent this situation# an interval$nown as the super frame is defined. !uring the first part of this interval# the point coordinator issues polls in a round robin fashion to all stations configured for polling. The point coordinator then idles for the remainder of the super frame# allowing a contention period for asynchronousaccess.

    igure B 12 illustrates the use of the super frame. %t the beginning of a super frame# the pointcoordinator may optionally sei(e control and issue polls for a give period of time. This intervalvaries because of the variable frame si(e issued by responding stations. The remainder of thesuper frame is available for contention based access. %t the end of the super frame interval# the

    point coordinator contends for access to the medium using 3I3 . If the medium is idle# the pointcoordinator gains immediate access# and a full super frame period follows. 4owever# the mediummay be busy at the end of a super frame. In this case# the point coordinator must wait until themedium is idle to gain access this results in a foreshortened super frame period for the ne)t cycle.

    6 INT+$N+T .N& INT$.N+T

    The Internet can be viewed as a collection of subnetwor$s or Autonomous 'ystems!A'es"that are connected together. There are no real structure# but several ma7or bac$bones e)ist. Theseare constructed high bandwidth and fast routers. %ttached to the bac$bone are regional ,midlevel-networ$s # attached to the these regional networ$s are the

  • 8/17/2019 Network and Ip Technology

    41/77

    The glue that holds the Internet together is the ;etwor$ layer protocol# I3 , Internet 3rotocol -. It was designed from the beginning with the internetwor$ing and intercommunication in mind.Its 7ob is to provide a best-efforts way to transport datagrams from source to destination# withoutregard to whether or not these machines are on the same networ$# or whether or not there are other networ$s in between them. Communication in the Internet wor$s as follows. The transport layer ta$es data streams and

    brea$s them up into datagrams. In theory# datagrams can be up to B @bytes each# but in practicethey are usually around 4566 bytes . Each datagram is transmitted through the Internet# possibly

    being fragmented into smaller units as it goes. :hen all the pieces finally get to the destinationmachine# they are reassembled by the networ$ layer into the original datagram. This datagram isthen handed to the transport layer# which inserts it into the receiving process6 input stream.

    6(('( The IP Protocol

    %n appropriate place to start our study of the networ$ layer in the Internet is the format of the I3datagrams themselves. %n I3 datagram consists of a header part and a te)t part. The header has a2" byte fi)ed part and a variable length optional part. The header format is shown in ig. D 2. It istransmitted in big endian order= from left to right# with the high order bit of the ersion field going

    first. ,The 3%RC is big endian the 3entium is little endian.- 'n little endian machines# softwareconversion is re&uired on both transmission and reception.

    Version field The Version field $eeps trac$ of which version of the protocol the datagram belongs to. 9y

    including the version in each datagram# it becomes possible to have the transition betweenversions ta$e months# or even years# with some machines running the old version and othersrunning the new one.

    header length ince the header length is not constant# a field in the header# I4

  • 8/17/2019 Network and Ip Technology

    42/77

    )ype of ser&ice field The )ype of ser&ice field allows the host to tell the subnet what $ind of service it wants.

    arious combinations of reliability and speed are possible. or digiti(ed voice# fast delivery beatsaccurate delivery. or file transfer# error free transmission is more important than fasttransmission. The field itself contains ,from left to right-# a three bit 3recedence field# threeflags# !# T# and R# and 2 unused bits. The 3recedence field is a priority# from " ,normal- to H,networ$ control pac$et-. The three flag bits allow the host to specify what it cares most about

    from the set S!elay# Throughput# Reliability . In theory# these fields allow routers to ma$e choices between# for e)ample# a satellite lin$ with high throughput and high delay or a leased line withlow throughput and low delay. In practice# current routers ignore the Type of ervice fieldaltogether.

    )otal length

    The )otal length includes everything in the datagram both header and data. The ma)imumlength is D#D?D bytes. %t present# this upper limit is tolerable# but with future gigabit networ$slarger datagrams will be needed.

    Identification field

    The Identification field is needed to allow the destination host to determine which datagrama newly arrived fragment belongs to. %ll the fragments of a datagram contain the sameIdentification value.

    $0 7*0- 0ragment offset

    $0 stands for !on6t ragment. It is an order to the routers not to fragment the datagram because the destination is incapable of putting the pieces bac$ together again. or e)ample# whena computer boots# its R'/ might as$ for a memory image to be sent to it as a single datagram. 9ymar$ing the datagram with the ! bit# the sender $nows it will arrive in one piece# even if thismeans that the datagram must avoid a small pac$et networ$ on the best path and ta$e a suboptimalroute. %ll machines are re&uired to accept fragments of DH bytes or less.

    *0 stands for /ore ragments. %ll fragments e)cept the last one have this bit set. It isneeded to $now when all fragments of a datagram have arrived.

    ersion I4< To Total length

    Identification ragment offset

    Time To

  • 8/17/2019 Network and Ip Technology

    43/77

    The 0ragment offset tells where in the current datagram this fragment belongs. %ll fragmentse)cept the last one in a datagram must be a multiple of 8 bytes# the elementary fragment unit.

    ince 1? bits are provided# there is a ma)imum of 81 2 fragments per datagram# giving ama)imum datagram length of D#D? bytes# one more than the Total length field.

    )ime to li&e field The )ime to li&e field is a counter used to limit pac$et lifetimes. It is supposed to count time

    in seconds# allowing a ma)imum lifetime of 2DD sec. It must be decremented on each hop and issupposed to be decremented multiple times when &ueued for a long time in a router. In practice# it

    7ust counts hops. :hen it hits (ero# the pac$et is discarded and a warning pac$et is sent bac$ to thesource host. This feature prevents datagrams for wandering around forever# something thatotherwise might happen if the routing tables ever become corrupted.

    Protocol field

    :hen the networ$ layer has assembled a complete datagram# it needs to $now what to dowith it. The Protocol field tells it which transport process to give it to. TC3 is one possibility# butso are >!3 and some others. The numbering of protocols is global across the entire Internet and isdefined in R C 1H"".

    #eader checksum

    The #eader checksum verifies the header only. uch a chec$sum is useful for detectingerrors generated by bad memory words inside a router. The algorithm is to add up all the 1 bithalfwords as they arrive# using one6s complement arithmetic and then ta$e the one6s complementof the result. or purposes of this algorithm# the 4eader chec$sum is assumed to be (ero uponarrival. This algorithm is more robust than using a normal add. ;ote that the 4eader chec$summust be recomputed at each hop# because at least one field always changes ,the Time to live field-#

    but tric$s can be used to speed up the computation.The 'ource address and $estination address indicate the networ$ number and host number.

    :e will discuss Internet addresses in the ne)t section.The (ptions field was designed to provide an escape to allow subse&uent versions of the protocolto include information not present in the original design# to permit e)perimenters to try out newideas# and to avoid allocating header bits to information that is rarely needed. The options arevariable length. Each begins with a 1 byte code identifying the option. ome options are followed

    by a 1 byte option length field# and then one or more data bytes. The 'ptions field is padded out toa multiple of four bytes.

    The Security option tells how secret the information is. In theory# a military router might usethis field to specify not to route through certain countries the military considers to be 5bad guys.5In practice# all routers ignore it# so its only practical function is to help spies find the good stuff more easily.

    The Strict source routing option gives the complete path from source to destination as ase&uence of I3 addresses. The datagram is re&uired to follow that e)act route. It is most useful for system managers to send emergency pac$ets when the routing tables are corrupted# or for ma$ingtiming measurements. The 2oose source routing option re&uires the pac$et to traverse the list of routers specified#and in the order specified# but it is allowed to pass through other routers on the way. ;ormally# this

    option would only provide a few routers# to force a particular path. or e)ample# to force a pac$etfrom

  • 8/17/2019 Network and Ip Technology

    44/77

    sed as a broadcast address to mean all hosts on the indicated networ$.

    B2

  • 8/17/2019 Network and Ip Technology

    45/77

    The I3 address "."."." is used by hosts when they are being booted but is not used afterward. I3addresses with " as networ$ number refer to the current networ$. These addresses allow machinesto refer to their own networ$ without $nowing its number ,but they have to $now its class to $nowhow many 's to include-. The address consisting of all ls allows broadcasting on the local

    networ$# typically a

  • 8/17/2019 Network and Ip Technology

    46/77

    :hen an I3 pac$et arrives# its destination address is loo$ed up in the routing table. If the pac$et is for a distant networ$# it is forwarded to the ne)t router on the interface given in the table.If it is a local host ,e.g.# on the router6s

  • 8/17/2019 Network and Ip Technology

    47/77

    The P.$./+T+$ P$%12+/ message indicates that an illegal value has been detected ina header field. This problem indicates a bug in the sending host6s I3 software# or possibly in thesoftware of a router transited. The S%U$C+ ;U+NC) message was formerly used to throttle hosts that were sending too

    many pac$ets. :hen a host received this message# it was e)pected to slow down. It is rarely usedany more because when congestion occurs# these pac$ets tend to add more fuel to the fire.Congestion control in the Internet is now done largely in the transport layer. The $+&I$+CT message is used when a router notices that a pac$et seems to be routedwrong. It is used by the router to tell the sending host about the probable error.

    The +C)% $+;U+ST and +C)% $+P24 messages are used to see if a given destinationis reachable and alive. >pon receiving the EC4' message# the destination is e)pected to send anEC4' RE3

  • 8/17/2019 Network and Ip Technology

    48/77

    Ethernet address. 'ne solution is to have a configuration file somewhere in the system that mapsI3 addresses onto Ethernet addresses. This solution is certainly possible# but for organi(ations withthousands of machines# $eeping these files up to date is an error prone# time consuming 7ob.

    % better solution is for host I to output a broadcast pac$et onto the Ethernet as$ing= 5:hoowns I3 address 2"2.11 . D.D 5 The broadcast will arrive at every machine on Ethernet2"2.11 . D."# and each one will chec$ its I3 address. 4ost 2 alone will respond with its Ethernetaddress ,E2-. In this way host 1 learns that I3 address 2"2.11 . D.D is on the host with Ethernetaddress E2. The protocol for as$ing this &uestion and getting the reply is called A P !Address

    esolution Protocol" . %lmost every machine on the Internet runs it. It is defined in R C 82 .%t this point# the I3 software on host 1 builds an Ethernet frame addressed to E2# puts the I3

    pac$et ,addressed to 2"2.11 . D.D- in the payload field# and dumps it onto the Ethernet. TheEthernet board of host 2 detects this frame# recogni(es it as a frame for itself# scoops it up# andcauses an interrupt. The Ethernet driver e)tracts the I3 pac$et from the payload and passes it to theI3 software# which sees that it is correctly addressed# and processes it.

    arious optimi(ations are possible to ma$e %R3 more efficient. To start with# once a machinehas run %R3# it caches the result in case it needs to contact the same machine shortly. ;e)t time itwill find the mapping in its own cache# thus eliminating the need for a second broadcast. In manycases host 2 will need to send bac$ a reply# forcing it# too# to run %R3 to determine the sender6sEthernet address. This %R3 broadcast can be avoided by having host 1 include its I3 to Ethernetmapping in the %R3 pac$et. :hen %R3 broadcast arrives at host 2# the pair ,2"2.11 . D.H# El- isentered into host 26s %R3 cache for future use. In fact# all machines on the Ethernet can enter thismapping into their %R3 caches.

    Fet another optimi(ation is to have every machine broadcast its mapping when it boots. This broadcast is generally done in the form of an %R3 loo$ing for its own I3 address. There should not be a response# but a side effect of the broadcast is to ma$e any entry in everyone6s %R3 cache. If aresponse does arrive# two machines have been assigned the same I3 address. The new one shouldinform the system manager and not boot.

    To allow mappings to change# for e)ample# when an Ethernet board brea$s and is replacedwith a new one ,and thus a new Ethernet address-# entries in the %R3 cache should time out after a

    ig. D D. Three interconnected class C networ$s= two Ethernets and an !!I ring

  • 8/17/2019 Network and Ip Technology

    49/77

    few minutes. ;ow let us loo$ at ig. D D again# only this time host 1 wants to send a pac$et to host

    ,2"2.11 . ?.8-. >sing %R3 will fail because host B will not see the broadcast ,routers do notforward Ethernet level broadcasts-. There are two solutions. irst# the C T router could be

    configured to respond to %R3 re&uests for networ$ 2"2.11 . ?." ,and possibly other localnetwor$s-. In this case# host 1 will ma$e an %R3 cache entry of ,2"2.11 . ?.8# E?- and happilysend all traffic for host B to the local router. This solution is called pro.y APP . The secondsolution is to have host 1 immediately see that the destination is on a remote networ$ and 7ust rendall such traffic to a default Ethernet address that handles all remote traffic# in this case E?. Thissolution does not re&uire having the C T router $now which remote networ$s it is serving.

    Either way# what happens is that host 1 pac$s the I3 pac$et into the payload field of anEthernet frame addressed to E?. :hen the C T router gets the Ethernet frame# it removes the I3

    pac$et from the payload field and loo$s up the I3 address in its routing tables. It discovers that pac$ets for networ$ 2"2.11 . ?." are supposed to go to router 2"2.11 . ".H. If it does not already$now the !!I address of 2"2.11 . ".H# it broadcasts an %R3 pac$et onto the ring and learns thatits ring address is ?. It then inserts the pac$et into the payload field of an !!I frame addressedto ? and puts it on the ring.

    %t the EE router# the !!I driver removes the pac$et from the payload field and gives it tothe I3 software# which sees that it needs to send the pac$et to 2"2.11 . ?.8. If this I3 address is notin its %R3 cache# it broadcasts an %R3 re&uest on the EE Ethernet and learns that the destinationaddress is E so it builds an Ethernet frame addressed to E # puts the pac$et in the payload field#and sends it over the Ethernet. :hen the Ethernet frame arrives at host B# the pac$et is e)tractedfrom the frame and passed to the I3 software for processing.

    Aoing from host 1 to a distant networ$ over a :%; wor$s essentially the same way# e)ceptthat this time the C T router6s tables tell it to use the :%; whose !!I address is 2.

    6(*(* The $everse .ddress $esolution Protocol

    %R3 solves the problem of finding out which Ethernet address corresponds to given I3address.# ometimes the reverse problem has to solved= Aiven an Ethernet address# what is thecorresponding I3 address In particular# this problem occurs when booting a dis$less wor$station.

    uch a machine will normally get the binary image of its operating system from a remote fileserver.

    6(*(8> The Interior 3ateway $outing ProtocolD %SP7

    %s we mentioned earlier# the Internet is made up of a large number of Autonomous 'ystems .Each % is operated by a different organi(ation and can use its own routing algorithm inside. or e)ample# the internal networ$s of companies J# F# and M would usually be seen as three % es if all three were on the Internet. %ll three may use different routing algorithms internally.

    ;evertheless# having standards# even for internal routing# simplifies the implementation at the boundaries between % es and allows reuse of code. In this section we will study routing within an% . In the ne)t one# we will loo$ at routing between % es. % routing algorithm within an % iscalled an interior gateway protocol an algorithm for routing between % es is called an

    E8P!e.terior gateway protocol" . The original Internet interior gateway protocol was a distance vector protocol ! IP, outing

    BH

  • 8/17/2019 Network and Ip Technology

    50/77

    Information Protocol" based on the ellman-0ord algorithm . It wor$ed well in small systems# but less well as % es got larger. It also suffered from the count to infinity problem and generallyslow convergence# so it was replaced in /ay 1 H by a lin$ state protocol. In 1 88# the

    IE)0! Internet Engineering )ask 0orce " began :or$ on a successor. That successor# called

    ('P0 !(pen 'hortest Path 0irst" became a standard in 1 ". /any router vendors are nowsupporting it# and it will become the main interior gateway protocol in the near future. 9elow wewill give a s$etch of how ' 3 wor$s. or the complete story# see R C 12BH.

    Aiven the long e)perience with other routing protocols# the group designing the new protocolhad a long list of re&uirements that had to be met.

    ,1- The algorithm had to be published in the open literature # hence the 5'5 in ' 3 . % proprietary solution owned by one company would not do.

    ,2- The new protocol had to support a variety of distance metrics# including physical distance, delay # and so on.

    ,?- Iit had to be a dynamic algorithm # one that adapted to changes in the topologyautomatically and &uic$ly. ,B- ;ew for ' 3 # it had to support routing based on type of ser&ice . The new protocol had to

    be able to route real-time traffic one way and other traffic a different way. The I3 protocol has aType of ervice field# but no e)isting routing protocol used it. ,D- Related to the above# the new protocol had to do load balancing # splitting the load over multiple lines. /ost previous protocols sent all pac$ets over the best route. The second best routewas not used at all. In many cases# splitting the load over multiple lines gives better performance.

    , - upport for hierarchical systems was needed. 9y 1 88# the Internet had grown so largethat no router could be e)pected to $now the entire topology. The new routing protocol had to be

    designed so that no router would have to.,H- ome modicum of security was re&uired to prevent fun loving students from spoofing

    routers by sending them false routing information.,8- 3rovision was needed for dealing with routers that were connected to the Internet via a

    tunnel. 3revious protocols did not handle this well. ' 3 supports three $inds of connections and networ$s= 1. 3oint to point lines between e)actly two routers. 2. /ultiaccess networ$s with broadcasting ,e.g.# most

  • 8/17/2019 Network and Ip Technology

    51/77

    /any of the % es in the Internet are themselves large and nontrivial to manage. ' 3 allowsthem to be divided up into numbered areas# where an area is a networ$ or a set of contiguousnetwor$s. %reas do not overlap but need not be e)haustive# that is# some routers may belong to noarea. %n area is a generali(ation of a subnet. 'utside an area# its topology and details are not

    visible.

    Every % has a bac$bone area# called area ". %ll areas are connected to the bac$bone# possibly bytunnels# so it is possible to go from any area in the % to any other area in the % via the

    bac$bone. % tunnel is represented in the graph as an arc and has a cost. Each router that isconnected to two or more areas is part of the bac$bone %s with other areas# the topology of the

    bac$bone is not visible outside the bac$bone.:ithin an area# each router has the same lin$ state database and runs the same shortest path

    algorithm. Its main 7ob is to calculate the shortest path from itself to every other router in the area#

    including the router that is connected to the bac$bone# of which there must be at least one. %router that connects to two areas needs the databases for both areas and must run the shortest pathalgorithm for each one separately.

    The way ' 3 handles type of service routing is to have multiple graphs# one labeled withthe costs when delay is the metric# one labeled with the costs when throughput is the metric# andone labeled with the costs when reliability is the metric. %lthough this triples the computationneeded# it allows separate routes for optimi(ing delay# throughput# and reliability.

    !uring normal operation# three $inds of routes may be needed= intra area# inter area# andinter% . Intra area routes are the easiest# since the source router already $nows the shortest path tothe destination router. Inter area routing always proceeds in three steps= go from the source to the

    bac$bone go across the bac$bone to the destination area go to the destination. This algorithmforces a star configuration on ' 3 with the bac$bone being the hub and the other areas beingspo$es. 3ac$ets are routed from source to destination 5as is.5 They are not encapsulated or tunneled# unless going to an area whose only connection to the bac$bone is a tunnel.

    :hen a router boots# it sends #ELL( messages on all of its point to point lines and multicaststhem on

  • 8/17/2019 Network and Ip Technology

    52/77

    router. It is said to be ad7acent to all the other routers# and e)changes information with them. ;eighboring routers that are not ad7acent do not e)change information with each other. % bac$updesignated router is always $ept up to date to ease the transition should the primary designatedrouter crash.

    !uring normal operation# each router periodically floods LIN2 ')A)E 9P$A)E messages toeach of its ad7acent routers. This message gives its state and provides the costs used in thetopological database. The flooding messages are ac$nowledged !LIN2 ')A)E A%2", to ma$ethem reliable. Each message has a se&uence number# so a router can see whether an incoming3!%TE is older or newer than what it currently has. Routers also send thesemessages when a line goes up or down or its cost changes.

    $A)A A'E $E'% IP)I(N messages give the se&uence numbers of all the lin$ stateentries currently held by the sender. 9y comparing its own values with those of the sender# thereceiver can determine who has the most recent values. These messages are used when a line is

    brought up.Either partner can re&uest lin$ state information from the other one using LIN2 ')A)E

    E+9E') messages. The net result of this algorithm is that each pair of ad7acent routers chec$sto see who has the most recent data# and new information is spread throughout the area this way.%ll these messages are sent as raw I3 pac$ets.

    inally# we can put all the pieces together. >sing flooding# each router informs all the other routers in its area of its neighbors and costs. This information allows each router to construct thegraph for its area,s- and compute the shortest path. The bac$bone area does this too. In addition#the bac$bone routers accept information from the area border routers in order to compute the bestroute from each bac$bone router to every other router. This information is propagated bac$ to the

    area border routers# which advertise it within their areas. >sing this information# a router about tosend an inter area pac$et can select the best e)it router to the bac$bone.

    6(*(6 The + terior 3ateway $outing ProtocolD 13P

    :ithin a single % # the recommended routing protocol on the Internet is ' 3 ,although it iscertainly not the only one in use-. 9etween % es# a different protocol# 8P ! order 8ateway

    Protocol" # is used. % different protocol is needed between % es because the goals of an interior gateway protocol and an e)terior gateway protocol are not the same. %ll an interior gateway

    protocol has to do is move pac$ets as efficiently as possible from the source to the destination. Itdoes not have to worry about politics. E)terior gateway protocol routers have to worry about politics a great deal. or e)ample# acorporate % might want the ability to send pac$ets to any Internet site and receive pac$ets fromany Internet site. 4owever# it might be unwilling to carry transit pac$ets originating in a foreign% and ending in a different foreign % # even if its own % was on the shortest path between thetwo foreign %ses ,5That6s their problem# not ours5-. 'n the other hand# it might be willing to carrytransit traffic for its neighbors# or even for specific other % es that paid it for this service.Telephone companies# for e)ample# might be happy to act as a carrier for their customers# but notfor others. E)terior gateway protocols in general# and 9A3 in particular# have been designed toallow many $inds of routing policies to be enforced in the inter % traffic.

    Typical policies involve political# security# or economic considerations. % few e)amples of routing constraints are=

    D"

  • 8/17/2019 Network and Ip Technology

    53/77

    1. ;o transit traffic through certain % es.2. ;ever put Ira& on a route starting at the 3entagon.?. !o not use the >nited tates to get from 9ritish Columbia to 'ntario.B. 'nly transit %lbania if there is no alternative to the destination.

    D. Traffic starting or ending at I9/ should not transit /icrosoft.3olicies are manually configured into each 9A3 router. They are not part of the protocol

    itself. rom the point of view of a 9A3 router# the world consists of other 9A3 routers and the linesconnecting them. Two 9A3 routers are considered connected if they share a common networ$.Aiven 9A36s special interest in transit traffic# networ$s are grouped into one of three categories.The first category is the stub networ$s# which have only one connection to the 9A3 graph. Thesecannot be used for transit traffic because there is no one on the other side. Then come themulticonneeted networ$s. These could be used for transit traffic# e)cept that they refuse. inally#there are the transit networ$s# such as bac$bones# which are willing to handle third party pac$ets#

    possibly with some restrictions. 3airs of 9A3 routers communicate with each other by establishing TC3 connections. 'peratingthis way provides reliable communication and hides all the details of the networ$ being passedthrough. 9A3 is fundamentally a distance vector protocol# but &uite different from most others such asRI3. Instead of maintaining 7ust the cost to each destination# each 9A3 router $eeps trac$ of thee)act path used. imilarly# instead of periodically giving each neighbor its estimated cost to each

    possible destination# each 9A3 router tells its neighbors the e)act path it is using. The current definition of 9A3 is in R C 1 DB. %dditional useful information can be found in

    R C 12 8.

    6(*(# Internet /ulticasting

    ;ormal I3 communication is between one sender and one receiver. 4owever# for someapplications it is useful for a process to be able to send to a large number of receiverssimultaneously. E)amples are updating replicated# distributed databases# transmitting stoc$ &uotesto multiple bro$ers# and handling digital conference ,i.e.# multiparty- telephone calls.

    I3 supports multicasting# using class ! addresses. Each class ! address identifies a group of hosts. Twenty eight bits are available for identifying groups# so over 2D" million groups can e)istat the same time. :hen a process sends a pac$et to a class ! address# a best efforts attempt ismade to deliver it to all the members of the group addressed# but no guarantees are given. omemembers may not get the pac$et.

    Two $inds of group addresses are supported= permanent addresses and temporary ones. % permanent group is always there and does not have to be set up. Each permanent group has a permanent group address. ome e)amples of permanent group addresses are

    22B.".".1 %ll systems on a

  • 8/17/2019 Network and Ip Technology

    54/77

  • 8/17/2019 Network and Ip Technology

    55/77

    ?. Changes to the router software and tables were not permitted.B. /ost pac$ets for mobile hosts should not ma$e detours on the way.D. ;o overhead should be incurred when a mobile host is at home.To review it briefly# every site that wants to allow its users to roam has to create a home

    agen t. Every site that wants to allow visitors has to create a foreign agent . :hen a mobile hostshows up at a foreign site# it contacts the foreign host there and registers. The foreign host thencontacts the user6s home agent and gives it a care of address# normally the foreign agent6s own I3address.

    :hen a pac$et arrives at the user6s home

  • 8/17/2019 Network and Ip Technology

    56/77

    arm rests so passengers with mobile computers can also plug in. ;ow we have two levels of mobility= the aircraft6s own computers# which are stationary with

    respect to the Ethernet# and the passengers6 computers# which are mobile with respect to it. Inaddition# the on board router is mobile with respect to routers on the ground. 9eing mobile with

    respect to a system that is itself mobile can be handled using recursive tunneling.

    6(*(: CI&$AAClassless Inter &omain $outing

    I3 has been in heavy use for over a decade. It has wor$ed e)tremely well# as demonstrated bythe e)ponential growth of the Internet. >nfortunately# I3 is rapidly becoming a victim of its own

    popularity= it is running out of addresses. This looming disaster has spar$ed a great deal of discussion land controversy within the Internet community about what to do about it. In thissection we will describe both the problem and several proposed solutions.

    9ac$ in 1 8H# a few visionaries predicted that some day the Internet might grow to 1""#"""networ$s. /ost e)perts pooh poohed this as being decades in the future# if ever. The 1""#"""thnetwor$ was connected in 1 . The problem# simply stated# is that the Internet is rapidly runningout of I3 addresses. In principle# over 2 billion addresses e)ist# but the practice of organi(ing theaddress space by classes# wastes millions of them. In particular# the real villain is the class 9networ$. or most organi(ations# a class % networ$# with 1 million addresses is too big# and aclass C networ$# with 2D addresses is too small. % class 9 networ$# with D#D? # is 7ust right. InInternet fol$Sore# this situation is $nown as the three bears problem ,as in Aoldiloc$s and theThree 9ears-.

    In reality# a class 9 address is far too large for most organi(ations. tudies have shown thatmore than half of all class 9 networ$s have fewer than D" hosts. % class C networ$ would have

    done the 7ob# but no doubt every organi(ation that as$ed for a class 9 address thought that one dayit would outgrow the 8 bit host field. In retrospect# it might have been better to have had class Cnetwor$s use 1" bits instead of eight for the host number# allowing 1"22 hosts per networ$. 4adthis been the case# most organi(ations would have probably settled for a class C networ$# andthere would have been half a million of them ,versus only 1 #?8B class 9 networ$s-.

    4owever# then another problem would have emerged more &uic$ly= the routing tablee)plosion. rom the point of view of the routers# the I3 address space is two level hierarchy# withnetwor$ numbers and host numbers. Routers do not have to $now about all the hosts# but they dohave to $now about all the networ$s. If half a million class C networ$s were in use# every router inthe entire Internet would need a table with half a million entries# one per networ$# telling whichline to use to get to that networ$# as well as other information.

    The actual physical storage of half a million entry tables is probably doable# althoughe)pensive for critical routers that $eep the tables in static R%/ on I0' boards. % more serious

    problem is that the comple)ity of various algorithms relating to management of the tables growsfaster than linear. :orse yet# much of the e)isting router software and firmware was designed at atime when the Internet had 1""" connected networ$s and 1"#""" networ$s seemed