04. tcp-ip

Upload: everinspire

Post on 08-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 04. TCP-IP

    1/36

    Sistem TelekomunikasiModul-04

    TCP/IP and the Internet

  • 8/7/2019 04. TCP-IP

    2/36

    Introduction

    What is TCP/IP:A software-based communications protocol used in networkingProvides network services: Telnet, email, etc

    Provides a method for transfering information from one machine to another

    Using the term TCP/IP usually refers to one or more protocols within the family, not just TCP and IP

    TCP/IP vs OSI Model

    M aret 2011 2Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    3/36

    TCP/IP Components

    M aret 2011 3Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    4/36

    A Quick Overview of TCP/IP Components (1/2)

    Telnet :Provides a remote login capability.F ile Transfer Protocol ( FTP):

    E nables a file on one system to be copied to another system

    Simple Mail Transfer Protocol (SMTP):Used for transferring electronic mail

    Kerberos :Security protocol using uses a special application called an authentication server to validatepasswords and encryption schemes

    D omain Name System ( D NS):E nables a computer with a common name to be converted to a special network address.DNS provides a conversion from the common local name to the unique physical address of thedevice's network connection

    Simple Network Management Protocol (SNMP) :Provides status messages and problem reports across a network to an administratorSNM P works with managers and agents, instead of clients and serversAn agent provides information about a device, whereas a manager communicates across a networkwith agents

    A bstract Syntax Notation ( A SN):a standard and flexible notation that describes data structures for representing, encoding,transmitting, and decoding data

    M aret 2011 4Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    5/36

    A Quick Overview of TCP/IP Components (1/2)

    NetworkF

    ile System (NFS):A set of protocols developed by Sun M icrosystems to enable multiple machines to access each

    other's directories transparentlyRemote Procedure Call ( R PC):

    A set of functions that enable an application to communicate with another machine (the server)It provides for programming functions, return codes, and predefined variables to support distributedcomputing

    Trivial F ile Transfer Protocol (T FTP):

    A very simple, unsophisticated file transfer protocol that lacks securityTransmission Control Protocol (TCP) :A communications protocol that provides reliable transfer of dataIt is responsible for assembling data passed from higher-layer applications into standard packets andensuring that the data is transferred correctly

    U ser D atagram Protocol ( UD P):A connectionless-oriented protocol, meaning that it does not provide for the retransmission of datagrams (unlike TCP, which is connection-oriented)

    Internet Protocol (IP) :R esponsible for moving the packets of data assembled by either TCP or UDP across networks

    Internet Control Message Protocol (ICMP) :R esponsible for checking and generating messages on the status of devices on a networkIt can be used to inform other devices of a failure in one particular machine.ICM P and IP usually work together

    M aret 2011 5Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    6/36

    TCP/IP History (1/3)1958 After USS R launches Sputnik, first artificial earth satellite, US formsthe Advanced Research Projects Agency ( AR PA), the following year, withinthe Department of Defense (DoD) to establish US lead in science andtechnology applicable to the military1961 First published work on packet switching ( Information Flow in

    Large Communication Nets , Leonard Kleinrock, M IT graduate student)1964 other independent work in packet switching at R AND Institute andNational Physics Laboratory in England1966 Lawrence Roberts (colleague of Kleinrock from M IT) publishesoverall plan for an A R PAnet, a proposed packet switch network1968 A R PA awards contracts for four nodes in A R PANET to UCLA

    (NetworkM

    easurement), StanfordR

    esearch Institute (NetworkInformation Center), UCSB (Interactive M athematics) and U Utah(Graphics); BBN gets contract to build the I M P switches

    Colleagues on Kleinrocks from M IT go on to lead computer science program at A R PABBN = Bolt Beraneck and Newman IncIM P = Interface M essage Processors

    M aret 2011 6Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    7/36

    TCP/IP History (2/3)4/7/1969 First R FC ( Host Software by Steve Crocker) basisfor the Network Control Protocol(NCP)1967-1972 Vint Cerf, graduate student in Kleinrock s lab,works on application level protocols for the A R PANET (filetransfer and Telnet protocols)1971 - R ay Tomlinson of BBN writes email application; derivedfrom two existing: an intra-machine email program(SENDM SG) and an experimental file transfer program(CPYNET)1973 E thernet was designed in 1973 by Bob M etcalfe atXerox Palo Alto Research Center (PA R C)1972-1974 Robert Kahn and Vint Cerf develop protocols toconnect networks without any knowledge of the topology orspecific characteristics of the underlying nets1974 First full draft of TCP produced

    M aret 2011 7Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    8/36

    TCP/IP History (3/3)November 1977 - First three-network TCP/IP based interconnectiondemonstrated linking SATN ET, PR NET and A R PANET in a path leading fromM enlo Park, CA to Univ. College London and back to USC/ISI ( M arina delR ay, CA)1978 TCP split into TCP and IP1981 Term Internet coined to mean collection of interconnectednetworks1982 ISO releases OSI seven layer model; actual protocols die but modelis influential1/1/1983 Original A R PANET NCP was banned from the A R PANET andTCP/IP was required1984 Domain Name System introduced; 1000+ hosts (200 hosts by endof 1970s; over 100000 by end of 1980s)1988 - Nodes on Internet began to double every year1988 - Internet Assigned Numbers Authority (IANA) established inDecember with Jon Postel as its Director. Postel was also the R FCEditorand US Domain registrar for many years

    .

    M aret 2011 8Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    9/36

    TCP/IP LayersPhysical Layer

    Concerned with physical interface between computer and network (characteristics of transmission medium, signal levels, data rates, etc)

    Network A ccess LayerExchange of data between an end system and attached networkConcerned with issues like :

    destination address provisioninvoking specific services like priority

    access to & routing data across a network link between two attached systemsAllows upper layers to ignore link specificsInternet Layer (IP)

    R outing functions across multiple networks for systems attached to different networks using IPprotocolImplemented in end systems and routersR outers connect two networks and relays data between them

    Transport Layer (TCP)Provides reliable delivery of dataA pplication Layer

    Provides support for user applicationsNeeds a separate module for each type of application

    M aret 2011 9Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    10/36

    R easons to use TCP/IP

    TCP/IP is up and running and has a proven record.TCP/IP has an established, functioning management body.

    Thousands of applications currently use TCP/IP and its well-

    documented application programming interfaces.TCP/IP is the basis for most UNIX systems, which are gainingthe largest share of the operating system market (other thandesktop single-user machines such as the PC and M acintosh).

    TCP/IP is vendor-independent

    M aret 2011 10Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    11/36

    The InternetThe Internet is not a singlenetwork but a collection of networks that communicate witheach other through gatewaysThe different networks connectedto each other through gatewaysare often called subnetworks,because they are a smaller part of the larger overall networkSubnetworks are completenetworks, but they are connectedthrough a gateway as a part of alarger internetwork, or in this casethe Internet.

    M aret 2011 11Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    12/36

    Transfer of a datagram over aninternetwork

    M aret 2011 12Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    13/36

    Internet A ddresses

    Three terms commonly used in the Internet relate toaddressing:

    name: is a specific identification of a machine, a user, or anapplication. It is usually unique and provides an absolute target for thedatagram.address: typically identifies where the target is located, usually itsphysical or logical location in a networkRoute: tells the system how to get a datagram to the address

    name server: a network software package used to resolve theaddress and the route from the name.

    Advantage of name server:addressing and routing unimportant to the end userSystem/network admin can freely change the network as required

    M aret 2011 13Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    14/36

    Subnetwork A ddressing

    On a single network, several pieces of informationare necessary to ensure the correct delivery of data.The primary components are:

    the physical addressthe data link address.

    M aret 2011 14Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    15/36

    Physical A ddress

    Each device on a network that communicates with others has a unique p hysical address, sometimes called the hardware addressFor hardware, the addresses are usually encoded into a network interface card, set

    either by switches or by softwareIf the recipient's address matches the physical address of the device, the datagramcan be passed up the layers. If the addresses don't match, the datagram is ignoredE thernet and several others use 48 bits in each addressIt is called a media access control ( M AC) address

    M aret 2011 15Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    16/36

    The D ata Link A ddress

    The preamble is a set of bits that are used primarily to synchronize thecommunication process and account for any random noise in the first few bits thatare sent. At the end of the preamble is a sequence of bits that are the start framedelimiter (SFD), which indicates that the frame follows immediately.The recipient and sender addresses follow in I EEE 48-bit format, followed by a 16-bit type indicator that is used to identify the protocolThe Data field is between 46 and 1,500 bytes in lengthCyclic redundancy check (C R C) count, which is used to ensure that the frame'scontents have not been modified during the transmission process.

    E thernet F rames

    M aret 2011 16Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    17/36

    IP A ddresses (IPv4)TCP/IP uses a 32-bit address to identify a machine on a network and the network to which it isattached.

    IP addresses identify a machine's connection to the network, not the machine itself Whenever a machine's location on the network changes, the IP address must be changed, tooIP address is the set of numbers many people see on their workstations or terminals, such as 127.40.8.72,which uniquely identifies the device

    IP (or Internet) addresses are assigned only by the Network Information Center (NIC)if a network is not connected to the Internet, that network can determine its own numberingFor all Internet accesses, the IP address must be registered with the NIC

    There are four formats for the IP address, with each used depending on the size of the network:Class A, B, C, and D

    M aret 2011 17Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    18/36

    IP A ddresses (IPv4)Class A addresses are for large networks that have many machines. The 24bits for the local address (also frequently called the host address) areneeded in these cases. The network address is kept to 7 bits, which limitsthe number of networks that can be identified.Class B addresses are for intermediate networks, with 16-bit local or host

    addresses and 14-bit network addresses.Class C networks have only 8 bits for the local or host address, limiting thenumber of devices to 256. There are 21 bits for the network address.Class D networks are used for multicasting purposes, when a generalbroadcast to more than one device is required.The lengths of each section of the IP address have been carefully chosento provide maximum flexibility in assigning both network and localaddresses.

    M aret 2011 18Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    19/36

    IP A ddresses (IPv4)IP addresses are four sets of 8 bits, for a total 32 bits, e.i.:

    network.local.local.local for Class Anetwork.network.network.local for Class C

    The IP addresses are usually written out in their decimal equivalents,instead of the long binary strings, example 147.10.13.28,

    network address is 147.10local or host address is 13.28.

    The actual address is a set of 1s and 0s. The decimal notation used for IPaddresses is properly called dotted quad notationif an address is set to all 1s, the address applies to all addresses on the

    network, example: the address 147.10.255.255 for a Class B network(identified as network 147.10) would be received by all devices on thatnetwork (255.255 being the local addresses composed of all 1s), but thedata would not leave the network.

    M aret 2011 19Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    20/36

    IP A ddress Class Network and Host Capacities

    P A ddress ClassTotal # Of Bits

    For Network I D / Host I D

    F irst Octet of IPA ddress

    # Of Network I D Bits U sed To

    Identify Class

    U sable # Of Network I D Bits

    Number of Possible

    Network I D s

    # Of Host I D sPer Network I D

    Class A 8 / 24 0xxx xxxx 1 8-1 = 7 2 7-2 = 126224 -2 =

    16,277,214

    Class B 16 / 16 10 xx xxxx 2 16-2 = 14 2 14 = 16,384 2 16 -2 = 65,534

    Class C 24 / 8 110 x xxxx 3 24-3 = 21 2 21 = 2,097,152 2 8-2 = 254

    M aret 2011 20Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    21/36

    The D omain Name SystemInstead of using the full 32-bit IP address, many systems adopt more meaningful namesfor their devices and networks.Network names usually reflect the organization's nameTranslating between these names and the IP addresses would be practically impossibleon an Internet-wide scale.To solve the problem of network names, the Network Information Center (NIC)maintains a list of network names and the corresponding network gateway addresses.This system grew from a simple flat-file list (which was searched for matches) to a morecomplicated system called the Domain Name System (DNS) when the networks becametoo numerous for the flat-file system to function efficiently.DNS uses a hierarchical architecture, much like the UNIX filesystem.

    The first level of naming divides networks into the category of subnetworks, such as com forcommercial, mil for military, edu for education, and so on.Below each of these is another division that identifies the individual subnetwork, usually onefor each organization. This is called the domain name and is unique.

    The organization's system manager can further divide the company's subnetworks as desired,with each network called a subdomain. For example, the system merlin.abc_corp.com has thedomain name abc_corp.com, whereas the network merlin.abc_corp is a subdomain of merlin.abc_corp.com.A network can be identified with an absolute name (such as merlin.abc_corp.com) or arelative name (such as merlin) that uses part of the complete domain name.

    M aret 2011 21Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    22/36

    The D omain Name SystemSeven first-level domain names have been established by the NIC so far. These are as follows

    The NIC also allows for a country designator to be appended. There are designators for allcountries in the world, such as .ca for Canada and .uk for the United Kingdom.DNS uses two systems to establish and track domain names.

    A name resolver on each network examines information in a domain name.If it can't find the full IP address, it queries a name server, which has the full NIC informationavailable. The name resolver tries to complete the addressing information using its own database.If a queried name server cannot resolve the address, it can query another name server, and so on,across the entire internetwork.

    There is a considerable amount of information stored in the name resolver and name server,as well as a whole set of protocols for querying between the two.

    arpa An ARPANET-Internet identification

    .com Commercial company

    .edu Educational institution

    .gov Any governmental body

    .mil Military

    .net Networks used by Internet Service Providers

    .org Anything that doesn't fall into one of the other categories

    M aret 2011 22Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    23/36

    The Internet Protocol (IP)

  • 8/7/2019 04. TCP-IP

    24/36

    Internet ProtocolThe primary protocol of the OSI model, as well as an integral part of TCP/IP(as the name suggests).Although the word "Internet" appears in the protocol's name, it is notrestricted to use with the Internet. It is true that all machines on theInternet can use or understand IP, but IP can also be used on dedicated

    networks that have no relation to the Internet at all.What does IP do?Formal definition of layout of a datagram informationRouting of datagram (direct route, alternate route)R elated to the unreliable

    IP is connectionless

    doesn't worry about which nodes a datagram passes through along the pathIP handles the addressing of a datagram with the full 32-bit Internet address,even though the transport protocol addresses use 8 bits.A new version of IP, called version 6 or IPng (IP Next Generation) can handlemuch larger headers

    M aret 2011 24Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    25/36

    The Internet Protocol D atagram Header

    IPv4 datagram format

    M aret 2011 25Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    26/36

    IP Header F ields (1)Version Number : 4-bit field that contains the IP version number theprotocol software is usingHeader Length : 4-bit field reflects the total length of the IP header built bythe sending machineType of Service : 8-bit (1 byte) Service Type field instructs IP how toprocess the datagram properly

    D atagram Length (or Packet Length): the total length of the datagram,including the header, in bytesIdentification : This field holds a number that is a unique identifier createdby the sending nodeF lags : 3-bit field, the first bit of which is left unused (it is ignored by theprotocol and usually has no value written to it)Fragment Offset : enables IP to reassemble fragmented packets in theproper order

    M aret 2011 26Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    27/36

    IP Header F ields (2)Time to Live (TTL): the amount of time in seconds that a datagram canremain on the network before it is discardedTransport Protocol : holds the identification number of the transportprotocol to which the packet has been handedHeader Checksum : checksum for the protocol header field (but not the

    data fields) to enable faster processingSending A ddress and D estination A ddress : 32-bit IP addresses of thesending and destination devicesOptions : The Options field is optional, composed of several codes of variable length. If more than one option is used in the datagram, theoptions appear consecutively in the IP header

    Padding : The content of the padding area depends on the optionsselected. The padding is usually used to ensure that the datagram headeris a round number of bytes.

    M aret 2011 27Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    28/36

    D atagram s Life (1)

    Case: application must send a datagram out on the networkit constructs the IP datagram within the legal lengths stipulated by thelocal IP implementation.The checksum is calculated for the data, and then the IP header is

    constructed.Determine the first hop (machine) to route the datagram to thedestination machine directly over the local network, or to a gateway (if the internetwork is used)If routing is important, this information is added to the header usingan option.,

    the datagram is passed to the network for its manipulation of thedatagram.

    M aret 2011 28Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    29/36

    D atagram s Life (2)As a datagram passes along the internetwork

    each gateway performs a series of testsAfter the network layer has stripped off its own header, the gateway IPlayer calculates the checksum and verifies the integrity of the datagram.If the checksums don't match, the datagram is discarded and an errormessage is returned to the sending device.Next, the TTL field is decremented and checked. If the datagram hasexpired, it is discarded and an error message is sent back to the sendingmachine.After determining the next hop of the route, either by analysis of thetarget address or from a specified routing instruction within the Optionsfield of the IP header, the datagram is rebuilt with the new TTL value andnew checksum.

    If fragmentation is necessary because of an increase in the datagram'slength or a limitation in the software, the datagram is divided, and newdatagrams with the correct header information are assembled.If a routing or timestamp is required, it is added as well.Finally, the datagram is passed back to the network layer.

    M aret 2011 29Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    30/36

    D atagram s Life (3)When the datagram is finally received at the destinationdevice

    the system performs a checksum calculationIf the two sums match checks to see if there are other fragments.If more datagrams are required to reassemble the entire message, thesystem waits, meanwhile running a timer to ensure that thedatagrams arrive within a reasonable time.If all the parts of the larger message have arrived but the device can'treassemble them before the timer reaches 0, the datagram isdiscarded and an error message is returned to the sender.Finally, the IP header is stripped off, the original message is

    reconstructed if it was fragmented, and the message is passed up thelayers to the upper layer application.If a reply was required, it is then generated and sent back to thesending device.

    M aret 2011 30Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    31/36

    Internet Control Message Protocol(ICMP)

    The IP (Internet Protocol) relies on several other protocols to perform necessarycontrol and routing functionsControl functions ICM PThe Internet Control M essage Protocol (IC M P) is a helper protocol that supports IPwith facility for

    E rror reportingSimple queries

    ICM P messages are encapsulated as IP datagrams

    M aret 2011 31Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    32/36

    IPng: IP Version 6

    When IP version 4 (the current release) was developed, theuse of a 32-bit IP address seemed more than enough tohandle the projected use of the Internet.With the incredible growth rate of the Internet over the lastfew years, however, the 32-bit IP address might become aproblem.To counter this limit, IP Next Generation, usually called IPversion 6 (IPv6), is under development.

    M aret 2011 32Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    33/36

    Main Features of IPv6

    128-bit network address instead of 32-bitM ore efficient IP header with extensions for applications andoptionsNo header checksumA flow label for quality-of-service requirementsPrevention of intermediate fragmentation of datagramsBuilt-in security for authentication and encryption

    M aret 2011 33Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    34/36

    IPv6 Header D atagram

    M aret 2011 34Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    35/36

    128 bit IP A ddressIPng increases the IP address from 32 bits to 128 bits. This enables anincredible number of addresses to be assembled, probably more than can everbe used.The new IP addresses support three kinds of addresses: unicast, multicast, andanycast.

    Unicast addresses are meant to identify a particular machine's interface. This lets aPC, for example, have several different protocols in use, each with its own address.Thus, you could send messages specifically to a machine's IP interface address andnot the NetB EUI interface address.A multicast address identifies a group of interfaces, enabling all machines in agroup to receive the same packet. This is much like broadcasts in IP version 4,although with more flexibility for defining groups. Your machine's interfaces couldbelong to several multicast groups.An anycast address identifies a group of interfaces on a single multicast address. Inother words, more than one interface can receive the datagram on the same

    machine.The handling of fragmentation and reassembly is also changed with IPng toprovide more capabilities for IP. Also proposed for IPng is an authenticationscheme that can ensure that the data has not been corrupted between senderand receiver, as well as ensuring that the sending and receiving machines arewho they claim they are.

    M aret 2011 35Sistem TelekomunikasiSemester Genap 2010-2011

  • 8/7/2019 04. TCP-IP

    36/36

    R eferences

    Teach yourself TCP/IP (Tim Parker & Dean M iller)William Stallings, Data and Computer Communications, 8 th Edition

    M aret 2011 36Sistem Telekomunikasi

    Semester Genap 2010-2011