Difference between revisions of "OPS335 Lab 1 draft"

From CDOT Wiki
Jump to: navigation, search
(Created page with '= Basic network configuration = Remember how you set up the network interfaces in your virtual machines in OPS235? You're expected to know that inside out by now. All the servic…')
 
(Redirected page to OPS335 Lab 1)
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Basic network configuration =
+
#REDIRECT [[OPS335_Lab_1]]
 
 
Remember how you set up the network interfaces in your virtual machines in OPS235? You're expected to know that inside out by now. All the services we're configuring in this course require a working network connection so it will be hard for you to get anything done if you don't know how to set a static IP address or change your DNS server or default gateway.
 
 
 
This lab is a crash course of the material from  labs 6 and 7 from [http://zenit.senecac.on.ca/wiki/index.php/OPS235_Weekly_Schedule_-_CentOS7 OPS235]
 
 
 
== Check current settings ==
 
 
 
In OPS235 you've 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 too).
 
 
 
* To get the IP address and subnet mask for all the interfaces:
 
** Old: '''ifconfig'''
 
** New: '''ip address'''
 
* To get your default gateway:
 
** Old: '''route -n'''
 
** New: '''ip route'''
 
* To check what DNS server you're using:
 
** Old and new: '''resolv.conf'''
 
* To check your hostname:
 
** Old and new: '''uname -n'''
 
 
 
== Make persistent changes ==
 
 
 
For the IP address, subnet mask, default gateway, and DNS server you edit a file in '''/etc/sysconfig/network-scripts/'''
 
 
 
You'll need a file that describes the settings for a network interface. The association between a specific network interface and the configuration file is made using (from least to most important):
 
* The name of the file ('''ifcfg-'''interfacename)
 
* The "NAME" setting inside the file
 
* The "DEVICE" setting inside the file
 
* The "HWADDR" setting inside the file
 
 
 
To set the hostname you use the '''hostnamectl''' command.
 
 
 
== Set static IP addresses on vm1, vm2, and vm3 ==
 
 
 
 
 
ssh & ssh keys
 
rsync & cron
 
Network troubleshooting
 

Latest revision as of 14:37, 12 January 2016

Redirect to: