Vous êtes sur la page 1sur 83

Computer Communication & Networks

Lab Manual

Name: _________________________________________ Reg. No:___________ Section: _________ Group: ______

University Of Engineering And Technology ,Taxila

Prepared by: Noshina Ishaque Checked by: Date:


________________________________________________________________________ 1

Hardware Requirements
Sr. No
1 2 3 4 5 6

Equipment Type
Workstations Fast Ethernet Switch Wireless Network Cards Wireless Access Point Crimping Tools Network Cable Testers

Qty
35 6 20 6 5 2

Software Requirements
Sr.No. Software Title
1 2 Ethereal Packet Tracer

Description
Freeware from

www.ethreal.com

Packet Tracer is a powerful networking based simulation and visualization Tool.

NS2

NS2 provides substantial support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks.

________________________________________________________________________ 2

Table of Contents
Lab 01: Introduction to Networking Equipment Lab 02: Networking Basics Commands Lab 03: Cabling Construction Lab 04: Building a Peer-to-Peer Network Lab 05: Active Directory and Domain Controller in Windows 2000 Server Lab 06: Wireless LAN Basics and Configuration (I) Lab 07: Wireless LAN Basics and Configuration (II) Lab 08: Ethereal Lab 09: LAN Scanner Lab 10: OFFLINE FILE Sharing Lab 11:Router Configuration Lab 12: Introduction To Simulation Softwares Lab 13: Basic Of Cygwin And NS2 Lab 14: Introduction To NS2 Programming
4 8 16 21 29 34 39 42 49 63 69 73 75 82

________________________________________________________________________ 3

Experiment no. 01
Title: Introduction to Networking Equipment Objective
To become familiar with Network Terminologies To become familiar with Network Devices To become familiar with OSI Model

TASK 1: Identify the Network Devices

Fig 1.1 Basic Networking Devices

________________________________________________________________________ 4

TASK 2: Check off all true statements regarding the benefits of OSI Model

TASK 3: Complete the Encapsulation Flow Chart

________________________________________________________________________ 5

TASK 4: Write each statement to its corresponding Layer

________________________________________________________________________ 6

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 7

Experiment no. 02
Networking Basics Commands

i.

PC Network TCP/IP Configuration

Objective
Gather information including connection, host name, Layer 2 MAC address and Layer 3 TCP/IP network address information. Compare network information to other PCs on the network. Learn to use the TCP/IP Packet Internet Groper (ping) command from a workstation. Learn to use the Trace Route (tracert) command from a workstation. Observe name resolution occurrences using WINS and/or DNS servers.

Background
This lab assumes the use of any version of Windows. This is a non-destructive lab and can be done on any machine without concern of changing the system configuration. Ideally, this lab is performed in a Computer Lab or other LAN environment that connects to the Internet. This lab can be done from a single remote connection via a Dial up modem or DSL-type connection. In the following Lab Manual the lab runs only on Windows NT/2000/XP systems. Extra Steps should be done on Windows 95/98/ME systems.

Step 1 Connect into the Internet


Establish and verify connectivity to the Internet. This ensures the computer has an IP address.

Step 2 Gather TCP/IP configuration information


Use the Start menu to open the Command Prompt, an MS-DOS-like window. Press Start > Programs > Accessories > Command Prompt OR Start > Programs > Command Prompt. OR Press Start>Run Then type cmd. The following figure shows the Command screen. Type ipconfig and press the Enter key. The spelling of ipconfig is critical while case is not. It is short for IP Configuration.

________________________________________________________________________ 8

Fig 2.1 ipconfig on Command Prompt This first screen shows the IP address, subnet mask, and default gateway. The IP address and the default gateway should be in the same network or subnet, otherwise this host would not be able to communicate outside the network. In the figure the subnet mask tells us that the first three octets must be the same to be in the same network. Note: If this computer is on a LAN, the default gateway might not be seen if it is running behind a Proxy Server. Record the following information for this computer.

Step 3 Record the following TCP/IP information for this computer


IP address: ____________________________________________________________ Subnet Mask: __________________________________________________________ Default Gateway: _______________________________________________________

Step 4 Compare the TCP/IP configuration of this computer to others on the LAN
If this computer is on a LAN, compare the information of several machines. Are there any similarities?____________________________________________________ What is similar about the IP addresses? __________________________________________ What is similar about the default gateways? _______________________________________ The IP addresses should share the same network portion. All machines in the LAN should share the same default gateway. Record a couple of the IP Addresses:

________________________________________________________________________
Step 5 Check additional TCP/IP configuration information
To see detailed information, type ipconfig /all and press Enter. The figure shows the detailed IP configuration screen.

________________________________________________________________________ 9

Fig 2.2 ipconfig/all on Command Prompt The host name, including the computer name and NetBIOS name should be displayed. Also, the DHCP server address, if used, and the date the IP lease starts and ends should be displayed. Look over the information. Entries for the DNS, used in name resolution servers, may also be present. The previous figure reveals that the router is performing both DHCP and DNS services for this network. This would likely be a small office or home office (SOHO) or small branch office implementation. Notice the Physical Address (MAC) and the NIC model (Description). In the LAN, what similarities about the Physical (MAC) Addresses are seen? __________________________________________________________________________ While not a requirement, most LAN administrators try to standardize components like NICs. Therefore, it would not be surprising to find all machines share the first three Hex pairs in the adapter address. These three pairs identify the manufacturer of the adapter. Write down the IP addresses of any servers listed: __________________________________________________________________________ Write down the computer Host Name: __________________________________________________________________________ Write down the Host Names of a couple other computers: __________________________________________________________________________

Step 6 Close the screen


Close the screen when finished examining network settings. Repeat the previous steps as necessary. Make sure that it is possible to return to and interpret this screen.

ii.

Using ping and tracert

Objective
Learn to use the TCP/IP Packet Internet Groper (ping) command.

________________________________________________________________________ 10

Learn to use the Trace Route (tracert) command. Observe name resolution occurrences using WINS and/or DNS servers.

Background
This lab assumes the use of any version of Windows. This is a non-destructive lab and can be done on any machine without concern of changing the system configuration. Ideally, this lab is performed in a LAN environment that connects to the Internet. It can be done from a single remote connection via a modem or DSL-type connection. The student will need the IP addresses that were recorded in the previous part of the lab.

Step 1 Establish and verify connectivity to the Internet


This ensures the computer has an IP address.

Step 2 Access the command prompt


As accessed in previous part of the lab.

Step 3 ping the IP address of another computer


In the window, type ping, a space, and the IP address of a computer recorded in the previous lab. The following figure shows the successful results of ping to this IP address.

Fig 2.3 ping by ip adress on Command Prompt ping uses the ICMP echo reply feature to test physical connectivity. Since ping reports on four attempts, it gives an indication of the reliability of the connection. Look over the results and verify that the ping was successful. Is the ping successful?

Step 4 ping the IP address of the default gateway


Try to ping the IP address of the default gateway if one was listed in the last exercise. If the ping is successful, it means there is physical connectivity to the router on the local network and probably the rest of the world.

Step 5 ping the IP address of a DHCP or DNS servers


Try to ping the IP address of any DHCP and/or DNS servers listed in the last exercise.

________________________________________________________________________ Was the ping successful? ____________________ ________________________________________________________________________ 11

Step 6 ping the Loopback IP address of this computer


Type the following command: ping 127.0.0.1 The 127.0.0.0 network is reserved for loopback testing. If the ping is successful, then TCP/IP is properly installed and functioning on this computer. Was the ping successful? ____________________

Step 7 ping the hostname of another computer


Try to ping the hostname of the computer that was recorded in the previous lab. The figure shows the successful result of the ping the hostname.

Fig 2.4 ping by host name on Command Prompt

Look over the results. Notice that the first line of output shows the host name, m450 in the example, followed by the IP address. This means the computer was able to resolve the host name to an IP address. Without name resolution, the ping would have failed because TCP/IP only understands valid IP addresses, not names. If the ping was successful, it means that connectivity and discovery of IP addresses can be done with only a hostname. In fact, this is how many early networks communicated. If successful, then ping a hostname also shows that there is probably a WINS server working on the network. Note: It would not be uncommon for a Windows 2000 or XP networks to not support this feature. It is an old technology and often unnecessary. If the last ping worked, try to ping the hostname of any another computer on the local network. The following figure shows the possible results. Note: The name had to be typed in quotes because the command language did not like the space in the name.

________________________________________________________________________ 12

Fig 2.5 ping by host name with spacing on Command Prompt

Step 8 ping the Cisco web site


Type the following command: ping www.cisco.com

