Docstoc

EXERCISES

Document Sample
EXERCISES Powered By Docstoc
					             Registration and address assignment
              (DNS Settings and Management)
                        Exercises

                       George Macri
                  gmacri@linkguide.ici.ro
              Research Institute for Informatics
                    Bucharest, Romania


CEENET 4-th Network Technology Workshop 23-31 August 1998
                   Bratislava, Slovakia
                                                            1
• All the PCs have WINDOWS95 and Slackware Linux. If you are using
  WINDOWS, shutdown WINDOWS, then choose Debian Linux while
  rebooting the system.
• Login with username root, password system

Exercise 1: Some tools for network debugging
   – Display the TCP ports:       netstat -a |more
   – Display the routing table:   netstat -rn or netstat -r
   – Use ping                     ping sun-ultra.stuba.sk
                                  (use CTRL/C to stop)
                                   ping ftp.univie.ac.at
   – Use traceroute               traceroute www.ibm.com
                                   traceroute www.cisco.com
   – Display the ARP table:       arp -a


                                                                     2
  Exercise 2. Access the Internic and RIPE database
    –   telnet info.ripe.net               ftp://ftp.rs.internic.net/
    –   ftp://ftp.ripe.net/                gopher://rs.internic.net/
    –   http://www.ripe.net/               http://rs.internic.net/
    –   gopher://gopher.ripe.net/          telnet rs.internic.net

    You can make these additional exercises during your free time.

Query the RIPE Databe:
   – whois -h whois.ripe.net help >help.ripe
   – whois -h whois.ripe.net AS3233
   – whois -h whois.ripe.net 147.175.87.0
   – whois.h whois.ripe.net sk
   – whois -h whois.ripe.net <person>


                                                                        3
                  Exercise 3. Checking DNS using host
• host                       !you will get the help information
  host <host address> ! you will get IP address for <hostname>
        host www.stuba.sk
        host ftp.univie.ac.at
        host www.isc.org
  host <ip-address>          ! you will get name for <ip-address>
        host 161.53.74.11
        host 131.130.1.72
        host 207.68.137.65
  host -t <type> <query>              ! query for a specific type of records (NS,
                                        SOA, MX, A, CNAME, PTR)
        host -t ns workshop.stuba.sk
        host -t soa workshop.stuba.sk
  host -a <domain>           !query for all record of a domain, verbose mode
        host -a stuba.sk host -a hr.            Host -a workshop.stuba.sk
  host -l a <domain> !list all the zone for a domain
        host -l -a ftp.cvt.stuba.sk
  Check other domains, which are known to you!                                 4
                  Exercise 4. Checking DNS using nslookup
                        (dig is also available for another alternative)
•   nslookup commands:
    server <nameserver>             ; set the server to be queried
    set type = NS                   ;queries NS resources
    set type = SOA                  ;queries SOA resources
    set type = A                    ;queries A resources
    set type = MX                   ;queries MX resources
    set type = CNAME                ;queries CNAME resources
    set type = PTR                  ;queries PTR resources
    set type = ANY                  ;queries ANY resources
    ls <domain>                     ;lists the <domain> zone
    ls <domain> > <file-name>       ;gets the zone <domain> into the file<file-name>
    view <file-name>                ;views the <file-name> file
#nslookup
>set type=any
>www.stuba.sk.
>stuba.sk.
>sk.
>ls cvt.stuba.sk > file1
>view file1                You can check other domains, known to you.
                                                                                       5
             Exercise 5. Setting up DNS servers
Network address:161.53.74
domain: workshop.stuba.sk
¨We will set up 5 domains beneath the domain workshop.stuba.sk:
              track1-a.workshop.stuba.sk
              track1-b.workshop.stuba.sk
              track1-c.workshop.stuba.sk
              track1-d.workshop.stuba.sk
              track1-e.workshop.stuba.sk
Each domain corresponds to the computers on a row and contains 4 hosts with
the IP host part given by the following table:
                   host1 host2 host3 host4 Example:
     track1-a      9        6        2             sun-ultra.stuba.sk
     track1-b      7        12       11        4   has the IP number
     track1-c               10       5         3   147.175.80.133
     track1-d       14      15       16        17
                                                                              6
     Exercise 5. Setting up DNS servers (continue)
track1-a.workshop.stuba.sk
   primary nameserver: track1-a.workshop.stuba.sk (147.175.87.xx)
   secondary nameserver: host3.track1-b.workshop.stuba.sk (147.175.87.xx)
   secondary nameserver: host3.track1-e.workshop. stuba.sk (147.175.87.xx)
   hosts in the domain:
        host1: 147.175.87.xx             host3: 147.175.87.xx
        host2: 147.175.87.xx             host4: 147.175.87.xx

track1-b.workshop.stuba.sk
   primary nameserver: hos3.track1-b.workshop.stuba.sk 147.175.87.xx
   secondary nameserver: host3.track1-c.workshop.stuba.sk 147.175.87.xx
   secondary nameserver: host3.track1-a.workshop.stuba.sk 147.175.87.xx
   hosts in the domain:
        host1: 147.175.87.xx             host3: 147.175.87.xx
        host2: 147.175.87.xx             host4 : 147.175.87.xx
                                                                             7
         Exercise 5. Setting up DNS servers (continue)
track1-c.workshop.stuba.sk
   primary nameserver: host3.track1-c.workshop.stuba.sk (147.175.87.xx)
   secondary nameserver: host3.track1-d.workshop.stuba.sk (147.175.87.xx)
   secondary nameserver: host3.track1-b.workshop.stuba.sk (147.175.87.xx)
   hosts in the domain:
        host1: 147.175.87.xx             host3: 147.175.87.xx
        host2: 147.175.87.xx             host4: 147.175.87.xx

