Networking

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 25

COMPUTER NETWORKING

INTRODUCTION :
A network is a collection of two or more computing devices that are connected to
share resources, exchange files, or allow electronic communications. Computing
devices can be computers, mobiles phones, routers, switches, etc. These devices
can be linked through cables, telephone lines, radio waves, satellites.
What Do Computer Networks Do?
Computer Networks are one of the important aspects of Computer Science. In the
early days, it is used for data transmission on telephone line and had a very limited
use, but nowadays, it is used in a variety of places. Computer Networks help in
providing better connectivity that helps nowadays.
PHYSICAL NETWORK : A physical network is made up of the physical hardware
that transfers data between devices. This includes the servers, routers, switches,
and cables that make up the network. Physical network diagrams show the network
topology , including the physical aspects like ports, cables, and racks.
LOGICAL NETWORK : A logical network is a simplified illustration of the physical
network's data flow. Logical network diagrams show the "invisible" elements and
connections flowing through the physical objects on the network. Logical network
diagrams answer the "how" while physical network diagrams answer the
"what" .Logical topology shows the appearance of a connection to the network end
users. It also indicates how data and signals are transmitted across a network.
Elements of network : Tow type of major network elements.
Client:- The client makes a request to the server, and the serve responds by
satisfying the client's request. The client and server interact with each other through
a network connection using a protocol.
Server:- large capacity computer that contain hard drive, printers and other
resources that are shared with other computers. The server is where all the
processing, computing and data handling is happening.
Data Communication System:
Data Communication is defined as exchange of data between two devices via some
form of transmission media such as a cable, wire or it can be air or vacuum also.
Data Communication System Components
There are mainly five components of a data communication system:
1. Message
2. Sender
3. Receiver
4. Transmission Medium
5. Set of rules (Protocol)

Modes of Communication
Modes of Communication or transmission mode means transferring data between
two devices.
Modes of communication is of three type :

Simple Mode:- In Simplex mode, the communication is unidirectional, i.e., the data
flow in one direction. A device can only send the data but cannot receive it or it can
receive the data but cannot send the data.
Half-Duplex: In a Half-duplex channel, direction can be reversed, i.e., the station
can transmit and receive the data as well. Messages flow in both the directions, but
not at the same time. The entire bandwidth of the communication channel is utilized
in one direction at a time. Eg :-Walkie Talkie
Full-Duplex: In Full duplex mode, the communication is bi-directional, i.e., the data
flow in both the directions. Both the stations can send and receive the message
simultaneously. Full-duplex mode has two simplex channels. One channel has traffic
moving in one direction, and another channel has traffic flowing in the opposite
direction. Eg :-Mobile Phone

Basic terms of network


Internet :- The internet is a worldwide, it is “networks of networks” that consists of
millions of smaller networks, which carry various information and services, such as
electronic mails, online chats. so the internet is the collection of interconnected
computer networks.

Intranet: A private network used for internal communication, teamwork, and


operations management that is only accessible to authorized users within a
company.

Extranet: A private network that grants access to specific intranet areas to third
parties for the purposes of collaboration and external communication

TYPES OF NETWORK
There are five types of networks :

1. LAN: (LOCAL AREA NETWORK)

Local area network is a group of computers connected to each other in a small


area such as building, office.

by Unknown
MAN:(METROPOLITAN AREA NETWORK)

> A metropolitan area network is a network


that covers a large area by
interconnecting a different LAN to form a
larger network

3 . CAN: (CAMPUS AREA NETWORK)


A campus area network (CAN) is a
computer network that spans limited area. .
CANs interconnect multiple local area
networks within a educational or corporate
campus

