Changes

Jump to: navigation, search

OPS235 Lab 6

250 bytes added, 20:53, 13 January 2019
Part 1: Configuring a Private Network (Via Virtual Machine Manager)
|style="padding-left:20px;" | Networking Utilities<br>
[http://man7.org/linux/man-pages/man8/ifconfig.8.html ifconfig]<br>
[http://man7.org/linux/man-pages/man8/ip.8.html ip]<br>
[http://www.serverlab.ca/tutorials/linux/administration-linux/configure-centos-6-network-settings/ system-config-network]<br>
[http://man7.org/linux/man-pages/man8/route.8.html route]<br>
[http://man7.org/linux/man-pages/man8/arp.8.html arp]<br>
[http://man7.org/linux/man-pages/man8/netstat.8.html netstat]
|style="padding-left:20px;" | Networking Configuration Files<br>
[https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-networkscripts-interfaces.html Interface Configuration]<br>
[https://linux.die.net/man/5/resolv.conf resolv.conf]<br>
|style="padding-left:20px;" |Additional Utilities<br>
[http://man7.org/linux/man-pages/man1/find.1.html find]<br>
# In the '''Connection Details''' dialog box, select the '''Virtual Networks''' tab
# Click to <u>de-select</u> the '''Autostart (on boot)''' check-box options and click the '''Apply''' button.
# Stop the default network configuration by clicking on the '''stop''' button at the bottom left-side of the dialog box.
# Click the '''add''' button (the button resembles a "plus sign") to add a new network configuration.
# Type the network name called: '''network1''', and then click the '''Forward''' button.
[[Image:new_network_dialog.png|right|thumb|300px|Although the private network has been setup via the '''Virtual Machine Manager''', each virtual machine requires to change its own network setting individually (either '''graphically''' or by '''command line''').]]
 
=== Part 2: Configuring Network For centos1 VM===
|{{Admon/note | Hosts files vs. the Domain Name System | On large public networks like the Internet or even large private networks we use a network service called [http://en.wikipedia.org/wiki/Domain_Name_System Domain Name System (DNS)] to resolve the human friendly hostnames like '''centos.org''' to the numeric addresses used by the IP protocol. On smaller networks we can use the <code>/etc/hosts</code> on each system to resolve names to addresses.}}
|}
=== Part 1: Using /etc/host hosts File for Local Hostname Resolution ===
After setting up a private network, it can be hard to try to remember IP addresses. In this section, we will setup your network to associate easy-to-remember server names with IP ADDRESSES.
&#35;<br>
&#35; Purpose: Creates system info report<br>
&#35;<br>&#35; USAGE: ./network-info.bash [full pathname to ifcfg-eno* eth0 file]<br>
<br>
if [ $USER != "root" ] # only runs if logged in as root<br>
if [ $# -ne 1 ]<br>
then<br>
&nbsp;echo "You need to provide the full pathname to ifcfg-eno eth0 file (eg eno1 or eno followed by numbers)" >&2<br>&nbsp;echo "USAGE: $0 [full pathname to ifcfg-eno* eth0 file]" >&2<br>
&nbsp;exit 0<br>
fi
</code>
<br><br>
<ol><li value="7">Give this shell script execute permissions and run this shell script.</li><li>You will need to determine the full pathname of the '''ifcfg-en0ens33''' file in the /etc/sysconfig/network-scripts directory to use as an argument for this shell script.</li><li>Run the shell script. What do you notice from the report that the shell script generated?</li><li>The the Then use wget command to download another variation of the network-info.bash shell script using the awk command to separate the variables and values into separate columns:<br><b><code><span style="color:#3366CC;font-size:1.2em;">http://cs.senecac.onsenecacollege.ca/~murray.saulops235/lab6/network-info-2.bash</span></code></b><br></li></ol>
'''Answer INVESTIGATION 2 observations / questions in your lab log book.'''
 
= LAB 6 SIGN-OFF (SHOW INSTRUCTOR) =
# Switch to your '''c7host''' VM.
# Change to the '''/root/bin''' directory.
# Issue the Linux command: <b><code><span style="color:#3366CC;font-size:1.2em;">wget http://matrixcs.senecac.onsenecacollege.ca/~murray.saulops235/ops235lab6/lab6-check.bash</span></code></b>
# Give the '''lab6-check.bash''' file execute permissions (for the file owner).
# Run the shell script and if any warnings, make fixes and re-run shell script until you receive "congratulations" message.

Navigation menu