Open main menu

CDOT Wiki β

Changes

NAD710 Lab 2

1,083 bytes added, 16:42, 11 September 2008
no edit summary
Lab with the proper hardware and software: T2107 in TEL building.
 
==Please check the following if you are doing this lab in T2107==
 
=== DHCP Client Issue===
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.
=Procedure=
You need two Linux systems connected to a LAN. Make sure that each system has only ONE network interface card. Label one system as Host-A and the other system as Host-B.
* Boot up both system to Fedora Core 8 (or 9FC9 if you are doing this lab in some other places).
* Login to Host-A and Host-B under a regular user account. Don't login as "root".
* On Host-A, open up two terminal windows, set the title on one terminal windows to "T" and the other to "C". "T" for tcpdump window and "C" for command window.
* Do the same on Host-B as on Host-A.
* Switch to user "root" on all four terminal windows.
* Use the command "ifconfig-a" to find out the name (eth<font color="blue">xx</font>), IP address, broadcast address, netmask and the MAC address of the network device on Host-A and Host-B. Keep this information for later use.
* Use the command "ip addr" on Host-A and Host-B and keep the output for later use.
* Use the "ping" command to check the network connection between Host-A and Host-B. Ask for help if Host-A can not talk to Host-B.
[root@host-b ~]# ping -c 2 [IP address of Host-A] ==Changing IP address on network interface using the ifconfig command==* 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.x.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.x.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 MAC address 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:
tcpdump -n arp host 172.16.<font color="red">x</font>.1
tcpdump -n arp host 172.16.<font color="red">x</font>.2
* On terminal window "C" on Host-A, enter the following "ping" command and watch the outputs on terminal "T" on Host-A and Host-B.
[root@host-a ~]# ping -c 4 [ip of host-b]
* Do the same on Host-B.
[root@host-b ~]# ping -c 4 [ip of host-a]
* On terminal window "C" on Host-A, enter the command "arp -n", record the MAC address of Host-B and label it as MAC-B.
* On terminal window "C" on Host-B, enter the command "arp -n", record the MAC address of Host-A and label it as MAC-A.
==Turn off ARP on network interface==
* On terminal window "C" on Host-B only, enter the following commands and compare the outputs of the first and last "ifconfig" command and spot the difference(s).
ifconfig eth<font color="blue">xx</font>
* 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 IP address to MAC address entry 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 (put Host-B's MAC here)
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
1
edit