Lab 1: Using the CIS 192 Lab Resurces The purpse f this lab is t becme familiar with the CIS Lab resurces and t start practicing sme ld and new Linux cmmands. Resurces The Opus server CIS VLab (Virtual Lab) VMs The CIS Student Help Frum Opus Server The Opus server is available t students via an SSH cnnectin. Opus is used as a repsitry fr cmmn files and submitting lab assignments. The VMs in the CIS VLab (Virtual Lab) We will be using a number f different Virtual Machines (VMs) in VLab fr this curse. VMs CentOS Ubuntu Windws Arwen Frd William Celebrian Saurn Elrnd Leglas These VMs can be accessed remtely frm n r ff campus. CIS Student Frum A phpbb frum, at http://slab.cabrill.edu/frum/, has been set up fr use by CIS students and instructrs t cllabrate, share infrmatin and help each ther. Prcedure Fr this lab yu are ging t recrd infrmatin in a text file named lab01 in yur hme directry n Opus. T start, make a cpy f the lab01 file in /hme/cis192/dept. When finished submit yur wrk by cpying yur lab01 file int the instructr s turnin directry. Every student is assigned their wn pd f VMs, static IP addresses (fr the CIS Lab netwrk) and virtual netwrks.
Task 1 - Cnnect Celebrian and Arwen t the private Shire netwrk Find yur pd and virtual netwrk in: http://simms-teach.cm/dcs/cis192/pd-assignments- 192-sp13.pdf. Pwer n yur Celebrian and Arwen VMs. Cable (by editing the VM settings) yur Celebrian and Arwen VMs as shwn abve. Lgin as cis192 and becme rt using sud -i n bth systems. Use the: ifcnfig ethx xxx.xxx.xxx.xxx/pp cmmand t cnfigure IP addresses the Celebrian eth1 and Arwen eth0 interfaces. This cnfiguratin will last till the system r netwrk service is restarted - it is NOT permanent! Use the: ifcnfig ethx cmmand t examine the cnfiguratin and status n bth interfaces. Ping Arwen twice frm Celebrian using: ping -c2 192.168.20.2 Ping Celebrian twice frm Arwen using: ping -c2 192.168.20.1 Recrd in yur lab01 file: The ifcnfig cmmands used t cnfigure the interfaces The MAC (HWaddr) address f bth interfaces Task 2 - Observe packets n the netwrk On Arwen, start mnitring netwrk traffic using: tcpdump On Celebrian, fire a single ping (with the -c1 ptin) at Arwen. On Arwen, bserved the captured traffic. Nte any ARP requests and replies. Nte the incming ping (ech request) and utging respnse (ech reply). Ntice that the ARP replies state ui Unknwn. Use Ggle t research this. After yu understand what an OUI is, use http://standards.ieee.rg/develp/regauth/ui/public.html t identify the wner f the unknwn OUI. On Celebrian, fire cntinuus pings (n -c ptin) at Arwen. Discnnect Arwen frm the netwrk (use VM Edit Settings) and wait a minute r tw.
Observe what happens with the cntinuus pings n bth Celebrian and Arwen. Nte the errr message displayed by the ping cmmand. Nw let s mnitr traffic n Celebrian as well. Withut disrupting the cntinuus ping, switch t anther tty like tty2 (Ctrl- Windws-Alt + Space + f2). On tty2 run tcpdump. Observe the packets being sent by Celebrian. Are they pings (ech requests) r ARP requests? Recnnect Arwen t the netwrk again. Yu shuld see ping replies (ech replies) nw in respnse t each ping request (ech request). On Celebrian, switch back t tty1 and use Ctrl-C t stp the cntinuus ping. On Arwen, use Ctrl-C t stp mnitring traffic by tcpdump. Recrd in yur lab01 text file: The ping cmmand yu used n Celebrian t send a single ping t Arwen. The ping cmmand yu used t Celebrian t send cntinuus pings t Arwen. The unknwn OUI and wh wns the unknwn OUI in ARP replies displayed by tcpdump. The ping errr message displayed n Celebrian when Arwen is discnnected. The keystrkes used t switch virtual terminals t tty2. Task 3 - Cnnect Celebrian t the CIS Lab netwrk using DHCP Cable Celebrian s eth0 interface t the CIS Lab netwrk. On Celebrian try t ping ggle.cm. The CentOS VMs are cnfigured t bt up withut any netwrk cnfiguratin s yu shuldn t be able t ping any Internet addresses. Use dhclient -v eth0 t btain an IP address, a default gateway and ne r mre DNS name servers. Can yu ping ggle.cm? Yu shuld be able t nw. Use ifcnfig eth0 t determine the IP address assigned t the eth0 interface. Use rute -n t shw the default gateway assigned. Lk fr the IP address in the Gateway clumn that has a crrespnding destinatin f 0.0.0.0. Use cat /etc/reslv.cnf t shw the DNS name server(s) assigned. Can yu still ping Arwen? Yu shuld be able t. Nte the difference in TTL (Time T Live) values n ping replies frm Arwen and ggle.cm. The TTL in the ping reply packet is decremented every time it travels thrugh a ruter.
Recrd in yur lab01 text file: The IP address, gateway and DNS server(s) yu were assigned by the DHCP server. The TTL f the ech reply frm ggle.cm. The TTL f the ech reply frm Arwen. Task 4 - Cnnect Celebrian t the CIS Lab netwrk using a static IP address Use dhclient -r eth0 t release the IP address, gateway and DNS name server(s) btained in the last task. Can yu ping ggle.cm? This shuld nt wrk nw. Chse a unique static IP address frm thse assigned t yu in: http://simmsteach.cm/dcs/cis192/pd-assignments-192-sp13.pdf Use ifcnfig eth0 172.20.192.zzz/16 t cnfigure yur unique IP address n eth0. This cnfiguratin will last till the system r netwrk service is restarted - it is NOT permanent! Use rute add default gw 172.20.0.1 t cnfigure the default gateway. This cnfiguratin will last till the system r netwrk service is restarted - it is NOT permanent! Verify yur changes with ifcnfig eth0 and rute -n. Add the fllwing line t /etc/reslv.cnf t cnfigure a DNS name server: nameserver 172.30.5.8 Verify by catting /etc/reslv.cnf. Ping the lab ruter with ping 172.20.0.1 which shuld wrk. Ping the DNS nameserver with ping 172.30.5.8 which shuld wrk. Ping ggle.cm. That shuld wrk t. Can yu still ping Arwen? Yu shuld be able t. Nte the difference in RTT (Rund Trip Time) values between ping replies frm Arwen and ggle.cm. Recrd in yur lab01 text file: The cmmand yu used t cnfigure yur IP address n eth0 The average RTT t ping ggle.cm The average RTT t ping Arwen.
Task 5 - Cnnect Frd t the CIS Lab netwrk Cable yur Frd s eth0 interface t the CIS Lab netwrk. Pwer up yur Frd VM. Lgin as cis192 (CIS 192 Student) and pen a graphical terminal (use Ctrl-Alt-t). The Ubuntu VM is cnfigured t autmatically btain IP infrmatin frm a DHCP server during bt. Nte the IP address, default gateway and DNS server(s) btained frm the DHCP server. Can yu ping ggle.cm? Yu shuld be able t. Using Celebrian s IP address, ping Celebrian frm Frd. That shuld wrk t. Can yu ping Arwen at 192.168.20.2 frm Frd? This will nt wrk because there is n rute t Arwen. The ping ech requests get directed ut twards the Internet never t return! If yu wish t see this use mtr 192.168.20.2 t watch hw far they get. Dn t wrry, we will learn hw t rute packets t private netwrks in future labs. Ping the cisvdc hst using ping cisvdc r ping 172.30.5.8. The hstname is in ur lcal DNS server which allws yu t ping it by hstname. Examine the TTL values in the ping utput and determine which (OS) Operating System family is mst likely running n cisvdc. Recrd in yur lab01 text file: The IP address, gateway and DNS server(s) cnfigured n Frd. The OS that is mst likely running n cisvdc. Task 6 - Lgin t yur VMs frm Opus using ssh Lg int Opus frm hme using anther lgin sessin. Nte the IP address being used by Opus. It shuld match the diagram abve. Nte the default gateway and DNS servers cnfigured n Opus.
Determine yur IP address r hstname yu are using at hme t cnnect t Opus. Use the wh cmmand n Opus t get this infrmatin. Verify by pinging yur hme IP address frm Opus. Check that yu can ping yur Frd and Celebrian VMs frm Opus. Yu shuld nt be able t ping yur Arwen VM because packets will be sent twards the Internet and lst frever. On Opus, lgin t yur Celebrian VM using the ssh cis192@172.20.192.zzz cmmand. Fr zzz use the IP address yu cnfigured previusly n the eth0 interface f Celebrian. Ntice yur shell prmpt has changes when yu lgin t Celebrian. Prve t yurself that yu are n Celebrian by using the hstname and ifcnfig eth0 cmmands. Use the wh cmmand t shw yu lgged int Celebrian frm Opus. Frm Celebrian yu can ssh int yur Frd r Arwen VMs. Nte that thugh yu culd nt ping Arwen frm Opus hwever yu can get there via ssh. Use ssh cis192@192.168.20.2 t lgin t Arwen. Yu are nw accessing yur Arwen VM frm hme using ssh. Pretty cl huh? Use exit t back ut f Arwen. Use exit t back ut f Celebrian. Use the cmmands yu learned in previus steps t nte the default gateway and name servers used by Opus. Recrd in yur lab01 text file: The IP address cnfigured n the Opus eth0 interface. The IP address r hstname yu are using at hme t cnnect t Opus. The default gateway used by Opus. The DNS name servers used by Opus. Task 8 - Shut dwn all yur VMs As rt yu can use the init 0 cmmand t rapidly shutdwn a system. It s OK t d this n a VM where yu are the nly ne lgged in. Why wuld yu nt want t d init 0 n a prductin system with multiple users lgged in? Shutdwn yur Frd and Arwen VMs. If yu plan t d the extra credit belw yu may wish t keep Celebrian pwered n. Exit vsphere t end the VLab sessin. Task 9 - Using the CIS Help Frum Brwse t the frum at http://slab.cabrill.edu/frum/, lcate the CIS 192 frum and read the current psts. Be sure t register if yu haven t already. When yu register, be sure t select a username that is yur first and last name separated by a space t get credit fr yur psts.
Make a pst n the frum. Yu can pst anything yu like but if yu are having truble picking a tpic here are sme suggestins: A pst intrducing yurself. A questin abut this lab that yu wuld like smene t respnd t. Share a tip n hw t d this lab that might save thers time and effrt. Reply t an existing pst. T turn in Fill ut all the header infrmatin at the tp f yur lab01 test file n Opus. This shuld include yur name, pd number and the dates/time spent n this lab. The time spent shuld reflect the ttal number f hurs yu spent preparing, implementing and trubleshting this lab. Be sure and clean up yur lab01 file s it lks prfessinal befre submitting. T submit yur wrk: cp lab01 /hme/rsimms/turnin/cis192/lab01.$logname Submit as many times as yu like up t the deadline. Each new submittal will verwrite the previus ne. Remember, late wrk is nt accepted, s please start early, plan ahead fr things t g wrng and use the frum t cllabrate. Grading rubric (30 pints) 3 pints fr a crrect submittal t the CIS 192 turnin directry 3 pints fr including all the header infrmatin in yur submittal 4 pints fr crrect infrmatin recrded fr Task 1 4 pints fr crrect infrmatin recrded fr Task 2 4 pints fr crrect infrmatin recrded fr Task 3 4 pints fr crrect infrmatin recrded fr Task 4 4 pints fr crrect infrmatin recrded fr Task 5 4 pints fr crrect infrmatin recrded fr Task 6 Extra Credit (3 pints) The ping cmmand sets the shell variable $? t 0 when the ping is successful. Review the man page n ping and write an riginal shrt script, named mnitr, n Opus that lps frever and mnitrs yur Celebrian VM. Dn t ping mre than nce every 10 secnds. Yu shuld set the ping timeut t 1 secnd fr faster ntificatin when Celebrian is unavailable. Only utput UP/DOWN status and thrw all ther utput int /dev/null. Test by cnnecting and discnnecting Celebrian's cnnectin t the CIS Lab netwrk. Recrd yur script in yur lab01 file. The utput f this script wuld lk smething like this:
[milhm192@slab ~]$./mnitr Enter IP address t mnitr: 172.20.192.91 172.20.192.91 is DOWN 172.20.192.91 is DOWN 172.20.192.91 is DOWN 172.20.192.91 is DOWN < Ctrl-C t end >