4.WAN (WIDE AREA NETWORK

A wide area network is a network that


extends over a large area such as countries
or states. A WAN is a quite bigger network
than the LAN.

than the LAN.

5. PAN:(PERSONAL AREA NETWORK)

A personal area
network is a network
arranged within an
individual person,
typically within a
range of 10 meters.

NETWORK DEVICES.
LAN CARD: It is also called NIC (network interface card). It is primary component of
our LAN that provides the connectivity between our computer and network.
- types:
1. PCI: - used for desktop only .
2. USB: - used for desktop or laptop .
3. PCMCIA: - used for laptop only .
- it is works on two addresses :-
1. Logical address (IP address) .
2. Physical address (MAC address) .

2. HUB:
A hub is a physical layer networking device which is used to connect multiple
devices in a network. They are generally used to connect computers in a LAN.
I. It is an unintelligent device because it doesn't know any of the
address (IP and MAC) .
II. it always performs broadcasting.
III. it has more chance to collision.
IV. it works over half duplex.
> TYPES OF HUB:
1. Active HUB.
2. Passive HUB.

3. SWITCH:
> A switch operates in the layer 2, i.e, data link layer of the OSI model.
> it is an intelligent network device that can be conceived as a multiple
port network bridge.
> it uses MAC addresses to send data packets to selected destination
ports.
> it uses packet switching technique to send and receive data packets
from the source to the destination device.
> transmission mode is full duplex, number of ports is higher- 24/48
4. ROUTER:
> router stands for RANDOM OPERATING UNIFIED TERMINAL RAM.
> It is a WAN device used to connect the two or more than two different networks.
> it is a layer 3 device which works over an IP address.
> types of routers:
a. Static router:
We can't add or remove he ports because router having a fix
numbers of ports. For e.g. :- cisco 2500 series.
b. Dynamic router:
We can add or remove the ports. For e.g. :- cisco 1700,
3600,7200 etc.

Network Topology

Network topology refers to the layout or structure of a computer network. It defines


how different devices (such as computers, routers, switches, etc.) are interconnected
and how data flows through the network. There are several common types of
network topologies:
1. Bus Topology: All devices are connected to a single backbone cable. Data
is transmitted through the cable and each device receives the data, but only
the intended recipient processes it.

2. Star Topology: All devices are connected to a central hub or switch. Data
flows through the hub or switch, which manages the

communication between device

3. Ring Topology: Devices are connected in a circular manner. Each device is


connected to two other devices, forming a ring. Data travels in one direction around
the ring until it reaches its destination.

4.Mesh Topology: Every device is connected to every other device in the network.
This provides multiple paths for data to travel, offering redundancy and fault
tolerance.
5.Tree Topology: This combines characteristics of star and bus topologies. Devices
are arranged in a hierarchy, with multiple star networks connected to a central bus
backbone.

6.Hybrid Topology: This is a combination of two or more different types of


topologies.

OSI model (Open Systems Interconnection)


The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes
the functions of a telecommunication or computing system into seven distinct layers. Each
layer represents a specific set of functions and protocols that enable communication between
devices across a network. Here's a brief overview of the OSI model layers from bottom to
top:

1. Physical Layer (Layer 1):

o Concerned with the physical transmission of raw bits over a communication


channel.
o Defines specifications such as voltage levels, data rates, and physical
connectors.

Data Link Layer (Layer 2):

o Responsible for node-to-node communication and ensuring data integrity.


o Divided into two sublayers: LLC (Logical Link Control) and MAC (Media
Access Control).
o Provides error detection and correction, as well as flow control.

Network Layer (Layer 3):

o Manages logical addressing and routing of data packets between different


networks.
o Determines the best path for data to travel from source to destination using
routing algorithms.
Transport Layer (Layer 4):

o Provides end-to-end communication between devices.


o Ensures reliable data transfer, flow control, and error checking.
o Examples include TCP (Transmission Control Protocol) and UDP (User
Datagram Protocol).

Session Layer (Layer 5):

o Establishes, manages, and terminates sessions (connections) between


applications.
o Handles synchronization, dialog control, and checkpointing.

Presentation Layer (Layer 6):

o Translates data between the application layer and the lower layers.
o Manages data representation and encryption/decryption.
o Ensures that data sent from the application layer of one system can be read by
the application layer of another system.

Application Layer (Layer 7):

o Provides network services directly to end-user applications.


o Supports application-specific functions such as file transfer, email, and web
browsing.
o Examples include HTTP, FTP, SMTP, and DNS.

TCP/IP (Transmission Control Protocol/Internet Protocol) model


The TCP/IP (Transmission Control Protocol/Internet Protocol) model is a conceptual
framework used for describing the protocols used in the internet and similar networks. It is
based on a four-layer architecture, which corresponds loosely to the OSI model but with
fewer layers. Here's an overview of the TCP/IP model layers from bottom to top:

Network Interface Layer (Link Layer in OSI):

o Handles the physical transmission of data packets over a physical medium.


o Includes protocols that define how data is formatted for transmission, error
handling, and physical addressing (e.g., Ethernet, Wi-Fi).

Internet Layer (Network Layer in OSI):

o Responsible for addressing, routing, and packaging data packets.


o Uses IP (Internet Protocol) to define the logical addressing scheme (IPv4 or
IPv6) and routing protocols (e.g., ICMP, ARP).

Transport Layer:

o Provides end-to-end communication between hosts.


o Uses TCP (Transmission Control Protocol) for reliable, connection-oriented
communication, ensuring data delivery and flow control.
o Alternatively, UDP (User Datagram Protocol) provides connectionless
communication with minimal overhead for applications that do not require
reliability (e.g., real-time applications like streaming).
o

Application Layer:

o Supports end-user applications and services.


o Includes protocols that enable communication between applications running
on different devices.

o Examples include HTTP (Hypertext Transfer Protocol) for web browsing, FTP
(File Transfer Protocol), SMTP (Simple Mail Transfer Protocol), and DNS
(Domain Name System).

IP address (Internet Protocol address)


An IP address, short for Internet Protocol address, is a unique numerical label
assigned to each device connected to a computer network that uses the Internet
Protocol for communication. It serves two main purposes: identifying the host or
network interface and providing the location of the device in the network.

TYPES OF IP ADDRESSES:

 IPv4 (Internet Protocol version 4):

Consists of four sets of numbers separated by dots (e.g., 192.168.0.1).

Each set can range from 0 to 255, allowing for approximately 4.3 billion
unique addresses.

Despite its widespread use, IPv4 addresses are running out due to the
growth of the internet and connected devices.
 IPv6 (Internet Protocol version 6):

Uses a hexadecimal format separated by colons (e.g.,


2001:0db8:85a3:0000:0000:8a2e:0370:7334).

Offers a much larger address space compared to IPv4, allowing for


approximately 340 undecillion unique addresses (1 followed by 36 zeros).

Designed to accommodate the increasing number of devices connected to


the internet.

PURPOSE OF IP ADDRESSES:

 Identification: Each device on a network, whether it's a computer,


smartphone, or server, must have a unique IP address to be identified and
communicate with other devices.
 Routing: IP addresses are used by routers to forward data packets from
the source device to the destination device across interconnected
networks.

CLASSES OF IP ADDRESSES (IPV4):


CLASS A

 Format: N.H.H.H (1 network octet, 3 host octets)


 Range: 1.0.0.0 to 126.255.255.255
 Networks: Supports up to 126 networks.
 Hosts per network: Supports up to 16,777,214 hosts per network (minus one
for network and one for broadcast).

CLASS B

 Format: N.N.H.H (2 network octets, 2 host octets)


 Range: 128.0.0.0 to 191.255.255.255
 Networks: Supports up to 16,384 networks.
 Hosts per network: Supports up to 65,534 hosts per network (minus one for
network and one for broadcast).

CLASS C

 Format: N.N.N.H (3 network octets, 1 host octet)


 Range: 192.0.0.0 to 223.255.255.255
 Networks: Supports up to 2,097,152 networks.
 Hosts per network: Supports up to 254 hosts per network (minus one for
network and one for broadcast).
CLASS D AND CLASS E

 Class D (Multicast): Range from 224.0.0.0 to 239.255.255.255, reserved for


multicast group addresses.
 Class E (Reserved): Range from 240.0.0.0 to 255.255.255.255, reserved for
future use or experimental purposes.

IP ADDRESS ASSIGNMENT:

 Static IP: Manually assigned to a device and remains constant unless changed by
a network administrator.
 Dynamic IP: Automatically assigned to a device by a DHCP (Dynamic Host
Configuration Protocol) server upon connection to a network. These IPs may
change over time.

Subnetting

Subnetting is the process of dividing a single large network into smaller,


more manageable sub-networks called subnets. This practice helps
optimize the use of IP addresses within an organization's network
infrastructure.

Fixed-Length Subnet Mask (FLSM):

 In FLSM, all subnets within a network use the same subnet mask.
 This method is simpler to implement and manage but may lead to inefficient use of IP
addresses if subnets vary significantly in size.

Variable-Length Subnet Mask (VLSM):

 VLSM allows different subnets within the same network to use different subnet
masks.
 This flexibility enables more efficient allocation of IP addresses by allocating larger
subnets to segments that require more hosts and smaller subnets to segments with
fewer hosts.

Routing
Routing is the process of selecting paths in a network along which to send
network traffic. It involves determining the optimal path for data packets from a
source to a destination based on routing algorithms and network protocols. Here's an
overview of how routing works

Router:

 A networking device that forwards data packets between computer networks.


 Operates at the network layer (Layer 3) of the OSI model.
 Uses routing tables to make decisions about where to send packets based on
destination IP addresses.

Routing Table:

 A data table stored in a router that lists the available routes to various network
destinations.
 Each entry in the routing table typically includes:
o Destination network or host IP address
o Subnet mask
o Next hop (IP address of the next router or interface)
o Metric (cost) associated with the route

Routing Protocols:

Algorithms and protocols used by routers to exchange routing information and


populate their routing tables.

Examples include:
o Interior Gateway Protocols (IGPs): Used within autonomous systems
(AS), such as OSPF (Open Shortest Path First) and RIP (Routing
Information Protocol).
o Exterior Gateway Protocols (EGPs): Used between different ASes,
such as BGP (Border Gateway Protocol).

Type of router :

Static Routing: Manual configuration of routing entries in the routing table by a


network administrator. Suitable for small networks with predictable traffic
patterns.

Dynamic Routing: Automatic exchange of routing information between routers


using routing protocols. Suitable for large, dynamic networks where routing
information needs to be updated dynamically in response to network changes.

Default Routing: Configuring a router to forward packets to a default gateway


when no specific route matches the destination IP address.

Modes of router :

1. User execution mode


Symbol : router > enable
2. Privilege mode
Symbol : router #
3. Global configuration mode
Symbol : router(config ) #
4. Interface configuration mode
Symbol : router (config-if ) #
5. Line configuration mode
Symbol : router(config-line)#

Types of router password:

 Console Password:

Router(config)# line console 0


Router(config-line)# password <password>
Router(config-line)# login
 Enable Password (Enable Secret)
Router(config)# enable secret <password>
 Enable Secret (Enable Password)
Router(config)# enable password <password>
 Telnet Password

Router(config)# line vty 0 4


Router(config-line)# password <password>
Router(config-line)# login

 SSH (Secure Shell) Password


Router(config)# username <username> privilege 15 secret <password>
Router(config)# line vty 0 4
Router(config-line)# transport input ssh
Router(config-line)# login local

DHCP (Dynamic Host Configuration Protocol)


DHCP (Dynamic Host Configuration Protocol) is a network management protocol
used on IP networks. It is responsible for automatically assigning IP addresses and
other network configuration parameters (such as subnet mask, default gateway,
DNS servers, etc.) to devices on a network. DHCP simplifies the process of IP
address management and configuration, especially in large networks, by dynamically
allocating IP addresses to devices as they connect to the network.
Some basic commands to Create a DHCP pool with a range of IP addresses:
Router(config)# ip dhcp pool <pool_name>
Router(dhcp-config)# network <network_address> <subnet_mask>
Router(dhcp-config)# default-router <gateway_address>
Router(dhcp-config)# dns-server <DNS_server_address>
Static routing
Static routing is a method of routing network traffic that relies on manually configured
routing entries in the routing table. In static routing, network administrators manually
create and maintain the routing table on routers or other network devices. Each
static route specifies a destination network (or host) and the next hop router or
outgoing interface to reach that destination.
Default routing
Default routing is a specific type of static routing that simplifies the routing process by forwarding
packets to a single, predefined destination when no specific route matches the destination IP
address of the packet. It is commonly used in networks where a router needs to send all traffic
that it does not have a specific route for to another router, usually at the edge of the network or
towards an ISP (Internet Service Provider).
 Default routing :

 Static routing:

RIP (Routing Information Protocol)


RIP (Routing Information Protocol) is one of the oldest and simplest distance-vector
routing protocols used in computer networks. It is designed to help routers
dynamically exchange information about the networks they can reach and to
determine the best routes for forwarding packets.
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol) is an advanced distance-
vector routing protocol developed by Cisco Systems. It combines the benefits of both
distance-vector and link-state routing protocols, offering rapid convergence, efficient
use of bandwidth, and support for large networks.
MAC Address
A MAC address, which stands for Media Access Control Address, is a physical
address that works at the Data Link Layer.
MAC Addresses are unique 48-bit hardware numbers of a computer that are
embedded into a network card (known as a Network Interface Card) during
manufacturing. The MAC Address is also known as the Physical Address of a
network device. In the IEEE 802 standard, the data link layer is divided into two
sublayers:
1. Logical Link Control (LLC) Sublayer
2. Media Access Control (MAC) Sublayer
The MAC address is used by the Media Access Control (MAC) sublayer of the Data-
Link Layer. MAC Address is worldwide unique since millions of network devices exist
and we need to uniquely identify each.

