D omain  N ame  S ystem S imple  N etwork  M anagement  P rotocol Seyed Ali Marjaie  060322017
Domain names and IP addresses People prefer to use easy-to-remember names instead of IP addresses  Domain names are alphanumeric names for IP addresses e.g., neon.ece.utoronto.ca, www.google.com, ietf.org The domain name system (DNS) is an Internet-wide distributed database that translates between domain names and  IP addresses How important is DNS?  Imagine what happens when the local DNS server is down.
Before there was DNS …. … . there was the HOSTS.TXT file Before DNS (until 1985), the name-to-IP address was done by downloading a single file (hosts.txt) from a central server with FTP.  Names in hosts.txt are not structured. The hosts.txt file still works on most operating systems. It can be used to define local names.
Resolver and name server An application program on a host accesses the domain system through a DNS client, called the  resolver Resolver contacts DNS server, called name server  DNS server returns IP address to resolver which passes the IP address to application Reverse lookups are also possible, i.e., find the hostname given an IP address
Design principle of DNS The naming system on which DNS is based is a hierarchical and logical tree structure called the  domain namespace .  An organization obtains authority for parts of the name space, and can add additional layers of the hierarchy Names of hosts can be assigned without regard  of location on a link layer network, IP network or autonomous system  In practice, allocation of the domain names generally follows the allocation of IP address, e.g.,  All hosts with network prefix 128.143/16 have domain name suffix virginia.edu All hosts on network 128.143.136/24 are in the Computer Science Department of the University of Virginia
DNS Name hierarchy DNS hierarchy can be represented by a tree  Root and top-level domains are administered by an Internet central name registration authority (ICANN) Below top-level domain, administration of name space is delegated to organizations Each organization can delegate further Managed  by UofT Managed by  ECE Dept.
Domain name system Each node in the DNS tree represents a  DNS name Each branch below a node is a  DNS domain . DNS domain can contain hosts or other domains ( subdomains ) Example:  DNS domains are  ., edu, virginia.edu, cs.virginia.edu
Domain names Hosts and DNS domains are named based on their position in the domain tree Every node in the DNS domain tree can be identified by a unique  Fully Qualified Domain Name (FQDN).  The FQDN gives the position in the DNS tree. A FQDN consists of  labels  (“cs”,“virginia”,”edu”) separated by a period (“.”) There can be a period (“.”) at the end. Each label can be up to 63 characters long FQDN contains characters, numerals, and dash character (“-”) FQDNs are not case-sensitive
Top-level domains Three types of top-level domains: Organizational:  3-character code indicates the function of the organization Used primarily within the US  Examples: gov, mil, edu, org, com, net Geographical:  2-character country or region code Examples: us, va, jp, de Reverse domains:  A special domain (in-addr.arpa) used for IP address-to-name mapping There are more than 200 top-level domains.
Organizational top-level domains com Commercial organizations edu Educational institutions gov Government institutions int International organizations mil U.S. military institutions net Networking organizations org Non-profit organizations
Hierarchy of name servers The resolution of the hierarchical name space is done by a hierarchy of name servers Each server is responsible (authoritative) for a contiguous portion of the DNS namespace, called a  zone . Zone is a part of the subtree DNS server answers queries about hosts in its zone
Authority and delegation Authority for the root domain is with the Internet Corporation for Assigned Numbers and Names (ICANN) ICANN delegates to accredited registrars (for gTLDs) and countries for country code top level domains (ccTLDs)  Authority can be delegated further Chain of delegation can be obtained by reading domain name from right to left.  Unit of delegation is a “zone”.
DNS domain and zones Each zone is anchored at a specific domain node, but zones are not domains.  A DNS domain  is a branch of the namespace A zone is a portion of the DNS namespace generally stored in a file (It could consists of multiple nodes) A server can divide part of its zone and  delegate  it to other servers
Primary and secondary name servers For each zone, there must be a primary name server and a secondary name server The  primary server  ( master server ) maintains  a zone file  which has information about the zone. Updates are made to the primary server The  secondary server  copies data stored at the primary server. Adding a host: When a new host is added (“gold.cs.virginia.edu”) to a zone, the administrator adds the IP information on the host (IP address and name) to a configuration file on the primary server
Root name servers The root name servers know how to find the authoritative name servers for all top-level zones. There are only 13 root name servers Root servers are critical for the proper functioning of name resolution
Addresses of root servers A.ROOT-SERVERS.EDU.  (formerly NS.INTERNIC.NET)  10.0.2.32 A.ROOT-SERVERS.NET.  (formerly NS1.ISI.EDU)  198.41.0.4 B.ROOT-SERVERS.NET.  (formerly C.PSI.NET)  128.9.0.107 C.ROOT-SERVERS.NET.  (TERP.UMD.EDU)  192.33.4.12 D.ROOT-SERVERS.NET.  (NS.NASA.GOV) 128.8.10.90 E.ROOT-SERVERS.NET.  (NS.ISC.ORG) 192.203.23 F.ROOT-SERVERS.NET.  (NS.NIC.DDN.MIL)  192.5.5.241 G.ROOT-SERVERS.NET.  (AOS.ARL.ARMY.MIL)  192.112.36.4 H.ROOT-SERVERS.NET.  (NIC.NORDU.NET) 128.63.2.53 I.ROOT-SERVERS.NET.  (at NSI (InterNIC)) 192.36.148.17 J.ROOT-SERVERS.NET.  (operated by RIPE NCC)  198.41.0.10 K.ROOT-SERVERS.NET.  (at ISI (IANA))  193.0.14.129  L.ROOT-SERVERS.NET.  (operated by WIDE, Japan) 198.32.64 M.ROOT-SERVERS.NET.  202.12.27.33
Domain name resolution User program issues a request for the IP address of a hostname Local resolver formulates a  DNS query  to the name server of the host Name server checks if it is authorized to answer the query.  If yes, it responds.  Otherwise,  it will query other name servers, starting at the root tree When the name server has the answer it sends it to the resolver.
Recursive and Iterative Queries There are two types of queries: Recursive queries  Iterative (non-recursive) queries The type of query is determined by a bit in the DNS query Recursive query:  When the name server of a host cannot resolve a query, the server issues a query to resolve the query Iterative queries:  When the name server of a host cannot resolve a query, it sends a referral to another server to the resolver
Recursive queries In a recursive query, the resolver expects the response from the name server If the server cannot supply the answer, it will send the query to the “closest known” authoritative name server (here: In the worst case, the closest known server is the root server) The root sever sends a referral to the “edu” server. Querying this server yields a referral to the server of “virginia.edu”  …  and so on
Iterative  queries In an iterative query, the name server  sends a closest known authoritative name server a referral to the root server.  This involves more work for the resolver
Caching To reduce DNS traffic, name servers caches information on domain name/IP address mappings When an entry for a query is in the cache, the server does not contact other servers Note: If an entry is sent from a cache, the reply from the server is marked as “unauthoritative”
Resource Records The database records of the distributed data base are called  resource records (RR) Resource records are stored in configuration files (zone files) at name servers. Left Resource records for a zone:
Resource Records Max. age of cached data  in seconds * Start of authority (SOA) record.  Means: “This name server is  authoritative for the zone Mylab.com”  * PC4.mylab.com is the  name server * hostmaster@mylab.com is the  email address of the person  in charge Name server (NS) record.  One entry for each authoritative  name server Address  (A) records.  One entry for each hostaddress
S imple  N etwork  M anagement  P rotocol
SNMP is … A network management tool Designed to allow data acquisition from SNMP capable network equipment Allows control of SNMP capable equipment by the distant controller Based on inquiry/response architecture with simple response parameters
Used for management of fault conditions – prevention of and response to network failure Designed to manage performance – coping with deterioration of performance due to congestion, changing traffic conditions SNMP is …
SNMP Message Protocol Messages use UDP, ports 161 (requests/responses) and 162 (notifications) Message types: GetRequest: request values of variables from device GetNextRequest: request value of variable following the one supplied GetResponse: return values SetRequest: instruct device to set values of variables Trap: from device - notify monitor / manager of value change
SNMP Communities Define “communities” specifying access to specific variable sets (read-write, read only, none) Supply community name as “password” in each message unencrypted in version of SNMP still widely used!!
SNMP SMI  (Structure of Management Information) Variables recognized by device supplied in MIB (Management Information Base) text file giving variables and data structures defined using ASN.1 standard variable sets often provided as RFC’s device-specific sets provided by vendors Management stations parse MIB’s to determine variables available for management obtain both data structure and management information
Example portion of MIB  (from RFC 1213)  --  the Interfaces group -- Implementation of the Interfaces group is mandatory for -- all systems. ifNumber OBJECT-TYPE SYNTAX  INTEGER ACCESS  read-only STATUS  mandatory DESCRIPTION "The number of network interfaces (regardless of their current state) present on this system." ::= { interfaces 1 }
SNMP Message Encoding Encode message as byte stream using ASN.1 BER (Abstract Syntax Notation 1 Basic Encoding Rules) Quantities encoded as Type,Length,Value triples Types Subset of basic ASN.1 types used in SNMP: integer, octet string, object identifier (“variable name”), sequence SNMP-defined types: gauge, counter, IP address, etc. Values weirdly encoded!! (see ASN.1 specs)
ASN.1 Object Identifiers  Variables identified by globally unique strings of digits ex:  1.3.6.1.4.1.3.5.1.1 name space is hierarchical; tree on next slide in above, 1  stands for  iso, 3  stands for org, 6  stands for dod, 1  stands for internet, 4  stands for private, etc. Variable names are aliases for digit strings (within MIB)  From previous page:  ifNumber  ::=  { interfaces 1 }  interfaces was previously defined in MIB as 1.3.6.1.2.1.2, so ifNumber = 1.3.6.1.2.1.2.1
Partial ASN.1  Object Identifier Tree (from: ASN.1 Complete, J. Larmouth, Open Systems Solutions, 1999)
Questions?