Fig 2.6 ping by web address on Command Prompt The first output line shows the Fully Qualified Domain Name (FQDN) followed by the IP address. A Domain Name Service (DNS) server somewhere in the network was able to resolve the name to an IP address. DNS servers resolve domain names, not hostnames, to IP addresses. Without this name resolution, the ping would have failed because TCP/IP only understands valid IP addresses. It would not be possible to use the web browser without this name resolution. With DNS, connectivity to computers on the Internet can be verified using a familiar web address, or domain name, without having to know the actual IP address. If the nearest DNS server does not know the IP address, the server asks a DNS server higher in the Internet structure.

Step 9 ping the Microsoft web site


a. Type the following command: ping www.microsoft.com

________________________________________________________________________ 13

Fig 2.7 ping failure for Microsoft because some Microsoft routers are configured to ignore ping Notice that the DNS server was able to resolve the name to an IP address, but there is no response. Some Microsoft routers are configured to ignore ping requests. This is a frequently implemented security measure. ping some other domain names and record the results. For example, ping www.msn.de

Step 10 Trace the route to the Cisco web site


Type tracert www.cisco.com and press Enter.

Fig 2.8 tracert website on Command Prompt

tracert is TCP/IP abbreviation for trace route. The preceding figure shows the successful result when running tracert from Bavaria in Germany. The first output line shows the FQDN followed by the IP address. Therefore, a DNS server was able to resolve the name to an IP address. Then there are listings of all routers the tracert requests had to pass through to get to the destination. tracert uses the same echo requests and replies as the ping command but in a slightly different way. Observe that tracert actually contacted each router three times. Compare the results to

________________________________________________________________________ 14

determine the consistency of the route. Notice in the above example that there were relatively long delays after router 11 and 13, possibly due to congestion. The main thing is that there seems to be relatively consistent connectivity. Each router represents a point where one network connects to another network and the packet was forwarded through.

Step 11 Trace other IP addresses or domain names


Try tracert on other domain names or IP addresses and record the results. An example is tracert www.hec.gov.pk

Step 12 Trace a local host name or IP address


Try using the tracert command with a local host name or IP address. It should not take long because the trace does not pass through any routers.

Fig 2.9 tracert a nearby Router

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 15

Experiment no. 03
Cabling Construction
i.

Straight-Through Cable Construction

Fig 3.1 Proper Straight Cable

Objective
Build a Category 5 or Category 5e (CAT 5 or 5e) Unshielded Twisted Pair (UTP) Ethernet network patch cable or patch cord. Test the cable for continuity and correct pinouts, the correct color of wire on the right pin.

Background
The cable constructed will be a four-pair, eight-wire, straight-through cable, which means that the color of wire on Pin 1 on one end of the cable will be the same as that of Pin 1 on the other end. Pin 2 will be the same as Pin 2, and so on. Prior to starting the lab, the teacher should have a spool of Cat 5 Unshielded Twisted Pair (UTP) cable, RJ-45 (8-pin) connectors, an RJ-45 crimping tool and an Ethernet / RJ-45 continuity tester available. Work individually or in teams. The following resources will be required: One 0.6 to .9 m (2 to 3 ft) length of Cat 5 cabling per person or team Four RJ-45 connectors, two are extra for spares RJ-45 crimping tools to attach the RJ-45 connectors to the cable ends Ethernet cabling continuity tester which can test straight-thru or crossover type cables Wire cutters RJ45 Pin # Pin 1 Pin 2 Pin 3 Color (both sides same) White Orange Orange White Green

________________________________________________________________________ 16

Pin 4 Pin 5 Pin 6 Pin 7 Pin8

Blue White Blue Green White Brown Brown

Use the preceding table and diagram to create a Straight cable. Both cable ends should be wired the same when looking at the conductors.

Step 1
Determine the distance between devices or device and plug. Add at least 30.48 cm (12 in.) to the distance. Standard lengths are 1.83 m (6ft) and 3.05 m (10 ft).

Step 2
Cut a piece of stranded Cat UTP cable to the desired length. Use stranded cable for patch cables because it is more durable when bent repeatedly. Solid wire is used for cable runs that are punched down into jacks.

Step 3
Strip 5.08 cm (2 in.) of jacket off of one end of the cable.

Step 4
Hold the four pairs of twisted cables tightly where jacket was cut away. Reorganize the cable pairs into the order of the wiring standard. Take care to maintain as much of the twists as possible since this provides noise cancellation.

Step 5
Hold the jacket and cable in one hand and untwist a short length of the green and blue pairs. Reorder the pairs to reflect the color scheme. Untwist and order the rest of the wire pairs according to the color scheme.

Step 6
Flatten, straighten, and line up the wires. Trim them in a straight line to within 1.25 to 1.9 cm (1/2 to in.) from the edge of the jacket. Be sure not to let go of the jacket and the wires, which are now in the proper order. Minimize the length of untwisted wires because sections that are too long and near connectors are a primary source of electrical noise.

Step 7
Place an RJ-45 plug on the end of the cable, with the prong on the underside and the orange pair to the left side of the connector.

Step 8

________________________________________________________________________ 17

Gently push the plug onto wires until the copper ends of the wires can be seen through the end of the plug. Make sure the end of the jacket is inside the plug. This provides for stress relief and to ensure that all wires are in the correct order. If the jacket is not inside the plug, the plug will not be properly gripped and will eventually cause problems. If everything is correct, crimp the plug hard enough to force the contacts through the insulation on the wires, completing the conducting path.

Fig 3.2 Proper way to Crimp a cable

Step 9
Repeat Steps 3 through 8 to terminate the other end of the cable. Use the same scheme to finish the straight through cable.

Step 10
Test the finished cable. Have the instructor check the finished cable. How is it possible to tell if the cable is functioning properly? ii.

Crossover Cable Construction

Objective
Build a Category 5 or Category 5e (CAT 5 or 5e) Unshielded Twisted Pair (UTP) Ethernet crossover cable. Test the cable for continuity and correct pin-outs, correct wire on the right pin.

Background
This will be a 4-pair "crossover" cable. A crossover cable means that the second and third pairs on one end of the cable will be reversed on the other end. The pin-outs will be on one end and on the other end. All 8 conductors (wires) should be terminated with RJ-45 modular connectors. This patch cable will conform to the structured cabling standards. If the patch cable is used between hubs or switches, it is considered to be part of the "vertical" cabling. Vertical cabling is also called backbone cabling. A crossover cable can be used as a backbone cable to connect two or more hubs or switches in a LAN, or to connect two isolated workstations to create a mini-LAN. This will allow the connection of two workstations or a server and a workstation without the need for a hub between them. This can be very helpful for training and testing. To connect more than two workstations, a hub or a switch will be needed.

________________________________________________________________________ 18

Prior to starting the lab, the teacher or lab assistant should have a spool of Cat 5 or Cat 5e UTP cable, RJ-45 (8-pin) connectors, a RJ-45 crimping tool and an Ethernet / RJ-45 continuity tester available. Work individually or in teams. The following resources will be required: One 0.6 to .9 m (2 to 3 ft) length of Cat 5 cabling per person or team Four RJ-45 connectors, two are extra for spares RJ-45 crimping tools to attach the RJ-45 connectors to the cable ends Ethernet cabling continuity tester which can test crossover type cables Wire cutters

RJ45 Pin # Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Pin 7 Pin8

1 end color White Orange Orange White Green Blue White Blue Green White Brown Brown

2nd end color White Green Green White Orange Blue White Blue Orange White Brown Brown

Step 1
Create a crossover cable using the following tables and diagrams. One end of the cable should be st nd wired to the 1 standard. The other end should be wired to the 2 standard. This crosses the transmit pairs and the receive pairs, the second and third pair, to allow communication to take place. Only four wires are used with 10BASE-T or 100BASE-TX Ethernet.

Step 2
Determine the distance between devices, or device and plug, and then add at least 30.48 cm (12 in.) to it. Standard lengths for this cable are 1.83 m (6 ft) and 3.05 m (10 ft).

Step 3
Cut a piece of stranded UTP cable to the desired length. Use stranded cable for patch cables because it is more durable when bent repeatedly. Solid wire is fine for cable runs that are punched down into jacks.

Step 4

________________________________________________________________________ 19

Strip 5.08 cm 9 (2in.) of jacket off one end of the cable.

Step 5
Hold the four pairs of twisted cables tightly where the jacket was cut away. Reorganize the cable nd pairs into the order of the 2 wiring standard. Take care to maintain the twists since this provides noise cancellation.

Step 6
Hold the jacket and cable in one hand. Untwist a short length of the green and blue pairs, and reorder nd them to reflect the 2 wiring color scheme. Untwist and order the rest of the wire pairs according to the color scheme.

Step 7
Flatten, straighten, and line up the wires. Trim them in a straight line to within 1.25 cm to 1.9 cm (1/2 to in.) from the edge of the jacket. Be sure not to let go of the jacket and the wires, which are now in order. Minimize the length of untwisted wires because sections that are too long and near connectors are a primary source of electrical noise.

