Open main menu

CDOT Wiki β

OPS335 Lab 1 draft

Revision as of 20:19, 9 January 2016 by Andrew (talk | contribs) (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…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 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 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