Dns And Snmp

  • 1.
    D omain N ame S ystem S imple N etwork M anagement P rotocol Seyed Ali Marjaie 060322017
  • 2.
    Domain names andIP addresses People prefer to use easy-to-remember names instead of IP addresses Domain names are alphanumeric names for IP addresses e.g., neon.ece.utoronto.ca, www.google.com, ietf.org The domain name system (DNS) is an Internet-wide distributed database that translates between domain names and IP addresses How important is DNS? Imagine what happens when the local DNS server is down.
  • 3.
    Before there wasDNS …. … . there was the HOSTS.TXT file Before DNS (until 1985), the name-to-IP address was done by downloading a single file (hosts.txt) from a central server with FTP. Names in hosts.txt are not structured. The hosts.txt file still works on most operating systems. It can be used to define local names.
  • 4.
    Resolver and nameserver An application program on a host accesses the domain system through a DNS client, called the resolver Resolver contacts DNS server, called name server DNS server returns IP address to resolver which passes the IP address to application Reverse lookups are also possible, i.e., find the hostname given an IP address
  • 5.
    Design principle ofDNS The naming system on which DNS is based is a hierarchical and logical tree structure called the domain namespace . An organization obtains authority for parts of the name space, and can add additional layers of the hierarchy Names of hosts can be assigned without regard of location on a link layer network, IP network or autonomous system In practice, allocation of the domain names generally follows the allocation of IP address, e.g., All hosts with network prefix 128.143/16 have domain name suffix virginia.edu All hosts on network 128.143.136/24 are in the Computer Science Department of the University of Virginia
  • 6.
    DNS Name hierarchyDNS hierarchy can be represented by a tree Root and top-level domains are administered by an Internet central name registration authority (ICANN) Below top-level domain, administration of name space is delegated to organizations Each organization can delegate further Managed by UofT Managed by ECE Dept.
  • 7.
    Domain name systemEach node in the DNS tree represents a DNS name Each branch below a node is a DNS domain . DNS domain can contain hosts or other domains ( subdomains ) Example: DNS domains are ., edu, virginia.edu, cs.virginia.edu
  • 8.
    Domain names Hostsand DNS domains are named based on their position in the domain tree Every node in the DNS domain tree can be identified by a unique Fully Qualified Domain Name (FQDN). The FQDN gives the position in the DNS tree. A FQDN consists of labels (“cs”,“virginia”,”edu”) separated by a period (“.”) There can be a period (“.”) at the end. Each label can be up to 63 characters long FQDN contains characters, numerals, and dash character (“-”) FQDNs are not case-sensitive
  • 9.
    Top-level domains Threetypes of top-level domains: Organizational: 3-character code indicates the function of the organization Used primarily within the US Examples: gov, mil, edu, org, com, net Geographical: 2-character country or region code Examples: us, va, jp, de Reverse domains: A special domain (in-addr.arpa) used for IP address-to-name mapping There are more than 200 top-level domains.
  • 10.
    Organizational top-level domainscom Commercial organizations edu Educational institutions gov Government institutions int International organizations mil U.S. military institutions net Networking organizations org Non-profit organizations
  • 11.
    Hierarchy of nameservers The resolution of the hierarchical name space is done by a hierarchy of name servers Each server is responsible (authoritative) for a contiguous portion of the DNS namespace, called a zone . Zone is a part of the subtree DNS server answers queries about hosts in its zone
  • 12.
    Authority and delegationAuthority for the root domain is with the Internet Corporation for Assigned Numbers and Names (ICANN) ICANN delegates to accredited registrars (for gTLDs) and countries for country code top level domains (ccTLDs) Authority can be delegated further Chain of delegation can be obtained by reading domain name from right to left. Unit of delegation is a “zone”.
  • 13.
    DNS domain andzones Each zone is anchored at a specific domain node, but zones are not domains. A DNS domain is a branch of the namespace A zone is a portion of the DNS namespace generally stored in a file (It could consists of multiple nodes) A server can divide part of its zone and delegate it to other servers
  • 14.
    Primary and secondaryname servers For each zone, there must be a primary name server and a secondary name server The primary server ( master server ) maintains a zone file which has information about the zone. Updates are made to the primary server The secondary server copies data stored at the primary server. Adding a host: When a new host is added (“gold.cs.virginia.edu”) to a zone, the administrator adds the IP information on the host (IP address and name) to a configuration file on the primary server
  • 15.
    Root name serversThe root name servers know how to find the authoritative name servers for all top-level zones. There are only 13 root name servers Root servers are critical for the proper functioning of name resolution
  • 16.
    Addresses of rootservers A.ROOT-SERVERS.EDU. (formerly NS.INTERNIC.NET) 10.0.2.32 A.ROOT-SERVERS.NET. (formerly NS1.ISI.EDU) 198.41.0.4 B.ROOT-SERVERS.NET. (formerly C.PSI.NET) 128.9.0.107 C.ROOT-SERVERS.NET. (TERP.UMD.EDU) 192.33.4.12 D.ROOT-SERVERS.NET. (NS.NASA.GOV) 128.8.10.90 E.ROOT-SERVERS.NET. (NS.ISC.ORG) 192.203.23 F.ROOT-SERVERS.NET. (NS.NIC.DDN.MIL) 192.5.5.241 G.ROOT-SERVERS.NET. (AOS.ARL.ARMY.MIL) 192.112.36.4 H.ROOT-SERVERS.NET. (NIC.NORDU.NET) 128.63.2.53 I.ROOT-SERVERS.NET. (at NSI (InterNIC)) 192.36.148.17 J.ROOT-SERVERS.NET. (operated by RIPE NCC) 198.41.0.10 K.ROOT-SERVERS.NET. (at ISI (IANA)) 193.0.14.129 L.ROOT-SERVERS.NET. (operated by WIDE, Japan) 198.32.64 M.ROOT-SERVERS.NET. 202.12.27.33
  • 17.
    Domain name resolutionUser program issues a request for the IP address of a hostname Local resolver formulates a DNS query to the name server of the host Name server checks if it is authorized to answer the query. If yes, it responds. Otherwise, it will query other name servers, starting at the root tree When the name server has the answer it sends it to the resolver.
  • 18.
    Recursive and IterativeQueries There are two types of queries: Recursive queries Iterative (non-recursive) queries The type of query is determined by a bit in the DNS query Recursive query: When the name server of a host cannot resolve a query, the server issues a query to resolve the query Iterative queries: When the name server of a host cannot resolve a query, it sends a referral to another server to the resolver
  • 19.
    Recursive queries Ina recursive query, the resolver expects the response from the name server If the server cannot supply the answer, it will send the query to the “closest known” authoritative name server (here: In the worst case, the closest known server is the root server) The root sever sends a referral to the “edu” server. Querying this server yields a referral to the server of “virginia.edu” … and so on
  • 20.
    Iterative queriesIn an iterative query, the name server sends a closest known authoritative name server a referral to the root server. This involves more work for the resolver
  • 21.
    Caching To reduceDNS traffic, name servers caches information on domain name/IP address mappings When an entry for a query is in the cache, the server does not contact other servers Note: If an entry is sent from a cache, the reply from the server is marked as “unauthoritative”
  • 22.
    Resource Records Thedatabase records of the distributed data base are called resource records (RR) Resource records are stored in configuration files (zone files) at name servers. Left Resource records for a zone:
  • 23.
    Resource Records Max.age of cached data in seconds * Start of authority (SOA) record. Means: “This name server is authoritative for the zone Mylab.com” * PC4.mylab.com is the name server * hostmaster@mylab.com is the email address of the person in charge Name server (NS) record. One entry for each authoritative name server Address (A) records. One entry for each hostaddress
  • 24.
    S imple N etwork M anagement P rotocol
  • 25.
    SNMP is …A network management tool Designed to allow data acquisition from SNMP capable network equipment Allows control of SNMP capable equipment by the distant controller Based on inquiry/response architecture with simple response parameters
  • 26.
    Used for managementof fault conditions – prevention of and response to network failure Designed to manage performance – coping with deterioration of performance due to congestion, changing traffic conditions SNMP is …
  • 27.
    SNMP Message ProtocolMessages use UDP, ports 161 (requests/responses) and 162 (notifications) Message types: GetRequest: request values of variables from device GetNextRequest: request value of variable following the one supplied GetResponse: return values SetRequest: instruct device to set values of variables Trap: from device - notify monitor / manager of value change
  • 28.
    SNMP Communities Define“communities” specifying access to specific variable sets (read-write, read only, none) Supply community name as “password” in each message unencrypted in version of SNMP still widely used!!
  • 29.
    SNMP SMI (Structure of Management Information) Variables recognized by device supplied in MIB (Management Information Base) text file giving variables and data structures defined using ASN.1 standard variable sets often provided as RFC’s device-specific sets provided by vendors Management stations parse MIB’s to determine variables available for management obtain both data structure and management information
  • 30.
    Example portion ofMIB (from RFC 1213) -- the Interfaces group -- Implementation of the Interfaces group is mandatory for -- all systems. ifNumber OBJECT-TYPE SYNTAX INTEGER ACCESS read-only STATUS mandatory DESCRIPTION "The number of network interfaces (regardless of their current state) present on this system." ::= { interfaces 1 }
  • 31.
    SNMP Message EncodingEncode message as byte stream using ASN.1 BER (Abstract Syntax Notation 1 Basic Encoding Rules) Quantities encoded as Type,Length,Value triples Types Subset of basic ASN.1 types used in SNMP: integer, octet string, object identifier (“variable name”), sequence SNMP-defined types: gauge, counter, IP address, etc. Values weirdly encoded!! (see ASN.1 specs)
  • 32.
    ASN.1 Object Identifiers Variables identified by globally unique strings of digits ex: 1.3.6.1.4.1.3.5.1.1 name space is hierarchical; tree on next slide in above, 1 stands for iso, 3 stands for org, 6 stands for dod, 1 stands for internet, 4 stands for private, etc. Variable names are aliases for digit strings (within MIB) From previous page: ifNumber ::= { interfaces 1 } interfaces was previously defined in MIB as 1.3.6.1.2.1.2, so ifNumber = 1.3.6.1.2.1.2.1
  • 33.
    Partial ASN.1 Object Identifier Tree (from: ASN.1 Complete, J. Larmouth, Open Systems Solutions, 1999)
  • 34.