04 naming slides

Upload: monica-mariappan

Post on 14-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 04 Naming Slides

    1/26

    Distributed Systems4. Naming and BindingPaul Krzyzanowski

    [email protected]

    19/24/2012 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    2/26

    My 15 MacBook Pro

    The rightmost computer on my desk

    Pauls aluminum laptop, but not the big or the small one

    hedwig

    hedwig.pk.org

    192.168.60.148

    00:14:51:ec:f2:5b

    9/24/2012 2 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    3/26

    Naming things

    User names

    Login, email

    Machine names

    rlogin, email, web

    Files

    Devices

    Variables in programs

    Network services

    9/24/2012 3 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    4/26

    Naming Service

    Allows you to look up names

    Often returns an addressas a response

    Might be implemented as

    Search through file Client-server program

    Database query

    9/24/2012 4 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    5/26

    Whats a name?

    Name: identifies what you want

    Address: identifies where it is

    Route: identifies how to get there

    Binding: associates a name with an address

    choose a lower-level-implementation for a higher-level semanticconstruct

    RFC 1498: Inter-network Naming, addresses, routing

    9/24/2012 5 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    6/26

    Names

    We may need names for:

    Services: e.g., time of day

    Nodes: computer that can run services

    Paths: route

    Objects within service: e.g. files on a file server

    Naming convention can take any format

    Ideally one that will suit application and user

    E.g., human readable names for humans, binary identifiers formachines

    9/24/2012 6 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    7/26

    Uniqueness of names

    Easy on a small scale

    Problematic on a large scale Globally unique names are hard to keep unique

    Hierarchy allows uniqueness to be maintained Globally unique components

    E.g.:

    Ethernet MAC address: 3 bytes: organization, 3 bytes: controller

    IP address: network & host

    compound name: set of atomic names connected with a nameseparator

    Domain name (www.rutgers.edu), URLs

    9/24/2012 7 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    8/26

    Terms: Naming convention

    Naming system determines syntax for a name

    Unix file names:

    Parse components from left to right separated by /

    /home/paul/src/gps/gui.c

    Internet domain names:Ordered right to left and delimited by .www.cs.rutgers.edu

    LDAP names

    Attribute/value pairs ordered right to left, delimited by ,

    cn=Paul Krzyzanowski, o=Rutgers, c=US

    9/24/2012 8 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    9/26

    Terms: Context

    A particular set ofname object bindings

    Each context has an associated naming convention

    A name is always interpreted relative to some context E.g., directory /usrin a UNIX file system

    9/24/2012 9 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    10/26

    Terms: Naming System

    Connected set of contexts of the same type (same naming

    convention) along with a common set of operations

    For example:

    System that implements DNS

    System that implements LDAP

    9/24/2012 10 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    11/26

    Terms: Name space

    Set of names in the naming system

    For example,

    Names of all files and directories in a UNIX file system

    All domain names on the Internet

    9/24/2012 11 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    12/26

    Terms: Resolution

    Name lookup

    Return the underlying representation of the name

    For example,

    www.rutgers.edu 128.6.4.5

    9/24/2012 12 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    13/26

    Directory Service

    Extension of naming service:

    Associates names with objects

    Allows objects to have attributes

    Can search based on attributes

    For example,

    LDAP (Lightweight Directory Access Protocol)

    Directory can be an object store:

    Look up printer object and send data stream to it

    9/24/2012 13 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    14/26

    Name resolution

    To send data to a service:

    1. Find a node on which the service resides (service name

    resolution)

    2. Find an address (or network attachment point) for that node(node name location)

    3. Find a path from this location to the service (routing service)

    9/24/2012 14 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    15/26

    Name resolution

    E.g., access paulsservice:

    File lookup: (service name to service address)

    paulsservicecs.rutgers.edu:1234

    DNS lookup: (domain name to IP address)

    cs.rutgers.edu128.6.4.2

    ARP resolution:(IP name to MAC address)

    128.6.4.208:00:20:90:9c:23

    IP routing: (no programmer involvement for IP)

    route: remuslcsr-gwaramis

    9/24/2012 15 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    16/26

    Binding

    The association of a resolution

    Static binding

    Hard-coded

    Early binding

    Look up binding before use

    Cache previously used binding

    Late binding

    Look up just before use

    9/24/2012 16 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    17/26

    IP Domain Names

    Human readable names

    e.g., www.cs.rutgers.edu

    Hierarchical naming scheme

    No relation to IP address or network class

    9/24/2012 17 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    18/26

    Example: DNS

    Internet Domain Name Service

    Maps machine names (www.cs.rutgers.edu)

    to IP addresses (128.6.4.24)

    In the past (up through the 1980s):

    Search /etc/hosts for machine name

    File periodically downloaded from Network Information Center

    (NIC) at the Stanford Research Institute (SRI)

    This was not sustainable with millions of hosts on the Internet

    9/24/2012 18 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    19/26

    Internet Domain Name Space

    Tree structure

    Each node has resource information associated with it

    owner: domain name whose resource record is found

    type of resource:

    Host address (A)

    Alias name (C) Name server for domain (NS)

    Mail server (MX)

    TTL (time to live)forcaching

    Relevant data(e.g., address)

    9/24/2012 19 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    20/26

    Domain Name Server

    Essential task

    Answer queries about data in its zone(group of machines under a root e.g. rutgers)

    org edu com mil gov

    pk nyu rutgers

    cs www remus

    top-level domains:

    www

    9/24/2012 20 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    21/26

    Sample Query

    Rutgers registers rutgers.edu with a domain registry

    educause.net for.edu domain

    See internic.net for ICANN-accredited list of registrars fortop-level domains

    Top-level domain names and their associated nameserver info loaded to root name servers

    13 servers: replicated information

    (some servers are themselves replicated)

    Contain addresses for all registries of top-level domains (.com,.edu, .org, )

    9/24/2012 21 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    22/26

    Sample QuerySubmit query to a local DNS resolver:

    1. query(cs.rutgers.edu) root name server

    root name servers identify authoritative servers for top-level domains

    send query to A.ROOT_SERVERS.NET: 198.41.0.4

    2. referral to edu name server

    returns list of DNS servers for .edu:

    L3.NSTLD.COM: 192.41.162.32

    3. query(cs.rutgers.edu) edu name server

    send query to 192.41.162.32

    4. referral to rutgers.edu name servers:

    - DNS1.rutgers.edu 165.230.144.131- DNS2.rutgers.edu 128.6.21.9

    - DNS3.rutgers.edu 198.151.130.254

    5. query(cs.rutgers.edu) rutgers name server

    send query to 165.230.144.131

    6. rutgers name server returns

    A: 128.6.4.2 address

    MX: dragon.rutgers.edudomain name for email9/24/2012 22 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    23/26

    Iterative vs. Recursive name resolution

    Referrals force iterativename resolution

    Send query to root name server

    Send query to edu name server

    Send query to rutgers name server

    Advantage: stateless

    Recursive:

    Send query to root name server

    Root name server sends query to edu name server

    Edu name server sends query to rutgers name server

    Advantage: increased caching opportunities, reduced communication

    DNS supports both types

    9/24/2012 23 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    24/26

    DNS

    BIND

    Implementation of DNS provided by the Internet Software

    Consortium (www.isc.org)

    Programs to perform queries:

    dnsquery, nslookup, dig, host

    9/24/2012 24 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    25/26

    Naming: files

    File system maps file pathname

    /home/paul/src/map.c

    major=3, minor=6, inode=6160

    nameiin kernel

    9/24/2012 25 2012 Paul Krzyzanowski

  • 7/30/2019 04 Naming Slides

    26/26

    The End

    269/24/2012 2012 Paul Krzyzanowski