Difference between revisions of "OPS235 Lab 6 - Fedora17"

From CDOT Wiki
Jump to: navigation, search
(Investigation 2: How do you configure a static network using system-config-network.)
Line 31: Line 31:
 
== Lab Preparation ==
 
== Lab Preparation ==
 
{{Admon/important | Important | It is advisable to perform a <code>yum update</code> on your Fedora host and all 3 VM's.}}
 
{{Admon/important | Important | It is advisable to perform a <code>yum update</code> on your Fedora host and all 3 VM's.}}
 +
{{Admon/important | Important | The fedora1 VM was installed from Live CD. It is missing the GUI Network Configuration tool we will be using. Use the command <code>yum install system-config-network</code> to install it.}}
 
{{Admon/important | Important  We will be working with your 3 VM's | Backup your VM disk images and then stop all 3 VM's for until told to start them.}}
 
{{Admon/important | Important  We will be working with your 3 VM's | Backup your VM disk images and then stop all 3 VM's for until told to start them.}}
  
Line 74: Line 75:
 
# Verify your new interface by examining the output of <code>ifconfig</code>
 
# Verify your new interface by examining the output of <code>ifconfig</code>
 
# Verify the network by using <code>ping 192.168.235.1</code>
 
# Verify the network by using <code>ping 192.168.235.1</code>
 +
# Record the answer to Investigation 2 in your logbook.
 +
 +
=== Investigation 2: What files does the <code>system-config-network</code> GUI tool change?. ===
 +
{{Admon/note | Note! | Complete this investigation on your fedora1 VM.}}
 +
# Start fedora1 VM and login
 +
#

Revision as of 14:33, 2 March 2010

Configuring a Network Using Virtual Machines

Stop (medium size).png
Caution!
This lab is very much under construction. Please do not start it until this warning is removed.

Objectives

  • Configure a virtual network for Virtual Machines
  • Use the Fedora GUI program to configure network interfaces with static IP configuration and host name resolution
  • Use the find command to locate the configuration files modified by the GUI network configuration program
  • To examine some of the Linux's TCP/IP configuration files in the /etc/ directory
  • To configure a Fedora host with static network configuration without a GUI tool
  • To use and interpret the netstat command to troubleshoot and monitor network services
  • To configure the linux firewall iptables to allow/disallow/forward different types of network traffic using simple rules

Reference

  • man pages for find, ifconfig, ping, netstat, NetworkManager, nslookup, iptables, arp
  • Online reading material for week 8.

Required materials

  • Fedora 12 Live CD or a classmate on the same pod
  • USB flash drive, 64 MB or more in size (Warning: the contents of this drive will be erased)
  • One SATA hard disk in a removable drive tray with Fedora host and 3 Fedora Virtual Machines installed

Current Configuration

Currently you should have the following network configuration: Network-config1.png

  • Fedora host has 1 active network interface (probably eth0)that receives IP configuration from the School's DHCP server.
  • Fedora host has 1 active network interface (virbr0) that has a static default configuration of 192.168.122.1/255.255.255.0
  • Fedora1 VM has 1 active interface (eth0) that receives a dynamic configuration from your Fedora Host
  • Fedora2 VM has 1 active interface (eth0) that receives a dynamic configuration from your Fedora Host
  • Fedora3 VM has 1 active interface (eth0) that receives a dynamic configuration from your Fedora Host

Lab Preparation

Important.png
Important
It is advisable to perform a yum update on your Fedora host and all 3 VM's.
Important.png
Important
The fedora1 VM was installed from Live CD. It is missing the GUI Network Configuration tool we will be using. Use the command yum install system-config-network to install it.
Important.png
Important We will be working with your 3 VM's
Backup your VM disk images and then stop all 3 VM's for until told to start them.

Lab Investigations

Investigation 1: How do you create a new virtual network.

Note.png
Note!
Complete this investigation on your fedora host.

Before configuring our network we want to turn off dynamic network configuration for our Virtual Machines by turning off the "default" virtual network.

  1. On the fedora host start Virtual Machine Manager
  2. Under Edit->Host Details select the Virtual Networks tab
  3. Disable the default configuration from starting at boot by deselecting the "Autostart On Boot" checkbox.
  4. Stop the default network configuration by clicking on the stop button at the bottom of the window.
  5. Click on the add button to add a new network configuration.
  6. Give your new network a name (network1)
  7. Enter in the new network IP address space:
    • 192.168.235.0/24
  8. Disable DHCP by deselecting the check box.
  9. Enable Network Forwarding by Selecting "Forwarding to physical network"
  10. The destination should be "Any physical device" and the mode should be "NAT"
  11. Now we need to add our new virtual network "network1" to the 3 VM's
    1. Select the fedora1 VM and edit the VM details
    2. Under View select Details
    3. In the left pane select the NIC and note that this NIC is on the "default" virtual network
    4. Click on the Remove button
    5. Click on "Add Hardware" and add a new network
    6. For the host device select "Virtual Network network1" : NAT
  12. Repeat these steps for fedora2 and fedora3 VM's
  13. Answer the Investigation 1 question in your lab log book.

Investigation 2: How do you configure a static network using system-config-network.

Note.png
Note!
Complete this investigation on your fedora2 VM.
  1. Start fedora2 VM and login
  2. On your fedora host run ifconfig and make note of the IP address assigned to the virbr1 interface. This will be your default gateway for your Vm's.
  3. To configure a new interface on fedora2 go to System->Administration->Network and click on the "New" button
  4. Select Ethernet Device and choose the network card named eth1
  5. Statically set the IP configuration:
    • IP Address 192.168.235.12
    • Subnet Mask 255.255.255.0
    • Default Gateway 192.168.235.1 (The IP address of virbr1 on your fedora host.)
  6. Save then Quit
  7. Restart your network on fedora2. service NetworkManager restart
  8. Verify your new interface by examining the output of ifconfig
  9. Verify the network by using ping 192.168.235.1
  10. Record the answer to Investigation 2 in your logbook.

Investigation 2: What files does the system-config-network GUI tool change?.

Note.png
Note!
Complete this investigation on your fedora1 VM.
  1. Start fedora1 VM and login