Step 8
Place an RJ-45 plug on the end of the cable with the prong on the underside and the orange pair, st green pair on the 1 end, to the left side of the connector.

Step 9
Gently push the plug onto wires until the copper ends of the wires can be seen through the end of the plug. Make sure the end of the jacket is inside the plug and all wires are in the correct order. If the jacket is not inside the plug, the plug will not be properly gripped and will eventually cause problems. If everything is correct, crimp the plug hard enough to force the contacts through the insulation on the wires, thus completing the conducting path.

Step 10
Repeat steps 4-8 to terminate the other end of the cable using the 1 scheme to finish the crossover cable.
st

Step 11
Test the finished cable. Have the instructor check it. How is it possible to tell if the cable is functioning properly?

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 20

Experiment no. 04
Building a Peer-to-Peer Network

Fig 4.1 Peer to Peer Network Different sorts of Cable symbols used to connect different devices

Objective
Create a simple peer-to-peer network between two PCs Identify the proper cable to connect the two PCs Configure workstation IP address information Test connectivity using the ping command.

Background / Preparation
This lab focuses on the ability to connect two PCs to create a simple peer-to-peer Ethernet LAN between two workstations. The workstations will be directly connected to each other without using a hub or switch. In addition to the Layer 1 physical and Layer 2 data link connections, the computers must also be configured with the correct IP network settings, which is Layer 3, so that they can communicate. A basic CAT 5/5e UTP crossover cable is all that is needed. A crossover cable is the same type that would be used as backbone or vertical cabling to connect switches together. Connecting the PCs in this manner can be very useful for transferring files at high speed and for troubleshooting interconnecting devices between PCs. If the two PCs can be connected with a single cable and are able to communicate, then any networking problems are not with the PCs themselves. Start this lab with the equipment turned off and with cabling disconnected. Work in teams of two with one person per PC. The following resources will be required: Two workstations with an Ethernet 10/100 NIC installed Several Ethernet cables, which are both straight-through and crossover, to choose from for connecting the two workstations

Step 1 Identify the proper Ethernet cable and connect the two PCs

________________________________________________________________________ 21

a. The connection between the two PCs will be accomplished using a Category 5 or 5e crossover cable. Locate a cable that is long enough to reach from one PC to the other, and attach one end to the NIC in each of the PCs. Be sure to examine the cable ends carefully and select only a crossover cable. b. What kind of cable is required to connect from NIC to NIC? _____________________________ c. What is the category rating of the cable? ____________________________________________

Step 2 Verify the physical connection


a. Plug in and turn on the computers. To verify the computer connections, insure that the link lights on both NICs are lit. Are both link lights lit? ___________________________________________

Step 3 Access the IP settings window


Note: Be sure to write down the existing IP settings, so that they can be restored at the end of the lab. These include IP address, subnet mask, default gateway, and DNS servers. If the workstation is a DHCP client, it is not necessary to record this information. Windows 95 / 98 / Me/ users should do the following: Click on Start > Settings > Control Panel and then click the Network icon. Select the TCP/IP protocol icon that is associated with the NIC in this PC and click on Properties. Click on the IP Address tab and the Gateway tab. Windows NT / 2000 users should do the following: Click on Start > Settings > Control Panel and then open the Network and Dial-up Connections folder. Click ad open the Local Area Connection icon. Select the TCP/IP protocol icon that is associated with the NIC in this PC. Click on Properties and click on Use the following IP address. Windows XP users should do the following: Click on Start > Settings > Control Panel and then click the Network Connection icon. Select the Local Area Network Connection and click on Change settings of this connection. Select the TCP/IP protocol icon that is associated with the NIC in this PC. Click on Properties and click on Use the following IP address. See the example below:

________________________________________________________________________ 22

Fig 4.2 Internet Protocol TCP/IP Properties

Step 4 Configure TCP/IP settings for the two PCs


a. Set the IP address information for each PC according to the information in the table. b. Note that the default gateway IP address is not required, since these computers are directly connected. The default gateway is only required on local area networks that are connected to a router.

Step 5 Access the Command or MS-DOS prompt


a. Use the Start menu to open the Command Prompt (MS-DOS-like) window: Windows 95 / 98 / Me users should do the following: Start > Programs > MS-DOS Prompt Windows NT / 2000 users should do the following: Start > Programs > Accessories > Command Prompt Windows XP users should do the following:

________________________________________________________________________ 23

Start > Programs > Accessories > Command Prompt

Step 6 Verify that the PCs can communicate


a. Test connectivity from one PC to the other by pinging the IP address of the opposite computer. Use the following command at the command prompt. C:>ping 192.168.1.1 (or 192.168.1.2) b. Look for results similar to those shown below. If not, check the PC connections and TCP/IP settings for both PCs. What was the ping result?

___________________________________________________________________________ ___________________________________________________________________________

Fig 4.3 Pinging a peer

Step 7 Confirm the TCP/IP network settings


Windows NT / 2000 / XP users should do the following: Type the ipconfig command from the Command Prompt. Record the results:

___________________________________________________________________________ Step 8 Restore the PCs to their original IP settings, disconnect the equipment, and store the cables

________________________________________________________________________ 24

Building a Switch-based Network

Fig 4.4 Switch Based Network Different sorts of Cable symbols used to connect different devices

Objective
Create a simple network with two PCs using a switch Identify the proper cable to connect the PCs to the switch Configure workstation IP address information Test connectivity using the ping command

Background / Preparation
This lab focuses on the ability to connect two PCs to create a simple switch-based Ethernet LAN using two workstations. A switch is a networking concentration device sometimes referred to as a multi port bridge. Switches are relatively inexpensive and easy to install. When operating in fullduplex mode, they provide dedicated bandwidth to workstations. Switches eliminate collisions by creating micro segments between ports to which the two workstations are attached. They are appropriate for small to large LANs with moderate to heavy traffic. In addition to the physical and data link connections, which are Layers 1 and 2, the computers must also be configured with the correct IP network setting, which is Layer 3, so that they can communicate. Since this lab uses a switch, a basic Category 5/5e UTP straight-through cable is needed to connect each PC to the switch. This is referred to as a patch cable or horizontal cabling, which is used to connect workstations and a typical LAN. Start this lab with the equipment turned off and with cabling disconnected. Work in teams of two with one person per PC. The following resources will be required: Two workstations with an Ethernet 10/100 NIC installed

________________________________________________________________________ 25

Ethernet 10BaseT or Fast Ethernet switch Several Ethernet cables, which are straight-through and crossover, to choose from for connecting the two workstations

Step 1 Identify the proper Ethernet cable and connect the two PCs to the switch
a. The connection between the two PCs and the switch will be accomplished using a Category 5 or 5e straight-through patch cable. Locate two cables that are long enough to reach from each PC to the switch. Attach one end to the NIC and the other end to a port on the switch. Be sure to examine the cable ends carefully and select only a straight-through cable. b. What kind of cable is required to connect from NIC to switch?

_________________________

c. What is the category rating of the cable? ________________________________________ d. What is the AWG wire size designation of the cable?

_______________________________

Step 2 Verify the physical connection


a. Plug in and turn on the computers. To verify the computer connections, insure that the link lights on the both PC NICs and the switch interfaces are lit. Are all link lights lit? ________________

Step 3 Access the IP settings window


Note: Be sure to write down the existing IP settings, so that they can be restored at the end of the lab. These include IP address, subnet mask, default gateway, and DNS servers. If the workstation is a DHCP client, it is not necessary to record this information. Windows 95 / 98 / Me/ users should do the following: Click on Start > Settings > Control Panel and then click the Network icon. Select the TCP/IP protocol icon that is associated with the NIC in this PC and click on Properties. Click on the IP Address tab and the Gateway tab.

Windows NT / 2000 users should do the following: Click on Start > Settings > Control Panel and then open the Network and Dial-up Connections folder. Click and open the Local Area Connection icon. Select the TCP/IP protocol icon that is associated with the NIC in this PC. Click on Properties and click on Use the following IP address.

Windows XP users should do the following: Click on Start > Settings > Control Panel and then click the Network Connection icon. Select the Local Area Network Connection and click on Change settings of this connection. Select the TCP/IP protocol icon that is associated with the NIC on this PC. Click on Properties and click on Use the following IP address.

See the example below:

________________________________________________________________________ 26

Fig 4.5 Internet Protocol (TCP/IP) Properties

Step 4 Configure TCP/IP settings for the two PCs


a. Set the IP address information for each PC according to the information in the table. b. Note that the default gateway IP address is not required, since these computers are directly connected. The default gateway is only required on local area networks that are connected to a router.

Step 5 Verify that the PCs can communicate


