1 Al Akhawayn University in Ifrane CSC3353 Computer Networks Networks Laboratory Prepared by O. Iraqi & T. Rachidi Lab3 Objective Learn how to deploy and configure Internet services (DNS, HTTP and DHCP). Reading 1. Understanding DNS: http://campus.champlain.edu/faculty/rogate/cis410f/w2000_dns.htm 2. DNS Hierarchy: http://www.novell.com/documentation/lg/dns_dhcp/index.html?page=/documentatio n/lg/dns_dhcp/dhcp_enu/data/behdbhhj.html 3. Common DNS configuration issues: http://infopage.cary.cw.net/DNS/Helpful_Configuration_Examples/dnsproblems.html 4. Apache HTTP Server Configuration: http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/chhttpdconfig.html 5. HTTP/1.1 RFC 2068: http://www.ietf.org/rfc/rfc2068.txt 6. DHCP RFC 1541: http://www.ietf.org/rfc/rfc2131.txt 7. A Detailed Look at Linux Boot Process : http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/s1-boot-initshutdown-process.html Hardware Two (2) PCs, one (1) 3Com 4226T switch, two (2) Huawei Quidway R2620 routers, four (4) RJ-45 cables, one (1) V.35 cables, two RS-232/R-J45 cables. Software Microsoft DNS, IIS, BIND and Apache. Prerequisite Redo Lab2 and setup a WAN as shown in figure 1/lab2. Main Steps 1. Deploy and configure Microsoft DNS on Windows. 2. Deploy and configure BIND (Berkley Internet Naming Daemon) on Linux. 3. Deploy and configure IIS Web server on Windows. 4. Deploy and configure Apache on Linux. 5. Deploy and configure DHCP on routers. 2 1. Microsoft DNS Deployment and Configuration You will start by creating two (2) DNS domains (zones). These two domains will be called windows1.com and windows2.com respectively. Then you will configure your Microsoft DNS server to be the primary server (SOA) for these two domains. Finally, you will add host records and MX record to each domain. 1.1 Launch MS-DNS configuration GUI by clicking on: Start>programs>Administrative Tools>DNS 1.2 Use the GUI to launch the New Zone Wizard. Choose standard primary and then forward lookup zone. Specify windows1.com as the zone name. Click OK to actually create windows1.com zone. 1.3 Redo 1.2 but specify windows2.com as the zone name. You have just created two domains windows1.com and windows2.com. In 1.4 and 1.5, you will configure your MS-DNS to be the primary server (SOA) for these two domains. 1.4 Edit the properties of windows1.com domain and in the SOA tab specify dns.windows1.com. as the primary server along with the local IP address. Notice the dot “.” At the end of the primary server name “dns.windows1.com.” 1.5 Edit the properties of windows2.com domain and in the SOA tab specify dns.windows2.com. as the primary server along with the local IP address. Notice the dot “.” At the end of the primary server name “dns.windows2.com.” 1.6 Explain the usage of the dot “.” At the end of the primary server name. Fill in the answer sheet. 1.7 Add the host www (CName) to windows1.com domain. www should map to the local IP address. 1.8 Add a MX record to windows1.com domain. The MX record should specify the local IP address. 1.9 Explain the purpose of the MX record. Fill in the answer sheet. 1.10 Add the host www (CName) to windows2.com domain. www should map to the local IP address. 1.11 Add a MX record to windows2.com domain. The MX record should specify the local IP address. 3 1.12 The configuration file related to windows1.com domain is called windows1.com.zone. Search for this file, print out its content and attach it with the answer sheet. If you try to ping www.windows1.com or www.windows2.com, then you will notice that these names cannot be resolved because the DNS client on Windows machine is not configured so as to connect/request information to/from your MS-DNS server. In 1.12, you will configure your DNS client to actually use your MS-DNS server. 1.13 Launch Windows Network Configuration GUI and set the IP address of the DNS server to the local IP address. 1.14 Issue a ping to www.windows1.com. You should get the reply from your local machine. 1.15 Issue a ping to www.windows2.com. You should get the reply from your local machine. 1.16 Use nslookup command/utility to query the DNS server and list all records related to windows1.com domain: nslookup >ls –d windows1.com 1.17 (Fill in answer sheet with this command output) Use nslookup command/utility to query the DNS server and list all records related to windows2.com domain. 2. BIND Deployment and Configuration You will start by creating two (2) DNS domains (zones). These two domains will be called linux1.com and linux2.com respectively. Then you will configure your BIND server to be the primary server (SOA) for these two domains. Then, you will add host records and MX record to each domain. Finally you will launch BIND server. 2.1 Launch BIND configuration GUI by clicking on: Main Menu Button>system settings>server settings>DNS 2.2 Use the GUI to create a new forward master zone called linux1.com. 2.3 The SOA of this zone should be set to dns.linux1.com. Notice the dot at the end of the SOA name “dns.linux1.com.” 2.4 Specify the local IP address as the IP address of the primary name server that serves this domain. 4 2.5 Use the GUI to create a new forward master zone called linux2.com. 2.6 The SOA of this zone should be set to dns.linux2.com. Notice the dot at the end of the SOA name “dns.linux2.com.” 2.7 Specify the local IP address as the IP address of the primary name server that serves this domain. You have just created the two domains linux1.com and linux2.com. In 2.8, 2.9, 2.10, 2.11 you will hosts records and MX record to each domain. 2.8 Add the host www (CName) to linux1.com domain. www should map to the local IP address. 2.9 Add a MX record to linux1.com domain. The MX record should specify the local IP address. 2.10 Add the host www (CName) to linux2.com domain. www should map to the local IP address. 2.11 Add a MX record to linux2.com domain. The MX record should specify the local IP address. 2.12 BIND general configuration file is called named.conf and it is located in /etc/. Print out its content and attach it with the answer sheet. 2.13 The configuration file related to linux1.com domain is called linux1.com.zone. This file is located under /var/named, print out its content and attach it with the answer sheet. 2.14 Redo 2.13 for linux2.com domain. 2.15 Launch BIND by issuing: service named start If you try to ping www.linux1.com or www.linux2.com, then you will notice that these names cannot be resolved because the DNS client on Linux machine is not configured so as to connect/request information to/from your BIND server. In 2.16, you will configure your DNS client to actually use your BIND server. 2.16 Edit the file /etc/resolv.conf and update its content as follows: nameserver <local_IP_address> 5 If, for example, Linux machine local IP address is 10.10.20.1 then the content of /etc/resolv.conf should be: nameserver 10.10.20.1 2.17 Issue a ping to www.linux1.com. You should get the reply from your local machine. 2.18 Issue a ping to www.linux2.com. You should get the reply from your local machine. 2.19 Use nslookup command/utility to query the DNS server and list all records related to linux1.com and linux2.com domains 3. Microsoft IIS Deployment and Configuration You will start by deploying two (2) Web sites on the same IIS Web server using name-based virtual hosts. The DNS name of the first Web site will be www.windows1.com and the DNS name of the second Web site will be www.windows2.com. Then you will change the default port of IIS Web server from 80 to 8080 and you will customize the 404 error message Web page returned to clients. 3.1 Create the directory that will be the Document Root for the first Web site: D:\web\windows1 3.2 Design the Web (HTML) page that welcomes the first Web site users as: <html> <head><title>Windows1 Web site</title></head> <body> <center> <h1>Welcome to Windows1 Web Site</h1> </center> </body> </html> 3.3 Save it as index.html under d:\web\windows1 3.4 Launch IIS configuration GUI by clicking on: Start>programs>Administrative Tools>Internet Services Manager 3.5 On IIS configuration GUI, right-click on Default Web Site and click on new site. 3.6 When the Web Site Creation GUI appears set the following properties Description: Windows1 Web Site Host header: www.windows1.com Path: D:\web\windows1 6 When you confirm the creation of the Web site, Windows1 Web Site icon appears in IIS configuration GUI. 3.7 Edit the properties of Windows1 Web Site: Click on Documents tab and add Explain the purpose of this operation. Fill in answer sheet. index.html. 3.8 Redo 3.1-3.7 relatively to the second Web Site. 3.9 Open Internet Explorer and download http://www.windows1.com. You should be able to see the Web page that you designed in 3.2. 3.10 Open Internet Explorer and download http://www.windows2.com. You should be able to see the Web page that you designed for Windows2 Web Site. 3.11 The default port of IIS Web server is 80. Modify it to 8080. Fill in answer sheet with the steps followed. 3.12 If you try now to re-download http://www.windows1.com or http://www.windows2.com, you will receive a connection failure. Explain why. Fill in answer sheet. 3.13 How can you modify the URLs (http://www.windows1.com, http://www.windows2.com) so as Internet Explorer can connect to IIS Web server and download the corresponding Web pages? Fill in answer sheet. 3.14 Modify again IIS Web server port to become 80 again. Now, you will customize the 404 error message for Windows1 Web Site. You can, of course, customize any error message (4xy, 5xy). 3.15 Design the error web page as: <html> <head><title>Windows1 Web site Error 404</title></head> <body> <center> <h1>Sorry, We could not serve this page</h1> </center> </body> </html> 3.16 Save it as error404.html under D:\web\windows1 3.17 Edit the properties of Windows1 Web Site. Click on Custom Errors tab, and customize 404 error message to be D:\web\windows1\error404.html. 7 3.18 Open Internet Explorer and try to download http://www.windows1.com/something. You should be able to see the error Web page that you designed in 3.17. 4. Apache Deployment and Configuration You will start by deploying two (2) Web sites on the same Apache server using name-based virtual hosts. The DNS name of the first Web site will be www.linux1.com and the DNS name of the second Web site will be www.linux2.com. Then you will change the default port of Apache server from 80 to 8080 and you will perform some performance tuning. 4.1 Create the directory that will be the document root for the first Web site: 4.2 /data/web/linux1 Design the Web (HTML) page that welcomes the first Web site users as: <html> <head><title>Linux1 Web site</title></head> <body> <center> <h1>Welcome to Linux1 Web Site</h1> </center> </body> </html> 4.3 Save it as index.html under d:\web\linux1 4.4 Launch Apache Configuration Tool by clicking on: Main Menu Button>system settings>server settings>HTTP Server 4.5 When Apache Configuration Tool GUI appears, determine the Directory Page Search List content. Fill in answer sheet. 4.6 Explain how the Directory Page Search List is used by the HTTP server. Fill in answer sheet. 4.7 Use the Virtual Hosts tab to create a Name Based Virtual Host with the following properties: Server Host Name: www.linux1.com Document Root Directory: /data/web/linux1 Web Master Email Address: your email address IP address: local IP address 4.8 Redo 4.1-4.7 relatively to the second Web site. 4.9 From the console, start Apache by issuing: service httpd start 4.10 Open Mozilla Web Browser and download http://www.linux1.com. You should be able to see the Web page that you designed in 4.2. 8 4.11 Open Mozilla Web Browser and download http://www.linux2.com. You should be able to see the Web page that you designed for Windows2 Web Site. 4.12 The default port of Apache server is 80. Modify it to 8080. Fill in answer sheet with the steps followed. 4.13 Test that Apache server is actually listening on port 8080. Fill in the answer sheet with the method used to perform this test. 4.14 Modify again Apache server port to become 80 again. Now, you will perform some performance tuning of Apache server. 4.15 In the Apache Configuration Tool, use Performance Tuning tab to enable Persistent Connections. Explain what a Persistent Connection is. Fill in answer sheet. 4.16 Set the Max Number of Connections to 100. Explain the effect of this operation. Fill in answer sheet. 4.17 Set the Max Requests per Connection to 50. Explain the effect of this operation. Fill in answer sheet. 4.18 All the configuration you have done so far is saved in Apache server configuration file: /etc/httpd/conf/httpd.conf. Print out the content of this file and attach it with the answer sheet. Each time you reboot the system, you should explicitly start Apache by issuing: httpd start. service To configure Linux to start Apache automatically at boot time, you should add httpd to the RunLevel 5 (the RunLevel used by default when Linux is started): 4.19 Launch the Services Manager GUI: Main Menu Button>system settings>server settings>services 4.20 Add httpd to RunLevel 5. Save and exit. 4.21 A symbolic link has been added to /etc/rc.d/rc5.d/Sxyhttpd where x and y are two digits. Fill in answer sheet with x and y. 4.22 Explain how this symbolic link is used by the init program. Fill in answer sheet. 4.23 Explain the usage of the number made of the two digits x and y. Fill in answer sheet. 4.24 Reboot Linux machine and make sure that Apache is started automatically. 9 5. DHCP Deployment and Configuration In this part, we assume that you redid lab 2 and you have setup a network as shown in figure 1. Router 2 WAN 0 (192.100.100.6) WAN 0 (192.100.100.5) LAN 0 (10.10.20.254) Router 1 LAN 0 (10.10.10.254) Linux Machine Windows (10.10.10.1) Machine VLAN 2 VLAN 1 Switch V.35 cable RJ-45 cable Figure1. Network architecture Now you will deploy and configure a DHCP server on Windows machine which will be used by the DHCP client on Linux machine to get dynamically the IP address (Notice that in figure1, Linux machine does not have a manually configured IP address). 5.1 Launch DHCP Server configuration GUI by clicking on: Start>programs>Administrative Tools>DHCP 5.2 Using the DHCP Server configuration GUI, create a new scope that will be used to serve VLAN2 where Linux machine resides (See figure1). The new scope should have the following properties: Name: Linux Network Scope Description: Provides dynamic host configuration for Linux network IP range o Start IP: 10.10.20.50 o End IP: 10.10.20.254 o Length (mask): 24 5.3 Router IP: 10.10.20.254 Explain the usage of the Router IP property. Fill in answer sheet. 10 Since Linux machine and Windows machine do not reside on same subnet, Router 2 and more specifically LAN0 interface of Router 2 should be configured to relay DHCP broadcasts (See figure2). Figure2. DHCP Relay Router 5.4 Open a Telnet session from Windows machine to Router 2. 5.5 In the command line of the Telnet session follow these steps: Quidway>enable Leave the password blank, just press <Enter> Quidway#config Quidway(config)#interface ethernet 0 Quidway(config-if-Ethernet0)#ip helper-address 10.10.10.1 The helper address 10.10.10.1 on Ethernet interface 0 specifies the address for DHCP server (running on Windows machine). When requesting for configuration information, DHCP client running on Linux machine sends out DHCP broadcast message. After receiving the broadcast message, Ethernet interface of DHCP Relay Router 2 processes and sends it to the helper address of the interface, i.e. DHCP server. DHCP server returns the generated reply message to DHCP relay router, then the router notifies DHCP client host of the reply message. 5.6 From Linux machine, send a DHCP request by issuing the following command: ifup eth0 5.7 View eth0 configuration of Linux machine. Fill in answer sheet with the IP address bound to eth0 interface and the Gateway IP address.