Computer Networks
Computer Networks
[COMPUTER NETWORKS]
AMIT 1
AMIT 2
INDEX
1. Computer Network 5
AMIT 3
DECLARATION
I hereby declare that the project work entitled “Computer Networks ” submitted
to the Panjab University Swami Sarvanand Giri Regional Centre, Hoshiarpur,
is a record of an original work done by me under the guidance of Mr. Gurpinder
Singh, AP Information Technology, Panjab University Swami Sarvanand Giri
Regional Centre, Hoshiarpur.
This project work is submitted in the partial fulfilment in the requirements for the
award of the degree of Bachelor of Engineering in Information Technology.
This project has not been submitted to any other university or institute for the
award of any degree or diploma.
Amit kumar
SG21805
IT, 2nd Semester.
AMIT 4
ACKNOWLEDGEMENT
On the very outset of this report, I would like to extend my sincere obligation
towards all the personages who have helped me in this endeavour. Without their
active guidance, help, cooperation and encouragement, I would not have made
headway in the project.
AMIT 5
COMPUTER NETWORK
AMIT 6
A computer network consists of various kinds of nodes. Servers, networking
hardware, personal computers, and other specialized or general-purpose hosts can
all be nodes in a computer network. Hostnames and network addresses are used to
identify them.
AMIT 7
Computer network components are the major parts which are needed to install the
software. Some important network components are NIC, switch, cable, hub,
router, and modem. Depending on the type of network that we need to install,
some network components can also be removed. For example, the wireless
network does not require a cable.
Following are the major components required to install a network:
NIC:
Switch:
Hub:
A Hub is a hardware device that divides the network connection among multiple
devices. When computer requests for some information from a network, it first
sends the request to the Hub through cable. Hub will broadcast this request to the
entire network. All the devices will check whether the request belongs to them or
not. If not, the request will be dropped.
The process used by the Hub consumes more bandwidth and limits the amount
of communication. Nowadays, the use of hub is obsolete, and it is replaced by
more advanced computer network components such as Switches, Routers.
Router:
AMIT 9
transmission of the packet.
AMIT 10
Modem:
● A modem is a hardware device that allows the computer to connect to
the internet over the existing telephone line.
● A modem is not integrated with the motherboard rather than it is installed on
the PCI slot found on the motherboard.
● It stands for Modulator/Demodulator. It converts the digital data into an
analog signal over the telephone lines.
Cable is a transmission media used for transmitting a signal. There are three types
of cables used in transmission:
o Twisted pair cable
o Coaxial cable
o Fiber-optic cable
AMIT 11
IP ADDRESS :
An Internet Protocol address is an IP address. It is a unique address that
identifies the device on the network. The Internet Service Provider (ISP) assigns
IP addresses to all devices on its network. IP addresses are not generated at
random. The Internet Assigned Numbers Authority (IANA), a part of the
Internet Corporation for Assigned Names and Numbers (ICANN), generates and
assigns them mathematically . IP addresses are used at the network layer. IP
Addresses are routable in nature.
MAC ADDRESS :
A MAC address is a one-of-a-kind identification assigned to a NIC (Network
Interface Controller/Card). The full form of MAC address is Media Access Control
address. MAC addresses are 48 bits long and these addresses could not be
routed between networks. MAC Address is a 12 digit hexadecimal numeral
which is most typically expressed with a colon or hyphen separating every two
digits (an octet), making reading easier. MAC Addresses are used at the Data
Link Layer
AMIT 12
PRACTICAL-01
CABLES
CABLE
Networking cables are networking hardware used to connect one network device to
other network devices or to connect two or more computers to share printers,
scanners etc. Different types of network cables, such as coaxial cable, optical fiber
cable, and twisted pair cables, are used depending on the network's topology,
protocol, and size. The devices can be separated by a few meters (e.g. via Ethernet)
or nearly unlimited distances (e.g. via the interconnections of the Internet).
While wireless networks are more easily deployed when total throughput is not an
issue, most permanent larger computer networks utilize cables to transfer signals
from one point to another.For the Ethernet , there are two types of cables to
construct they are:
1. Straight through cable
2. Cross over cable
AMIT 13
This cable type has identical wiring on both ends (pin 1 on one end of the cable is
connected to pin 1 at the other end of the cable, pin 2 is connected to pin 2 etc.)
This type of cable is used to connect the following devices:
● computer to hub
● computer to switch
● router to hub
● router to switch
Computers and routers use wires 1 and 2 to transmit data and wires 3 and 6 to
receive data. Hubs and switches use wires 1 and 2 to receive data and wires 3 and
6 to send data. That is why, if you want to connect two computers together, you
will need a crossover cable.
Crossover cable
With the crossover cable, the wire pairs are swapped, which means that different
pins are connected together – pin 1 on one end of the cable is connected to pin 3 on
the other end, pin 2 on one end is connected to pin 6 on the other end
AMIT 14
Crimp tool:
This tool is used to attach the connectors to the cable. Typically, this tool also
includes a wire-cutter and wire-stripper. So if you buy a crimp tool, you don't have
to buy a wire-cutter and wire-stripper separately. The following image shows a
crimping device equipped with a wire-stripper and wire.
AMIT 15
PRACTICAL-02
LOCAL AREA NETWORK
LAN:
LAN stands for local area network. A network is a group of two or more connected
computers, and a LAN is a network contained within a small geographic area,
usually within the same building. Home WiFi networks and small business
networks are common examples of LANs. LANs can also be fairly large, although
if they take up multiple buildings, it is usually more accurate to classify them as
wide area networks (WAN) or metropolitan area networks (MAN).
LAN is comparatively secure as only authentic users in the network can access
other computers or shared resources. Users can print documents using a connected
printer, upload/download documents and software to and from the local server.
Such LANs provide the short range communication with the high speed data
transfer rates. These types of networks can be extended up to 1 km. Data transfer
in LAN is quite high, and usually varies from 10 Mbps (called Ethernet) to 1000
AMIT 16
Mbps (called Gigabit Ethernet), where Mbps stands for Megabits per second.
AMIT 17
Ethernet is a set of rules that decides how computers and other devices connect
with each other through cables in a local area network or LAN.
What are the benefits of a LAN?
The advantages of a LAN are the same as those for any group of devices
networked together. The devices can use a single Internet connection, share files
with one another, print to shared printers, and be accessed and even controlled by
one another.
AMIT 18
PRACTICAL-03
SUBNETTING
Subnetting in Networking-
The process of dividing a single network into multiple sub networks is called as
subnetting. The sub networks so created are called as subnets.
Subnetting Examples:
Now, we shall discuss some examples of subnetting a network
Example-01: Consider- we will use, 192.168.5.85 /24 Address. Let’s determine
the network and host part of this address. This is the first example, so we are
starting with an easy example.
IPAddress: 192.168.5.85
Subnet Mask : 255.255.255.0
For this example, firstly we will convert this decimal numbers to the binary equals.
As you can see below, the 1s in the Subnet Mask will show the number of bits that
network part has. And the 0s will show the host part bits.
AMIT 19
IPAddress: 11000000.10101000.00000101.01010101
Subnet Mask : 11111111. 11111111. 11111111.00000000
So, here, the first 24 bits (First 3 octets) are network bits and the last 8 bits (Last
octet) are the host bits.
For this IP and Subnet Mask, to determine the Network Address of this IP address,
we will use “AND” operation between IP Address and Subnet Mask in binary mode.
IPAdd: 11000000.10101000.00000101.01010101
SubM: 11111111.11111111.11111111.00000000
AND : 11000000. 10101000.00000101.00000000
When we use AND operation with this binary numbers, as you can see, the last
octet will be multiple with zero (AND is Multiplication). So the result of this
multiplication will be 192.168.5.0. Here, the first three octets will be same as IP
address and the last octet will be full of 0s.
For this example our broadcast address will be 192.168.5.255. AS you can see, all
the host bits are full of 1s for broadcast address. The other addresses in the middle
through 192.168.5.1 to 192.168.5.254 are host addresses.
AMIT 20
PRACTICAL-04
Dynamic Host Configuration Protocol
Benefits of DHCP
DHCP provides the following benefits.
1). Reliable IP address configuration. DHCP minimizes configuration errors
caused by manual IP address configuration, such as typographical errors, or
address conflicts caused by the assignment of an IP address to more than one
computer at the same time.
2). Reduced network administration. DHCP includes the following features
to reduce network administration:
o Centralized and automated TCP/IP configuration.
o The ability to define TCP/IP configurations from a central location.
o The ability to assign a full range of additional TCP/IP configuration values
by means of DHCP options.
o The efficient handling of IP address changes for clients that must be updated
frequently, such as those for portable devices that move to different locations on
a wireless network.
o The forwarding of initial DHCP messages by using a DHCP relay agent,
AMIT 21
which eliminates the need for a DHCP server on every subnet
Task 01
Create a network with 1 router, 1 switch and 10 computer system where the IP
address and subnet mask are as follows:
IP address : 200.100.0.1/25
Design the network such that the computer system are automatically assigned IP
addresses through DHCP.
AMIT 22
CLI :
Ping:
AMIT 23
PRACTICAL-05
Routing Information Protocol (RIP)
o In a routing table, the first column is the destination, or we can say that it is a
network address.
o The cost metric is the number of hops to reach the destination. The number of
hops available in a network would be the cost. The hop count is the number of
networks required to reach the destination.
o In RIP, infinity is defined as 16, which means that the RIP is useful for smaller
networks or small autonomous systems. The maximum number of hops that RIP
can contain is 15 hops, i.e., it should not have more than 15 hops as 16 is infinity.
o The next column contains the address of the router to which the packet is to be
sent to reach the destination
Advantages of RIP
AMIT 24
The following are the advantages of a RIP protocol:
o It is easy to configure
o It has less complexity
Task 02:
Design a network with 1 router , 2 switches and 4 computer system according to
the given instruction:
Default network address 200.100.0.0/28
Network A containing 1 switch and 2 computer system with IP address
200.100.0.1
Network B containing 1 switch and 2 computer system with IP address
200.100.0.17
Manually assign IP address to all the computer system and implement Router
RIP(Routing information protocol)
LAN using RIP Routing protocol :
AMIT 25
CLI:
PING:
AMIT 26
AMIT 27