a. Test connectivity from one PC to the other through the switch by pinging the IP address of the opposite computer. Use the following command at the command prompt. C:>ping 192.168.1.1 (or 192.168.1.2) b. Look for results similar to those shown below. If not, check the PC connections and TCP/IP settings for both PCs. What was the ping result?

__________________________________________________________________________ ________________________________________________________________________ 27

__________________________________________________________________________

Fig 4.6 Pinging a host in switch based Network

Step 6 Confirm the TCP/IP network settings


Windows NT / 2000 / XP users should do the following: Type the ipconfig command from the Command Prompt. Record the results.

__________________________________________________________________________
Step 7 Restore the PCs to their original IP settings, disconnect the equipment, and store the cables

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 28

Experiment no. 05
Active Directory and Domain Controller in Windows 2000 Server

Objective
To Install of Active Directory on Windows 2000 NT Server Apply GPO policies on a particular group Then join a client with the domain

Equipment
Two or more systems, one of them must with windows 2000 NT Server.

Introduction to Active Directory


Active Directory is the widely touted new directory service integrated into Windows 2000 NT, and is one of the most significant new features of the operating system. A directory service stores information about all network resources and makes that information available to administrators, users, and applications. Many companies have multiple directory services that they must manage, such as one for sending e-mail, one for managing users accounts, and one for storing information about applications. The complexity of administering and using multiple accounts has a negative affect on the productivity of everyone involved. Using Active Directory, administrators manage a directory service that is completely integrated with the operating system, which means that it provides one management interface for many directory service tasks. In addition, Active Directory significantly strengthens network security by acting as the central authority for governing access control and user authentication. Active Directory builds on the familiar architecture of the Windows NT operating system with the addition of standards-based technologies DNS and the Lightweight Directory Access Protocol (LDAP)to access Active Directory features. Active Directory uses DNS as a locator service, resolving domain names to IP addresses and LDAP, the industry standard, protocol for directory service access, for accessing data. For example, when an Active Directory client wants to log on to an Active Directory domain, the client queries its DNS server for the IP address of the LDAP service running on the domain controller. To simplify managing your network, enhance network security, and make use of open standards that allow you to extend and interoperate your directory service with other applications, directory services, and devices, take a look at how to install Active Directory when upgrading to Windows 2000.

What is a Windows Domain?


A Windows Domain is a group of Windows NT and Windows 2000 file servers and other computers which share user and security information.

Steps to install Active Directory on Windows 2000 NT Server


Requirements Here is a quick list of what you must have: An NTFS partition with enough free space An Administrator's username and password The correct operating system version

________________________________________________________________________ 29

A NIC Properly configured TCP/IP (IP address, subnet mask and - optional - default gateway) A network connection (to a hub or to another computer via a crossover cable) An operational DNS server (which can be installed on the DC itself) A Domain name that you want to use The Windows Server 2000 CD media

Assumptions In this lab we assume that you already have the DNS service installed. Otherwise install the service from windows CD. Furthermore, it is assumed that the DC will also be its own DNS server. If that is not the case, you MUST configure another Windows 2000/2003 server as the DNS server, and if you try to run DCPROMO without doing so, you'll end up with errors and the process will fail. Running DC Promo Now run Dcpromo.exe from the Run command. 1. Click Start, point to Run and type "dcpromo". 2. The wizard windows will appear. Click Next. 3. In the Operating System Compatibility windows read the requirements for the domain's clients and if you like what you see - press Next. 4. Choose Domain Controller for a new domain and click Next. 5. Choose Create a new Domain in a new forest and click Next. 6. Enter the full DNS name of the new domain, for example telecom.com. Click Next. This step might take some time because the computer is searching for the DNS server and checking to see if any naming conflicts exist. 7. Accept the the down-level NetBIOS domain name, in this case it's telecom. Click Next 8. Accept the Database and Log file location dialog box (unless you want to change them of course). The location of the files is by default %systemroot%\NTDS, and you should not change it unless you have performance issues in mind. Click Next. 9. Accept the Sysvol folder location dialog box (unless you want to change it of course). The location of the files is by default %systemroot%\SYSVOL, and you should not change it unless you have performance issues in mind. This folder must be on an NTFS v5.0 partition. This folder will hold all the GPO and scripts you'll create, and will be replicated to all other Domain Controllers. Click Next. 10. If your DNS server, zone and/or computer name suffix were not configured correctly you will get the following warning:

________________________________________________________________________ 30

This means the Dcpromo wizard could not contact the DNS server, or it did contact it but could not find a zone with the name of the future domain. You should check your settings. You have an option to let Dcpromo do the configuration for you. If you want, Dcpromo can install the DNS service, create the appropriate zone, configure it to accept dynamic updates, and configure the TCP/IP settings for the DNS server IP address. To let Dcpromo do the work for you, select "Install and configure the DNS server...". Click Next. 11. If your DNS settings were right, you'll get a confirmation window. Just click Next. 12. Accept the Permissions compatible only with Windows 2000 or Windows Server 2003 settings, unless you have legacy apps running on Pre-W2K servers. 13. Enter the Restore Mode administrator's password. In Windows Server 2000 this password can be later changed via NTDSUTIL. Click Next. 14. Review your settings and if you like what you see - Click Next. 15. See the wizard going through the various stages of installing AD. Whatever you do NEVER click Cancel!!! You'll wreck your computer if you do. If you see you made a mistake and want to undo it, you'd better let the wizard finish and then run it again to undo the AD. 16. If all went well you'll see the final confirmation window. Click Finish. 17. You must reboot in order for the AD to function properly. 18. Click Restart now. Checking the AD installation You should now check to see if the AD installation went well. 1. First, see that the Administrative Tools folder has all the AD management tools installed. 2. Run Active Directory Users and Computers (or type "dsa.msc" from the Run command). See that all OUs and Containers are there. 3. Run Active Directory Sites and Services. See that you have a site named Default-FirstSite-Name, and that in it your server is listed. 4. Open the DNS console. See that you have a zone with the same name as your AD domain (the one you've just created, remember? Duh...). See that within it you have the 4 SRV record folders. They must exist. If they don't (like in the following screenshot), your AD functions will be broken (a good sign of that is the long time it took you to log on. The "Preparing Network Connections" windows will sit on the screen for many moments, and even when you do log on many AD operations will give you errors when trying to perform them).

________________________________________________________________________ 31

Steps to join a Domain in XP


