Changes

Jump to: navigation, search

NAD710 Lab 2

696 bytes added, 11:35, 17 September 2008
Completing this Lab
If you boot to FC8, by default, the system contacts the DHCP server in the Lab and config its ethernet adpator with the assigned TCP/IP parameters. The DHCP client running on FC8 will renew its TCP/IP lease from the server every few minutes. Since we want to change the IP address of the network interface, we must first stop the DHCP client on the machine.
=== Stopping DHCP Client ===
* First, use the su command to get super-user privileges. Use your login password when prompted:
[joker@localhost ~]$ su -
Password:
[root@host-a ~]#
* The name of the DHCP Client on FC8 is called "dhclient". Use the following to find out the process ID of the running dhclient on the system:
[root@host-a ~]# ps -ef | grep dhclient |grep -v grep
root <font color="red">2030</font> 1 0 15:23 ? 00:00:00 /sbin/dhclient -1 -q -lf
/var/lib/dhclient/dhclient-eth2.leases -pf /var/run/dhclient-eth2.pid eth2
* If the command produces nothing, DHCP client is not running on your system. The number in red (I highlighted it here, the actual output shows no color) is the process number of the DHCP client process. You can use the following "kill" command to try to terminate it:
[root@host-a ~]# kill -15 2030
* Type the following command again to see whether the DHCP client is still running or not:
[root@host-a ~]# ps -ef | grep dhclient |grep -v grep
* If the dhclient still shows up, try the following:
[root@host-a ~]# kill -9 2030
=Procedure=
* Commands in the following steps may contain the variable <font color="red">x</font>. If you are doing this lab using your own LAN, you can pick any value between 1 and 254 for <font color="red">x</font>. If you are working in the LUX lab, make sure you are not using the same <font color="red">x</font> value as any other students in the Lab.
* On terminal window "C" on Host-A, set the IP address for the network device to 172.16.<font color="red">x</font>.1, netmask to 255.255.255.0, and set the broadcast address to the appropriate value. For example:
ifconfig eth<font color="blue">xx</font> 172.16.<font color="red">x</font>.1 netmask 255.255.255.0 broadcast 172.16.<font color="red">x</font>.255
* On terminal window "C" on Host-B, set the IP address for the network device to 172.16.<font color="red">x</font>.2, netmask to 255.255.255.0, and set the broadcast address to the appropriate value. For example:
ifconfig eth<font color="blue">xx</font> 172.16.<font color="red">x</font>.2 netmask 255.255.255.0 broadcast 172.16.<font color="red">x</font>.255
* Use the "ifconfig" or "ip addr" on Host-A and Host-B to verify the newly assigned addresses. Make changes if necessary. Ask for help if you have any troubles.
* Use the "ping" command to verify the network connection between Host-A and Host-B for the new addresses. Go on to the next step only after a positive result.
 ==Query List MAC address addresses stored in the ARP cache==
* On terminal window "C" on Host-A, enter the following commands and keep the outputs for later use:
arp -n
arp -n
* Do the same on Host-B.
 
==Capturing network packets==
* On terminal window "T" on Host-A, enter the following command and keep the output for later use:
* On terminal window "T" on Host-B, terminate the "tcpdump" and retype the last tcpdump command.
* On terminal window "C" on Host-A, send two ping packets to Host-B and watch the outputs to Host-A and Host-B's terminal window "T"s. Record your observation for later use.
== Add Adding IP address to MAC address entry mapping entries to Host-A and Host-B manually==
* On terminal window "C" on Host-A only, enter the following commands and record the output for later reference:
arp -s 172.16.<font color="red">x</font>.2 MAC-B XX:XX:XX:XX:XX:XX (put replace the Xs with Host-B's MAC hereaddress)
arp -n
* On terminal window "C" on Host-A, send two ping packets to Host-B and record your observation.
* On terminal window "C" on Host-B, enter the following commands and record the output:
arp -s 172.16.<font color="red">x</font>.1 MAC-A XX:XX:XX:XX:XX:XX (put replace the Xs with Host-A's MAC hereaddress)
arp -n
* On terminal window "C" on Host-A, send two ping packets to Host-B and record your observation.
 
==Enable ARP on network interface==
* On terminal window "C" on Host-B, enter the following commands and record your observation:
ifconfig eth<font color="blue">xx</font> down
ifconfig eth<font color="blue">xx</font> arp
ifconfig eth<font color="blue">xx</font> up
arp -n
* Make sure that the tcpdump command is still running on terminal window "T" on Host-B.
You will be graded according to your contribution.
If you have nothing to add to the answer page, please make some comments of the lab and the answers and email them to your professor.
 
[[Category:LUX]][[Category:NAD]]
1
edit

Navigation menu