Alakhawayn University in Ifrane

advertisement
1
Al Akhawayn University in Ifrane
CSC3353 Computer Networks
Networks Laboratory
Prepared by O. Iraqi & T. Rachidi
Lab1
Objectives
1. Be able to configure and troubleshoot TCP/IP protocol stack on both Linux and
Windows platforms.
2. Be able to setup a LAN and configure a switch using different interfaces (Command Line
Interface through Telnet and Graphical User Interface through HTTP).
3. Understand what VLANs are, and be able to configure VLANs (IEEE802.1Q) using
both untagged and tagged ports.
4. Learn how to use packet analyzers such as Ettercap, to analyze traffic.
Reading
1. IEEE Standards for Local and Metropolitan Area Networks: Virtual Bridged Local Area
Networks. http://standards.ieee.org/getieee802/download/802.1Q-1998.pdf
2. 3Com SuperStack 3 Switch Implementation Guide.
http://hep.phy.uct.ac.za/~becker/switch/Docs/implementation/dua1730-0bAA01.pdf
3. Ettercap Man pages
4. IPRoute utility. http://www.linuxgrill.com/iproute2.doc.html
Hardware
Two (2) PCs, one (1) 3Com 4226T switch, two (2) RJ-45 cables
Software
Linux Red Hat 9.0, Windows 2000 Server, Ettercap-0.6.b
Main Steps
1. Install Linux Red Hat 9.0 on the machine labeled “Linux”.
2. Install Windows 2000 Server on the machine labeled “Windows”.
3. Configure and view network parameters (Mac address, IP address, Subnet mask, IP
broadcast address) of the Linux using IPRoute and ifconfig utilities.
4. Configure and view network parameters (Mac address, IP address, Subnet mask, IP
broadcast address) of the Windows machine using the network configuration GUI,
ipconfig and netstat.
5. Setup a LAN using the two machines and a 3Com 4226T switch.
6. Install and use Ettercap-0.6.b on the Linux machine to sniff and analyze traffic.
7. Configure the 3Com 4226T so as the two machines belong to two (2) different VLANs
using untagged ports.
8. Configure two VLANs to be distributed over two (2) 3Com 4226T switches using
80.2.1Q tagged ports.
2
1. Linux Red Hat 9.0 Installation
While installing Linux, make sure to choose the custom installation. Make sure also to
create and format manually the following partitions:
Partition
Size (Mbytes)
Formatting
/boot
100
Ext3 (journaling)
Swap
128
Not applicable
/
4500
Ext3 (journaling)
/data
The remaining disk space
Ext3 (journaling)
The root password should be rootroot.
While choosing the packages to be installed, make sure to select only the following:
+Desktops: all desktops
+Applications
-Editors
-Graphical Internet
+Servers
-Server Configuration Tool
-Web Server
-Mail Server
-Windows File Server
-DNS Name Server
-FTP Server
-Network Servers
+Development
-Development Tools
+System
-Administration Tools
-System Tools
+Miscellaneous: Don’t select anything
The total size of packages to be installed should be 1580 Mbytes.
2. Windows 2000 Server Installation
While installing Windows 2000 Server, make sure to select the following packages:
+IIS (Internet Information Services)
+Network Services
The administrator password should be administrator.
3
3. Network Parameters Configuration on Linux Machine
3.1
Use IPRoute utility (Basically the ip command) to get the MAC address of the
Linux machine. Fill in the answer sheet with the command issued and the MAC
address.
3.2
Use IPRoute utility to configure the following parameters for the eth0 interface:
IP address: 10.10.10.1
Subnet mask: 255.255.255.0 (24 bits)
IP Broadcast address: 10.10.10.255
Fill in the answer sheet with the command issued.
3.3
Use ifconfig utility to view the eth0 interface configuration. Fill in the answer sheet
with the command issued and its output (that describes eth0 interface
configuration).
3.4
Use ifconfig utility to disable the eth0 interface. Fill in the answer sheet with the
command issued.
3.5
Use ifconfig utility to re-enable the eth0 interface. Fill in the answer sheet with the
command issued.
4. Network Parameters Configuration on Windows Machine
4.1
Use ipconfig utility to get the MAC address of the Windows machine. Fill in the
answer sheet with the command issued and the MAC address.
4.2
Use the network parameters GUI to configure the following:
IP address: 169.254.100.99
Subnet mask: 255.255.0.0 (16 bits)
4.3
Use ipconfig utility to view the network interface configuration. Fill in the answer
sheet with the ipconfig output.
4.4
Ping the loopback address (127.0.0.1) and the local address (169.254.100.99). You
should get a reply.
4.5
Display all the active connections using netstat utility, Fill in answer sheet with the
command issued.
4
5. Switch Configuration and Network Setup
The 3Com 4226T switch comes with a default IP address which is 169.254.100.100. You will
start by changing this IP address to 10.10.10.10 using a Web interface (HTML GUI + HTTP
protocol). The 3Com 4226T runs an HTTP Server. You will connect to this HTTP Server
from the Windows machine using Internet Explorer browser.
5.1
Explain why the IP address of the Windows machine should be set to
169.254.x.y. (169.254.100.99 for example). Fill in the answer sheet.
5.2
Connect the Windows machine to 3Com 4226T switch using RJ-45 cable and any
port on the switch (see figure1).
5.3
Launch Internet Explorer and type in the address field: http://169.254.100.100
5.4
Enter admin as username and leave the password blank. Don’t change the
admin password
5.5
Use the Web interface to change the IP address of the switch to 10.10.10.10.
5.6
Change the network parameters of the Windows machine to the following:
IP address: 10.10.10.2
Subnet mask: 255.255.255.0 (24 bits)
5.7
Setup a LAN using the architecture shown in figure 1. Use port 1 for Linux
machine and port 2 for Windows machine. (Off course you can use any port of
the switch).
Figure1. Network architecture using one switch
5.8
Report the link state described by the LED on each port. Fill in the answer sheet.
5.9
Make sure that machines are well connected by issuing a ping from one machine
to the other one.
5
5.10
Use IPRoute utility to disable ARP on Linux machine. Fill in the answer sheet with
the command issued.
5.11
Delete ARP cache on Windows machine by issuing:
arp –d *
Issue a ping from Windows machine to Linux machine. This later should be
unreachable. Explain. Fill in the answer sheet.
5.12
Use IPRoute utility to re-enable ARP on Linux machine.
6. Ettercap Installation and Traffic Analysis
6.1
Mount the floppy disk that contains Ettercap under Linux file system and copy
ettercap-0.6.b-1.i386.rpm file to hard disk.
6.2
Install Ettercap-0.6.b by issuing the following command:
rpm –i ettercap-0.6.b-1.i386.rpm
6.3
Launch Ettercap-0.6.b by issuing the command:
ettercap
6.4
Issue a ping from one machine to the other one and use Ettercap to sniff and
analyze Ethernet frames. Report the header fields of an Ethernet frame. Fill in
answer sheet.
7. VLANs Configuration Using Untagged Ports
7.1
Open Telnet session from Linux machine to the 3Com 4226T switch. The
username is admin and the password should be left blank. A top-level menu will
be
displayed.
The
menu
hierarchy
is
shown
in
figure
2
below.
Top-level menu
Create
Bridge
Other menus
Vlan
Other menus
Delete
Modify
Detail
Add port
Name
Remove port
Figure 2. Command Line Interface Menu Hierarchy.
Summary
6
7.2
Create a VLAN with ID set to 2 and name set to SSE. Fill in the answer sheet
with the command issued
7.3
Remove port 2 from VLAN 1 (default VLAN). We assume that Linux machine,
from which Telnet commands are sent to the switch, is connected on port 1. Fill
in the answer sheet with the command issued.
7.4
Add port 2 to VLAN 2 as an untagged port. Fill in the answer sheet with the
command issued.
7.5
Issue a ping from Linux machine to Windows machine or the reverse. Describe
ping output and explain. Fill in the answer sheet.
8. Distributed VLANs Configuration using 802.1Q Tagged Ports
When VLANs are distributed over more than one switch, 802.1Q tagged ports must be
used so that all VLAN traffic can be passed along the links between the switches.
In this step, two groups will collaborate to connect their switches through 802.1Q tagged
ports.
8.1
In Step 7, two VLANs were defined for each switch/group (VLAN1 which is the
default VLAN and VLAN2) and each machine was connected to a different
VLAN through an untagged port. In this scenario, we want that the machine
connected to switch1/VLAN1 be able to communicate with the machine
connected to switch2/VLAN1. We want also that the machine connected to
switch1/VLAN2 be able to communicate with the machine connected to
switch2/VLAN2. See figure 3.
Figure 3. VLAN configuration using 802.1Q tagged ports
8.2
Add port 3 on switch 1 to both VLAN1 and VLAN2 as a tagged port.
7
8.3
Add port 3 (Notice that we could use any other port-4, 5, 16 …) on switch 2 to
both VLAN1 and VLAN2 as a tagged port.
8.4
Connect the switches through port 3 of each one.
8.5
Issue a ping from the machine connected to switch1/VLAN1 to the machine
connected to switch2/VLAN1. Issue another ping from the machine connected to
switch1/VLAN2 to the machine connected to switch2/VLAN2. Describe ping
output and explain.
8.6
Issue a ping from the machine connected to switch1/VLAN1 to the machine
connected to switch2/VLAN2. Issue another ping from the machine connected to
switch1/VLAN2 to the machine connected to switch2/VLAN1. Describe ping
output and explain.
Download