Difference between revisions of "NAD710 Lab 1"

From CDOT Wiki
Jump to: navigation, search
(Procedure)
Line 2: Line 2:
  
 
= Objective =
 
= Objective =
Use the following commands to collect kernel information and network settings on a Linux Machine:
+
Use the following commands to collect system information and network settings on a Linux Machine:
 
* hostname
 
* hostname
 
* uname
 
* uname
Line 12: Line 12:
  
 
= Background Information =
 
= Background Information =
In order for a computer to communicate with other computers on a local area network, a few network settings must be assigned to the computer. A few more are needed if those computers are on the Internet or other LANs. Follow the steps below to collect the network settings and some useful information of a host in the Matrix Cluster:
+
A computer must have the proper network settigns in order to communicate with other computers either on a local area network or on the Internet. The procedure below could be used to collect the following network settings and system information on a Linux machine:
 
* MAC Address
 
* MAC Address
 
* IP address
 
* IP address
Line 24: Line 24:
 
* Linux Kernel information
 
* Linux Kernel information
  
You can use the same steps to collect the same information on your own Fedora Core machine.
+
Follow the procedure on matrix.senecac.on.ca and your own Fedora Core machine to collete those network settings and system information.
  
 
= Procedure =
 
= Procedure =
* Login the matrix.senecac.on.ca using your email account and password:
+
* On any Linux machine with Internet connection, run the ssh client to login to  matrix.senecac.on.ca using your email account and password:
 
   [studen@fc9 student]$ssh student@matrix.senecac.on.ca
 
   [studen@fc9 student]$ssh student@matrix.senecac.on.ca
 
   Password:  
 
   Password:  
Line 33: Line 33:
 
   student@matrix:~>
 
   student@matrix:~>
 
* Type the command
 
* Type the command
   uname -a
+
   uname -a
 
+
* Use the command "man uname" to display the manual page for the command "uname" and use it to decode the output of the "uname" command. You should record the output of the "uname" command for later use.
* Use the command "man uname" to display the manual page for the command "uname" and use it to decode the output of the "uname" command.
+
* Type the following command to display the host name of the machine you are on:
 +
  hostname
 +
* Type the command /sbin/lspci to display all the PCI devices detected by the Linux kernel. Record the output, especially look for the line that contains the words "Ethernet controller".
 +
  /sbin/lspci
 +
  00:00.0 Host bridge: Intel Corporation 82845 845 (Brookdale) Chipset Host Bridge (rev 04)
 +
  00:01.0 PCI bridge: Intel Corporation 82845 845 (Brookdale) Chipset AGP Bridge (rev 04)
 +
  00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 05)
 +
  00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 05)
 +
  ...
 +
* Each piece of periphal hardware need a program (device driver) to control it. Most of the hardware device drivers are implemented on Linux as loadable kernel modules. The command /sbin/lsmod can be used to display all currently loaded kernel modules (i.e. hardware device drivers).
 +
  /sbin/lsmod
 +
  Module
 +
  ...                    Size  Used by
 +
  loop                  20488  0
 +
  dm_mod                60184  0
 +
  usbhid                52192  0
 +
  e100                  40456  0
 +
  mii                    9600  1 e100
 +
  i2c_i801              11660  0
 +
  i2c_core              25216  1 i2c_i801
 +
  ...
 +
* The first column on the output of the /sbin/lsmod command is the module name. You can obtain more information about each loadable kernel module withe the command /sbin/modinfo:
 +
  raymond@matrix:~> /sbin/modinfo mii
 +
  filename:      /lib/modules/2.6.18.8-0.5-default/kernel/drivers/net/mii.ko
 +
  author:        Jeff Garzik <jgarzik@pobox.com>
 +
  description:    MII hardware support library
 +
  license:        GPL
 +
  vermagic:      2.6.18.8-0.5-default SMP mod_unload 586 REGPARM gcc-4.1
 +
  supported:      yes
 +
  depends:
 +
  srcversion:    16DCEDEE4B5629C222C352D
 +
* Try the command on each of the module listed and determine which one is the device driver for the network interface card. Record the location (filename) of the device driver of the network interface card.
 +
 +
 +
 
  
 
= Questions =
 
= Questions =
  
 
= Completing this Lab =
 
= Completing this Lab =

Revision as of 20:12, 1 September 2008

NAD710 - Introduction to Networks - Using Linux

Objective

Use the following commands to collect system information and network settings on a Linux Machine:

  • hostname
  • uname
  • /sbin/ifconfig
  • /sbin/route
  • /sbin/lspci
  • /sbin/lsmod
  • /sbin/modinfo

Background Information

A computer must have the proper network settigns in order to communicate with other computers either on a local area network or on the Internet. The procedure below could be used to collect the following network settings and system information on a Linux machine:

  • MAC Address
  • IP address
  • Network Mask
  • Broadcast address
  • Network address
  • IP address(es) of the gateway(s)
  • hostname
  • list of PCI device
  • Network device driver
  • Linux Kernel information

Follow the procedure on matrix.senecac.on.ca and your own Fedora Core machine to collete those network settings and system information.

Procedure

  • On any Linux machine with Internet connection, run the ssh client to login to matrix.senecac.on.ca using your email account and password:
 [studen@fc9 student]$ssh student@matrix.senecac.on.ca
 Password: 
 Have a lot of fun...
 student@matrix:~>
  • Type the command
 uname -a  
  • Use the command "man uname" to display the manual page for the command "uname" and use it to decode the output of the "uname" command. You should record the output of the "uname" command for later use.
  • Type the following command to display the host name of the machine you are on:
 hostname
  • Type the command /sbin/lspci to display all the PCI devices detected by the Linux kernel. Record the output, especially look for the line that contains the words "Ethernet controller".
 /sbin/lspci
 00:00.0 Host bridge: Intel Corporation 82845 845 (Brookdale) Chipset Host Bridge (rev 04)
 00:01.0 PCI bridge: Intel Corporation 82845 845 (Brookdale) Chipset AGP Bridge (rev 04)
 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 05)
 00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 05)
 ...
  • Each piece of periphal hardware need a program (device driver) to control it. Most of the hardware device drivers are implemented on Linux as loadable kernel modules. The command /sbin/lsmod can be used to display all currently loaded kernel modules (i.e. hardware device drivers).
 /sbin/lsmod
 Module
 ...                     Size  Used by
 loop                   20488  0
 dm_mod                 60184  0
 usbhid                 52192  0
 e100                   40456  0
 mii                     9600  1 e100
 i2c_i801               11660  0
 i2c_core               25216  1 i2c_i801
 ...
  • The first column on the output of the /sbin/lsmod command is the module name. You can obtain more information about each loadable kernel module withe the command /sbin/modinfo:
 raymond@matrix:~> /sbin/modinfo mii
 filename:       /lib/modules/2.6.18.8-0.5-default/kernel/drivers/net/mii.ko
 author:         Jeff Garzik <jgarzik@pobox.com>
 description:    MII hardware support library
 license:        GPL
 vermagic:       2.6.18.8-0.5-default SMP mod_unload 586 REGPARM gcc-4.1
 supported:      yes
 depends:
 srcversion:     16DCEDEE4B5629C222C352D
  • Try the command on each of the module listed and determine which one is the device driver for the network interface card. Record the location (filename) of the device driver of the network interface card.



Questions

Completing this Lab