Unit 4 Complete With Assignment
Unit 4 Complete With Assignment
Assignment No. 4
Q. No. Questions
1. Explain OSI Model in details. What are the functions of each of its layers.
2. What is TCP/IP Model and why it is significant in computer networking?
3. Define internetworking. Explain various types of computer networks.
OR
Discuss technologies (such as routers, switches etc) used in computer networking with their
importance. What are the difficulties associated during joining numerous network?
4. Discuss good computer security habits. Explain the element required to prove internet fraud
under law.
OR
Describe fundamental of computer security. Explain common types of cyber threats (Malware,
phishing, Dos etc.) their properties, propagation mechanism and potential effects on
computers.
5. Explain Firewall and how it provides security to the computer system.
Basic Computer Engineering
BT 205
Unit-IV
Client/Server interaction
• File server A computer that stores and manages files for multiple users on a
network
• Web server A computer dedicated to responding to requests (from the browser
client) for web pages
Local-area network (LAN) A network that connects a relatively small number of
machines in a relatively close geographical area
The most widely deployed type of network, LANs were designed as an
alternative to the more expensive point-to-point connection. A LAN has high
throughput for relatively low cost. LANs often rely on shared media, usually a
cable, for connecting many computers. This reduces cost. The computers take
turns using the cable to send data.
• A LAN is a data communication system within a building, plant, or campus, or
between nearby buildings.
• Its depend on the need of an organization and the type of technology used, a LAN
can be simple as two PCs and a printer in someone’s office.
• It can be extend throughout a company and include audio and video peripherals.
• LAN size is limited to a few kilometers.
• LAN are designed to allow resources to be shared between personal computer or
workstation.
• The resource to be shared can include hardware, software or data.
An isolated LAN connecting 12 computers to a
hub in a closet
Types of Topology
Various configurations, called topologies, have been used to administer LANs
⚫Ring topology A configuration that connects all nodes in a closed loop on
which messages travel in one direction
⚫Star topology A configuration that centers around one node to which all
others are connected and through which all messages are sent
⚫Bus topology All nodes are connected to a single communication line that
carries messages in both directions
A bus technology called Ethernet has become the industry standard for local-
area networks
Metropolitan Area Network
• A MAN is a network with a size between a LAN and a
WAN.
• It is a data communication system covering an area
the size of a town or city.
• A MAN is larger than a LAN, which is typically limited
to a single building, campus or site.
• It is often used to connect several LANs together to
form a bigger network. When this type of network is
specifically designed for a college campus, it is
sometimes referred to as a Campus Area Network,
or CAN.
• It is designed for costumer who need a high speed
connectivity, normally to the internet, and have end
points spread over a city or a part of city.
Wide area network
• A WAN provide long distance transmission of data,
image, audio and video information over large
geographic areas that may comprise a state, a country,
a continent, or even the whole world.
• A WAN is a data communication system spanning
states, countries, or the whole world.
• A WAN can be complex as the backbones that connect
the internet or as simple as a dial-up line that connect
a home computer to the internet.
• A WAN can contain multiple smaller networks, such as
LANs or MANs. The Internet is the best-known example
of a public WAN.
Personal Area Network
• A personal area network, or PAN, is a computer
network organized around an individual person
within a single building. This could be inside a
small office or residence. A typical PAN would
include one or more computers, telephones,
peripheral devices, video game consoles and
other personal entertainment devices.
• If multiple individuals use the same network
within a residence, the network is sometimes
referred to as a home area network, or HAN. In a
very typical setup, a residence will have a single
wired Internet connection connected to a
modem. This modem then provides both wired
and wireless connections for multiple devices.
The network is typically managed from a single
computer but can be accessed from any device.
Personal Area Network
• This type of network provides great flexibility. For example, it allows you
to:
• Send a document to the printer in the office upstairs while you are sitting on the
couch with your laptop.
• Upload the photo from your cell phone to your desktop computer.
• Watch movies from an online streaming service to your TV.
What is the difference between a LAN, a MAN,
and a WAN?
Differences Between LAN, MAN, and WAN
Basis LAN MAN WAN
LAN stands for local area MAN stands for WAN stands for wide area
Full-Form
network. metropolitan area network. network.
Transmission The transmission speed of While the transmission Whereas the transmission
Speed a LAN is high. speed of a MAN is average. speed of a WAN is low.
Fault There is more fault While there is less fault In WAN, there is also less
tolerance tolerance in LAN. tolerance. fault tolerance.
A heterogeneous network made of WANs & LANs
Network Criteria
The criteria that have to be met by a computer network are:
1. Performance:
• It is measured in terms of transit time and response time.
• Transit time is the time for a message to travel from one device to another
• Response time is the elapsed time between an inquiry and a response.
Performance is dependent on the following factors:
• The number of users
• Type of transmission medium
• Capability of connected network
• Efficiency of software
1. Reliability It is measured in terms of
• Frequency of failure
• Recovery from failures
2. Security
It means protecting data from unauthorized access.
Goals of Computer Networks..
Network Goals
• Cost reduction by sharing hardware & software resources.
• High reliability by having multiple sources of supply.
• Greater flexibility because of possibility to connect devices.
• Increase productivity by making it easier to access data by the several users.
• Another goal is to increase the systems performance, as the work load increases, by just
adding more processors.
• Computer networks provide a powerful communication medium.
Resource Sharing
Many organization has a substantial number of computers in operations, which are located
apart. Ex. A group of office workers can share a common printer, fax, modem, scanner etc.
High-Reliability
If there are alternate sources of supply, all files could be replicated on two or, machines. If one
of them is not available, due to hardware failure, the other copies could be used.
..Goals of Computer Networks
Inter-process Communication
Network users, located geographically apart, may converse in an interactive session
through the network. In order to permit this, the network must provide almost error-
free communications.
Flexible access
Files can be accessed from any computer in the network. The project can be begun on
one computer and finished on another.
Other Goals
• Other goals include Distribution of processing functions,
Centralized management, and allocation of network resources
• Compatibility of dissimilar equipment and software
• Good network performance
• Scalability
• Saving money
• Access to remote information
• Person to person communication etc.
Functionality of Computer Network
Computer network has two type of functionality
Functionality : Mandatory function
Some function is mandatory in computer network to perform operation in computer
network. Some mandatory functions are given below:
Error control:
The computer network has some responsibility like transmission of data from one device to
another device and end to end transfer of data from a transmitting application to a receiving
application involves many steps, each subject to error. By using the error control process, we can
be confident that the transmitted and received data are identical. Data can be corrupted during
transmission. The error must be detected and corrected for reliable communication.
Types of error
• Single bit error: The terms single bit error means that only one bit of the data unit was
changed from 1 to 0 and 0 to 1.
• Burst Error: The term burst error means that two or more bits in the data unit were changed. A
burst error is also called packet-level error, where errors like packet loss, duplication,
reordering.
Functionality : Mandatory function
Flow control:
When a packet (Layer-2 data) is sent from one host to another over a single medium, it is
required that the sender and receiver should work at the same speed. That is, the sender sends
at a speed on which the receiver can process and accept the data. If the sender is sending too fast
the receiver may be overloaded, (swamped) and data may be lost.
Access control:
Network access control is a method of enhancing the security of a private organizational network
by restricting the availability of network resources to endpoint devices that comply with the
organization’s security policy. The network access control scheme comprises of two major
components such as Restricted Access and Network Boundary Protection.
Multiplexing and Demultiplexing :
A multiplexing is a technique by which different analog and digital streams of transmission can be
simultaneously processed over a shared link. Multiplexing divides the high capacity medium into
low capacity logical medium which is then shared by different streams.
Functionality : Option function
Some function is optional in computer network and optional function do not need always
in computer network. Some optional functions are given below
Types of encryption
• Symmetric Key encryption
• Public Key encryption
Advantage
• Sharing devices such as printers saves money.
• Files can easily be shared between users.
• Network users can communicate by email.
• Security is good - users cannot see other users' files unlike on stand-
alone machines.
• A file server is easy to back up as all the data is stored in one place.
Disadvantage
• Managing a large network is complicated, requires training and a network manager
usually needs to be employed.
• If the file server breaks down the files on the file server become inaccessible. E-
mail might still work if it is on a separate server. The computers can still be used as
stand alones.
• Purchasing the network cabling and file servers can be expensive.
• Viruses can spread to other computers throughout a computer network.
• There is a danger of hacking particularly with wide area networks. Security
procedures are needed to prevent such abuse.
Connection Oriented & Connectionless Services
• Connection Oriented services
• Connection Oriented services, the source first makes a connection with the
destination before sending a packet.
• When the connection is established, a sequence of packets from the same source
to the same destination can be sent one after another.
• There is a relationship between packets.
• They are sent on a same path in sequential order.
• When all packets of a message have been delivered, the connection is terminated.
• Requires a session connection to be established before any data can be sent. This
method is often called a "reliable" network service.
• The connection oriented services are used in TCP.
Connection Oriented & Connectionless Services
Connectionless Services
• Connectionless Services, the network layer protocol treats each packet
independently, with each packet having no relationship to any other packet.
• The packet in the message may or may not travel the same path to their
destination.
• Does not require a session connection between sender and receiver. The
sender simply starts sending packets (called datagram) to the destination.
• 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.
• Connectionless service is typically provided by the UDP (User Datagram
Protocol). The packets transferred using UDP are also called datagram.
Difference between Connection Oriented & Connectionless Services
• OSI Model provides a clear structure for data transmission and managing network
issues. The OSI Model is widely used as a reference to understand how network
systems function.
• The OSI Model consists of 7 layers and each layer has specific functions and
responsibilities. This layered approach makes it easier for different devices and
technologies to work together.
Data Flow in the OSI Model
Data Flow in the OSI Model
When we transfer information from one device to another, it travels through 7 layers of
OSI model.
First data travels down through 7 layers from the sender's end and then climbs back 7
layers on the receiver's end.
Step 1: Person A interacts with e-mail application like Gmail, outlook, etc. Writes his email to send.
(This happens at Application Layer).
Step 2: At Presentation Layer, Mail application prepares for data transmission like encrypting data and
formatting it for transmission.
Step 3: At Session Layer, there is a connection established between the sender and receiver on the
internet.
Step 4: At Transport Layer, Email data is broken into smaller segments. It adds sequence number and
error-checking information to maintain the reliability of the information.
Step 5: At Network Layer, addressing of packets is done in order to find the best route for transfer.
Step 6: At Data Link Layer, data packets are encapsulated into frames, then MAC address is added for
local devices and then it checks for error using error detection.
Step 7: At Physical Layer, Frames are transmitted in the form of electrical/ optical signals over a
physical network medium like ethernet cable or WiFi.
After the email reaches the receiver i.e. Person B, the process will reverse and decrypt the e-mail
content. At last, the email will be shown on Person B email client.
Why OSI Model
it provides the user a clear structure of "how the data moves in the network?".
As the OSI Model consists of 7 layers, each layer has its specific role, and due to
which it helps in understanding, identifying and solving the complex network
problems easily by focusing on one of the layers not the entire network. It helps
people understanding network concepts very easily.
OSI Model
Advantages
• Simplified understanding: Divides communication into 7 layers, making concepts
easier to grasp.
• Standardization: Each layer has defined functions and protocols, promoting
uniform communication.
• Easier troubleshooting: Problems can be isolated and resolved at specific layers.
• Improved flexibility: Individual layers can be updated independently with new
technologies.
Disadvantages
• Complex for beginners: Too many layers to grasp easily.
• Less practical: Real networks mostly use TCP/IP.
• Slower processing: Extra rules add overhead.
• Theoretical use: More concept-based than practical.
Network devices
Unit IV
• Hubs Hubs are simple network devices, and
their simplicity is reflected in their low cost.
At the bottom of the networking food
chain, so to speak, are hubs. Hubs are used
in networks that use twisted-pair cabling to
connect devices. Hubs can also be joined
together to create larger networks. Hubs
are simple devices that direct data packets
to all devices connected to the hub,
regardless of whether the data package is
destined for the device. This makes them
inefficient devices and can create a
performance bottleneck on busy networks.
Switch
Like hubs, switches are the connectivity points of an Ethernet network. Devices connect
to switches via twisted-pair cabling, one cable for each device. The difference between
hubs and switches is in how the devices deal with the data that they receive. Whereas a
hub forwards the data it receives to all of the ports on the device, a switch forwards it
only to the port that connects to the destination device. It does this by learning the
MAC address of the devices attached to it, and then by matching the destination MAC
address in the data it receives.
Bridges
Bridges are used to divide larger networks into smaller sections. They do this by sitting
between two physical network segments and managing the flow of data between the two.
By looking at the MAC address of the devices connected to each segment, bridges can elect
to forward the data (if they believe that the destination address is on another interface), or
block it from crossing (if they can verify that it is on the interface from which it came).
Routers
A router derives its name from the fact that it can
route data it receives from one network onto
another. When a router receives a packet of data, it
reads the header of the packet to determine the
destination address. Once it has determined the
address, it looks in its routing table to determine
whether it knows how to reach the destination and,
if it does, it forwards the packet to the next hop on
the route. The next hop might be the final
destination, or it might be another router
Gateways
Any device that translates one data format
to another is called a gateway. Some
examples of gateways include a router
that translates data from one network
protocol to another, a bridge that converts
between two networking systems, and a
software application that converts
between two dissimilar formats. The key
point about a gateway is that only the data
format is translated, not the data itself. In
many cases, the gateway functionality is
incorporated into another device.
Modem
Modem is a device which converts the computer-
generated digital signals of a computer into analog
signals to enable their travelling via phone lines. The
‘modulator-demodulator’ or modem can be used as a
dial up for LAN or to connect to an ISP. Modems can
be both external, as in the device which connects to
the USB or the serial port of a computer, or
proprietary devices for handheld gadgets and other
devices, as well as internal; in the form of add-in
expansion cards for computers and PCMCIA cards for
laptops.
IP address
• An IP address is a unique address that identifies a device on the internet
or a local network. IP stands for "Internet Protocol," which is the set of
rules governing the format of data sent via the internet or local network.
• An IP address is a string of numbers separated by periods. IP addresses
are expressed as a set of four numbers — an example address might be
192.158.1.38. Each number in the set can range from 0 to 255. So, the
full IP addressing range goes from 0.0.0.0 to 255.255.255.255.
IP address
The use of IP addresses typically happens behind the scenes. The process
works like this:
1. However, your IP address can change. For example, turning your modem or router
on or off can change it. Or you can contact your ISP, and they can change it for you.
2. When you are out and about – for example, traveling – and you take your device
with you, your home IP address does not come with you. This is because you will be
using another network (Wi-Fi at a hotel, airport, or coffee shop, etc.) to access the
internet and will be using a different (and temporary) IP address, assigned to you by
the ISP of the hotel, airport or coffee shop.
IP address
IPv4 addresses are categorized into five classes: A, B, C, D, and E. The order of bits in the first octet
determines the class of an IP address. IPv4 address is divided into two parts:
1. Network ID: Identifies the specific network to which a device belongs.
• Within a URL, it’s possible to remove HTTP or WWW. However, the situations in which
you would remove one of these elements depends on a few factors.
• WWW is a prefix used to indicate that a website is using HTTP to communicate. In
fact, you can mix and match prefixes, for example http://example.com or
www.example.com.
• Both of the above URLs have enough information to communicate between the
browser and server, so both will work without any interruptions.
• So, what if we do choose to use http://example.com as your URL, but users type in
WWW where it isn’t necessary? In the majority of cases, the user will be
automatically redirected to your non-WWW domain. This means you can set up a
non-WWW site .
E-commerce
• Electronic commerce, commonly known as E-commerce or eCommerce, is trading in
products or services using computer networks, such as the Internet.
• Electronic commerce uses and operates on technologies such as
• mobile commerce,
• electronic funds transfer,
• supply chain management,
• Internet marketing,
• online transaction processing,
• electronic data interchange (EDI),
• inventory management systems, and
• automated data collection systems.
• Modern electronic commerce typically uses the World Wide Web for at least one part
of the transaction, although it may also use other technologies such as e-mail.
What are the Different eCommerce Business Models?
eCommerce is typically classified into three different models based on the type of participants
involved in the transaction: B2B, B2C, and C2C. Broadly speaking these business models are:
Business to Business (B2B)
B2B is when businesses sell to other businesses. This is typical of stationery stores who sell office
equipment in bulk to businesses. Normally B2B companies provide a discounted rate per unit if
customers buy in bulk which it is great motivation for offices to avail of.
Business to Consumer (B2C)
B2C is the most commonly thought of business model where merchants sell to consumers who buy a
small amount of produce. A familiar example of the B2C model would be supermarkets where
consumers buy their shopping weekly but they wouldn’t normally bulk buy anything.
Consumer to Consumer (C2C)
C2C is a relatively new business model where consumers who previously bought something seek to
resell this item to another consumer. Through marketplaces like eBay and Craigslist, this can be easy
and quite lucrative for selling items that you no longer have a use for.
TCP/IP(Transmission Control Protocol/Internet Protocol)
• The Internet protocol suite is the computer networking model and set of
communications protocols used on the Internet and similar computer networks.
• It is commonly known as TCP/IP, because its most important protocols, the
Transmission Control Protocol (TCP) and the Internet Protocol (IP), were the first
networking protocols defined in this standard.
• Also known as Internet protocol suite.
• TCP/IP provides end-to-end connectivity specifying how data should be
packetized, addressed, transmitted, routed and received at the destination.
• This functionality is organized into four abstraction layers.
TCP/IP(Transmission Control Protocol/Internet Protocol)
This Trojan can create a “backdoor” on your computer. It lets an attacker access
your computer and control it. Your data can be downloaded by a third party and
stolen. Or more malware can be uploaded to your device.
Distributed Denial of Service (DDoS) attack Trojan
This Trojan performs DDoS attacks. The idea is to take down a network by flooding
it with traffic. That traffic comes from your infected computer and others.
Downloader Trojan
This Trojan targets your already-infected computer. It downloads and installs new
versions of malicious programs. These can include Trojans and adware.
Fake AV Trojan
This Trojan behaves like antivirus software, but demands money from you to
detect and remove threats, whether they’re real or fake.
Game-thief Trojan
The losers here may be online gamers. This Trojan seeks to steal their account
information.
Infostealer Trojan
As it sounds, this Trojan is after data on your infected computer.
Mailfinder Trojan
This Trojan seeks to steal the email addresses you’ve accumulated on your device.
Ransom Trojan
This Trojan seeks a ransom to undo damage it has done to your computer. This can
include blocking your data or impairing your computer’s performance.
Remote Access Trojan
This Trojan can give an attacker full control over your computer via a remote network
connection. Its uses include stealing your information or spying on you.
Spyware
Cyber Pornography
• Cyber Pornography refers to the act of producing, distributing, or
accessing sexually explicit material using digital technologies, primarily
the internet.
• This can include photos, videos, and other multimedia content shared
through websites, chatrooms, messaging apps, or social media.
Intrusion
Every PC connected to Internet is a potential target for hackers. Intrusion to
PC can occur in any form:
• Sweeper attack: A malicious program which sweeps out all data from
the system.
• Denial of Services(DoS): This type of attack use all the resources of a
system and deny any further requests, so system comes to halt.
• This is an attack meant to shut down a machine or network, making it
inaccessible to its intended users. DoS attacks accomplish this by
flooding the target with traffic, or sending it information that triggers a
crash.
• There are two general methods of DoS attacks: flooding services or
crashing services.
Flood attacks occur when the system receives too much traffic for the server
to buffer, causing them to slow down and eventually stop. Popular flood
attacks include:
Buffer overflow attacks – the most common DoS attack. The concept is to
send more traffic to a network address than the programmers have built the
system to handle.
ICMP flood – leverages misconfigured network devices by sending spoofed
packets that ping every computer on the targeted network, instead of just one
specific machine. The network is then triggered to amplify the traffic. This
attack is also known as the smurf attack or ping of death.
SYN flood – sends a request to connect to a server, but never completes the
handshake. Continues until all open ports are saturated with requests and
none are available for legitimate users to connect to.
Cyber Stalking
Packet-filtering gateways
• Application gateways
An application gateway uses server programs (called proxies) that run on
the firewall. These proxies take external requests, examine them, and
forward legitimate requests to the internal host, which provides the
appropriate service. Application gateways can support functions such as
user authentication and logging.
Firewall
• The firewall can be configured as the only host address that is visible to
the outside network, requiring all connections to and from the internal
network to go through the firewall.
• The use of proxies for different services prevents direct access to
services on the internal network, protecting the enterprise against
unsecured or misconfigured internal hosts.
• Strong user authentication can be enforced with application gateways.
• Proxies can provide detailed logging at the application level.
Firewall
IP spoofing
IP spoofing is when an attacker masquerades his or her machine as
a host on the target's network (fooling a target machine that
packets are coming from a trusted machine on the target's internal
network). Policy regarding packet routing has to be clearly written
so that they will be handled accordingly if there is a security
problem. It is necessary that authentication based on source
address be combined with other security schemes to protect
against IP spoofing attacks.
IP spoofing
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.
• Sending and receiving IP packets is a primary way in which networked
computers and other devices communicate, and constitutes the basis of the
modern internet. All IP packets contain a header which precedes the body of
the packet and contains important routing information, including the source
address. In a normal packet, the source IP address is the address of the sender
of the packet. If the packet has been spoofed, the source address will be
forged.
Computer Ethics & Good Practices
Computer Ethics is a part of practical philosophy which deals with how
computing professionals should make decisions regarding professional
and social conduct.
Ten Commandments of Computer Ethics
• Do not use computer to harm other peoples.
• Do not interfere with other people's computer work.
• Do not snoop around in other people's computer files.
• Do not use a computer to steal.
• Do not use a computer to bear false witness.
• Do not copy or use proprietary software for which you have not paid.
• Do not use other people's computer resources without authorization or proper
compensation.
• Do not use other people's intellectual output.
• Do think about the social consequences of the program you are writing or the system
you are designing.
• Do always use a computer in ways that ensure consideration and respect for your fellow
humans.
Cyber Law
• Cyber law or Internet law is a term that encapsulates the legal issues
related to use of the Internet.
• It is a less distinct field of law than intellectual property or contract
law, as it is a domain covering many areas of law and regulation
related to computer and cyber space.
• Some leading topics include internet access and usage, privacy,
freedom of expression, and jurisdiction.
Internet Fraud
• The use of Internet services or software with Internet access to
defraud victims or to otherwise take advantage of them; for
example, by stealing personal information, which can even lead to
identity theft.
• A very common form of Internet fraud is the distribution of
compromised security software.
• Internet services can be used to present fraudulent solicitations to
victims, to conduct fraudulent transactions.
Good Computer Security habits