13,420
edits
Changes
no edit summary
In OPS235, you learned how to configure a virtual private network via graphical applications for the '''centos1''' and '''centos2''' machines. In the previous lab, you have created and cloned VMs that are text-based only ('''like centos3'''). All of the virtual machines will be text-based (just like centos3 in OPS235) for this course. All of the services that we are configuring in this course require a working network connection; therefore, it is very important that you know how to set (preferable configure) a static IP address, default gateway, as well as your DNS serverfrom the command line.
This lab is a <u>review</u> of the material from labs 6 ( [http://zenit.senecac.on.ca/wiki/index.php/OPS235_Lab_6_-_CentOS7#Part_4:_Configuring_VM_Network_Setup_via_Command_Line_.28centos3.29 CLI Network Configuration] ), but will also show newer (more efficient) commands in the process.
== Checking Your Current Network Settings ==
In OPS235 you've have used the '''ifconfig''' and '''route ''' commands. In this course we'll use the '''ip''' command instead (you're welcome to use the old commands but you're expected to know the new ones tooas well).
'''Perform the following steps:'''
# View the table below comparing ''older '' vs ''newer '' methods of obtaining network setting information for a Linux machine.
<tr> <td>Obtain DNS Server</td><th>nslookup</th><th>more resolv.conf</th></tr>
<tr> <td>Obtain Hostname</td><th>uname -n</th><th>Sameuname -n</th></tr>
</table>
<ol><li value="2">Run the '''ifconfig''' and '''ip address''' commands separately. Do you notice any differences between their respective outputs?</li><li>Repeat the same steps for the other two sets set of ''older'' vs ''newer'' commands listed in the table.</li><li>Which commands do you prefer to use?</li><li>Use the man pages to see how to issue the above commands to create a <u>temporary</u> connection to your existing network.</ol>
# From your ''OPS335''/''OPS235''/''ULI101'' notes, issue a command to provide the full path-name of the directory: ''network-scripts''
# Which filename in your network-scripts directory do you think contains your current network settings?
# View the contents of the file to see if it contains the IP ADDRESS, subnet mask, and default gateway?.
# What is the MAC address if your current machine?
# Does this file contain the hostname of your machine? If not, what command can allow you to change your machine's hostname?
Except for your host machine, all the Virtual Machines in this course will have '''static network configuration''' (as opposed to Automatic or DHCP).
::'''ping''' (what is the purpose of this command?). Try to ping matrix and google from your host machine. Try to ping matrix and google from each of your VM's to ensure you can reach the outside world.
::'''ssh''' (into another server, like Matrix)