track1-d.workshop.stuba.sk
   primary nameserver: host3.track1-d.workshop.stuba.sk (147.175.87.xx)
   secondary nameserver: host3.track1-e.workshop.stuba.sk (147.175.87.xx)
   secondary nameserver: host3.track1-c.workshop.stuba.sk (147.175.87.xx)
   hosts in the domain:
        host1: 147.175.87.xx             host3: 147.175.87.xx
        host2: 147.175.87.xx             host4: 147.175.87.xx
                                                                        8
          Exercise 5. Setting up DNS servers (continue)


track1-e.workshop.stuba.sk
   primary nameserver: host3.track1-e.workshop.stuba.sk (147.175.87.xx)
   secondary nameserver: host3.track1-a.workshop.stuba.sk (147.175.87.xx)
   secondary nameserver: host3.track1-d.workshop.stuba.sk (147.175.87.xx)
   hosts in the domain:
        host1: 147.175.87.xx             host3: 147.175.87.xx
        host2: 147.175.87.xx             host4: 147.175.87.xx




                                                                        9
     Examples of configuration files for DNS set up
• The process named runs on each PC
• Please have a look in the following files using the ˝more <file>˝ command:
                – /etc/resolv.conf                     - resolver configuration file
                – /etc/named.boot                      - nameserver configuration file
                – /var/named/named.root                - defines the root servers
                     (This file is available at ftp://ftp.rs.internic.net/domain/named.root)
                – /var/named/named.local               - defines the IP for the localhost
                – /var/named/named.rev-local           - defines the reverse name for 127.0.0.1
• The example is given for host3.track1-a.workshop.stuba.sk. The procedure is the
  same for the other nameservers, but replace track1-a with track1-b, track1-c, etc.
– cd /var/named                 !change to the directory /var/named
– cp track1-x.zone track1-a.zone        !copy the sample file track1-x.zone to track1-
  a.zone
– vi/pico/joe track1-a.zone          !using the editor modify appropriately the file
– add the following lines to the file /etc/named.boot (using pico):
         primary track1-a.workshop.stuba.sk.              track1-a.zone
         secondary track1-b.workshop.stuba.sk 147.175.87.xx track1-b-sec.zone
         secondary track1-e.workshop.stuba.sk 161.53.74.219 track1-e-sec.zone

•   kill -HUP `cat /usr/run/named.pid`                           ! Restart the named process   10
Exercise 6. Checking your DNS server (your domain and the
  neighboring ones)
Check the domain track1-a.workshop.stuba.sk using nslookup
!Check the primary nameserver host3.track1-a.workshop.stuba.sk
>server host3.track1-a.workshop.stuba.sk
>set type=NS
>track1-a.workshop.stuba.sk
> ls track1-a.workshop.stuba.sk
!Check the secondary nameserver host3.track1-b.workshop.stuba.sk
>server host3.track1-b.workshop.stuba.sk
>track1-a.workshop.stuba.sk
> ls track1-a.workshop.stuba.sk
!Check the secondary nameserver host3.track1-e.workshop.stuba.sk
>server host3.track1-e.workshop.stuba.sk
>track1-a.workshop.stuba.sk
> ls track1-a.workshop.stuba.sk
Try telnet, ftp to host1.track1-a.workshop.stuba.sk, and to hostx(1,23,4)   11
Exercise 6. Checking your DNS server (your domain and the
  neighboring ones) - continue
Check the domain track1-b.workshop.stuba.sk using host
!Check the primary nameserver host3.track1-b.workshop.stuba.sk
host -t NS track1-b.track1-b.workshop.stuba.sk    host3.track1-a.workshop.stuba.sk
host -l -a track1-b.track1-b.workshop.stuba.sk  host3.track1-a.workshop.stuba.sk
!Check the secondary nameserver host3.track1-c.workshop.stuba.sk
host -t NS track1-b.track1-b.workshop.stuba.sk    host3.track1-c.workshop.stuba.sk
host -l -a track1-b.track1-b.workshop.stuba.sk  host3.track1-c.workshop.stuba.sk
!Check the secondary nameserver host3.track1-a.workshop.stuba.sk
host -t NS track1-b.track1-b.workshop.stuba.sk    host3.track1-a.workshop.stuba.sk
host -l -a track1-b.track1-b.workshop.stuba.sk  host3.track1-a.workshop.stuba.sk
Try telnet, ftp to host1.track1-b.workshop.stuba.sk, and to hostx (1,2,3,4)


                                                                              12
             Adding a new entry within a domain
Suppose that in each domain we want to add:
• a host name www which points to the host sun1.workshop.stuba.sk.
• a host name ftp which points to host1.track1-i.workshop.stuba.sk. (i=a,….e)

Do the following:
• Using the editor program edit the zone file track1-i.zone for your domain:
    – increase the serial number;
    – add the records:
       www        IN       CNAME            hostx.track1-x.workshop.stuba.sk.
       ftp        IN       CNAME            hostx.track1-x.workshop.stuba.sk.
• Restart the named process: kill -HUP `cat /var/run/named.pid`
Check your configuration:
• Use nslookup or host program
• Test http://hostx.track1-x.workshop.stuba.sk
• Test ftp://hostx.track1-i.workshop.stuba.sk
                                                                            13

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:43
posted:12/26/2010
language:English
pages:13