Format of MAC Address


to understand what is MAC address is, it is very important that first you understand
the format of the MAC Address. So a MAC Address is a 12-digit hexadecimal
number (6-bit binary number), which is mostly represented by Colon-Hexadecimal
notation.
The First 6 digits (say 00:40:96) of the MAC Address identify the manufacturer,
called the OUI (Organizational Unique Identifier). IEEE Registration Authority
Committee assigns these MAC prefixes to its registered vendors.
As discussed above, the MAC address is represented by Colon-Hexadecimal
notation. But this is just a conversion, not mandatory. MAC address can be
represented using any of the following formats:
Note: Colon-Hexadecimal notation is used by Linux OS and Period-separated
Hexadecimal notation is used by Cisco System

SWITCHING
● Ethernet switches are used in LAN to create Ethernet networks.
● Switches forward the traffic on the basis of MAC address.
● Switches maintain a switching table which is known as CAM (Content
Addressable Memory) table in which MAC addresses and Port No are used
to perform switching decisions.
Classification of switches:
A. Based on Working
1. Store & Forward
This switch receives the entire frame then performs error checking and starts
forwarding data to the Destination.
2. Cut through
This switch starts forwarding the frame as soon as the first six bytes of the
frame are received.
3. Fragment-free
This switch receives 64 bytes of the frame, performs error checking and then
starts forwarding data
B. Types of switches based on management
1. Manageable switches
2. Non-Manageable switches
C. Types of switches based on OSI layer
1. Layer 2 switches (only switching)
2. Layer 3 switches (switching & routing)
D. Types of switches based on command mode (only in Cisco)
1. IOS based
2. CLI based

