CCN
CHAPTER 1
BY
SAMARTH URANKAR
Computer Network
• A computer network is a system in which multiple computers are connected to each other to share information and
resources.
• The connection between networked computing devices is established using either cable media or wireless media.
• The best-known computer network is the Internet.
Advantages of Computer Networks Disadvantages of Computer Networks
File sharing Lack of data security and privacy
Resource sharing Presence of computer viruses and malware
Better connectivity and communications
Internet access
Entertainment
Use (Applications) of Computer Networks
Financial services
Business
Email services
Mobile applications
Types of Computer Networks
LAN (Local Area Network)
WAN (Wide Area Network)
MAN (Metropolitan Area Network)
Internet
• The internet is a type of world-wide computer network.
• The Internet is a computer network that interconnects hundreds of millions of computing devices throughout the
world.
• When two computers are connected over the Internet, they can send and receive all kinds of information such as text,
graphics, voice, video, and computer programs.
Protocol
• A protocol is a set of rules that govern (manages) data communications.
• Protocols are also language that is used to communicate between the hosts or the different devices in the internet.
• Protocols define methods of communication, how to communicate when to communicate etc.
• Important elements of protocols are :
1. Syntax 2. Semantics 3. Timing
• Example: HTTP, IP, FTP etc…
The Network Edge
• It defines those computers of the network used at the edge (end) of the network. These computers are known as
hosts or end system.
• A host can be classified into the following two types:
Clients: Refer to the computer systems that request servers for the completion of a task.
The clients are generally called desktop PCs or workstations.
Servers: Refer to the computer systems that receive requests from the clients and process them. After the processing
is complete, the servers send a reply to the clients who sent the request.
• The concept of clients and servers is essential in the network design. The various networks design models are as follows:
1. Peer to Peer network 2. Client-Server
network
Peer to Peer network
• In this network group of computers is connected together so that users can share resources and information.
• There is no central location (server) for authenticating users, storing files, or accessing resources and each of them work
as both client and server.
• This means that users must remember which computers in the workgroup have the shared resource or information that
they want to access.
Advantage: Disadvantage:
It is easy to set up. There is no central backup of files and folders.
The network implementation is quite cheap. The speed of the network decreases due to heavy usage
Network and data security are weak.
Client/Server network
• A client/server network is a system where one or more computers called clients to connect to a central computer named as
a server to share or use resources.
• The client requests a service from a server, which may include running an application, querying a database, printing a
document, performing a backup or recovery procedure. The request made by the client is handled by a server.
Advantage: Disadvantage:
The server system holds the shared files. The implementation of the network is quite expensive.
The software applications shared by the If a server fails, the entire network crashes.
server are accessible to the clients.
Techniques used in data communications to transfer data
1. Connection-oriented method 2. Connectionless method
Connection-oriented method
• Connection-oriented communication includes the steps of setting up a call from one computer to another,
transmitting/receiving data, and then releasing the call, just like a voice phone call.
• Connection-oriented communication is done in one of two ways over a packet switched network:
1. Without virtual circuits 2. With virtual circuits.
Connectionless method
• Connectionless communication is just packet switching where no call establishment and release occur.
• A message is broken into packets, and each packet is transferred separately. Moreover, the packets can travel a different
route to the destination since there is no connection.
• Connectionless service is typically provided by the UDP (User Datagram Protocol). The
packets transferred using UDP are also called datagrams.
Transmission Media
• A transmission media can be defined as anything that can carry information from a source to a destination.
• On the basis of transmission of data, the transmission media can be classified into two categories:
1. Guided (Physical OR wired) transmission media
2. Unguided (Wireless) transmission media
Guided Transmission Media
• Guided media are those that provide a channel from one device to another.
• The three Guided (Physical) media commonly used for data transmission are:
1. Twisted-Pair 2. Coaxial 3. Fiber Optics
1. Twisted Pair
• A twisted pair consists of two insulated copper wires, typically about 1 mm thick.
• The wires are twisted together in a helical form, just like a DNA molecule.
• Twisting is done because two parallel wires constitute a fine antenna.
• When the wires are twisted, the waves from different twists cancel out, so the wire radiates less effectively.
• Types of Twisted-Pair Cable
1) Unshielded twisted-pair (UTP)
o Twisted pair cabling comes in several varieties, two of which are important for computer networks.
Category 3 : twisted pairs consist of two insulated wires gently twisted together.
Category 5 : is the more advanced twisted pairs were introduced.
2) Shielded twisted-pair (STP).
o STP cable has a metal foil covering that encases each pair of insulated conductors
o It is bulkier and more expensive.
o Metal casing improves the quality of cable by preventing the penetration of noise or crosstalk.
2. Coaxial Cable
• It has better shielding than twisted pairs, so it can span longer distances at higher speeds.
• Two kinds of the coaxial cable are widely used. One kind is a 50-ohm cable which is commonly used for digital
transmission & The other kind is a 75-ohm cable which is commonly used for analog transmission.
• Coaxial cables widely used within the telephone system for long-distance lines but have now largely been replaced by
fiber optics.
• The bandwidth possible depends on the cable quality, length, and signal-to-noise ratio of the data signal. Modern cables
have a bandwidth of close to 1 GHz.
3. Fiber Optics
• A fiber-optic cable is made of glass or plastic and transmits signals in the form of light.
• Optical fibers use reflection to guide light through a channel.
• Fiber optic cables are similar to coax, except without the braid
Unguided (Wireless) transmission media
• Unguided media transport electromagnetic waves without using a physical conductor. This type of communication is often
referred to as wireless communication.
1. Radio Transmission 3. Infrared
2. Microwave Transmission 4. Lightwave Transmission
The Network Core
• Network core defines the connection of different network segments together and the process to transmit the data packets
across the network.
• The network core is implemented through the use of switching techniques.
• The classification of a switching network is shown below:
Circuit Switching
• Circuit switching is used in public telephone networks
• The connection is transparent: once it is established, it appears to attach devices as if there were a direct connection.
• Communication via circuit switching involves three phases:
1. Circuit Establishment
2. Data Transfer
3. Circuit Disconnect
• Developed for Interconnection of
telephones within a building or office.
• In circuit switching, a direct physical connection between two devices is created by :
Space-division switches.
Time-division switches.
Space Division Switching
• In a space-division switch, the path from one device to another is spatially separate from other paths.
• Developed for the analogue environment.
• A crossbar is the most common space-division switch. It connects n inputs to m outputs via n × m cross points.
Time Division Switching
• In a time-division switch, the inputs are divided in time, using TDM. A control unit sends the input to the correct output
device.
• Use digital time division techniques to set up and maintain virtual circuits.
Packet Switching
• Packet switching was designed to provide a more efficient facility than circuit-switching for burst data traffic.
• With packet switching, a station transmits data in small blocks, called packets
• Each packet contains some portion of the user data plus control info needed for proper functioning of the network.
• Examples of packet switching networks are X.25, Frame Relay, ATM and IP.
• Station breaks a long message into packets. Packets sent one at a time to the network.
• Packets handled in two ways:
1. Datagram 2. Virtual Circuit
• Each packet treated independently. • Pre-planned route established before any packets sent.
• Packets can take any practical route. • Each packet contains a Virtual Circuit Identifier (VCI)
• Packets may arrive out of order . instead of a destination address.
• Packets may go missing . • No routing decisions required for each packet.
• Clear request to drop circuit.
• Not a dedicated path .
Message Switching
• This technique was somewhere in the middle of circuit switching and packet switching.
• In message switching, the whole message is treated as a data unit and is transferred in its entirety.
• A switch working on message switching first receives the whole message and buffers it until there are resources available to
transfer it to the next hop.
• If the next hop is not having enough resource to accommodate large size message, the message is stored and switch waits.
Protocols layers and their service model
OSI Layer Architecture
• The model is called the OSI (Open Systems Interconnection) Reference Model because it deals with connecting open
systems—that is, systems that are open for communication with other systems.
• The OSI model has seven layers.
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
Understanding of Delay, Loss, and Throughput in the Packet Switching Network
• As a packet travels from one node (host or router) to the subsequent node (host or router) along this path, the packet
suffers from several types of delays at each node along the path.
• The most important of these delays are the
1. Nodal processing delay
2. Queuing delay
3. Transmission delay
4. Propagation delay
• Together, these delays accumulate to give a total nodal delay
Processing Delay
• The time required to examine the packet’s header and determine where to direct the packet is part of the processing
delay.
• It is typically on the order of microseconds or less.
Queuing Delay
• At the queue, the packet experiences a queuing delay as it waits to be transmitted onto the link.
• On the other hand, if the traffic is heavy and many other packets are also waiting to be transmitted, the queuing delay
will be long.
• Queuing delays can be on the order of microseconds to milliseconds.
Transmission Delay
• Assuming that packets are transmitted in a first-come-first-served manner like packet-switched networks.
• The transmission delay is L/R.
L = length of the packet
R = transmission rate of the link from a router to a router
• Transmission delays are typically on the order of microseconds to milliseconds
Propagation Delay
• Once a bit is pushed into the link, it needs to propagate to router B. The time required to propagate from the beginning of
the link to router B is the propagation delay.
• Propagations delay=d (Length of Physical Link) /s (Propagation speed in medium).
• Propagation delays are on the order of milliseconds.
Packet Loss
• Packet loss is the failure of one or more transmitted packets to arrive at their destination.
• This event can cause noticeable effects on all types of digital communications.
• The loss of data packets depends on the switch queue. The loss of data packets increases with the increases in the
traffic intensity.
• It affects the performance of the network.
Throughput
• Throughput or Network Throughput is the rate of successful message delivery over a communication channel.
• Throughput is usually measured in bits per second (bit/s or bps)
• The data these messages belong to may be delivered over a physical or logical link or it can pass through a certain network
node.
Networks under attack
• Many people rely on the Internet for many of their professional, social and personal activities. But there are also people
who attempt to damage our Internet-connected computers, violate our privacy and render inoperable the Internet services.
1. Malware – Malware (short for “malicious software”) is a file or code, typically delivered over a network, that infects,
explores, steals or conducts virtually any behavior an attacker wants. And because malware comes in so many variants,
there are numerous methods to infect computer systems.
malware usually has one of the following objectives:
•Send spam from the infected machine to unsuspecting targets.
•Investigate the infected user’s local network.
•Steal sensitive data.
2. Virus – Viruses are a subgroup of malware. A virus is malicious software attached to a document or file that supports
macros to execute its code and spread from host to host. Once downloaded, the virus will lie dormant until the
file is opened and in use. Viruses are designed to disrupt a system's ability to operate. As a result, viruses can
cause significant operational issues and data loss.
3. Worm –A worm is a type of malicious software that rapidly replicates and spreads to any device within the network.
Unlike viruses, worms do not need host programs to disseminate. A worm infects a device through a downloaded file or a
network connection before it multiplies and disperses at an exponential rate. Like viruses, worms can severely disrupt the
operations of a device and cause data loss.
4. Botnet – The words "robot" and "network" together give rise to the term Botnet. Botnet refers to a network of hijacked
fast.internet-connected devices that are installed with malicious codes known as malware. Each of these infected devices is
known as Bots, and a hacker/cybercriminal known as the "Bot herder" remotely controls them. A bot is also called a
zombie, and a botnet is referred to as a zombie army.
• The bot herder can direct every bot to carry out a coordinated illegal action from a single central location. A botnet can
have several bots and thus allows the attacker to carry out large-scale attacks. Infected devices can acquire updates and
modify their behavior easily and quickly since a remote attacker controls them. The bots are used to automate large-scale
attacks, including data theft, server failure, malware propagation, spam email generation, and malicious traffic generation
for distributed denial-of-service (DDoS) attacks.
DoS (Denial of Service) – A DoS attack renders a network, host, or other pieces of infrastructure unusable by legitimate users.
Most Internet DoS attacks fall into one of three categories :
• Vulnerability attack: This involves sending a few well-crafted messages to a vulnerable application or operating system
running on a targeted host. If the right sequence of packets is sent to a vulnerable application or operating system, the service
can stop or, worse, the host can crash.
• Bandwidth flooding: The attacker sends a deluge of packets to the targeted host—so many packets that the target’s access
link becomes clogged, preventing legitimate packets from reaching the server.
• Connection flooding: The attacker establishes a large number of half-open or fully open TCP connections at the target host.
The host can become so bogged down with these bogus connections that it stops accepting legitimate connections.
DDoS (Distributed DoS) – A distributed denial-of-service (DDoS) attack is a malicious attempt to disrupt the normal traffic of
a targeted server, service or network by overwhelming the target or its surrounding infrastructure with a flood of Internet traffic.
From a high level, a DDoS attack is like an unexpected traffic jam clogging up the highway, preventing regular traffic from
arriving at its destination.
Packet sniffer – A passive receiver that records a copy of every packet that flies by is called a packet sniffer. By placing a
passive receiver in the vicinity of the wireless transmitter, that receiver can obtain a copy of every packet that is transmitted!
These packets can contain all kinds of sensitive information, including passwords, social security numbers, trade secrets, and
private personal messages. some of the best defenses against packet sniffing involve cryptography.
IP Spoofing – The ability to inject packets into the Internet with a false source address is known as IP spoofing. IP spoofing is
the creation of Internet Protocol (IP) packets which have a modified source address in order to either hide the identity of the
sender, to impersonate another computer system, or both. It is a technique often used by bad actors to invoke DDoS attacks
against a target device or the surrounding infrastructure.
Difference b/w circuit switching and packet switching
Topics which are not included in this PPT
Explanation of OSI layers
1. Describe the layered frame work used for the design of network systems that allows communication between all types of
computer systems. Explain the process of encapsulation and decapsulation at host and destination.
1. The layered framework commonly used for the design of network systems is the Open Systems Interconnection (OSI)
model. It consists of seven layers, each responsible for specific functions and providing a standardized approach to network
communication. The layers are as follows:
2. Physical Layer: This is the lowest layer of the OSI model and deals with the physical transmission of data over the network.
It defines the electrical, mechanical, and procedural aspects of data transmission, such as voltage levels, cables, and
network interface cards.
3. Data Link Layer: This layer is responsible for the reliable transfer of data between directly connected nodes on a network.
It provides error detection and correction, flow control, and manages access to the physical medium.
4. Network Layer: The network layer handles the routing of data across different networks. It determines the best path for data
transmission, performs logical addressing, and encapsulates data into packets.
5. Transport Layer: This layer ensures reliable and efficient end-to-end delivery of data. It segments data from the upper
layers into smaller units, handles error recovery, flow control, and provides mechanisms for multiplexing and
demultiplexing data streams.
6. Session Layer: The session layer establishes, manages, and terminates connections between applications. It enables
synchronization, checkpointing, and recovery of data exchange, as well as handles session authentication and authorization.
7. Presentation Layer: This layer is responsible for data representation and provides services such as data encryption,
compression, and formatting. It ensures that data from the application layer of one system can be understood by the
application layer of another system.
8. Application Layer: The application layer is the topmost layer and provides an interface for applications to access network
services. It supports various application protocols such as HTTP, FTP, SMTP, etc.
• Encapsulation and decapsulation occur at the source (host) and destination systems to allow data to traverse through the
different layers of the OSI model.
• When data is sent from the host, it goes through a process called encapsulation. At each layer, a header (or trailer) containing
control information specific to that layer is added to the original data. This process continues as the data moves down the
layers, resulting in multiple layers of headers being added to the original data. The resulting encapsulated data is then
transmitted over the network.
• Upon reaching the destination, the process of decapsulation takes place. The network system receives the encapsulated data
and strips off the headers or trailers added at each layer, one by one, until the original data is obtained. Each layer examines
its respective header, performs the necessary functions based on that information, and then passes the remaining data to the
layer above it. This process continues until the data reaches the application layer of the destination system.
• Encapsulation and decapsulation are essential for ensuring that data can be properly transmitted across different types of
computer systems, allowing for seamless communication between them. The layered approach of the OSI model facilitates
interoperability and modular design, enabling the development of network systems with diverse technologies and
functionalities.
Differentiate virus, worm and spyware.