The University of Lahore
Lab Manual
Data Communication and networks
Lab Instructor David Samuel Bhatti
Semester Fall 2019
Department of Computer Science & Information Technology
The University of Lahore, Lahore.
In this lab we will do some networking commands to help us better understand
networking and in its troubleshooting as well as its administration.
Ipconfig:
Ipconfig (ifconfig in Linux distributions) is a network administration utility, which
helps to get information about hosts’s ip address, default gateway, physical
address etc.
1.
Verify that your machine is connected to internet
Click on Start > All Programs > Accessories > Command Prompt
OR
Click on Start > Run, type cmd and click on ok.
2.
Type ipconfig (short for IP configuration) and press Enter.
What is default gateway?
What is IP address?
Ping:
Ping is also a network administration utility that is used to test the ability of the
source computer to reach a specified destination computer. The ping command is
usually used as a simple way verify that a computer can communicate over the
network with another computer or network device.
Type the following command on cmd to check connectivity with specified host on
a network:
Ping yahoo.com and take a screen shot of the output.
What things you noticed in the alert?
LAB 02
Introduction to data communication and network
Data communications and networking are changing the way we do business and the way we live. Business decisions have to be made ever more quickly, and the decision makers require immediate access to accurate information. Why wait a week for that report from Germany to arrive by mail when it could appear almost instantaneously through computer networks? Businesses today rely on computer networks and
internetworks. But before we ask how quickly we can get hooked up, we need to know how networks operate, what types of technologies are available, and which design best fills which set of needs.
The development of the personal computer brought about tremendous changes for business, industry, science, and education. A similar revolution is occurring in data communications and networking. Technological advances are making it possible for communications links to carry more and faster signals. As a result, services are evolving to allow use of this expanded capacity. For example, established telephone services such as conference calling, call waiting, voice mail, and caller ID have been extended.
Research in data communications and networking has resulted in new
technologies. One goal is to be able to exchange data such as text, audio, and video from all points in the world. We want to access the Internet to download and upload information quickly and accurately and at any time.
This chapter addresses four issues: data communications, networks, the Internet, and protocols and standards. First we give a broad definition of data communications. Then we define networks as a highway on which data can travel. The Internet is discussed as a good example of an internetwork (i.e., a network of networks). Finally, we discuss different types of protocols, the difference between protocols and standards, and the organizations that set those standards.
1- Internet protocol (IP)
1.1
IP Format
IP Address Format: The 32-bit IP address is grouped 8 bits at a time, each group of 8 bits is an octet. Each of the four octets are separated by a dot, and represented in decimal format, this is known as dotted decimal notation.
I-e 192.168.10.1
1.2
IP address and classes
IP is the combination of Network ID and host ID. With an IPv4 IP address, there are five classes of available IP ranges: Class A, Class B, Class C, Class D and Class E, while only A, B, and C are commonly used. Each class allows for a range of valid IP
addresses, shown in the following table.
Class 1Rangest Octet Decimal Default Subnet Mask Representation
A 1 – 126* 255.0.0.0
B 128 – 191 255.255.0.0
C 192 – 223 255.255.255.0
D 224 – 239 Reserved for Multicasting This is not included in this course.
In this table, Range 127* is missing. Range 127 is used in home (local hosts).
2- Cables / Wires
There are different wires for different functions, discussed below: For same devices:
the same type: e.g. two computers (via their network interface controllers) or two switches to each other.
For Different Devices:
An Ethernet straight cable is a cable / wire used to connect different devices. e.g. Connecting switch and computer.
For Routers:
Routers include specific type of cable, Serial cable. Serial cable is only used to connect routers together.
3- How to assign IP to the computers
Procedure:
Step 1: Double click on computer Step 2: Open Desktop
Step 3: Click on IP Configuration Step 4: Assign IP to the Computers
Step 2:
LAB 03
Implementation of different topologies
Bus topology
Star topology
Ring topology
Mesh topology
Hybrid topology
Difference between switch and hub
Switch is an intelligent device, operates on data link layer
second layer of OSI model. Due to intelligence switches provide traffic
control packets, rather than providing data to all connected ports while
Hub is not an intelligent device, operates on data link layer second layer
of OSI model. In hub when a packet is received at one port, it is copied
to other ports so that all devices / segments can see the packet.
Physical topology:
Refers to the way in which a network is laid out physically.
- Two or more devices connect to a link and two or more links form a topology
- Topology is geometric representation of the relationship of all the links and
Bus Topology:
- Nodes are connected to the bus cable by drop lines and taps - Was used in early LANs
- Bus topology connecting three stations
Star Topology:
In this configuration, every node connects to a central network device, like a hub, switch, or computer. The central network device acts as a server and the peripheral devices act as clients. Depending on the type of network card used in each computer of the star topology, a coaxial cable or a RJ-45 network cable is used to connect computers together.
Ring topology:
A ring network is a network topology in which each node connects to exactly two other nodes, forming a single continuous pathway for signals through each node - a ring.
Mesh topology:
Hybrid:
- Mixture of different topologies - It can be same or different
Lab Implementations:
Bus topology:
Star topology:
- Star topology with HUB.
Hybrid topology:
Ring topology:
- Implementation with hub, in a ring.
Lab 04
DNS
DHCP
HTTP
DNS:
The Domain Name System (DNS) associates various sorts of information with domain names; most importantly, it serves as the “phone book” for the Internet by translating human-readable computer hostnames, e.g. http://www.example.com, into the IP addresses, e.g. 208.77.188.166, that networking equipment needs to deliver information.
-
Used to translate the name with IP and vice versa-
The most basic task of DNS is to translate hostnames to IP addressesDHCP:
-
Dynamic host configuration protocol-
Used to assign IP address and DNS (subnet masks, default gateway, and other IP parameters) information automatically to hosts.HTTP:
HTTP is a request/response standard between a client and a server. A client is the end-user, the server is the web site. The client making an HTTP request – using a web browser. Typically, an HTTP client initiates a request. It establishes a Transmission Control Protocol (TCP) connection to a particular port on a host (port 80 by default ;). An HTTP server listening on that port waits for the client to send a request message.
Lab Implementations:
DNS and HTTP:
-
Connecting PC to a switch and DNS server with a switch.-
This Server-PT is working as a DNS server.-
Here DNS server IP is same as the DNS.-
Go on, desktop. Double click on web browser, write the address you have written before or you want to open.-
Go on server, click on services, TURN ON services.-
From where you want to start IP just change the last octet to configure your devices dynamically.-
Go on PC, desktop, configure IP.Lab 05
INTRA VLAN (Virtual local area network)
VLAN:
A virtual LAN (VLAN) is any broadcast domain that is partitioned and isolated in a computer network at the data link layer (OSI layer 2). LAN is the abbreviation for local area network and in this context virtual refers to a physical object recreated and altered by additional logic. We usually have different departments physically separated on rooms or floors.
2 – Types: - Intra vlan - Inter vlan
Intra Vlan:
IntraVlan is a mechanism in which let2 hosts in same VLAN and in different physical L2 switches to communicate to each other.
Access and trunk links
The links connecting the end devices are called access links. These are the links usually carrying the Data VLAN information.
The link between the switches is called trunk link. It carries packets from all the VLANs, including the native VLAN. It usually needs a bigger throughput than an access link.
Some Commands:
These commands should we followed in this sequence: 1- To Add vlan
a. Show vlan //Note: It should be on second mode (enable ’#’) This command shows vlan.
d. Exit
2- To Configure
a. Configure terminal //To go on third mode b. Interface fastEhthernet //0/1, 0/2, 0/3, 0/4
c. Switchport mode access //wants access for the given system / node (e.g. fastEthernet 0/1)
d. Switchport access vlan ___ (No. of vlan in which you want to put the upper given system / node, to communicate) //10
3- Trunk
a. Interface fastEthernet //ports which are connected between switches e.g. Interface fastEthernet 0/6
b. Switchport mode access // wants access for the given system / node (e.g. fastEthernet 0/6)
c. Switchport mode trunk //Trunk links are required to pass VLAN information between switches. A port on a Cisco switch is either an access port or a trunk port.
Lab Implementations:
- By sending packets;
Lab 06
INTER VLAN
Virtual LANs (VLANs) divide one physical network into multiple broadcast domains. But, VLAN-enabled switches cannot, by themselves, forward traffic
across VLANboundaries. So you need to have routing between theseVLANs which is called interVLAN routing.
To broadcast, first we have to see the class. According to class the octets left become subnet mask (e.g. class A 10.255.255.255).
Some commands:
a- Interface fastEthernet 0/0.__ (You can write anything you want to) //10 – Its good to write your vlan to avoid confusion.