On the Computer Name tab, click Change, and then enter the domain membership information. If everything is in place (especially the computer's TCP/IP and DNS configuration) then you should receive a username and password dialog box. Enter the username and password of a user that has enough right to create computer accounts in the domain (for example - a Domain Admin group member). If a computer account was already established in the domain then you can enter any username and password of any valid user (for example - your own domain username and password). If all went ok you'll get a welcome message. Note: Usually, there is no need to manually change the computer's DNS Suffix when joining an Active Directory domain, because the suffix will automatically be set to mach the DNS name of the domain. So if you plan to join an AD domain, leave the DNS suffix empty. Note: Home Edition is not designed to join domains; only workgroups. To join domains, use XP Professional version or above. A reboot will be necessary to complete this process. Network ID Wizard If you are unfamiliar or uncertain about performing these tasks, you can use the Network Identification (ID) Wizard to help you. Click Network ID on the System Properties dialog box. This step starts the Network ID Wizard. This wizard is new to Windows XP, and its purpose is to guide you with a series of questions that can enable the computer to be added to either a workgroup or domain. You can move backwards and forwards in the wizard by using the Back and Next buttons. The first set of options in the wizard are: Option 1 states: "This computer is part of a business network, and I use it to connect to other computers at work." Option 2 states: "This computer is for home use and is not part of a business network."

If you select option 2, the wizard requests you to click Finish to restart the computer. If you follow this step, the configuration of the computer is "Workgroup Member", with the name of the workgroup as "Workgroup," by default. If you select option 1, the following options are displayed: Option 1a: "My company uses a network with a domain." Option 1b: "My company uses a network without a domain."

If you select option 1b, you can also configure the computer as a "Workgroup Member", and you can enter the name of the workgroup. If you select option 1a, a dialog box is displayed that requests the following information:

________________________________________________________________________ 32

User name Password User account domain Computer name Computer domain

The next page requires the domain name to which the computer is to be added and the username and password of an account that has the rights to add a computer to the domain. The next page enables the user account from the previous page to be added to this computer. The next page enables that newly added user to have various rights on the local computer.

Note: If the computer is a member of a domain, the computer also maintains a local domain
with security accounts that pertain only to that computer. To change domains at the logon screen, press CTRL+ALT+DELETE. If the domain box is not displayed, click the Options button to display the domain box. Then, select the required domain from the menu.

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 33

Experiment no. 06
Wireless LAN Basics and Configuration (I) Objective
Understanding of Wireless LAN Establish a wireless LAN in four different applications

Equipment
DWL-2100 AP (The DWL-2100AP Wireless Access Point utilizes the 802.11b and the 802.11g standards) Computers with WLAN Cards of 802.11b or 802.11g Standard

Introduction
A Wireless Local Area Network (WLAN) is a computer network that transmits and receives data with radio signals instead of wires. WLANs are used increasingly in both home and office environments, and public areas such as airports, coffee shops and universities. Innovative ways to utilize WLAN technology are helping people to work and communicate more efficiently. Increased mobility and the absence of cabling and other fixed infrastructure have proven to be beneficial for many users. Wireless users can use the same applications they use on a wired network. Wireless adapter cards used on laptop and desktop systems support the same protocols as Ethernet adapter cards. People use WLAN technology for many different purposes: Mobility - Productivity increases when people have access to data in any location within the operating range of the WLAN. Management decisions based on real-time information can significantly improve worker efficiency. Low Implementation Costs - WLANs are easy to set up, manage, change and relocate. Networks that frequently change can benefit from WLANs ease of implementation. WLANs can operate in locations where installation of wiring may be impractical. Installation and Network Expansion - Installing a WLAN system can be fast and easy and can eliminate the need to pull cable through walls and ceilings. Wireless technology allows the network to go where wires cannot go - even outside the home or office. Inexpensive Solution - Wireless network devices are as competitively priced as conventional Ethernet network devices. Scalability - WLANs can be configured in a variety of ways to meet the needs of specific applications and installations. Configurations are easily changed and range from Peer-to-Peer networks suitable for a small number of users to larger Infrastructure networks to accommodate hundreds or thousands of users, depending on the number of wireless devices deployed.

Installation Considerations
The D-Link DWL-2100AP lets you access your network, using a wireless connection, from virtually anywhere within its operating range. Keep in mind, however, that the number, thickness and location of walls, ceilings, or other objects that the wireless signals must pass through, may limit the range. Typical ranges vary depending on the types of materials and background RF (radio frequency) noise in your home or business. The key to maximizing wireless range is to follow these basic guidelines: 1. Keep the number of walls and ceilings between the DWL-2100AP and other network devices to a minimum - each wall or ceiling can reduce your DWL-2100APs range from 3-90 feet (1-

________________________________________________________________________ 34

30 meters.) Position your devices so that the number of walls or ceilings is minimized. straight through a wall or ceiling (instead of at an angle) for better reception. 2. Be aware of the direct line between network devices. A wall that is 1.5 feet thick (.5 meters), at a 45-degree angle appears to be almost 3 feet (1 meter) thick. At a 2-degree angle it looks over 42 feet (14 meters) thick! Position devices so that the signal will travel 3. Building materials can impede the wireless signal - a solid metal door or aluminum studs may have a negative effect on range. Try to position wireless devices and computers with wireless adapters so that the signal passes through drywall or open doorways and not other materials. 4. Keep your product away (at least 3-6 feet or 1-2 meters) from electrical devices or appliances that generate RF noise.

WLAN Applications
LAN Extension Ad hoc networks Cross building interconnection Nomadic access

LAN Extension (Infrastructure Network)

Fig 6.1 Infrastructure Network

For a typical wireless setup at home (as shown above), please do the following: 1. You will need broadband Internet access (a Cable or DSL-subscriber line into your home or office). 2. Connect the Cable or DSL modem to the DWL-2100AP

________________________________________________________________________ 35

3. If you are connecting a desktop computer to your network, install the D-Link AirPlus XtremeTM G DWL-G520 wireless PCI adapter into an available PCI slot on your desktop computer. 4. Install the drivers for the D-Link DWL-G650 wireless Card bus adapter into a laptop computer. 5. Configure IP addresses and enjoy the WLAN extension of existing wired LAN. Configure the Access Point by using Configuration Menu Open Web browser Type in the IP address of the DWL-2100AP

Type admin in the User Name field Leave the Password blank. (However, if you have changed the password, please enter the correct password.) Click OK

From here after you will see windows below and you can easily configure your AP by using this wizard.

________________________________________________________________________ 36

Fig 6.2 Configuring Infrastructure Network

Ad hoc Network

Fig 6.3 Adhoc Network and its requirements

________________________________________________________________________ 37

Install the D-Link DWL-G510 Wireless G PCI Adapter into one desktop computer. (See the Quick Installation Guide included with the product for installation instructions.) Install another DWL-G510 into a desktop computer. Set the wireless configuration for the adapters to Ad-Hoc mode, set the adapters to the same channel, and assign an IP address to each computer on the Ad-Hoc network. When assigning IP addresses to the computers on the network, please remember that the IP address for each computer must be in the same IP address range as all the computers in the network, and the subnet mask must be exactly the same for all the computers in the network. For example: If the first computer is assigned an IP address of 192.168.0.2 with a subnet mask of 255.255.255.0, then the second computer can be assigned an IP address of 192.168.0.3 with a subnet mask of 255.255.255.0, etc. IMPORTANT: If computers or other devices are assigned the same IP address, one or more of the devices may not be visible on the network.

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 38

Experiment no. 07
Wireless LAN Basics and Configuration (II) Objective
Understanding of Wireless LAN Establish a wireless LAN in four different applications

Equipment
DWL-2100 AP (The DWL-2100AP Wireless Access Point utilizes the 802.11b and the 802.11g standards) Computers with WLAN Cards of 802.11b or 802.11g Standard

Introduction
A Wireless Local Area Network (WLAN) is a computer network that transmits and receives data with radio signals instead of wires. WLANs are used increasingly in both home and office environments, and public areas such as airports, coffee shops and universities. Innovative ways to utilize WLAN technology are helping people to work and communicate more efficiently. Increased mobility and the absence of cabling and other fixed infrastructure have proven to be beneficial for many users. Wireless users can use the same applications they use on a wired network. Wireless adapter cards used on laptop and desktop systems support the same protocols as Ethernet adapter cards. People use WLAN technology for many different purposes: Mobility - Productivity increases when people have access to data in any location within the operating range of the WLAN. Management decisions based on real-time information can significantly improve worker efficiency. Low Implementation Costs - WLANs are easy to set up, manage, change and relocate. Networks that frequently change can benefit from WLANs ease of implementation. WLANs can operate in locations where installation of wiring may be impractical. Installation and Network Expansion - Installing a WLAN system can be fast and easy and can eliminate the need to pull cable through walls and ceilings. Wireless technology allows the network to go where wires cannot go - even outside the home or office. Inexpensive Solution - Wireless network devices are as competitively priced as conventional Ethernet network devices. Scalability - WLANs can be configured in a variety of ways to meet the needs of specific applications and installations. Configurations are easily changed and range from Peer-to-Peer networks suitable for a small number of users to larger Infrastructure networks to accommodate hundreds or thousands of users, depending on the number of wireless devices deployed.

Installation Considerations
The D-Link DWL-2100AP lets you access your network, using a wireless connection, from virtually anywhere within its operating range. Keep in mind, however, that the number, thickness and location of walls, ceilings, or other objects that the wireless signals must pass through, may limit the range. Typical ranges vary depending on the types of materials and background RF (radio frequency) noise in your home or business. The key to maximizing wireless range is to follow these basic guidelines: 5. Keep the number of walls and ceilings between the DWL-2100AP and other network devices to a minimum - each wall or ceiling can reduce your DWL-2100APs range from 3-90 feet (1-

________________________________________________________________________ 39

30 meters.) Position your devices so that the number of walls or ceilings is minimized. straight through a wall or ceiling (instead of at an angle) for better reception. 6. Be aware of the direct line between network devices. A wall that is 1.5 feet thick (.5 meters), at a 45-degree angle appears to be almost 3 feet (1 meter) thick. At a 2-degree angle it looks over 42 feet (14 meters) thick! Position devices so that the signal will travel 7. Building materials can impede the wireless signal - a solid metal door or aluminum studs may have a negative effect on range. Try to position wireless devices and computers with wireless adapters so that the signal passes through drywall or open doorways and not other materials. 8. Keep your product away (at least 3-6 feet or 1-2 meters) from electrical devices or appliances that generate RF noise.

WLAN Applications
LAN Extension Ad hoc networks Cross building interconnection Nomadic access

Cross Building Interconnection

Fig 7.1 Cross Building Interconnection

Also called LAN-to-LAN connectivity Point to point wireless link between buildings Typically connecting bridges or routers Used where cable connection not possible e.g. across a street

________________________________________________________________________ 40

Wireless bridges allow two or more networks that are physically separated to be connected on one LAN, without the time or expense of dedicated cable or T1 lines.

Nomadic Access

Fig 7.2 Nomadic Access in Wireless LAN

WLANs replace the layer one transmission medium of a traditional wired network (usually Cat 5 cable) with radio transmission over the air. Mobile data terminal e.g. laptop Transfer of data from laptop to server Campus or cluster of buildings

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 41

Experiment no. 08
Ethereal Objective
Capture packets of Wireless and Wired LAN Analyze the captured packet headers

Equipment
WLAN Ethernet Ethereal Software

Introduction

The basic tool for observing the messages exchanged between executing protocol entities is called a packet sniffer. As the name suggests, a packet sniffer captures (sniffs) messages being sent/received from/by your computer; it will also typically store and/or display the contents of the various protocol fields in these captured messages. A packet sniffer itself is passive. It observes messages being sent and received by applications and protocols running on your computer, but never sends packets itself. Similarly, received packets are never explicitly addressed to the packet sniffer. Instead, a packet sniffer receives a copy of packets that are sent/ received from/by application and protocols executing on your machine. Figure 1 shows the structure of a packet sniffer. At the right of Figure 1 are the protocols (in this case, Internet protocols) and applications (such as a web browser or ftp client) that normally run on your computer. The packet sniffer, shown within the dashed rectangle in Figure 1 is an addition to the usual software in your computer, and consists of two parts. The packet capture library receives a copy of every link-layer frame that is sent from or received by your computer. The messages exchanged by higher layer protocols such as HTTP, FTP, TCP, UDP, DNS, or IP all are eventually encapsulated in link-layer frames that are transmitted over physical media such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and so all upper layer protocols are eventually encapsulated within an Ethernet frame. Capturing all link-layer frames thus gives you all messages sent/received from/by all protocols and applications executing in your computer.

________________________________________________________________________ 42

Fig 8.1 Packet Sniffer Structure

The second component of a packet sniffer is the packet analyzer, which displays the contents of all fields within a protocol message. In order to do so, the packet analyzer must understand the structure of all messages exchanged by protocols. For example, suppose we are interested in displaying the various fields in messages exchanged by the HTTP protocol in Figure 1. The packet analyzer understands the format of Ethernet frames, and so can identify the IP datagram within an Ethernet frame. It also understands the IP datagram format, so that it can extract the TCP segment within the IP datagram. Finally, it understands the TCP segment structure, so it can extract the HTTP message contained in the TCP segment. Finally, it understands the HTTP protocol and so, for example, knows that the first bytes of an HTTP message will contain the string GET, POST, or HEAD,. We will be using the Ethereal packet sniffer [http://www.ethereal.com] for these labs, allowing us to display the contents of messages being sent/received from/by protocols at different levels of the protocol stack. (Technically speaking, Ethereal is a packet analyzer that uses a packet capture library in your computer). Ethereal is a free network protocol analyzer that runs on Windows, Linux/Unix, and Mac computers. Its an ideal packet analyzer for our labs it is stable, has a large user base and well-documented support that includes a user-guide (http://www.ethereal.com/docs/user-guide/), man pages (http://www.ethereal.com/ethereal.1.html), and a detailed FAQ (http://www.ethereal.com/faq.html), rich functionality that includes the capability to analyze more than 500 protocols, and a well-designed user interface. It operates in computers using Ethernet to connect to the Internet, as well as so-called point-to-point protocols such as PPP. Getting Ethereal In order to run Ethereal, you will need to have access to a computer that supports both Ethereal and the libpcap packet capture library. If the libpcap software is not installed within your operating system, you will need to install libpcap or have it installed for you in order to use Ethereal. See http://www.ethereal.com/download.html for a list of supported operating ________________________________________________________________________ 43

systems and download sites Download and install the Ethereal and (if needed) libpcap software: If needed, download and install the libpcap software. Pointers to the libpcap software are provided from the Ethereal download pages. For Windows machines, the libpcap software is known as WinPCap, and can be found at http://winpcap.polito.it/ See FAQ question #2 at http://winpcap.polito.it/ To determine whether or not WinPCap is already installed on your machine. Go to http://www.ethereal.com and download and install the Ethereal binary for your computer. Download the Ethereal user guide. You will most likely only need Chapters 1 and 3. The Ethereal FAQ has a number of helpful hints and interesting tidbits of information, particularly if you have trouble installing or running Ethereal. Running Ethereal When you run the Ethereal program, the Ethereal graphical user interface shown in Figure 2 will de displayed. Initially, no data will be displayed in the various windows.

Fig 8.2 Ethereal Graphical User Interface

The Ethereal interface has five major components: 1. The command menus are standard pull down menus located at the top of the window. Of interest to us now are the File and Capture menus. The File menu allows you to save captured packet data or open a file containing previously captured packet ________________________________________________________________________ 44

2.

3.

4. 5.

data, and exit the Ethereal application. The Capture menu allows you to begin packet capture. The packet-listing window displays a one-line summary for each packet captured, including the packet number (assigned by Ethereal; this is not a packet number contained in any protocols header), the time at which the packet was captured, the packets source and destination addresses, the protocol type, and protocol-specific information contained in the packet. The packet listing can be sorted according to any of these categories by clicking on a column name. The protocol type field lists the highest level protocol that sent or received this packet, i.e., the protocol that is the source or ultimate sink for this packet. The packet-header details window provides details about the packet selected (highlighted) in the packet listing window. (To select a packet in the packet listing window, place the cursor over the packets one-line summary in the packet listing window and click with the left mouse button.). These details include information about the Ethernet frame and IP datagram that contains this packet. The amount of Ethernet and IP-layer detail displayed can be expanded or minimized by clicking on the right-pointing or down-pointing arrowhead to the left of the Ethernet frame or IP datagram line in the packet details window. If the packet has been carried over TCP or UDP, TCP or UDP details will also be displayed, which can similarly be expanded or minimized. Finally, details about the highest level protocol that sent or received this packet are also provided. The packet-contents window displays the entire contents of the captured frame, in both ASCII and hexadecimal format. Towards the top of the Ethereal graphical user interface, is the packet display filter field, into which a protocol name or other information can be entered in order to filter the information displayed in the packet-listing window (and hence the packet-header and packet-contents windows). In the example below, well use the packet-display filter field to have Ethereal hide (not display) packets except those that correspond to HTTP messages.

Taking Ethereal for a Test Run The best way to learn about any new piece of software is to try it out! Do the following 1. Start up your favorite web browser, which will display your selected homepage. 2. Start up the Ethereal software. You will initially see a window similar to that shown in Figure 2, except that no packet data will be displayed in the packet listing, packetheader, or packet-contents window, since Ethereal has not yet begun capturing packets. 3. To begin packet capture, select the Capture pull down menu and select Start. This will cause the Ethereal: Capture Options window to be displayed, as shown in Figure 3. 4. You can use all of the default values in this window. The networks interfaces (i.e., the physical connections) that your computer has to the network will be shown in the Interface pull down menu at the top of the Capture Options window. In case your computer has more than one active network interface (e.g., if you have both a wireless and a wired Ethernet connection), you will need to select an interface that is ________________________________________________________________________ 45

being used to send and receive packets (mostly likely the wired interface). After selecting the network interface (or using the default interface chosen by Ethereal), click OK. Packet capture will now begin - all packets being sent/ received from/by your computer are now being captured by Ethereal! 5. Once you begin packet capture, a packet capture summary window will appear, as shown in Figure 4. This window summarizes the number of packets of various types that are being captured, and contains the Stop button that will allow you to stop packet capture. Dont stop packet capture yet.

Fig 8.3 Ethereal Capture Options Window

________________________________________________________________________ 46

Fig 8.4 Ethereal Packet Capture Window

6. While Ethereal is running, enter the URL: http://www.nu.edu.pk In order to display this page, your browser will contact the HTTP server at nu.edu.pk and exchange HTTP messages with the server in order to download this page. The Ethernet frames containing these HTTP messages will be captured by Ethereal. 7. After your browser has displayed the html page, stop Ethereal packet capture by selecting stop in the Ethereal capture window. This will cause the Ethereal capture window to disappear and the main Ethereal window to display all packets captured since you began packet capture. The main Ethereal window should now look similar to Figure 2. You now have live packet data that contains all protocol messages exchanged between your computer and other network entities! The HTTP message exchanges with the nu.edu.pk web server should appear somewhere in the listing of packets captured. But there will be many other types of packets displayed as well (see, e.g., the many different protocol types shown in the Protocol column in Figure 2). Even though the only action you took was to download a web page, there were evidently many other protocols running on your computer that are unseen by the user. 8. Type in http (without the quotes, and in lower case all protocol names are in lower case in Ethereal) into the display filter specification window at the top of the main Ethereal window. Then select Apply (to the right of where you entered http). This will cause only HTTP message to be displayed in the packet-listing window. 9. Exit Ethereal ________________________________________________________________________ 47

Fig 8.5 Ethereal Display after Step 9

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 48

Experiment no. 9
Student Name: LAN Scanner Roll No:

DESCRIPTION:

The title of project, demands us that we provides us tools for scanning computers connected by the LAN. And further we need to perform some specific operations. LAN Scanner is a technique through which we scan all PCs on the LAN. In scanning we can find the IP address, MAC address, host name, response time, port, SNMP and logged on user etc of all computers on the LAN

PURPOSE: The purpose of this project is to briefly introduce you with the concept of LAN scanning. Why we need it when we are working on the network.
PROBLEM:

The actual problem was that when we make the network we need to have a continuous check on the users performing different activities. And in case of any defect we need to point out the IP address of any specific computer.
OBJECTIVES:-

The objective of LAN Scanner is to introduce you with the concept of performing scanning on the LAN. Getting IP addresses of computers, checking status of each computer remotely shutdown and power off any PC accessing the hidden and shared folders etc.
SoftPerfect Network Scanner:

It is a multi-threaded IP, SNMP and NetBIOS scanner with a modern interface and several advanced features. It is intended for both system administrators and general users who are interested in computer security. The program pings computers, scans for listening TCP ports and displays which types of resources are shared on the network (including system and hidden). In addition, it allows you to filter the results list and more

In the start the following screen opens when you run the Netscan.

________________________________________________________________________ 49

Main Features The program controls are as follows: Clear the display Load the scan results from a XML file. Save the scan results to a file. Expand the results tree. Collapse the results tree. Search the results tree. Apply the shares filter. Only computers with available shared folders are shown. Apply the ports filter. Only computers with an open TCP port are shown. Apply the host name filter. Only computers with a valid host name are shown. Apply the SNMP filter. Only computers with a running SNMP service are shown. Program options. Automatically detect the network configuration.

________________________________________________________________________ 50

Online Help (this web page). Program Options

Press Ctrl+O or the

button to access the network scanner options

1. Max. number of threads - the maximum number of scanning threads. 2. Method - the ping method. Can be chosen from ICMP (ping), ARP (arping), or both. 3. Ping Timeout - the period to wait for a reply from the remote computer. 4. Retries - the maximum number of ping requests. 5. Always analyze host - force the scanner to analyze a non-responding host. 6. Ping broadcast addresses - when enabled the scanner tries to ping IP addresses ending with .255. 7. Explore shared folders in background - If this option is set, whenever you choose to explore a folder the network scanner launches a separate process of Windows Explorer to avoid temporary unresponsiveness. 8. Display dead hosts - add non-responding hosts into the results.

________________________________________________________________________ 51

1. Resolve Host Names - when enabled, the IP addresses are converted to the host names. 2. Resolve MAC Addresses - when enabled, you will see hardware (MAC) addresses (Windows 2000 and higher only). 3. Check open port - when enabled, the program will attempt connection to the specified TCP port (you can specify several ports separated by a comma, e.g. 21,80,110). 4. Case insensitive sorting - ignore case type when results are sorted. 5. Retrieve comments - display a comment assigned to a Windows workstation.

Lookup logged-on users - display a list of users currently logged-on to a Windows workstation (Windows NT and higher only). Lookup LAN group - display the workgroup/domain name which a Windows workstation belongs to (Windows NT and higher only, see rightmost columns). Lookup Windows version - display the Windows version on a workstation (Windows NT and higher only, see rightmost columns).

________________________________________________________________________ 52

Scan for shared resources - enables scanning of shared resources. Below are all the possible types of shared resources. Check for write access - when enabled, the program determines if the shared folder is writable or not (read only). All - all resources. Folders - shared folders or drives. Printers - shared print devices. Comm. device - a communication device. Special - special share reserved for interprocess communication (IPC$) or remote administration of the server (ADMIN$). It can also be used for administrative shares such as C$, D$, E$, etc. IPC - interprocess communication (IPC).

Use this tab to setup scanning for machines that have an SNMP service running. You can specify a community (e.g. public or private) and a MIB OID number. Multiple communities and/or OIDs are to be comma separated. This data will be used for an SNMP query. Set the Display answers option if you would like to see replies from the SNMP enabled machines.

The applications tab extends support for third-party applications. For example, if you use remote administration or specific network client software, you can setup the

________________________________________________________________________ 53

network scanner to connect to a remote host using the additional software directly from the network scanner.

The SoftPerfect Network Scanner is able to detect your IP range automatically. Select the Options - Auto Detect Local IP Range menu item. In the following dialog, select an interface and the program will calculate the IP range of the network.

If you are connected to the Internet and are behind a router or proxy server, use the Detect External IP Address command to determine your external IP address (requires Internet connection).

Here enter the host name and IP address range will be returned.

________________________________________________________________________ 54

Scanning To begin scanning click the Start Scanning button. The following window will be displayed, showing all the scanned computers on the LAN. When scanning has finished, you will be able to browse the results, save to a file, map a network drive, explore a folder, etc

________________________________________________________________________ 55

You can open any other computer as Web, as File server, as Client etc.

Now here you can copy the IP address, Mac address host name etc of any computer on LAN.

________________________________________________________________________ 56

Now the screen shots below shows the main menu options. What options are available and how we can use them.

________________________________________________________________________ 57

________________________________________________________________________ 58

Live Display If you enable the Live Display option (choose View - Live Display from the main menu), the network scanner will constantly update scan results to reveal the latest changes in the network. If a new host joins or leaves the network, it will be logged in the display window Wake On LAN To send a 'magic' wake up packet to a remote computer (its MAC address must be known), choose Actions - Wake-On-LAN from the main menu

________________________________________________________________________ 59

By using this option you can shutdown any PC remotely.

By using this option you can turn off any PC remotely.

________________________________________________________________________ 60

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 61

Experiment no. 10
Student Name:
OFFLINE FILE SHARING

Roll No:

Introduction: Offline Files allows you to keep using network files, folders, and applications when disconnected from the network. To users, this is transparent; offline, theyll have the same access permissions to the files and folders that are available when theyre connected to the network. Best of all, when they reconnect, all the changes theyve made to those files will be made to the files on the network, via offline file synchronization. Because mobile users often have to contend with disk-space limitations on laptops or notebooks, the Offline Files feature allows you, as the administrator, to specify the amount of space that can be used for automatic caching of offline files on the local computer. (This doesnt limit the ability to store additional offline files manually.) Well discuss how to configure cache limits later in this article. The default configuration settings for Offline Files are, in general, optimized for the needs of mobile users. You can make network files available offline by storing shared files on your computer so they are accessible when you are not connected to the network. When you reconnect to the network, any changes that you made to files while working offline are updated to the network. This process is called synchronization. If you and someone else on the network made changes to the same file, you can save your version of the file to the network, keep the other version, or save both. If you share folders on your computer with others on the network, they can work offline with those folders. To protect files in your shared folders, you can specify whether other users can change your documents or just view them. You can also control which shared files users can access offline. offline.

________________________________________________________________________ 62

Setting caching options on shared folders: Offline Files works by creating a cache on the computers local hard disk and storing the shared network files that are designated as offline files in this cache. You configure the caching options for each shared folder made available offline. The caching options are set from the Shared Folders node in the Computer Management MMC (accessed by rightclicking My Computer and selecting Manage). Right-click the shared folder for which you want to set caching properties and select Properties. On the General tab, Click the Caching button. The Caching Settings properties box Enable caching of the shared folder by selecting the check box. Three options are available to control how the files in the folder will be cached: Manual Caching for Documents: With this option, the only documents that will be cached are those that the user specifically designates to be available offline. Automatic Caching for Documents: With this option, when a user opens a file in this shared folder, it will be automatically downloaded and made available offline without the user specifying that it be an offline file. Older copies of a file will be deleted automatically to make room for files that have been accessed more recently. With this option, a file that the user has not opened while online will not be available offline.

________________________________________________________________________ 63

Automatic Caching for Programs: All files in the folder will be made available offline. This option is used when the data in the folder is read-only, as with shared network applications. It shouldnt be used if users will change the data in the folder.

Tip: The default caching setting is Manual Caching For Documents. Working Offline: To make a file or folder to be available offline, Open My Computer. Double-click a network drive to view its contents. Click the shared network file or folder that you want to make available offline. On the File menu, click Make Available Offline.

________________________________________________________________________ 64

If My Computer does not contain links to any network drives, you need to assign a drive letter to a shared network resource. To view a list of all of the shared network files that are available offline, on the Tools menu, click Folder Options. On the Offline Files tab, click View Files. If all of the files in a shared folder are made available offline, any files placed in that folder will automatically be made available offline the next time you synchronize your computer with the network. The network administrator determines which files are available offline. You can make a shortcut to a file available offline. However, if you make a shortcut to a folder available offline, the contents of the folder will not be available offline. To make a network file or folder unavailable offline, right-click the item, and click Make Available Offline again to clear the check mark. After youve set up the computer to enable Offline Files and made the selected files or folders available offline, other users can connect to the offline files and work with them over the network and then continue working with them after the connection between your computer and theirs is broken.

________________________________________________________________________ 65

Folders available offline If Offline Files is configured to display a balloon notification, when the network connection is broken, the user will see an Offline Files icon appear in the status area to the right of the taskbar buttons on the Windows XP taskbar. When the network connection is restored (for example, when you plug your laptop back into the docking station or plug a live Ethernet cable into its PC Card NIC), the status-bar information will change, and modifications that you have made to offline files since the disconnection will be updated to the network files automatically. File Conflicts: If more than one person works with the same offline files, the possibility of file conflicts arises. There can be differing versions of the file to which different modifications have been made. When you synchronize files, those that you have modified since disconnecting from the network Files will be compared to the versions of those same files on the network server. Your changes will be copied to the network versionsif no one else has modified the network files while you were working offline. If someone else did change the files during that time, a file conflict arises. Which version should be kept on the networkthe one copied to the network while you were offline or the one containing the modifications you made while offline? ________________________________________________________________________ 66

Youll be asked to choose one of the following: Keep Your Version Of The File Keep The Version On The Network Keep Both Versions If you elect to keep both versions, youll need to give your version a different name. Both versions will be saved to your local disk and the network server.

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 67

Experiment no. 11
Router Configuration

Objective To Become Familiar with routers configuration Overview

User EXEC Mode : When you are connected to the router, you are started in user EXEC mode. The user EXEC commands are a subset of the privileged EXEC commands. Privileged EXEC Mode: Privileged commands include the following: Configure Changes the software configuration. Debug Display process and hardware event messages. ________________________________________________________________________ 68

Setup Enter configuration information at the prompts. Enter the command disable to exit from the privileged EXEC mode and return to user EXEC mode. Configuration Mode: Configuration mode has a set of submodes that you use for modifying interface settings, routing protocol settings, line settings, and so forth. Use caution with configuration mode because all changes you enter take effect immediately. To enter configuration mode, enter the command configure terminal and exit by pressing Ctrl-Z. Procedure
Router(config)#hostname uet-taxila-gw

________________________________________________________________________ 69

Show Running Configuration

Password protect the Privilege Mode


uet-taxila-gw(config)#enable secret uet enable secret 5 $1$emBK$WxqLahy7YOAf0nifub.hU

Configure the Interfaces

uet-taxila-gw(config)#interface serial0 uet-taxila-gw(config-if)#

________________________________________________________________________ 70

uet-taxila-gw(config-if)#ip address 201.100.11.1 255.255.255.0 uet-taxila-gw(config-if)#clock rate 56000 uet-taxila-gw# uet-taxila-gw#show running-config uet-taxila-gw(config)#router rip uet-taxila-gw(config-router)# version 2

Set up the routing protocol


uet-taxila-gw(config-router)#network 192.5.5.0 uet-taxila-gw(config-router)#network 207.7.5.0 uet-taxila-gw(config-router)#network 201.100.11.0

Turn on the interfaces: uet-taxila-gw(config)#interface s0 uet-taxila-gw(config-if)#no shutdown uet-taxila-gw(config-if)#interface e0 uet-taxila-gw(config-if)#no shutdown uet-taxila-gw(config-if)#interface e1 uet-taxila-gw(config-if)#no shutdown Check and save your configuration Router#show run (Check) Router#copy run start (Save)

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:
________________________________________________________________________ 71

Experiment no. 12
Introduction To Simulation Software
Objective

Familarize with basics of Networking simulators.


Overview

A simulation is an imitation of some real thing, state of affairs, or process.The act of simulating something generally require representing certain key characteristics or behaviors of a selected physical or abstract system.Simulation is used in many contexts, including the modeling of natural systems or human systems in order to gain insight into their functioning. Other contexts of simulation include simulation of technology for performance optimization, safety engineering, testing, training and education. Simulation can be used to show the eventual real effects of alternative conditions and courses of action. This provides real like results without having to perform the actual experimentations in real world. Available Softwares

Task: Study all these mentioned(above) softwares and submit the report.

________________________________________________________________________ 72

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

Lab R

________________________________________________________________________ 73

eExperiment no. 13
Basic Of Cygwin AND NS2 Objective

Installation Of Cygwin,NS2 How to Execute the tcl File


.

Procedure

DOWNLOADING Cygwin Download cygwin from: http://www.cygwin.com/setup.exe Run setup.exe you want to update or install a Cygwin package. Note that, when installing packages for the first time, setup.exe does not install every package. Only the minimal base packages from the Cygwin distribution are installed by default. RUN SETUP:

INSTALLER STARTS SET SOURCE (local directory)

________________________________________________________________________ 74

SET DESTINATION

REACH TO INI FILE

SELECT PACKAGES

________________________________________________________________________ 75

INSTALLATION STARTED

INSTALLATION COMPLETE

________________________________________________________________________ 76

ICON ON THE DESKTOP

DOWNLOADING ns-allinone-2.xx Download ns-allinone-2.xx.tar.gz from: http://www.isi.edu/nsnam/ns/ns-build.html#allinone Current version is ns-allinone-2.32.tar.gz available at sourceforge.net http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.30.tar.gz The ns-allinone-2.30.tar.gz (65.8 MB) archive contains folder ns-allinone-2.30 INSTALL NS-2 IN CYGWIN Extract and Copy the folder ns-allinone-2.30 in C:\cygwin\home\Administrator Enter into ns-allinone-2.30 folder through terminal: cd ns-allinone-2.30\ Enter ./install command in cygwin terminal (i)

________________________________________________________________________ 77

(ii)

(iii)

(iv)

(v)

________________________________________________________________________ 78

(vi)

(vii)

(ix)

________________________________________________________________________ 79

X SERVER

HOW TO RUN .tcl FILE Command: ns filename.tcl

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

Task: Install these two Softwares on yours PC. ________________________________________________________________________ 80

Experiment no. 14
Introduction To NS2 Programming Objective

Familarize with Generic Script Structure in NS2 Lab Description: Structure of a typical ns script Creating event scheduler Opening trace files Creating topology Creating the transport layer connection Creating application to generate traffic Start and stop the traffic flows Creating event scheduler Create scheduler set ns [new Simulator] Schedule event $ns at <time> <event> <event> is any legitimate ns/tcl commands Start scheduler $ns run Opening trace files Open trace files Ex.1 Trace packets on all links set fp [open test.out w] $ns trace-all $fp trace format: <event> <time> <from> <to> <pkt_type> <size> <flag><flow_id><src> <dst><seq_no> <ack_seq_no> r 1 0 2 tcp 1000 - - - - - - - - - - - - - - - - - 0 0.0 3.1 29 199 + 1 0 2 tcp 1000 - - - - - - - - - - - - - - - - - 0 0.0 3.1 29 199 - 1 0 2 tcp 1000 - - - - - - - - - - - - - - - - - 0 0.0 3.1 29 199 d 1.00234 0 2 tcp 1000 - - - - - - - - - - - - 0 0.0 3.1 29 199 Open trace files Ex.2
#Open the Trace file set tf [open out.tr w] $ns trace-all $tf

________________________________________________________________________ 81

Create Topology: Create nodes set n0 [$ns node] set n1 [$ns node] Create links and queues $ns <link-type> $n0de1 $node2 <bandwidth> <delay> <queue-type> <queue-type>: DropTail, RED, WFQ, SFQ, <link-type>: duplex-link, simplex-link $ns duplex-link $n0 $n1 1Mb 10ms DropTail Create Flow: UDP
UDP Create agents

- set udp [new Agent/UDP] - set null [new Agent/NULL]


Attach to the nodes - $ns attach-agent $n0 $udp - $ns attach-agent $n1 $null Establish the connection - $ns connect $udp $null

Create Connection: TCP TCP Create agents


- set tcp [new Agent/TCP] - set tcpsink [new Agent/TCPSink]

Attach to the nodes


- $ns attach-agent $n0 $tcp - $ns attach-agent $n1 $tcpsink Establish the connection - $ns connect $tcp $tcpsink

Create UDP agents


- set udp [new Agent/UDP] - set null [new Agent/NULL]

Attach to the nodes


- $ns attach-agent $n0 $udp - $ns attach-agent $n1 $null

________________________________________________________________________ 82

Establish the connection


- $ns connect $udp $null Start & Stop the traffic

Summary: Generic Script Structure set ns [new Simulator] # [Turn on tracing] # Create topology # Setup packet loss, link dynamics # Create routing agents # Create: # - multicast groups # - protocol agents # - application and/or setup traffic sources # Post-processing procs # Start simulation Task1:

Lab performed on (date): ___________ Signature: ______________ Checked by: ________________________ Date: ______________ Marks Awarded: ____________ Comments:

________________________________________________________________________ 83

Vous aimerez peut-être aussi