42
Basics of IP Routing

Arp DNS Dhcp

Embed Size (px)

DESCRIPTION

Arp DNS DhcpArp DNS DhcpArp DNS DhcpArp DNS DhcpArp DNS DhcpArp DNS DhcpArp DNS DhcpArp DNS DhcpArp DNS DhcpArp DNS DhcpArp DNS Dhcp

Citation preview

  • Basics of IP Routing

  • Types of Addresses

  • Types of AddressesHostnames

    IP Addresses

    Mac Addresses

  • IP AddressesNumerical label assigned to each device in a computer network

    Used for host or network identification and location addressing

    Used as a unique identifier to identify the devices in any given network

    IPV4 and IPV6 are the two versions of IP addresses

  • HostnameA Label assigned to the device connected in the network

    URL or Uniform Resource Locator provides a reference to a resource on the internet

  • Mac AddressUnique identifier assigned to network interfaces for communications on the physical network segment.

    Assigned by the manufacturer on the NIC

    A network node may have multiple NICs and each must have one unique MAC address per NIC.

    Mac addresses are of 48bits

  • ARP, DNS and DHCP

  • ARPARP associates an IP address with itsphysical address. On a typical physicalnetwork, such as a LAN, each device on alink is identified by a physical or stationaddress that is usually imprinted on theNIC.

    The Reverse Address ResolutionProtocol (RARP) is an obsolete computernetworking protocol used by a clientcomputer to request its InternetProtcol (IPv4) address from a computernetwork, when all it has available isits Link Layer or hardware address, suchas a MAC address.

  • Encapsulation of ARP Packet

  • Address Translation with ARPARP Request: A broadcasts an ARP request to all stations on the network: What is the hardware address of Router137?

    Host A

    128.143.137.144

    00:a0:24:71:e4:44

    Router137

    128.143.137.1

    00:e0:f9:23:a8:20

    ARP Request:

    What is the MAC address

    of 128.143.71.1?

  • Address Translation with ARPARP Reply: Router 137 responds with an ARP Reply which contains the hardware address

    Host A

    128.143.137.144

    00:a0:24:71:e4:44

    Router137

    128.143.137.1

    00:e0:f9:23:a8:20

    ARP Reply:

    The MAC address of 128.143.71.1

    is 00:e0:f9:23:a8:20

  • ExampleARP Request from Host A:

    Source hardware address: 00:a0:24:71:e4:44Source protocol address: 128.143.137.144Target hardware address: 00:00:00:00:00:00Target protocol address: 128.143.137.1

    ARP Reply from Router137:

    Source hardware address: 00:e0:f9:23:a8:20 Source protocol address: 128.143.137.1 Target hardware address: 00:a0:24:71:e4:44Target protocol address: 128.143.137.144

  • RARPRARP finds the logical address for a machine that only knows its physical address.

  • DNS

  • 19

    What is DNS?DNS is a host name to IP address translation service

    DNS is a distributed database implemented in a hierarchy of name servers

    an application level protocol for message exchange between clients and servers

  • 20

    Why DNS?It is easier to remember a host name than it is to remember an IP address.

    An name has more meaning to a user than a 4 byte number.

    Applications such as FTP, HTTP, email, etc., all require the user to input a destination.

    The user generally enters a host name.

    The application takes the host name supplied by the user and forwards it to DNS for translation to an IP address.

  • 21

    DNS ServicesBesides the address translation service, DNS also provides the following services:Host aliasing: a host with a complicated name can have one or more aliases that are simpler to

    remember,e.g., relay1.west-coast.media.com -> media.com. The longer name is the canonical hostname, the shorter the alias hostname.

    Mail server aliasing: same as above, aliases can exist for long canonical host names.

    Load Balancing: a set of servers can have one name mapped onto several machines. DNS provides the full list of names to the end users application which generally takes the first one in the list. DNS rotates the names on the list.

  • 22

    Root DNS Servers

    com DNS servers org DNS servers edu DNS servers

    poly.edu

    DNS servers

    umass.edu

    DNS serversyahoo.com

    DNS servers

    amazon.com

    DNS servers

    pbs.org

    DNS servers

    Distributed, Hierarchical Database

    Client wants IP for www.amazon.com; 1st approx:

    client queries a root server to find com DNS server

    client queries com DNS server to get amazon.com DNS server

    client queries amazon.com DNS server to get IP address for www.amazon.com

  • 23

    TLD and Authoritative ServersTop-level domain (TLD) servers: responsible for com, org, net, edu, etc, and all top-level

    country domains uk, fr, ca, jp.

    Network Solutions maintains servers for com TLD

    Educause for edu TLD

    Authoritative DNS servers: organizations DNS servers, providing authoritative hostname

    to IP mappings for organizations servers (e.g., Web, mail).

    can be maintained by organization or service provider

  • 24

    DNS: Root name serversroot name server:

    contacts authoritative name server if name mapping not known

    gets mapping

    returns mapping to local name server

    13 root

    name servers

    worldwideb USC-ISI Marina del Rey, CA

    l ICANN Los Angeles, CA

    e NASA Mt View, CA

    f Internet Software C. Palo Alto, CA (and 36 other locations)

    i Autonomica, Stockholm (plus

    28 other locations)

    k RIPE London (also 16 other locations)

    m WIDE Tokyo (also Seoul,

    Paris, SF)

    a Verisign, Dulles, VA

    c Cogent, Herndon, VA (also LA)

    d U Maryland College Park, MD

    g US DoD Vienna, VA

    h ARL Aberdeen, MD

    j Verisign, ( 21 locations)

  • Local Name Serverdoes not strictly belong to hierarchy

    each ISP (residential ISP, company, university) has one. also called default name server

    when host makes DNS query, query is sent to its local DNS server acts as proxy, forwards query into hierarchy

  • 26

    DNS QueriesRecursive: The client machine sends a request to the local name server, which, if it does

    not find the address in its database, sends a request to the root name server, which, in turn, will route the query to an intermediate or authoritative name server. Note that the root name server can contain some hostname to IP address mappings. The intermediate name server always knows who the authoritative name server is.

  • 27

    DNS Queries (contd)Iterative:

    The local server queries the root server. If address not in its database, will have the name/address of an intermediate or authoritative name server and forward that information to the local name server so that it can directly communicate with the intermediate or authoritative name server. This is to prevent the overloading of the root servers that handle millions of requests.

  • requesting host

    cis.poly.edu

    gaia.cs.umass.edu

    root DNS

    server

    local DNS server

    dns.poly.edu

    1

    23

    4

    5

    6

    authoritative DNS server

    dns.cs.umass.edu

    78

    TLD DNS

    server

    DNS name resolution example

    Host at cis.poly.edu wants IP address for gaia.cs.umass.edu

    iterated

    query:

    contacted server replies with name

    of server to

    contact

    I dont know this name, but

    ask this server

  • 29

    requesting host

    cis.poly.edu

    gaia.cs.umass.edu

    root DNS

    server

    local DNS server

    dns.poly.edu

    1

    2

    45

    6

    authoritative DNS server

    dns.cs.umass.edu

    7

    8

    TLD DNS

    server

    3 recursive

    query:

    puts burden of name resolution

    on contacted name

    server

    heavy load?

    DNS name resolution example

  • DNS: caching and updating recordsonce (any) name server learns mapping, it caches mapping

    cache entries timeout (disappear) after some time

    TLD servers typically cached in local name servers Thus root name servers not often visited

  • DHCP

  • Dynamic Assignment of IP addressesDynamic assignment of IP addresses is desirable for several reasons:

    IP addresses are assigned on-demand

    Avoid manual IP configuration

    Support mobility of laptops

  • 36

    DHCPDynamic Host Configuration Protocol (DHCP)

    From 1993

    An extension of BOOTP, very similar to DHCP

    Same port numbers as BOOTP

    Extensions: Supports temporary allocation (leases) of IP addresses

    DHCP client can acquire all IP configuration parameters needed to operate

    DHCP is the preferred mechanism for dynamic assignment of IP addresses

    DHCP can interoperate with BOOTP clients.

  • DHCP Interaction (simplified)Host A

    00:a0:24:71:e4:44 DHCP Server

    DHCP Request 00:a0:24:71:e4:44

    Sent to 255.255.255.255

    Host A

    128.143.137.144

    00:a0:24:71:e4:44 DHCP ServerDHCP Response:

    IP address: 128.143.137.144

    Default gateway: 128.143.137.1

    Netmask: 255.255.0.0

  • DHCP Message TypeMessage type is sent as an option.

    Value Message Type

    1 DHCPDISCOVER

    2 DHCPOFFER

    3 DHCPREQUEST

    4 DHCPDECLINE

    5 DHCPACK

    6 DHCPNAK

    7 DHCPRELEASE

    8 DHCPINFORM

  • Message TypesDHCPDISCOVER: Broadcast by a client to find available DHCP servers.

    DHCPOFFER: Response from a server to a DHCPDISCOVER and offering IP address and other parameters.

    DHCPREQUEST: Message from a client to servers that does one of the following:

    Requests the parameters offered by one of the servers and declines all other offers.

    Verifies a previously allocated address after a system or network change (a reboot for example).

    Requests the extension of a lease on a particular address.

  • Contd.DHCPACK: Acknowledgement from server to client with parameters,

    including IP address.

    DHCPNACK: Negative acknowledgement from server to client, indicating that the client's lease has expired or that a requested IP address is incorrect.

    DHCPDECLINE: Message from client to server indicating that the offered address is already in use.

    DHCPRELEASE: Message from client to server canceling remainder of a lease and relinquishing network address.

    DHCPINFORM: Message from a client that already has an IP address (manually configured for example), requesting further configuration parameters from the DHCP server.

  • DHCP Operation

    DCHP DISCOVERDHCP Client

    00:a0:24:71:e4:44 DHCP Server

    DHCPDISCOVERSent to 255.255.255.255

    DHCP Server

    DHCP Client

    00:a0:24:71:e4:44 DHCP Server

    DHCP Server

    DHCPOFFER

    DHCPOFFERDCHP OFFER

  • DHCP OperationDHCP Client

    00:a0:24:71:e4:44 DHCP Server

    DHCP Server

    DHCPREQUEST

    DHCPACKDCHP DISCOVER

    At this time, the DHCP client can start to use the IP address

    DHCP Client

    00:a0:24:71:e4:44 DHCP Server

    DHCP Server

    DHCPREQUEST

    DHCPACK

    Renewing a Lease

    (sent when 50% of lease has expired)

    If DHCP server sends DHCPNACK, then address is released.

  • DHCP OperationDHCP Client

    00:a0:24:71:e4:44 DHCP Server

    DHCP Server

    DHCPRELEASE DCHP RELEASE

    At this time, the DHCP client has released the IP address

  • Circuits/ WAN Connections