VLAN (Virtual LAN)


VLAN (Virtual Local Area Network) is a method of logically dividing a single physical
network into multiple isolated networks. Each VLAN acts as a separate broadcast
domain, enhancing network performance, security, and manageability by grouping
devices based on logical rather than physical connections. VLANs are configured on
network switches, with each VLAN having its own VLAN ID and can be implemented
to control broadcast traffic, enhance security, and optimize network management.

Steps to create VLAN :-


To configure static VLAN
Switch(config)#VLAN <number>
Switch(config-VLAN) #name <VLAN name>
2. STEP to Port Access
Switch (config)# interface <int type>
Switch (config-if)# switchport access VLAN <VLAN number>
Switch (config-if)# do w
For multiple port access
Switch(config)#int range f0/1-3
Switch(config-if-range) #switchport access VLAN 2
Switch(config-if-range) #do write
VLAN Trunking: VLAN (Virtual LAN) trunking allows a single physical link to carry
traffic for multiple VLANs. VLANs are used to logically segment a network, and
trunking enables switches to carry traffic from multiple VLANs over a single physical
connection between switches.
Commands to initiate trunking:
Switch(config)#int <interface number>
Switch(config)#switchport mode trunk
Switch(config)#do write
To off the trunking:
Switch(config)#int <interface number>
Switch(config)#switchport mode access
Native VLAN
Switch(config)#int <interface number>
Switch(config)#switchport trunk native VLNA < VLAN number>
Allowed VLAN
Switch(config)#int <interface number>
Switch(config)#switchport trunk ALLOWED VLNA <EXPRESSIONS>
ALL
ADD
EXCEPT
NONE
REMOVE

DTP (DYNAMIC TRUNKING PROTOCOL):

DTP is used to negotiate and dynamically set up trunk links between Cisco switches.
Its primary function is to automate the process of trunk creation between switches
without requiring manual configuration of each trunk port.

VTP (VLAN TRUNKING PROTOCOL):

VTP is used to manage and synchronize VLAN configuration across multiple switches within
a domain. It ensures consistency of VLAN information such as VLAN IDs, names, and other
parameters across all switches in the VTP domain.

You might also like