A computer network is a telecommunications network that allows autonomous digital devices (nodes) to exchange data between each other using wired or wireless connections to share resources (hardware or software) interconnected by a single technology (e.g., internet).
Goals of Computer Networks
Facilitating Communication
Enabling swift and efficient communication between individuals and organizations.
Supports video conferencing, emails, and instant messaging.
Resource Sharing
Allows users to share hardware and software resources.
Enables printer sharing and file sharing.
Data Storage and Access
Centralized storage systems that allow data access from any connected device.
Helps in easy data backup and recovery.
Cost Efficiency
Reduces costs by sharing resources and avoiding duplication of hardware and software.
Reliability and Redundancy
Enhances reliability through alternate paths and redundant systems in case of failures.
Applications of Computer Networks
Business and Commerce
E-commerce, online banking, stock trading, etc.
Facilitates remote working and global collaboration.
Education
E-learning platforms, virtual classrooms, online exams, etc.
Facilitates research and knowledge sharing.
Healthcare
Telemedicine, electronic health records, remote patient monitoring, etc.
Government Services
E-governance, online public services, secure communication between government agencies, etc.
Entertainment
Online gaming, streaming services, social media platforms, etc.
Scientific Research
Facilitates data sharing and collaboration on research projects between institutions worldwide.
Travel and Hospitality
Online ticket booking, hotel reservations, GPS and navigation services, etc.
Data Communication
Data communications are the exchange of data between two devices via some transmission medium.
Data Communication System Components
Message: Information (data) to be communicated (e.g., text, audio, video).
Sender: Device that sends the message (computer, phone, camera, etc.).
Receiver: Device that receives the message (computer, phone, television, etc.).
Transmission Medium: Physical path by which a message travels from sender to receiver.
Protocol: Includes syntax, semantics, and timing.
Syntax
Semantics
Timing
De facto
De jure
Transmission Mode
Data flow between two systems can be categorized into three types.
Simplex
Half-Duplex
Full-Duplex
Simplex Mode
The communication is unidirectional.
One device always sends, the other always receives.
E.g., radio, mouse.
The simplex mode can use the entire capacity of the channel to send data in one direction.
Half-Duplex Mode
Each station can both transmit and receive, but not at the same time.
E.g., walkie-talkie.
When one device is sending, the other can only receive, and vice versa.
In a half-duplex transmission, the entire capacity of a channel is taken over by whichever of the two devices is transmitting at the time.
Full-Duplex Mode
Both stations can transmit and receive at the same time.
Actually, it is two half-duplex connections.
Telephone network is an example of full-duplex mode, when two people are communicating by a telephone line, both can talk and listen at the same time.
The capacity of the channel, must be divided between the two directions.
Network Criteria
A network must be able to meet a certain number of criteria.
Delivery & Accuracy: Must deliver the data to the correct destination without any error.
Performance: Can be measured in many ways including transit time, response time, number of users, type of transmission medium, capabilities of connected hardware’s and efficiency of software.
Reliability: Is a measure of frequency of failure and the time taken to resolve from the failure.
Security: Includes protecting data from unauthorized access, protecting data from damage and development.
Types of Connection
Point to Point
A point-to-point connection provides a dedicated link between two devices.
Most point-to-point connections use an actual length of wire or cable to connect the two ends, but other options, such as microwave or satellite links, are also possible.
Multipoint
A multipoint (also called multidrop) connection is one in which more than two specific devices share a single link.
Physical Topology
Refers to the way in which a network is laid out physically.
Topology of a network is the geometric representation of the relationship of all the links and linking devices to one another.
Mesh Topology
In a mesh topology, every device has a dedicated point-to-point link to every other device.
We need, n∗(n−1)/2 duplex-mode links, where n is number of nodes.
Advantages
No traffic problems
Robust
Privacy or security
Fault identification and fault isolation are easy.
Disadvantage
Installation and reconnection are difficult.
The sheer bulk of the wiring.
Expensive.
Star Topology
In a star topology, each device has a dedicated point-to-point link only to a central controller, usually called a hub.
The devices are not directly linked to one another.
The controller acts as an exchange:
If one device wants to send data to another, it sends the data to the controller, which then relays the data to the other connected device.
Advantages
Less expensive than a mesh topology.
Easy to install and reconfigure and less costly.
It is robust. If one link fails, only that link is affected.
Easy fault identification and fault isolation.
Disadvantage
Dependency of the whole topology on one single point, the hub.
Often more cabling is required in a star than in some other topologies.
Bus Topology
A bus topology is multipoint.
One long cable acts as a backbone to link all the devices in a network.
Nodes are connected to the bus cable by drop lines and taps.
A drop line is a connection running between the device and the main cable.
A tap is a connector that either splices into the main cable or punctures the sheathing of a cable to create a contact with the metallic core.
Advantages
Ease of installation.
Uses less cabling than mesh or star topologies.
Disadvantage
Difficult reconnection and fault isolation.
Difficult to add new devices to the network.
A fault or break in the bus cable stops all transmission.
Ring Topology
In a ring topology, each device has a dedicated point-to-point connection with only the two devices on either side of it.
A signal is passed along the ring in one direction, from device to device, until it reaches its destination.
Each device in the ring incorporates a repeater.
When a device receives a signal intended for another device, its repeater regenerates the bits and passes them along.
Advantages
A ring is relatively easy to install and reconfigure.
Fault isolation is simplified.
Disadvantages
A break in the ring (such as a disabled station) can disable the entire network.
Network Types
Local Area Network (LAN)
LAN is usually limited to a few kilometers of area.
It may be privately owned and could be a network inside an office on one of the floor of a building or a LAN could be a network consisting of the computers in an entire building.
Wide Area Network (WAN)
WAN is made of all the networks in a (geographically) large area.
The network in the entire state of UP could be a WAN.
Metropolitan Area Network (MAN)
MAN is of size between LAN and WAN.
It is larger than LAN but smaller than WAN.
It may comprise the entire network in a city like Mumbai.
Network Models
International standard organization (ISO) proposed an open system interconnection (OSI) model that allows two systems to communicate regardless of their architecture.
The purpose of the OSI model is to show how to facilitate communication between different systems without requiring changes to the logic of the underlying hardware and software.
The OSI model is not a protocol.
It is a model for understanding and designing a network architecture that is flexible, robust, and interoperable.
It consists of seven separate but related layers, each of which defines a part of the process of moving information across a network.
Directive Principles
Constitution
Layered Architecture
The OSI model is composed of seven ordered layers.
Within a single machine, each layer calls upon the services of the layer just below it and provides services to the layer above it.
Between machines, layer x on one machine communicates with layer x on another machine.
This communication is governed by an agreed-upon series of rules and conventions called protocols.
The processes on each machine that communicate at a given layer are called peer-to-peer processes.
Peer-to-Peer Processes
At the physical layer, communication is direct:
Device A sends a stream of bits to device B (through intermediate nodes).
At the higher layers, communication must move down through the layers on device A, over to device B, and then back up through the layers.
Each layer in the sending device adds its own information to the message it receives from the layer just above it and passes the whole package to the layer just below it.
At layer 1 the entire package is converted to a form that can be transmitted to the receiving device.
At the receiving machine, the message is unwrapped layer by layer, with each process receiving and removing the data meant for it.
Physical Layer
The physical layer defines the characteristics of the interface between the devices and the transmission medium.
Representation of bits
The physical layer data consists of a stream of bits (sequence of 0s or 1s) with no interpretation.
To be transmitted, bits must be encoded into signals- electrical or optical.
Data rate
The transmission rate-the number of bits sent each second-is also defined by the physical layer.
Line configuration
The physical layer is concerned with the connection of devices to the media.
Point-to-point
Multipoint
Physical topology
The physical topology defines how devices are connected to make a network.
Ring
Star
Point to Point
Bus
Tree
Mesh
Hybrid
Transmission mode
The physical layer also defines the direction of transmission between two devices: simplex, half-duplex, or full-duplex.
Data Link Layer
Framing
The data link layer divides the stream of bits received from the network layer into manageable data units called frames.
Physical addressing
If frames are to be distributed to different systems on the network, the data link layer adds a header to the frame to define the sender and/or receiver of the frame.
Access control
When two or more devices are connected to the same link, data link layer protocols are necessary to determine which device has control over the link at any given time.
Flow control
If the rate at which the data are absorbed by the receiver is less than the rate at which data are produced in the sender, the data link layer imposes a flow control mechanism to avoid overwhelming the receiver.
Error control
The data link layer adds reliability to the physical layer by adding mechanisms to detect and retransmit damaged or lost frames.
It also uses a mechanism to recognize duplicate frames.
Error control is normally achieved through a trailer added to the end of the frame.
Network Layer
The network layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links).
Logical addressing
If a packet passes the network boundary, we need another addressing system to help distinguish the source and destination systems.
The network layer adds a header to the packet coming from the upper layer that, among other things, includes the logical addresses of the sender and receiver.
Routing
When independent networks or links are connected to create internetworks (network of networks) or a large network, the connecting devices (called routers or switches) route or switch the packets to their final destination.
One of the functions of the network layer is to provide this mechanism.
Transport Layer
Service-point addressing
The transport layer header must include a type of address called a service-point address (or port address).
The network layer gets each packet to the correct computer; the transport layer gets the entire message to the correct process on that computer.
The transport layer is responsible for process-to-process delivery of the entire message.
Segmentation and reassembly
A message is divided into transmittable segments, with each segment containing a sequence number.
These numbers enable the transport layer to reassemble the message correctly upon arriving at the destination and to identify and replace packets that were lost in transmission.
Connection control
The transport layer can be either connectionless or connection oriented.
A connectionless transport layer treats each segment as an independent packet and delivers it to the transport layer at the destination machine.
A connection-oriented transport layer makes a connection with the transport layer at the destination machine first before delivering the packets.
After all the data are transferred, the connection is terminated.
Flow control
Like the data link layer, the transport layer is responsible for flow control.
However, flow control at this layer is performed end to end rather than across a single link.
Error control
Like the data link layer, the transport layer is responsible for error control.
However, error control at this layer is performed process to process rather than across a single link.
The sending transport layer makes sure that the entire message arrives at the receiving transport layer without error (damage, loss, or duplication).
Error correction is usually achieved through retransmission.
Session Layer
The session layer is the network dialog controller.
It establishes, maintains, and synchronizes the interaction among communicating systems.
The session layer is responsible for dialog control and synchronization.
Dialog control: The session layer allows two systems to enter into a dialog. It allows the communication between two processes to take place in either half-duplex (one way at a time) or full-duplex (two ways at a time) mode.
Synchronization: The session layer allows a process to add checkpoints, or synchronization points, to a stream of data.
Presentation Layer
Translation
The processes (running programs) in two systems are usually exchanging information in the form of character strings, numbers, and so on.
The information must be changed to bit streams before being transmitted.
Because different computers use different encoding systems, the presentation layer is responsible for interoperability between these different encoding methods.
The presentation layer at the sender changes the information from its sender-dependent format into a common format.
The presentation layer at the receiving machine changes the common format into its receiver-dependent format.
Encryption
To carry sensitive information, a system must be able to ensure privacy. Encryption means that the sender transforms the original information to another form and sends the resulting message out over the network.
Decryption reverses the original process to transform the message back to its original form.
Compression
Data compression reduces the number of bits contained in the information.
Data compression becomes particularly important in the transmission of multimedia such as text, audio, and video.
Application Layer
The application layer enables the user, whether human or software, to access the network.
It provides user interfaces and support for services such as electronic mail, remote file access and transfer, shared database management, and other types of distributed information services.
Services
Network virtual terminal: A network virtual terminal is a software version of a physical terminal, and it allows a user to log on to a remote host. To do so, the application creates a software emulation of a terminal at the remote host. The user's computer talks to the software terminal which, in turn, talks to the host, and vice versa. The remote host believes it is communicating with one of its own terminals and allows the user to log on.
File transfer, access, and management: This application allows a user to access files in a remote host (to make changes or read data), to retrieve files from a remote computer for use in the local computer, and to manage or control files in a remote computer locally.
Mail services: This application provides the basis for e-mail forwarding and storage.
Directory services: This application provides distributed database sources and access for global information about various objects and services.
Transmission Media
Transmission media can broadly be defined anything that can carry information from source to destination.
Wired/Guided Media
Twisted Pair Cable
Coaxial Cable
Fibre Optic Cable
Wireless/Unguided Media
Radio Waves
Microwaves
Infrared Waves
Guided Media
Are those which provide a connection from one device to another.
Twisted pair cable
Consists of two conductors (copper), each with it’s own plastic insulation, twisted together.
(shielded and unshielded twisted pair of cables)(telephone line)
Coaxial Cable
Has a central core conductor of solid wire enclosed in an insulating sheath, which in turn, encased in an outer conductor of metal foil, braid or a combination of two.
(Cable TV)
Fibre optic
Made of glass or plastic and transmit signal in the form of light, using the principle of total internal reflection, a glass or plastic core is surrounded by a cladding of less dense glass or plastic.
Backbone network cost effective can go up to 1600 Gbps (higher bandwidth, less signal attenuation, no noise problem, no corrosion, light weight, greater immunity to tapping) (installation and maintenance, unidirectional light propagation, cost)
Unguided Media: Wireless
Ground propagation
Waves travel through lower portion of the atmosphere hugging the earth, they are omni directional, distance depends on the amount of power.
Will having low frequency and large wave length (Khz - Mhz)
Bend round the obstructions, because large of Wave Length(e.g. light and sound)
Attenuate in short range.
Sky propagation
High frequency radio waves, radiated upward into the ionosphere where they are reflected back to earth. greater distance with lower output.
3 Mhz to 32 Mhz
Range go up to 5000 km
Line of sight propagation
Very high frequency signals transmitted in straight lines directly from antenna to antenna.
Radio Waves
(3KHz- 1GHz) (omnidirectional) (interference problem because of omnidirectional) (sky mode) (long distance) (AM radio) (can penetrate through wall) (managed by government)
Microwaves
(1GHZ- 300GHz) (unidirectional) (can be focused narrowly) (sending and receiving antenna needed to be aligned) (cannot penetrate wall) (wide band so high data rates are possible) (managed by government)
Infrared
Infrared-(300GHz-400THz) (short range communication) (home appliances)
Switching
Switching is the technique by which nodes control or switch data to transmit it between specific points on a network.
Switching Methods
Circuit Switching
Packet Switching
Datagram Approach
Virtual Approach
Circuit Switching
In circuit switching network resources (bandwidth) is divided into pieces and bit delay is constant during a connection.
The dedicated path/circuit established between sender and receiver provides a guaranteed data rate. Data can be transmitted without any delays once the circuit is established. Telephone system network is the one of example of Circuit switching.
Telephone system network is the one of example of Circuit switching.
TDM (Time Division Multiplexing)
FDM (Frequency Division Multiplexing)
Are two methods of multiplexing multiple signals into a single carrier.
Time Division Multiplexing
Divides into frames
Time-division multiplexing (TDM) is a method of transmitting and receiving independent signals over a common signal path by means of synchronized switches at each end of the transmission line.
TDM is used for long-distance communication links and bears heavy data traffic loads from end user.
Time division multiplexing (TDM) is also known as a digital circuit switched.
Frequency Division Multiplexing
Divides into multiple bands
Frequency Division Multiplexing or FDM is used when multiple data signals are combined for simultaneous transmission via a shared communication medium.
It is a technique by which the total bandwidth is divided into a series of non-overlapping frequency sub-bands, where each sub-band carry different signal. Practical use in radio spectrum & optical fiber to share multiple independent signals.
Advantages of Circuit Switching
The main advantage of circuit switching is that a committed transmission channel is established between the computers which gives a guaranteed data ratee.
In circuit switching there is no delay in data flow because of the dedicated transmission path.
No Header is required
Reordering of data cannot happen.
Disadvantages of Circuit Switching
It takes long time to establish connection.
More bandwidth is required in setting up of dedicated channels.
It cannot be used to transmit any other data even if the channel is free as the connection is dedicated in circuit switching.
Outdated, not used now a days
Packet Switching
Datagram network
If the message is going to pass through a packet-switched network, it needs to be divided into packets of fixed or variable size.
The size of the packet is determined by the network and the governing protocol.
In packet switching, there is no resource allocation for a packet.
This means that there is no reserved bandwidth on the links, and there is no scheduled processing time for each packet. Resources are allocated on demand.
The allocation is done on a first come, first-served basis.
When a switch receives a packet, no matter what is the source or destination, the packet must wait if there are other packets being processed. As with other systems in our daily life, this lack of reservation may create delay.
Even if a packet is part of a multi-packet transmission, the network treats it as though it existed alone. Packets in this approach are referred to as datagrams. Packets may also be lost or dropped because of a lack of resources.
In most protocols, it is the responsibility of an upper-layer protocol to reorder the datagrams or ask for lost datagrams before passing them on to the application.
Virtual network
A virtual-circuit network is a cross between a circuit-switched network and a datagram network. It has some characteristics of both. Used now-a-days in telephone networks
ISDN
(Integrated Services Digital Network)
Definition: Integrated Services Digital Network - a set of protocols for establishing and breaking circuit-switched connections, and for advanced call features for the user.
Development Period: Developed during the late 1980s and early 1990s.
Digital Transmission: Unlike traditional telephone services which use analog signals, ISDN uses digital signals for transmission.
Channels: ISDN provides channels known as B-channels (for data) and D-channels (for control and signaling).
BRI and PRI: There are two types of ISDN interfaces - Basic Rate Interface (BRI) and Primary Rate Interface (PRI). BRI is suitable for home and small enterprise, while PRI is used for larger installations.
Speed: ISDN provides data rates up to 128 kbps in the case of BRI, and up to 1.544 Mbps for PRI in North America and 2.048 Mbps in Europe.
Usage: Initially popular for internet access before the widespread availability of broadband.
Decline: Its popularity has declined with the advent of faster, more reliable broadband internet services.
Two Sublayers
The IEEE has subdivided the data-link layer into two sublayers:
Logical link control (LLC) (TOP)
Media access control (MAC) (BOTTOM).
Media Access Control (MAC):
It defines the specific access method for each LAN, Ethernet, and Take care of Addressing at the level (Lan technology).
Flow control, error control, and part of the framing duties are collected into one sublayer called the logical link control (LLC).
Framing is handled in both the LLC sublayer and the MAC sublayer.
Media Access Control
When nodes or stations are connected and use a common link, we need a multiple-access protocol to coordinate access to the link.
Many protocols have been devised to handle access to a shared link.
Propagation Delay: Propagation delay is the time it takes for a bit to travel from point A to point B in the transmission media.
Tp=Distance/Propagationspeed
Transmission Delay (TT): A sender needs to put the bits in a packet on the line one by one. If the first bit of the packet is put on the line at time t1 and the last bit is put on the line at time t2, transmission delay of the packet is (t2−t1).
In random access methods, no station is superior to another station and none is assigned the control over another.
No station permits, or does not permit, another station to send.
Two features give this method its name.
First, there is no scheduled time for a station to transmit. Transmission is random among the stations. That is why these methods are called random access.
Second, no rules specify which station should send next. Stations compete with one another to access the medium. That is why these methods are also called contention methods.
However, if more than one station tries to send, there is an access conflict-collision-and the frames will be either destroyed or modified.
All the protocols in Random access approach will answer the following questions
When can the station access the medium?
What can the station do if the medium is busy?
How can the station determine the success or failure of the transmission?
What can the station do if there is an access conflict?
Aloha
Earliest random-access method, was developed at the University of Hawaii around 1970.
It was designed for a radio (wireless) LAN, but it can be used on any shared medium.
The original ALOHA protocol is called pure ALOHA. This is a simple, but elegant protocol.
The idea is that each station sends a frame whenever it has a frame to send.
However, there is the possibility of collision between frames from different stations.
We assume that the stations send fixed-length frames with each frame taking Tfr to send.
Vulnerable time in which there is a possibility of collision, we see that the time during which a collision may occur in pure ALOHA, is 2 times the frame transmission time.
Pure ALOHA vulnerable time= 2∗Tfr
If all these stations try to resend their frames after the time-out, the frames will collide again.
Pure ALOHA dictates that when the time-out period passes, each station waits a random amount of time before resending its frame.
The randomness will help avoid more collisions. We call this time the back-off time TB.
Pure ALOHA has a second method to prevent congesting the channel with retransmitted frames.
After a maximum number of retransmissions attempts Kmax a station must give up and try later.
A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the requirement to make this frame collision-free?
Average frame transmission time T, is 200 bits/200 kbps or 1 ms. The vulnerable time is 2∗1ms=2ms.
This means no station should send later than 1 ms before this station starts transmission and no station should start sending during the period (1 ms) that this station is sending.
Throughput
Let us call G the average number of frames generated by the system during one frame transmission time.
Then it can be proven that the average number of successfully transmitted frames for pure ALOHA is S=G∗e−2G.
The maximum throughput Smax is 0.184, for G = 1/2.
(We can find it by setting the derivative of S with respect to G to 0; see Exercises.)
In other words, if one-half a frame is generated during one frame transmission time (one frame during two frame transmission times), then 18.4 percent of these frames reach their destination successfully.
We expect G = 1/2 to produce the maximum throughput because the vulnerable time is 2 times the frame transmission time.
Therefore, if a station generates only one frame in this vulnerable time (and no other stations generate a frame during this time), the frame will reach its destination successfully.
A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the throughput if the system (all stations together) produces
a. 1000 frames per second?
b. 500 frames per second?
c. 250 frames per second?
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, or 1 frame per millisecond, then G = 1.
In this case S=G∗e−2G=0.135 (13.5 percent).
This means that the throughput is 1000∗0.135=135 frames.
Only 135 frames out of 1000 will probably survive.
b. If the system creates 500 frames per second, or 1/2 frames per millisecond, then G=1/2.