====== Network Configuration: Results ====== ^EG-253^Practical Internet Technology II ^ |**Name** |Ali Ali | |**Student Number** |672227| |**Date of Submission** |29th November 2012 | ===== Instructions ===== This wiki page allows you to record the results of your network configuration exercise. You may need to refer to the configuration handout to complete this document. **Answer** all questions based on the host that you are configuring in the lab. Edit this wiki page directly to insert your answers. You will probably find this most convenient to do at the same time as you perform the configuration. Where requested, please include listings of the actual configuration files and command outputs directly in the document. Placeholders have been provided for this purpose. Please follow the formatting hints given in the text. When the exercise is complete you should [[#signature|sign]] and submit it in for marking. Deadline for completion is the start of the lab on the last week of this term. This exercise is worth 20% of the module marks. ===== Host Configuration ===== ==== Question 1 ==== Which Linux command gives you information about your computer's name on the network? **Answer** (//delete as appropriate//): hostname ==== Question 2 ==== Use the command selected in [[#question_1|Question 1]] to determine your host computer's name? What is the name? **Answer**: titan ==== Question 3 ==== Which configuration file would you need to edit to change your computer's name on the network? Your answer (//one of//): /etc/hostname ==== Question 4 ==== Which linux command gives you information on your host's network settings? **Answer** //one of//: ifconfig ==== Question 5 ==== Use the command selected in [[#question_4|Question 4]] to complete the following table: ^ Feature ^ Value ^ | My host's IP address | 192.168.3.35 | | My network's IP address | 192.168.3.0 | | The address used by my host to send an IP packet to all hosts on my network | 192.168.3.255 | | The netmask of my host | 255.255.255.0 | | The hardware address (MAC Address) of my LAN-facing network interface connection (NIC)((If your host has two or more network cards, the LAN-facing card will be the NIC assigned to your host's static IP address.)) |00:19:d1:91:43:d0 | | The frame-level (layer 1) protocol is used to send network messages to the network from my host? | Ethernet | ==== Question 6 ==== How many hosts can the sub-net defined by your host's netmask support? **Answer** //one of//: 254 ==== Question 7 ==== What class of network is the //sub-net// to which your host has been assigned? **Answer** //one of//: Class C ===== Network Configuration ===== **Answer** the following questions about your network configuration. Please copy and paste the contents of the files identified in [[#question_8|Questions 8]] and [[#question_11|11]] to your submission. ==== Question 8 ==== In which file is the configuration of your Network Interface Controller (NIC) configured? **Answer** //one of//: /etc/network/interfaces Please include a listing of the file chosen in answer to [[#question_8|Question 8]]: auto eth0 iface eth0 inet static address 192.168.3.35 network 192.168.3.0 netmask 255.255.255.0 gateway 192.168.3.1 Copy contents of file and paste it as a listing here. Include a minumum indent of two spaces per line. Like this. ==== Question 9 ==== What is the IP address of the host which serves as the default gateway for your network? **Answer**: 192.168.3.1 ==== Question 10 ==== What is the hostname of the gateway interface? **Answer**: saturn ==== Question 11 ==== In which file is the symbolic names of the networks, hosts and interfaces available on the network defined? **Answer** //one of//: /etc/hosts Please include a listing of the file chosen in answer to [[#question_11|Question 11]]: Copy contents of file and paste it as a listing here. Include a minumum indent of two spaces per line. Like this. 127.0.0.1 localhost 127.0.1.1 titan /etc/hosts -- Hosts file for ICCT Private network IP FQDN if aliases 127.0.0.1 localhost.localdomain localhost myhost 192.168.1.1 solaris.icct.com solaris inet-gateway 192.168.1.2 venus.icct.com venus www Jupiter cluster 192.168.2.23 carme.jupiter.icct.com guo carme 192.168.2.22 leda.jupiter.icct.com jumana leda 192.168.1.3 gw-jupiter.icct.com gw-jupter jupiter-if1 192.168.2.1 jupiter.icct.com jupiter jupiter-if2 Saturn cluster 192.168.3.35 titan.saturn.icct.com ali titan 192.168.3.21 hyperion.saturn.icct.com jena hyperion 192.169.3.69 mimas.saturn.icct.com richard mimas 192.168.3.3 tethys.saturn.icct.com megan tethys 192.168.3.2 dione.saturn.icct.com gary dione 192.168.1.4 gw-saturn.icct.com gw-saturn saturn-if1 192.168.3.1 saturn.icct.com saturn saturn-if2 Add other hosts/clusters below here (we'll use this to add virtual hosts to the web-server in a later lab exercise) The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ==== Question 12 ==== What is the symbolic name of your network's gateway interface? **Answer**:saturn.icct.com ==== Question 13 ==== What is the purpose of the Gateway interface? **Answer**:It is to determine how the system is linked to the network **Not quite. You need to be more precise.** --- //[[chris@cpjobling.me|Chris Jobling]] 2012/12/06 09:00// ==== Question 14 ==== Which linux command shows the routing table for your host? **Answer**: route Run the command identified in [[#question_14|Question 14]] and reproduce its output here. **Answer** user@host:~$ command # Copy command and its output and paste it here. icct@titan:/etc$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default saturn.icct.com 0.0.0.0 UG 100 0 0 eth0 link-local * 255.255.0.0 U 1000 0 0 eth0 192.168.3.0 * 255.255.255.0 U 0 0 0 eth0 ==== Question 15 ==== How many interfaces (NICs) must a router have? **Answer** //one of//: 2 ==== Question 16 ==== Which system feature must be turned on if you want a Linux host to act as a router? **Answer**: The DHCP and dns systems and theat by using NAT with masquerade. **No, you need to turn on //IP forwarding//. The other services listed are related to routing from a private to public internet, but they are not directly responsible for routing.** --- //[[chris@cpjobling.me|Chris Jobling]] 2012/12/06 09:00// ==== Question 17 ==== Which run-time command can be used to make a Ubuntu Linux host act as a router? **Answer**: sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" ==== Question 18 ==== In which file is the setting defined in [[#question17|Question 17]] set if you want a Ubuntu host to be configured as a router at boot-time? **Answer**: icct@jupiter:~$ nano /etc/network/options **As your host is on the saturn network the correct answer would be:** icct@saturn:~$ nano /etc/network/options --- //[[chris@cpjobling.me|Chris Jobling]] 2012/12/06 09:04// Reproduce the contents of the file defined in [[#question_17|Question 17]] to make a Ubuntu host into a router? **Answer** ip_forward=yes spoofprotect=yes syncookies=no ==== Question 19 ==== What setting has been added to the network configuration file to define a route to ''icct-net'' from your sub-network's cluster-server? **Answer**: up route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.4 **What about ''down route delete''?** --- //[[chris@cpjobling.me|Chris Jobling]] 2012/12/06 09:04// icct@jupiter:~$ cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # This is Jupiter # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.3 network 192.168.1.0 netmask 255.255.255.0 gateway 192.168.1.1 # route to saturn-net up route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.4 down route del -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.4 auto eth1 iface eth1 inet static address 192.168.2.1 netmask 255.255.255.0 network 192.168.2.0 gateway 192.168.1.3 #iface eth0 inet dhcp #iface eth1 inet dhcp # Uncomment following lines to active third interface #auto eth2 #iface eth2 inet dhcp **This is the intefaces file on //jupiter// not //saturn//!** --- //[[chris@cpjobling.me|Chris Jobling]] 2012/12/06 09:07// ===== Checking Your Network ===== The Linux command ''netstat'' gives a lot of useful information on your network. In the following 3 questions, reproduce the output of various usages of netstat. You should annotate your results with a brief explanation of what they mean. You may need to print the output and attach to the submission. ==== Question 20 ==== Give and explain the output of the command ''netstat -r''. **Answer** user@host:~$ netstat -r # Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface default saturn.icct.com 0.0.0.0 UG 0 0 0 eth0 link-local * 255.255.0.0 U 0 0 0 eth0 saturn-net * 255.255.255.0 U 0 0 0 eth0 The netstat command with _r flag use it to displays the kernel routing table in the way we've been doing with route. Destination : The destination network or destination host. Gateway : The gateway address or ’*’ if none set. Genmask : The netmask for the destination net; 255.255.255.255 for a host destination and 0.0.0.0 for the default route. Flags : Possible flags include U (route is up) H (target is a host) G (use gateway) R (reinstate route for dynamic routing) D (dynamically installed by daemon or redirect) M (modified from routing daemon or redirect) A (installed by addrconf) C (cache entry) ! (reject route) Iface : Interface to which packets for this route will be sent. MSS : Default maximum segment size for TCP connections over this route. Window : Default window size for TCP connections over this route. irtt : Initial RTT (Round Trip Time). The kernel uses this to guess about the best TCP protocol parameters without waiting on (possibly slow) answers. **I want the explanation in your own words!** --- //[[chris@cpjobling.me|Chris Jobling]] 2012/12/06 09:08// ==== Question 21 ==== Give and explain the output of the command ''netstat -i''. **Answer** user@host:~$ netstat -i # Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 3035 0 0 0 1951 0 0 0 BMRU lo 16436 0 0 0 0 0 0 0 0 0 LRU This command displays statistics for the network interfaces currently configured **Specifically what statistics?** --- //[[chris@cpjobling.me|Chris Jobling]] 2012/12/06 09:09// ==== Question 22 ==== Give and explain the output of the command ''netstat -ta''. **Answer** user@host:~$ netstat -ta # Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:http *:* LISTEN tcp 0 0 *:ssh *:* LISTEN tcp 0 0 localhost:mysql *:* LISTEN tcp 0 0 titan.saturn.icct:49099 lhr14s21-in-f26.1e:http ESTABLISHED tcp 0 0 titan.saturn.icct:54280 server-54-240-166-:http TIME_WAIT tcp 0 0 titan.saturn.icct:42348 lhr14s21-in-f13.1e:http ESTABLISHED tcp 0 0 titan.saturn.icct:57646 50.97.210.35-stati:http TIME_WAIT tcp 0 0 titan.saturn.icct:49100 lhr14s21-in-f26.1e:http TIME_WAIT tcp 0 0 titan.saturn.icct:57588 50.97.210.35-stati:http TIME_WAIT tcp 0 0 titan.saturn.icct:50481 lhr14s19-in-f1.1e1:http ESTABLISHED tcp 0 0 titan.saturn.icct:48015 www.cyberciti.biz:http ESTABLISHED tcp 0 0 titan.saturn.icct:43183 wi-in-f147.1e100.n:http ESTABLISHED tcp 0 0 titan.saturn.icct:55536 OCSP.MIA1.VERISIGN:http ESTABLISHED tcp 1 0 titan.saturn.icct:39669 mulberry.canonical:http CLOSE_WAIT tcp 0 1 titan.saturn.icct:49103 lhr14s21-in-f26.1e:http SYN_SENT tcp 0 0 titan.saturn.icct:57635 50.97.210.35-stati:http TIME_WAIT tcp 0 0 titan.saturn.icct:54278 server-54-240-166-:http ESTABLISHED tcp 0 0 titan.saturn.icct:43184 wi-in-f147.1e100.n:http TIME_WAIT tcp 0 0 titan.saturn.icct:44394 server-54-240-166-:http ESTABLISHED tcp 0 0 titan.saturn.icct:48016 www.cyberciti.biz:http ESTABLISHED tcp 0 0 titan.saturn.icct:55537 OCSP.MIA1.VERISIGN:http ESTABLISHED tcp 0 0 titan.saturn.icct:54276 server-54-240-166-:http ESTABLISHED tcp 0 0 titan.saturn.icct:44395 server-54-240-166-:http TIME_WAIT tcp 0 0 titan.saturn.icct:54288 server-54-240-166-:http TIME_WAIT tcp 0 1 titan.saturn.icct:49104 lhr14s21-in-f26.1e:http SYN_SENT tcp 0 0 titan.saturn.icct:54277 server-54-240-166-:http ESTABLISHED tcp 0 0 titan.saturn.icct:41303 208.81.234.96:http ESTABLISHED tcp 0 0 titan.saturn.icct:49861 50.23.124.152-stat:http ESTABLISHED tcp 0 0 titan.saturn.icct:49195 lhr14s21-in-f26.1e:http ESTABLISHED tcp 0 0 titan.saturn.icct:48079 www.cyberciti.biz:http TIME_WAIT netstat supports a set of options to display active or passive sockets. The options -t, -u, -w, and -x show active TCP, UDP, RAW, and Unix socket connections. If you provide the -a in addition, sockets that are waiting for a connection are displayed as well. This display will give you a list of all servers that are currently running on your system. ===== Testing the Connectivity of your network ===== Install, if necessary, the //traceroute// command then answer the following two questions. ==== Question 23 ==== Give the output of traceroute from your host to any host on one of the other ICCT networks. **Answer** user@host:~$ traceroute leda.jupiter # traceroute to leda.jupiter (192.168.2.22), 64 hops max 1 192.168.3.1 (192.168.3.1) 1.463ms 1.402ms 0.255ms 2 192.168.1.3 (192.168.1.3) 5.305ms 1.504ms 1.499ms 3 192.168.2.22 (192.168.2.22) 1.827ms 1.845ms 1.830ms ==== Question 24 ==== Give the output of ''traceroute'' from your host to ''www.swan.ac.uk'' **Answer** user@host:~$ traceroute www.swan.ac.uk # traceroute to www.swan.ac.uk (137.44.1.7), 64 hops max 1 192.168.3.1 (192.168.3.1) 1.470ms 0.250ms 1.407ms 2 137.44.3.254 (137.44.3.254) 0.924ms 2.902ms 0.811ms Each lines gives the details of interaction with each router encountered. So we see that traceroute not only gives the IP addresses of the intermediate routers but also three round trip times for that particular router as for each router the traceroute commands fires three packets. **28 lines of output ommitted I think. Important because that's really what I wanted you to explain!** --- //[[chris@cpjobling.me|Chris Jobling]] 2012/12/06 09:10// ===== Extension Questions ===== ==== Question 25 ==== A new sub-network engineering-net (''192.168.10.0/24'') is to be added to the ICCT network. Host engineering (''192.168.10.1/32'') is a cluster server for this new network. Give the settings needed to set up this host as a router to ''icct-net'', ''jupiter-net'', and ''saturn-net'' and a gateway for ''engineering-net''. **Answer** ==== Question 26 ==== Which other files would you need to modify to correctly set up this new router? **Answer** ==== Question 27 ==== Summarize the changes that you would you need to make to your host's network configuration to have the new //engineering// sub-network recognized? **Answer** ==== Question 27 ==== Which other files would you need to modify to fully configure your host to recognizes the new engineering sub-network? **Answer** ===== Signature ===== I hereby submit this work for marking. Your signature here: Ali Ali