Computer Networks
Computer Networks
Computer Networks
COPYRIGHT 2015
ISBN:
This worktext in computer networks was developed for IT – related courses and
programs of DMMMSU – Mid – La Union Campus.
It aims to present a detailed and comprehensive description and information
regarding the basics of computer networks.
The material is used as a guide and allows the reader to reduce time and cost
required to learn computer networks concepts.
It is designed to help faculty and students in learning the concepts and completing the
course.
The worktext is organized from simple to complex and from basic to advance to make
an easy transfer of learning.
The reader is encouraged not only to read this worktext but to analyze and answer
the review questions at the end of each.
iii
Acknowledgement
iv
Table of Contents
Preface iii
Acknowledgement iv
Table of Contents v
Framework vi
Unit 4: TCP/IP 51
Unit 5: IPV6 61
Unit 8: Wireless 83
Unit 9: Routing 96
References 156
Appendices
v
Framework
Competence
In the worktext, the learner will develop competence through activities and quizzes
that are incorporated after every unit. This intends to cultivate the minds of the
learners by capturing understanding on the subject matter. It concludes questions or
activities on knowledge and comprehension domains of learning.
Skills
In the worktext, the learner will enhance the skills through the activities which can be
done during their laboratory time. This is done to enable the learners to translate their
understanding on the subject matter to codes, programs, or any output which is
computerized in nature.
Attitude
With the activities incorporated in the worktext, the learner will develop the right
attitude on handling situations regarding problem – solving. These activities will be
done to drive learners to make decision until the desired output is achieved.
With the integration of the right strategy and approach to develop competence, skills,
and attitude, the teacher facilitator can directly apply these factors to teaching or learning
process.
vi
Course Objectives
vii
Unit 1
Computer Networks
Unit Objectives
Computer Networks
Networking
A group of computers and other devices connected together is called a network. The
interconnected computers can share resources, which called networking. It is linking of two
or more different entities together to form a group of network to perform some specific task.
The networking enhances the capacity of computer to share, exchange, preserve and protect
information. When the computers are connected over a network it is possible to exchange
the information easily and faster.
2
Unit 1 Computer Networks
Advantages of Networking
3
Unit 1 Computer Networks
Disadvantages of Networking
1. Network Hardware, Software and Setup Cost. Computers don’t just magically
network themselves, of course. Setting up a network requires an investment in
hardware and software, as well as funds for planning, designing and implementing
the network. For a home with a small network of two or three PCs, this is relatively
inexpensive, possibly amounting to less than a hundred dollars with today’s low
prices for network hardware, and operating systems already designed for networks.
For a large company, cost can easily run into tens of thousands of dollars or more.
2. Growing Concerns over Security. As Internet use increased in the 1990s, more
“bad guys” started using the network also. The more machines a company had
directly connected to the Internet, the greater their potential exposure to security
risks.
3. Undesirable Sharing. With the good comes to bad; while networking allows the easy
sharing of useful information, it also allows the sharing of undesirable data. One
significant “sharing problem” in this regard has to do with viruses, which are easily
spread over networks and the Internet. Mitigating these effects costs more time,
money and administrative effort.
4. Illegal or Undesirable Behavior. Similar to the point above, networking facilities
useful connectivity and communication, but also brings difficulties with it. Typical
problems include abuse of company resources distractions that reduce productivity,
downloading of illegal or illicit materials, and even software piracy. In larger
organizations, these issues must be managed through explicit policies and
monitoring, which again, further increases management costs.
1. Security Goals: Network security issues comprise of prevention from virus attacks
and protecting data from unauthorized access.
a) Viruses: As a network is accessible from many points, it can be susceptible to
computer viruses. A virus is an illicitly introduced code to damage the functionality of
a system. A good network is protected from viruses by software and hardware
designed specifically for that purpose.
4
Unit 1 Computer Networks
5
Unit 1 Computer Networks
4. Network Cost: While designing cost of a network is an important factor. The network
cost can be calculated on the basis of fixed cost and runtime cost.
a) Fixed cost: The cost of medium and devices (like switch, router, hub etc.) which are
required to make a network functional plays an important role while designing the
network. For better network design in minimum cost the network design engineer
must understand the function’s to be performed by the network and accordingly
performance parameters of medium and device (capacity and quality of medium,
processing speed, capacity etc.. of device) should be chosen.
b) Runtime cost: To maintain a Network functionally strong, very good maintenance is
required and as much complexity we increase in design chances of failure increases
accordingly which in turn leads to more down time and maintenance cost of network.
So increasing the runtime cost of network. So while designing not only fixed cost but
run-time costs must be taken into account for minimization of total cost.
6
Unit 1 Computer Networks
Topologies
7
Unit 1 Computer Networks
Peer to peer is the relationship where the devices share the link equally. The
examples are ring and mesh topologies.
In primary-secondary relationship, one device controls and the other devices have to
transmit through it. For example star and tree topology.
1. Mesh Topology
It is also called as complete topology.
In mesh topology, every device has a dedicated point to point link to other device
where point to point means that only one terminal/wire directly connects only the two
devices.
The term dedicated means the link carries traffic only between the two devices it
connects.
A mesh network has (n(n-1))/2 physical channels to link n devices.
The accommodate that many links ; every devices on the network work must have (n-
1) input output ports.
Mesh topology is employed for long-distance transmission of data between nodes.
Mesh topology is two types:
o True mesh topology
o Hybrid mesh topology
8
Unit 1 Computer Networks
2. 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 each other. Unlike a
mesh topology, a star topology does not allow direct traffic between devices. 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 device. The star is probably the most
commonly used topology today. It uses twisted pair (10baseT or 100baaseT) cabling and
requires that all devices are connected to a hub.
9
Unit 1 Computer Networks
9. It is easy to modify and add new needs to a star network without disturbing the rest of
the network.
10. Star topology is useful when a centralized control is required.
3. Ring Topology
It is also called as circular topology. In a ring topology, each device has a dedicated
point-to-point line configuration only with 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 repeaters regenerates the bits and passes
them along. The ring topology looks are same as the star; except that it uses special
hubs and Ethernet adapters. The ring topology is used with Token Ring networks.
10
Unit 1 Computer Networks
11
Unit 1 Computer Networks
4. Bus Topology
It is also called as linear topology.
All other topologies (mesh, star, ring) described point-to-point configuration.
A bus topology is multipoint. One long cable acts as a backbone to link all other
devices in the network.
The speed of the bus topology is slow because only one computer can send a
message at a time. A computer must wait until the bus is free before it can transmit.
The bus topology requires a proper termination at both the ends of the cable.
Since the bus is passive topology, the electrical signal from a transmitting computer is
free to travel the entire length of the cable.
Nodes are connected to the bus cable by droplines and taps.
Dropline: A drop line is a connection between the devices and the main cable.
Tap: A tap is a connection that punctures with the metallic core.
12
Unit 1 Computer Networks
3. Repeater configuration. When BUS type network has its backbone extended using
repeaters, reconfiguration may be necessary.
4. Nodes must be intelligent. Each node on the network is directly connected to the
central bus. This means that some way of deciding who can use the network at any
given time must be performed in each node.
5. Tree Topology
It is also called as hierarchical topology.
A tree topology is a variation of a star. As in a star, nodes in a tree are linked to a
central hub that controls the traffic to the network.
However not every computers plugs into the central hub, majority of them are
connected to a secondary hub which in turn is connected to the central hub.
The central hub in the tree is an active hub, which contains repeater. The repeater
amplifies the signal and increase the distance a signal can travel.
The secondary hubs may be active or passive. A passive hub provides a simple
physical connection between the attached devices.
Tree Topology is somewhat similar to bus topology. We can say that tree topology
is another form of bus topology. But unlike bus topology, the nodes in a tree
extend similar to the branches of a tree with the trunk or we can say bus is a
special case of tree in which there is only one trunk.
13
Unit 1 Computer Networks
Categories of Network
A computer network means a group of ‘networked’ computers i.e., computers that are
linked by means of a communication system. A network can mean a small group of linked
computers to a chain of a few hundred computers of different types (e.g., PCs, minis,
mainframes etc.) spread around the world. Thus, networks vary in size, complexity and
geographical spread. Mostly, computers are classified on the basis of geographical spread
and on this basis; there can be three types of networks.
Local Area Networks (LANs)
Wide Area Networks (WANs)
Metropolitan Area Networks (MANs)
14
Unit 1 Computer Networks
Use:
1. User can use the LAN to communicate with each other by sending e-mail s,
data or in chat sessions
2. Through LAN, many users can share expensive devices.
Advantages of LAN
1. It allows large number of users to access the data from single memory.
2. The files are stored on single memory.
3. The processing can be done by number of users simultaneously.
Characteristics of LAN
1. Low cost is an important characteristic of LAN.
2. Resource sharing is the greatest advantage of LAN.
3. In LAN, every device can communicate with any other device.
4. The independent devices are interconnected with high degree in LAN.
System of LAN
There are three types of systems used in LAN.
1. Client-server- this LAN does not provide network resources. In this case, the client
computer accesses the main computer through the server.
2. Peer based LAN- this LAN provides interconnection between the computers and
various devices. All computers can be interconnected to each other by networking.
3. Server Based LAN- this is hybrid network, in which Peer connection are made by
joining the connections.
Attributes of LAN
The LAN transmits data amongst user stations.
The LAN transmission capacity is more than 1 Mbps.
The LAN channel is typically privately owned by the organizations using the facility.
15
Unit 1 Computer Networks
A WAN provides long distance transmission of data, video image and video
information over large areas.
The data is communicated in the form of small pieces and sent over the network.
It is cheaper and more efficient to use phone network for the links.
Uses of WAN
1. A WAN uses telephone links, mobile phones, satellite transmission and under sea
cables.
2. The WAN used direct distance dialing, leased links and satellite.
3. The remote computers are connected to each other by use of these lines.
4. A WAN uses various communication facilities to connect the user not located in the
single building.
Types of WAN
WANs can be classified into two types. They are:
1. Discontinuous connection WANs and
2. Continuous connection WANs.
16
Unit 1 Computer Networks
Purposes: The purpose of a MAN is also the sharing of hardware and software
resources among its users.
Transfer Rate: MAN provides the transfer rates from 34 to 150 Mbps.
17
Review Questions
1. What do you mean by the term computer networks? Give the list of goals of computer
networks.
3. What do you mean by the term topology? Explain any two types of topologies.
18
Unit 2
Network Architecture
Unit Objectives
Protocols
Five-layer Network
20
Unit 2 Network Architecture
Classification of Protocols
1. Connection Oriented Service
2. Connectionless Service
In this protocol, a logical connection is being established between the endpoints prior
to the transmission of data.
It is designed to have a high reliability for data movement across the network.
21
Unit 2 Network Architecture
Connectionless Service
OSI Model
22
Unit 2 Network Architecture
Application
Transport
Internet
Network Interface
1. APPLICATION LAYER - includes all process and services that use the transport layer
to deliver data.
2. TRANSPORT LAYER - provides peer entities on the source and destination hosts to
carry on a conversation.
3. INTERNET LAYER - the Internet network layer protocol handle machine to machine
communications.
4. HOST-TOHOST LAYER - this is the lowest layer in TCP/IP reference model. This
layer is also called network interface layer.
23
Unit 2 Network Architecture
7 Application
6 Presentation Application
5 Session
4 Transport Transport
3 Network Internet
2 Data Link Network Interface
1 Physical
OSI Model and the TCP/IP Network Stack
1 7 layers 4 layers
Model was first designed before
2 Model defined after, protocol were implemented.
implementation takes place.
OSI model based on three concept: TCP/IP model did not originally clearly distinguish
3
service, interface and protocol. between service, interface and protocol.
OSI model gives guarantee of Transport layer does not always guarantee the
4
reliable delivery of data packet. reliable delivery of packet.
OSI does not support internet
5 TCP/IP support.
working.
24
Review Questions
1. What do you mean by the term protocol? Also explain its key elements?
2. Give the names of the various design issues for the layers?
4. Explain in detail the OSI Model with all its seven layers.
25
Unit 3
Data Communication Concept
Unit Objectives
Data communication is the exchange of data (in the form of 0s and 1s) between two
devices via some form of transmission medium (such as a wire cable). Data communication
is considered local if the communicating devices are in the same building or a similarly
restricted geographical area, and is considered remote if the devices are farther apart.
27
Unit 3 Data Communication Concept
4. Medium: is the physical path by which a message travels from sender to receiver. It
can consist of twisted pair, coaxial cable and fiber optic cable, laser or radio waves
(terrestrial or satellite microwave).
5. Protocol: is the set of rule that govern data communication. It represent an
arrangements between the communicating devices. Without a protocol, two devices
may be connected but not communicating.
Block Diagram
28
Unit 3 Data Communication Concept
Transmission model consist of three types namely Simplex, Half-duplex and Full-duplex.
1. Simplex: Transmission in one direction. One end will always transmit and the other
end will always receive. Examples are traditional keyboards and printers for simplex
devices.
2. Half-duplex: It permits transmission in both direction but at a time in only one
direction. So it is also known as “Two Way Alternate” (TWA). In other words, in half-
duplex mode, each station can both transmit and receive but not at the same time.
When one device is sending, the other device can only receive or vice versa.
3. Full-duplex: It permits transmission simultaneously in both directions. It is also known
as “Two Way Simultaneous” (TWS). In full-duplex (also called duplex), both stations
can transmit and receives simultaneously. Example of a full-duplex is the telephone
network. When two people are communicating by a telephone, both can talk and
listen at the same time.
Transmission Media
29
Unit 3 Data Communication Concept
30
Unit 3 Data Communication Concept
Category 5: Use in local transmission speed of 100 Mbps data transmission speed.
Category 4: It support transmission speed up to 16 Mbps and three twist per foot.
Category 3: It support data transmission speed up to 10 Mbps. At least three twist
per feet and used in telephone system.
Category 2:It support data transmission speed up to 4 Mbps and suitable for voice
data transmission.
Category 1: Mostly used in telephone system. Cat1 is suitable for voice and low
speed data communication
Characteristics of UTP
1. Transmission rate of 10-100 Mbps.
2. Less expensive than FOC and co-axial cable.
3. Maximum cable segment is 100 meters.
4. Very flexible and easy to work.
5. Uses RJ-45 connector.
6. Most susceptible to electrical interference or cross talk.
31
Unit 3 Data Communication Concept
Advantages of UTP
1. Easy to terminate.
2. Cost of installation is less.
3. High installed base.
Disadvantages of UTP
1. It is very noisy.
2. It covers less distance
3. Suffers from interference
2. CO-AXIAL CABLE
It consists of two concentric conductors separated by dielectric material.
External conductor is metallic braid and
used for the purpose of shielding. Co-
axial cable may contain one or more
co-axial pairs.
The wire mesh protects the wire from
EMI. It is often called shield.
A tough plastic jacket forms the cover
of the cover providing insulation and
protection.
This cable was initially developed as the backbone of analog telephone networks
where a single telephone cable would be used to carry more than 10,000 voice
channels at a time.
32
Unit 3 Data Communication Concept
Digital transmission systems using co-axial cable were developed in 1970’s and the
range is 8.5 Mb/s to 565 Mb/s.
Popularly used in cable TV system. The existing co-axial cable system has a range
from 54 MHz to 500 MHz.
Other important application is cable modem, with the cable modem termination
system (CMTS).
One more application is Ethernet LAN using co-axial cable. The co-axial cable is
used for its large bandwidth and high noise immunity.
33
Unit 3 Data Communication Concept
RG – 11 50* Thick
RG – 58 50* Ethernet
RG – 59 75* Thin Ethernet
Cable TV
34
Unit 3 Data Communication Concept
35
Unit 3 Data Communication Concept
Wireless Media
It does not use electrical or optical conductor. In most cases the earth’s atmosphere
is the physical path for the data.
Wireless media is used when distance or obstruction make cable media difficult.
Types
Radio waves
Microwave
Infrared
1. Radio Transmission
Have frequencies between 10 kilohertz (kHz) and 1 giga hertz (GHz). It includes the
following types:
i. Short Wave
ii. Very high Frequency (VHF) television and FM radio
iii. Ultra High Frequency (UHF) radio and television
Low Frequency
Low Frequency (LF) also propagated as surface waves. It is also used for long-range
radio navigation locators. Attenuation is greater during daytime, when absorption of
waves by natural obstacle increases.
Long-range navigation = 30 KHz to 300 KHz
36
Unit 3 Data Communication Concept
Middle Frequency
Middle Frequency (MF) signals are propagated in the troposphere. These frequencies
are absorbed by the ionosphere. Absorption increases during daytime, but most MF
transmission rely on-line of – sight antennas to increase control to avoid absorption
problem altogether.
Uses: AM radio, radio direction finding (RDF) and emergency frequencies
High Frequency
High Frequency (HF) signals use iono-spheric propagation.
Uses for HF signals includes amateur radio (ham radio), citizens band (CB) radio,
international broadcasting, military communication, long distance aircraft and ship
communication, telephone, telegraph and facsimile.
37
Unit 3 Data Communication Concept
Microwaves
1. Basically electromagnetic waves having frequencies between 1 and 300 GHz.
2. Unidirectional
3. Propagation is line of sight propagation.
4. Microwave band is wide (299 GHz) so it’s possible to allot wider sub-bands.
Therefore it can support high data rates.
Terrestrial Microwave
Does not follow the curvature of the earth therefore it requires line of sight
transmission and reception equipment. Height allows the signal to travel farther
without being stopped by the curvature of the planet and raises the signal above
many surface obstacles such as, low hills and tall buildings that would block the
transmission.
Microwave signals propagate in one direction a time, which means that two
frequencies are necessary for two-way communication such as telephone
conversation. Each frequency requires its own transmitter and receiver. Today, both
pieces of equipment usually combined in a single piece equipment called transceiver.
Repeater. To increase the distance served by terrestrial microwave, a system
repeaters can be installed with each antenna. A repeater may broadcast the
regenerated signal either at the original frequency or at a new frequency, depending
on the system.
38
Unit 3 Data Communication Concept
Satellite Communication
Satellite transmission is much like line-of-sight microwave transmission in which one
of the stations is a satellite orbiting the earth. Satellite microwave can provide
transmission capability to and from any location on earth, no matter how remote.
Advantages
i. Installation of towers and associated equipment’s is cheaper than laying down a
cable of 100 km length.
ii. Less maintenance as compared to cable
iii. Repeaters can be used. So effect of noise is reduced.
iv. No adverse effects such as cable breakage etc.
v. Due to the use of highly directional antenna, links do not make any interference with
other communication systems.
vi. Size of transmitter and receiver reduces due to the use of high frequency.
Disadvantage
i. Signal strength at the receiving antenna reduces to multipath reception.
ii. Transmission will be affected by the thunderstorms, and other atmospheric
phenomenon.
INFRARED TRANSMISSION
a) Electromagnetic waves having frequencies from 300 GHz to 400 THz (wave length
from 1mm to 770nm ).
b) Uses line-of-sight propagation.
c) It cannot penetrate walls.
d) Can be used with a much reduced interference and possibility of reuse of the same
frequency band in different rooms.
39
Unit 3 Data Communication Concept
e) Wavelength is from 850 nm and 900nm, where the receivers with god sensitivity are
available.
f) Advantage of infrared communication is the very large bandwidth which is available
for use but has not been exploited to its full extent.
g) Major disadvantage is that sun generates radiation on the infrared band that can
cause a lot of interference with the IR communication.
h) The infrared can be used in the development of the very high speed wireless LAN’s in
the future.
Application of Infrared
1. Very High data rates can be supported due to very high bandwidth (approximately
400 THz)
2. For communication of electronic gadget in the house.
40
Unit 3 Data Communication Concept
Introduction to Switching
Is an important technique that can determine how connections are made and how data
movement is handled in wide area network (WAN).
Circuit Switching
Complete physical connection between two computers is established and then data are
transmitted from the source computer to the destination computer. The important property of
this switching technique is to set up and end-to-end path (connection) between computers
before any data can be sent.
Advantages
1. Dedicated transmission channel the computer establish a guaranteed data rate.
2. No delay of data flow.
3. Low variance end to end delay.
Disadvantages
1. Since the connection dedicated, it cannot be used to transmit any other data even if
the channel is free.
2. Dedicated channel require more bandwidth.
3. Its takes long time to establish connection.
4. Connection setup and tear down introduces extra overhead.
5. Other users cannot use circuit even if free of traffic.
41
Unit 3 Data Communication Concept
Message Switching
The source computer sends data for the message to the switching office first, which stores
the data in its buffer. It then looks for a free link to another switching office and then sends
the data to this office. This process is continued until the data are delivered to the destination
complete. Also known as “store and forward”.
Advantages
1. Provides efficient traffic management by assigning priorities to the message to be
switched.
2. Reduces network traffic congestion.
3. Network devices share the data channels.
4. Provides asynchronous communication across time zone.
Disadvantages
1. Storing and forwarding introduces delay hence cannot be used for real time
applications like voice and video.
2. Require a large storing capacity since it has to store message unless a free path is
available.
Packet Switching
A fixed size of packet which can be transmitted across the network is specified.
In message switching, data packets are stored in on the disk while in packet
switching, all packets are stored in main memory.
This improves the performance as the cross time (time taken to access data packet)
is reduced, thus, throughput (measure of performance of the network) is improved.
Advantages
1. Increases the bandwidth of the network by allowing many devices to communicate
through the same network channel.
2. A switching node can route the packet as and when required.
3. Transmission delay is reduced.
42
Unit 3 Data Communication Concept
Disadvantages
1. Require large amount of RAM to handle quantities of packets.
2. Switching node requires processing power because the packet switching protocols
are more complex.
3. Packets are more easily lost on their routes; hence sequence numbers are required
to identify the missing packets.
Multiplexing
Benefits in Multiplexing
Combines the transmission and facilitates the transmission via single line thus saving
the money.
Less number of physical lines and less number of modems are required.
Combines many low speed transmissions into high speed transmission.
Methods in Multiplexing
a) Frequency Division Multiplexing (FDM)
b) Time Division Multiplexing (TDM)
43
Unit 3 Data Communication Concept
and receiving devices. In such case, multiple transmission can occupy a single link by
sub dividing them and inter-leaving the portions.
TDM divides the channel into short time slots of fixed intervals. The various terminals
time share the channel.
Working of Modems
Modem converts digital signal to A/F (Audio Frequency) tones which are in the
frequency range that the telephone lines can transmit and also it can convert
transmitted tones back to digital information. After the power is turned on in DTE
(Data Terminal Equipment) and DCE (Data Communication Equipment), the terminal
runs for self check, it asserts the data terminal ready (DTR) signal to tell the modem
that it is ready. When modem is powered up and ready to transmit data, the modem
will assert the data set ready (DSR) signal to the terminal. Under the manual or
terminal control the modem dials up the computer on the other end. If the computer
is available it will send back a specified tone.
Now when the terminal has a character ready to sent, it will assert request to send
(RTS) signal to the modem. The modem then assert its carrier detect (CD) signal to
the terminal to indicate that it has established contact with the computer. When the
modem is fully ready to transmit data it asserts clear-to-send (CTS) signal back to
the terminal. The terminal then sends serial data characters to the modem. When
the terminal has sent all the characters it needs to make its RTS signal high. This
causes the MODEM to un asserts its CTS signal and stop transmitting.
44
Unit 3 Data Communication Concept
Modulation Technique
Amplitude Shift Keying (ASK)
Frequency Shift Keying (FSK)
Phase Shift Keying (PSK)
3. Phase Shift Keying (PSK) – we keep the amplitude and the frequency of the carrier
signal unchanged and only changes the phase to denote 0s and 1s. In PSK, we
change the timing of the carrier wave abruptly to encode data. After a phase shift
happens, the carrier wave still continues to oscillate, but it immediately jumps to a
new point in a cycle. The phase of the signal during each bit duration is constant and
its value depends on whether it is 0 or 1.
Circuit Switching
When a terminal wants to communicate with another terminal, this technique creates
a fixed-bandwidth channel, called a circuit, between the source and the destination. There’s
a need of pre-specified route from which data will travel and no other data will permitted.
When two nodes communicate with each other over a dedicated communication path, it
is called circuit switching. In simple words, in circuit switching, to transfer data circuit must
established so that the data transfer can take place.
Source first establishes a connection (circuit) to the destination.
45
Unit 3 Data Communication Concept
Packet Switching
It is a technique that uses to send data from one terminal to another. The bits and
bytes that make up the data are assembled in individual packets. Protocol information
is sent along with the packets to alert the receiving hardware that data is coming and
how the data packets are to be assembled.
46
Unit 3 Data Communication Concept
Multiplexing
Types of multiplexing
Frequency Division Multiplexing
Wavelength-division Multiplexing
47
Unit 3 Data Communication Concept
48
Unit 3 Data Communication Concept
STDM
It is a digital multiplexing technique for combining several low rate channels into one
high rate one. It is a digital process that allows several connections to share the high
bandwidth of a link. Each connection occupies a portion of time in the link. Digital data from
different sources are combined into one timeshared link.
Multiple data signals can be transmitted over a single frequency. It allows its users to
full bandwidth and transmits signals all the time using a unique Code.
49
Review Questions
50
Unit 4
TCP/IP
Unit Objectives
History of TCP/IP
The TCP/IP protocol was deployed to the ARPANET network with some persuasions.
Not all sites were preparing to convert over their protocols, so Cerf, Jon Postel, and
the TCP/IP team turned off the NCP network channel on the ARPANET IMP’s for a
full day in mid1982, so that only sites using TCP/IP could still operate. To emphasize
the point, they disabled NCP again for two days later that fall. The full switchover to
TCP/IP was performed on January 1, 1983, without too many problems although a
few recalcitrant sites were done as long as three months while they retrofitted their
system.
In 1984, the US department of Defense made TCP/IP the standard for all military
computers networking, which gave it a high profile and stable funding.
In 1985, Dan Lynch and the Internet Architecture Board held a three-day workshop
on TCP/IP for the computer industry, which was attended by about 50 researchers
and 250 vendor representatives.
In September 1988, Lynch organized an Internet convention that later became the
Interop trade show. Fifty companies were invited to the first show to demonstrated
interoperation of their TCP/IP packages, and five thousand engineers attended. The
interoperability demonstration was successful, validating TCP/IP’s open design and
showing that the network standard could became a multi-vendor product.
Internet protocols were first developed in the mid-1970’s, when the Defense
Advanced Research Projects Agency (DARPA) became interested in establishing a
packet-switched network that would facilitate communication between dissimilar
computer systems at research institutions. With the goal of heterogeneous
connectivity in mined, DARPA funded research by Stanford University and Bolt,
Beranek, and Newman (BBN). The result of this development effort was the internet
protocol suite, completed in the late 1970’s.
TCP/IP later was included with Berkeley Software Distribution(BSD) UNIX and has
since become the foundation on which the Internet and the World Wide Web (WWW)
are Based.
Is the basic communication language or protocol of the Internet.
Can be used as a communications protocol in a private network (either an intranet or
an extranet)
52
Unit 4 TCP/IP
When you are set up with direct access to the Internet, your computer is provided with
a copy of the TCP/IP program just as every other computer that you may send
messages to or get information from also has a copy of TCP/IP.
Higher Layer
is the TCP
Endures the safe delivery at the destination & the assembling of all the packets to get
the complete lot of data at the destination computers.
Lower Layer
is the IP
Each gateway computer on the network checks this address to see where to forward
messages. Even though some packets from the same message are routed differently
than others, they’ll be reassembled at the destination.
Application Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
53
Unit 4 TCP/IP
APPLICATION LAYER
There are many applications in the TCP/IP suite of protocols. Some of the most
useful ones are for sending mail (SMTP), transferring files (FTP), and displaying web
pages (HTTP).
Another important application layer protocol is the Domain Name System (DNS).
Domain names are significant because they guide users to where they want to go on
the Internet.
A. Domain Name System
Name servers contain information on some segment of the DNS and make that
information available to clients who are called RESOLVERS.
Every TCP/IP implementation has a software routine called NAME RESOLVERS
(NR) to request a DNS lookup from a name server (NS).
Recursive resolution- NR asks NS to resolve names for which it does not have an
authoritative answer by querying other name servers.
Iterative resolution- NR asks NS to provide the IP address of a NS that can provide
an authoritative solution.
54
Unit 4 TCP/IP
Source port address: is the address of the application program that has created the
message.
Destination port address: is the address of the application program that will receive
the message.
Total Length: defines the total length of the user datagram in bytes.
Checksum: is a 16-bit field used in error detection.
55
Unit 4 TCP/IP
o The client asks for a connection by sending a TCP segment with a SYN
control bit set.
o The server responds with its own SYN segment that includes identifying
information that was sent by the client in the initial SYN segment.
o The client acknowledges the server’s SYN segment.
TCP Header
Every TCP segment has a header. The header comprises all necessary information
or reliable, complete delivery of data. Among other things, such as IP addresses, the
header contains the following fields:
o Sequence Number. This 32-bit number contains either the sequence number
of the first byte of data in this particular segment or the Initial Sequence
Number (ISN) that identifies the first byte of data that will be sent for this
particular connection. The sequence number s used to ensure the data is
reassembled in the proper order before being passed to an application
protocol.
o Acknowledgement Number.This 32-bit number is the other host sequence
number +1 of the last successfully received byte of data. It is the sequence
number of the next expected byte of data.
3 ADDRESSING STRATEGIES
1. Table lookup
2. Translation performed by a mathematical function.
ARP employs the third strategy, message exchange. ARP defines a request and a
response. Only the computer whose IP address matches the request send a
response.
3. Message exchange
56
Unit 4 TCP/IP
DATA LINK
The main task of the data link layer is to take a raw transmission facility and transform
it into a line that appears free of transmission errors in the network layer. The data
link layer should provide error control between adjacent nodes.
Network Frames
o The basic unit of a physical network is a frame.
57
Unit 4 TCP/IP
CHARACTERISTICS OF TCP/IP
1. Connectionless. Signal transport path’s aren’t required to be continuously available.
2. Adaptive Routing Diversity. Transport paths and other network characteristics are
not fixed but learned and capable of being altered at any time.
3. Arbitrary Host Support. Any up to 4 billion connected host computers can arbitrarily
communicate with any others.
4. Arbitrary Service Support. Any service up to nearly 64 thousand can be
concurrently supported and delivered between or among any connected computer
hosts.
Another aspect of TCP/IP is a SLOW START, which takes place whenever a
connection is established. Slow-start is an artificial limit on the number of data
segments that can be sent before acknowledgement of those segments is received.
Slow-start is designed to limit network congestion. When a connection over Ethernet
is established, regardless of the receiver’s window size, a 4KB transmission can take
up to 3-4 RTT due to slow-start.
A TCP/IP optimization called the Nagle Algorithm can also limit data transfer speed
on a connection. The Nagle Algorithm is designed to reduce protocol overhead for
applications that send small amounts of data, such as Telnet, which sends a single
character at a time. Rather than immediately send a packet with lots of header and
little data, the stack waits for more data from the application, or an acknowledgement,
before proceeding.
When a TCP connection is closed, connection resources at the node that initiated the
close are put into a wait state, called TIME-WAIT. To guard data corruption if
duplicate packets linger in the network. These ensure both ends are finished with the
connection. This can cause duplication of resources required per-connection, such as
RAM and ports, when application open and close connections frequently.
58
Unit 4 TCP/IP
DATAGRAM
Basic unit (up to 65, 535 bytes)
Packets in IP Layer
Variable length packets with two parts namely the header and the data
IP Provides …
Addressing: IP headers contain 32 bit addresses, which identify the ending and
receiving hosts. These addresses are used by intermediate routers to select a path
though the network for the packet.
Fragmentation: IP packets maybe split, or fragmented into smaller packets. This
permits a large packet to travel across a network which can only handle smaller
packets. IP fragments and reassembles packets transparently.
Packet Time Out: Each IP packets contain a time to live (TTL) field, which is
decremented every time a routers handle a packet. If TTL reaches zero, the packet is
discarded, preventing packets from running in circles forever and flooding a network.
59
Review Questions
60
Unit 5
IPV6
Unit Objectives
IP Address Shortage
Network Address Translation- The network address translation (NAT) is the process of
modifying IP address information in IPv4 headers while in transit across a traffic routing
device.
62
Unit 5 IPV6
Explanation:
The NAT firewall shares 192.168.0 to host A, host B and host C While 192.168.1 shares to
host D, host E, host F, and host G.
63
Unit 5 IPV6
o If the same internal host sends a packet even with the same source address
and port but to a different destination, a different mapping is used.
o Only an external host that receives a packet from an internal host can send a
packet back.
Explanation:
Each request from the same internal IP address and port to a specific destination IP address
and port is mapped to a unique external source IP address and port; if the same internal host
sends a packet even with the same source address and port but to a different destination, a
different mapping is used.
Only an external host that receives a packet from an internal host can send a packet back.
64
Unit 5 IPV6
IPv6 Addresses
IPv6 addresses are 16 byte integers (128 bits) used for uniquely identifying a host
on a network, and thus permitting the routing of IP packets between hosts.
An IPv6 address is represented as eight groups of four hexadecimal digits, each
group representing 16 bits (two octets).
The groups are separated by colons (:)
Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Leading zeroes in a group may be omitted.
IPv6 uses Classless Inter-Domain Routing (CIDR) to separate network ID from Host
ID in an IP address
A network is denoted by the first address in the block (ending in all zeroes), a slash
(/), and a decimal value equal to the size in bits of the prefix.
For example, the network written as 2001:db8:1234::/48 has 48 bits in network ID
65
Unit 5 IPV6
66
Unit 5 IPV6
Extension headers carry optional Internet layer information, and are placed between
the fixed header and the upper-layer protocol header. The headers form a chain,
using the Next Header fields. The Next Header field in the fixed header indicates the
type of the first extension header; the Next Header field of the last extension header
indicates the type of the upper-layer protocol header in the payload of the packet.
All extension headers are a multiple of 8 octets in size; some extension headers
require internal padding to meet this requirement.
Hop-by-hop options and destination options- The Hop-by-Hop Options extension
header needs to be examined by all nodes on the packet's path, including sending
and receiving nodes. The Destination Options extension header need to be examined
by the destination node(s) only. The extension headers are both at least 8 octets in
size; if more options are present than will fit in that space, blocks of 8 octets are
added to the header repeatedly—containing options and padding—until all options
are represented.
Options (variable) -Contains one or more options, and optional padding fields to
align options and to make the total header length a multiple of 8 octets. Options are
TLV-coded
67
Review Questions
1. What is an IPv6?
68
Unit 6
The 7 OSI Model
Unit Objectives
This model, published in 1984, was developed by the International Organization for
Standardization (ISO) in an effort to standardize the diverse network systems.
Defines a networking framework to implement protocols in seven layers.
70
Unit 6 The 7 OSI Model
71
Unit 6 The 7 OSI Model
72
Review Questions
3. What are the difference between each of the seven different OSI Model?
73
Unit 7
Collision Free Protocols
Unit Objectives
Collisions in any system adversely affect the overall system performance. This can be
observed especially when the distance between stations is large and the packet length is
short.
Two Collision free protocols
1. A bit-map protocol– let there N stations each having unique address 0 to N-1 and
contention period is equally divided into N slots. The station that wants to transmit is
broadcast on the channel, before the actual transmission, also called as reservation
protocol.
2. Binary count down– used to overcome the overhead 1 bit per station.
Contention Systems - multiple users share a common channel in a way that can
lead to conflicts.
Limited Contention Protocols – combines the best properties of the contention and
collision-free protocols.
75
Unit 7 Collision Free Protocol
Two Channels:
Narrow Channel – provided as a control channel to signal the station.
Wide Channel – the station can output data frames.
76
Unit 7 Collision Free Protocol
77
Unit 7 Collision Free Protocol
78
Unit 7 Collision Free Protocol
The Institute of Electrical and Electronics Engineers (IEEE) publish several widely
accepted LAN-recommended standards. These standards are very important because they
encourage the use of common approaches for LAN protocols and interfaces.
Fast Ethernet
The IEEE 802.3u standard was approved in 1995 to provide Ethernet LANs operating
at 100Mbps. The systems that operate under this standard are known as Fast Ethernet. To
maintain compatibility with existing standards, the frame format, interfaces, and procedures
have been kept the same.
Gigabit Ethernet
The IEEE 802.3z Gigabit Ethernet standard was completed in 1998 and established
an Ethernet LAN that increased the transmission speed over that of Fast Ethernet by a factor
of 10. The goal was to define new physical layers but to again retain the frame structure and
procedures of the 10 Mbps IEEE 802.3 standard.
10 Gigabit Ethernet
Is defined only for full-duplex mode providing a point-to-point Ethernet connectivity
service with the CSMA/CD algorithm disabled.
79
Unit 7 Collision Free Protocol
80
Unit 7 Collision Free Protocol
81
Review Questions
82
Unit 8
Wireless
Unit Objectives
Wireless
Implications
Different mechanisms needed
o Physical layer
Different knobs: antennas, transmission power, encodings
o Link Layer
Distributed medium access protocols
Topology awareness
o Network, Transport Layers
Routing, forwarding
o Most advances do not abstract away the physical and link layers
Physical Layer
Specifies physical medium
o Ethernet: Category 5 cable, 8 wires, twisted pair, R45 jack
o WiFi wireless: 2.4GHz
Specifies the signal
o 100BASE-TX: NRZI + MLT-3 encoding
84
Unit 8 Wireless
Interference
External sources
o E.g., 2.4GHz unlicensed ISM band
o 802.11
o 802.15.4 (ZigBee), 802.15.1 (Bluetooth)
o 2.4GHz phones
o Microwave ovens
Internal sources
o Nodes in the same network/protocol can (and do) interfere
85
Unit 8 Wireless
Multipath
o Self-interference (destructive)
Multipath
Remember Shannon?
C–Capacity
Shannon-Hartley B–maximum frequency of signal
M–number of discrete “levels” per symbol
C = 2B log2(M) bits/sec (1)
But noise ruins your party
C = B log2(1 + S/N) bits/sec (2)
(1) ≤ (2) => M ≤ √1 + S/N
Noise limits your ability to distinguish levels
o For a $xed modulation, increases Bit Error Rate (BER)
Could make signal stronger
o Uses more energy
o Increases interference to other nodes
Wireless Modulation/Encoding
More complex than wired
Modulation, Encoding, Frequency
o Frequency: number of symbols per second
o Modulation: number of chips per symbol
86
Unit 8 Wireless
Example
o 802.11b, 1Msps: 11Mcps, DBPSK, Barker Code
1 chip per symbol, 11 chips/bit
o 802.11b, 2Msps: 11Mcps, DQPSK, Barker Code
2 chips per symbol, 11 chips/bit
Link Layer
Medium Access Control
o Should give 100% if one user
o Should be efficient and fair if more users
Ethernet uses CSMA/CD
o Can we use CD here?
No Collision happens at the receiver
Protocols try to avoid collision in the first place
Hidden Terminals
A can hear B and C
B and C can’t hear each other
They both interfere at A
B is a hidden terminal to C, and
vice-versa
Carrier sense at sender is
useless
Exposed Terminals
A transmits to B
C hears the transmission, backs off,
even though D would hear C
C is an exposed terminal to A’s
transmission
Why is it still useful for C to do CS?
87
Unit 8 Wireless
Key points
No global view of collision
o Different receivers hear different senders
o Different senders reach different receivers
Collisions happen at the receiver
Goals of a MAC protocol
o Detect if receiver can hear sender
o Tell senders who might interfere with receiver to shut up
RTS/CTS
Idea: transmitter can check availability of channel at receiver
Before every transmission
o Sender sends an RTS (Request-to-Send)
o Contains length of data (in time units)
o Receiver sends a CTS (Clear-to-Send)
o Sender sends data
o Receiver sends ACK after transmission
If you don’t hear a CTS, assume collision
If you hear a CTS for someone else, shut up
88
Unit 8 Wireless
Benefits of RTS/CTS
Solves hidden terminal problem
Does it?
o Control frames can still collide
o E.g., can cause CTS to be lost
o In practice: reduces hidden terminal problem on data packets
Drawbacks of RTS/CTS
Overhead is too large for small packets
o 3 packets per packet: RTS/CTS/Data (4-22% for 802.11b)
RTS still goes through CSMA: can be lost
CTS loss causes lengthy retries
33% of IP packets are TCP ACKs
In practice, WiFi doesn’t use RTS/CTS
89
Unit 8 Wireless
Network Layer
What about the network topology?
Almost everything you use is single hop!
o 802.11 in infrastructure mode
o Bluetooth
o Cellular networks
o WiMax (Some 4G networks)
Why?
o Really hard to make multihop wireless efficient
90
Unit 8 Wireless
Routing
Routing in ad-hoc networks has had a lot of research
o General problem: any-to-any routing
o Simplified versions: any-to-one (base station), one-to any (dissemination)
DV too brittle: inconsistencies can cause loops
91
Unit 8 Wireless
DSDV
Destination Sequenced Distance Vector
Charles Perkins (1994)
Avoid loops by using sequence numbers
Each destination increments own sequence number
Many Others
DSR, AODV: on-demand
Geographic routing: use nodes’ physical location and do greedy routing
Virtual coordinates: derive coordinates from topology, use greedy routing
Tree-based routing with on-demand shortcuts
Routing Metrics
How to choose between routes?
Hopcount is a poor metric!
o Paths with few hops may use long, marginal links
o Must find a balance
All links do local retransmissions
Idea: use expected transmissions over a link as its cost!
o ETX = 1/(PRR) (Packet Reception Rate)
o Variation: ETT, takes data rate into account
92
Unit 8 Wireless
Multihop Throughput
Only every third node can transmit!
o Assuming a node can talk to its immediate neighbors
(1) Nodes can’t send and receive at the same time
(2) Third hop transmission prevents second hop from receiving
(3) Worse if you are doing link-local ACKs
In TCP, problem is worse as data and ACK packets contend for the channel!
Not to mention multiple crossing & flows!
Sometimes you can’t (or shouldn’t) hide that you are on wireless!
Three examples of relaxing the layering abstraction
4B Link Estimator
93
Unit 8 Wireless
Summary
Wireless presents many challenges
Across all layers
Encoding/Modulation (we’re doing pretty well here)
o Distributed multiple access problem
o Multihop
Most current protocols sufficient, given over provisioning (good enough syndrome)
Other challenges
o Smooth handoff between technologies (3G, Wifi, 4G…)
o Low-cost, long range wireless for developing regions
o Energy usage
94
Review Questions
95
Unit 9
Routing
Unit Objectives
Routing
The process of moving packets across a network from one host to a another
The process of selecting best pathsin a network
Confused with bridging, which performs a similar function
Enable data to pass from one computer to another
Performed many kinds of networks, including the telephone network (circuit
switching), electronic data networks (such as the Internet), and transportation
networks
WHAT IS FLOODING?
Simple routing technique in computer network
A Denial of Service (DOS)is designed to bring a network or service down by flooding
it with large amounts of traffic
Distribute routing information updates quickly to every node in a large network
EXAMPLE:
*RIP (routing information protocol)
*IGRP (interior gateway routing
protocol) and
*EIGRP (enhanced IGRP).
97
Unit 9 Routing
LINK-STATE ROUTING
Used in packet switching networks for computer communications
Open Shortest Path First (OSPF) is a routing protocol for Internet Protocol (IP)
networks. It uses a link state routing algorithm and falls into the group of interior
routing protocols, operating within a single autonomous system (AS).
HIERARCHICAL ROUTING
Reduce memory requirements of simulations over very large topologies
o topology is broken down into several layers of hierarchy
o If A wants to send packets to any router in region 2 (D, E, F or G), it sends
them to B, and so on. As you can see, in this type of routing, the tables can be
98
Unit 9 Routing
99
Unit 9 Routing
Broadcast Routing
Refers to a method of transferring a message to all recipients simultaneously
Perform high level operation
Avoid flooding duplicates
Sending updates to all receivers
Multicast Routing
One-to-many or many-to-many distribution
Used to distribute data (for example, audio/video streaming broadcasts)
Send a single copy of data to a single multicast address
100
Unit 9 Routing
101
Review Questions
2. Contrast and compare distance vector routing with link state routing?
102
Unit 10
DNS, HTTP
Unit Objectives
Application Layer
In computer network, the application layer is used to name the protocols and methods
designed for process-to-process communications across an Internet Protocol (IP)
computer network.
Application layer protocols use the underlying transport layer protocols to establish
host-to-host connections.
104
Unit 10 DNS, HTTP
Top-level domains
The country code top-level domains (ccTLD) based on the two-character territory
codes of country abbreviations.
In addition, a group of seven generic top-level domains (gTLD) was implemented
which represented a set of categories of names and multi-organizations.
These were the domains gov, edu, com, mil, org, net, and int.
105
Unit 10 DNS, HTTP
Resource Records
When a resolver gives a domain name to DNS, what it gets back are the resource
records associated with that name.
A resource record is a five-tuple.
o Domain_name
o Time_to_live
o Class (For Internet information, it is always IN)
o Type
o Value
106
Unit 10 DNS, HTTP
DNS Queries
When a resolver has a query about a domain name, it passes the query to one of the
local name servers.
If the domain being sought falls under the same branch, it returns an authoritative
resource records.
An authoritative record is one that comes from the authority that manages the record
and is thus always correct.
Authoritative records are in contrast to cached records, which may be out of date.
(Non-authoritative)
107
Unit 10 DNS, HTTP
Architectural Overview
The Web consists of a vast, worldwide collection of documents or web pages.
Users can follow a link by clicking on it
The idea of having one page point to another is called hypertext
Client Side
The browser determines the URL (by seeing what was selected).
The browser asks DNS for the IP address of www.itu.org.
DNS replies with the corresponding IP ( 156.106.192.32)
The browser makes a TCP connection to port 80 on 156.106.192.32.
It then sends over a request asking for file /home/index.html.
The www.itu.org server sends the file /home/index.html.
The TCP connection is released.
108
Unit 10 DNS, HTTP
Server Side
Accept a TCP connection from a client (a browser).
Get the name of the file requested.
Get the file (from disk).
Return the file to the client.
Release the TCP connection.
109
Unit 10 DNS, HTTP
HTTP Commands
Http Request Message
Example HTTP
Command
GET /somedir/page.html
HTTP/1.1
Connection: close
User-agent: Mozilla/4.0
Accept: text/html,
image/gif, image/jpeg
Accept-language:en
110
Unit 10 DNS, HTTP
Status Codes
200 OK: Request succeeded and the information is returned in the response.
301 Moved Permanently: Requested object has been permanently moved; new URL
is specified in Location: header of the response message. The client software will
automatically retrieve the new URL.
400 Bad Request: A generic error code indicating that the request could not be
understood by the server.
404 Not Found: The requested document does not exist on this server
505 HTTP Version Not Supported: The request HTTP protocol version is not
supported by the server.
Conditional GET
GET /fruit/kiwi.gif HTTP/1.0
User-agent: Mozilla/4.0
Accept: text/html, image/gif, image/jpeg
If-modified-since: Mon, 22 Jun 2010 09:23:24
========================================
HTTP/1.0 304 Not Modified
Date: Wed, 19 Aug 2010 15:39:29
Server: Apache/1.3.0 (Unix)
(empty entity body)
111
Review Questions
112
Unit 11
Application Layer
Unit Objectives
Network Security
Security is a broad topic and covers a multitude of sins. In its simplest form, it is
concerned with making sure that nosy people cannot read, or worse yet modify messages
intended for other recipients. It is concerned with people trying to access remote services
that they are not authorized to use. It also deals with how to tell whether that message
purportedly from IRS saying: “Pay by Friday or else” is really from the IRS or from the Mafia.
Security also deals with the problems of legitimate messages being captured and replayed
and with people trying to deny that they sent certain messages.
Most security problems are intentionally caused by malicious people trying to gain
some benefit or harm someone. A few of the most common perpetrators are listed. It should
be clear from this list that making a network secure involves a lot more than just keeping it
free of programming errors. It involves outsmarting often intelligent, dedicated and
sometimes well-funded adversaries. It should also be clear that measures that will stop
casual adversaries will have little impact on the serious ones.
Adversary Goal
Student To have fun snooping on people’s email
Hacker To test out someone’s security system; steal data
Sales rep To claim to represent all of Europe, not just Andorra
Businessman To discover a competitor’s strategic marketing plan
Ex-employee To get revenge for being fired
Accountant To embezzle money from a company
Stockbroker To deny a promise made to a customer by e-mail
Conman To steal credit card numbers for sale
Spy To learn an enemy’s military strength
Terrorist To steal germ warfare secrets.
Network security problems can be divided roughly into four intertwined areas:
secrecy, authentication, non repudiation, and in integrity control. Secrecy has to dowith
keeping information out of the hands of unauthorized users. This is what usually comes to
mind when people think about network security. Authentication deals with determining
114
Unit 11 Application Layer
whom you are talking to before revealing sensitive information or entering into a business
deal. Non repudiation deals with signatures: How do you prove that your customer really
placed an electronic order for ten million left-handed doohickeys at 89 cents each when he
later claims the price was 69 cents? Finally, how you can be sure that message you received
was really the sent and not something that malicious adversary modified in transit or
concocted?
In the data link layer, packets on a point-to-point line can be encoded as they leave
one machine and decoded as they enter another. All details can be handled in the data link
layer, with higher layers oblivious to what is going on. This solution breaks down when
packets have to transverse multiple routers, however, because packets have to be decrypted
at each router, leaving them vulnerable to attacks from within the router. Also, it does not
allow some sessions to be protected (e.g., those involving on-line purchases by credit card)
and others not. Nevertheless, link encryption, as this method is called, can be added to any
network easily and is often useful.
In the network layer, firewalls can be installed to packets in or keep packets out. In
the transport layer, entire connections can be encrypted, end to end, that is process to
process. Although these solutions help with secrecy issues and many people are working
hard to improve them, none of them solve the authentication or non repudiation problem in a
sufficiently general way. To tackle these problems, the solutions must be in the application
layer.
Security Attacks
“Security attack is any action that comprises the security of “information” owned by an
organization.”
ATTACK: An attempted cryptanalysis is termed as an attack.
115
Unit 11 Application Layer
1. Active Attacks
An active attack attempts to alter the system resources or affect their operation.
Active attack involves some modification of the data stream or the creation of a false
stream.
2. Passive Attacks
“A passive attack attempts to learn or make use of information from the system but
does not affect system resources.”
Note: Passive attacks are very difficult to detect because they do not involve any alteration
of the data, these can be prevented by means of encryption. Active attacks are quite difficult
to prevent absolutely because to do so requires physical protection of all communication
facilities and paths at all times.
116
Unit 11 Application Layer
Security Services
“Security services are the services that enhance the security of the data processing
system and the information transfers of an organization”.
The services are intended to counter the security attacks and they make use of one
or more security mechanisms to provide the service.
2. Data Integrity. If a received communication is exactly what the sender party has send
(i.e., Contain no modification, insertion, deletion or replay etc.) then it is said to have
integrity. Therefore, the parties must be able to assure themselves that the message they
received is exactly what the other party has sent.
117
Unit 11 Application Layer
4. Access Control.The prevention of unauthorized use of a resource i.e., this service controls
who can have access to a resource, under what conditions access can occur and what those
accessing the resources are allowed to do.
Access Control is the ability to limit to limit and control the access to host systems and
applications via communication links.
Security Mechanisms
Security mechanisms are that which are designed to detect, prevent or recover from a
security attack.
Mechanisms are divided into those that are implemented in a specific protocol layer
and to those that are not specific to any particular protocol layer or security service.
118
Unit 11 Application Layer
iii. Access Control. A variety of mechanisms that enforce access rights to resources.
iv. Data Integrity. A variety of mechanisms used to assure the integrity of a data unit
or stream of data units.
v. Authentication Exchange. A mechanism intended to ensure the identity of an
entity by means of information exchange.
vi. Traffic Padding. The insertion of bits into gaps in a data stream to frustrate traffic
analysis attempts.
vii. Routing Control. Enables selection of particular physically secure routes for
certain data and allows routing changes, especially when a breach of security is
suspected.
viii. Notarization. The use of a trusted third party to assure certain properties of a data
exchange.
Authentication
Authentication plays a very important role in PPP because PPP is designed for use
over dial-up links where verification of user identity is necessary. Authentication means
validating the identity of a user who needs to access a set of resources. PPP has created
two protocols for authentication: Password Authentication Protocol (PAP) and Challenge
Handshake Authentication Protocol (CHAP).
119
Unit 11 Application Layer
PAP
The Password Authentication Protocol (PAP) is a simple authentication with a two-step
process:
The user who wants to access a system sends authentication identification (usually
the user name) and a password.
The system checks the validity of the identification and password and either accepts
or denies connection.
PAP Packets
PAP packets are encapsulated in a PPP frame. What distinguishes a PAP packet
from other packets is the value of the protocol field, C02316. There are three PAP packets:
authenticate-request, authenticate-ack, and authenticate-nak. The first packet is used by the
user to send the user name and password. The second is used by the system to allow
access. The third is used by the system to deny access.
CHAP
The Challenge Handshake Authentication Protocol (CHAP) is a three way
handshaking authentication protocol that provides more security than PAP. In this method,
the password is kept secret: it is never sent on line.
The system sends to the user a challenge packet containing a challenge value,
usually a few bytes.
The user applies a predefined function that takes the challenge value and the user’s
own password and creates a result. The user sends the result in the response packet
to the system.
The system does the same. It applies the same function to the password of the user
(known to the system) and the challenge value to create a result. If the result created
is the same as the result sent in the response packet, access is granted; otherwise, it
is denied.
CHAP is more secure than PAP, especially if the system continuously changes the
challenge value. Even if the intruder learns the challenge value and the result, the password
is still secret.
120
Unit 11 Application Layer
CHAP PACKETS
CHAP packets are encapsulated in the PPP frame. What distinguishes a CHAP
packet from other packets is the value of the protocol field, C22316. There are four CHAP
packets: challenge, response, success, and failure. The first packet is used by the system to
send the challenge value. The second is used by the user to return the result of the
calculation. The third is used by the system to allow access to the system. The fourth is used
by the system to deny access to the system.
Concept of SNMP
SNMP uses the concept of manager and agent. That is, a manager, usually a host,
controls and monitors a set of agents, usually routers.
SNMP is an application-level protocol in which a few manager stations control a set of
agents. The protocol is designed at the application level so that it can monitor devices made
by different manufacturers and installed on different physical networks. In other words,
SNMP frees management tasks from both the physical characteristics of the managed
devices and the underlying networking technology. It can be used in a heterogeneous
internet made of different LANs and WANs connected by routers or gateways made by
different manufacturers.
121
Unit 11 Application Layer
number of packets received and forwarded. The manager can fetch and compare the values
of these two variables to see if the router is congested or not.
The manager can also make the router perform certain actions. For example, a router
periodically checks the value of a reboot counter to see when it should reboot itself. It
reboots itself, for example, if the value of the counter is 0. The manager can use this feature
to reboot the agent remotely at any time. It simply sends a packet to force a 0 value in the
counter.
Agents can also contribute to the management process. The server program running
on the agent can check the environment and, if it notices something unusual, it can send a
warning message (called a trap) to the manager.
In other words, management with SNMP is based on three basic ideas:
Components of SNMP
Management in the Internet is achieved not only through the SNMP protocol but also
by using other protocols that cooperate with SNMP. At top level, management is
accomplished with two other protocols: structure of management information (SMI) and
management information base (MIB). SNMP uses the services provided by these two
protocols to do its job. In other words, management is a team effort by SMI, MIB, and SNMP.
All three use other protocols such as abstract syntax notation 1 (ASN .1) and basic encoding
rules (BER).
122
Unit 11 Application Layer
SMI
The Structure of Management Information (SMI) is a component used in network
management. Its functions are to name objects; to define the type of data that can be stored
in an object, and to show how to encode data for transmission over the network.
MIB
The Management Information Base (MIB) is the second component used in network
management. Each agent has its own MIB, which is a collection of all the objects that the
manager can manage. The objects in the MIB are categorized under eight different groups:
system, interface, address translation, IP, ICMP, TCP, UDP, and EGP.
SNMP
Simple Network Management Protocol (SNMP) defines five messages: Get
Request, GetNextRequest, SetRequest, GetResponse, and Trap.
GetRequest
The GetRequest message is sent from the manager (client) to the agent (server) to
retrieve the value of a variable.
123
Unit 11 Application Layer
GetNextRequest
The GetNextRequest message is sent from the manager to the agent to retrieve the
value of a variable. The retrieve value is the value of the object following the defined object in
the message. It is mostly used to retrieve the values of the entries in a table. If the manager
does not know the indexes of the entries, it cannot retrieve the values. However, it can use
GetNextRequest and define the object.
GetResponse
The GetResponse message is sent from an agent to a manager in response to
GetRequest and GetNextRequest. It contains the value of the variable(s) requested by the
manager.
SetRequest
The SetRequest message is sent from the manager to the agent to set (store) a value
in a variable.
Trap
The trap message is sent from the agent to the manager to report an event. For
example, if the agent is rebooted, it informs the manager and reports the time of rebooting.
1. Managed Nodes
The manage nodes can be hosts, routers, bridges, printers, or any other devices
capable of communicating status information to the outside world. To be managed directly by
SNMP, a node must be capable of running as SNMP management process, called an SNMP
agent. All computers meet this requirement, as do increasingly many bridges, routers, and
124
Unit 11 Application Layer
peripheral devices designed for network use. Each agent maintains a local database of
variables that describe its state and history and affect its operation.
2. Management Stations
Network management is done from management stations, which are, in fact, general
purpose computers running special management software. The management stations
contain one or more process that communicate with the agents over the network, issuing
commands and getting responses. In this design, all the intelligence is in the management
stations, in order to keep the agents as simple as possible and minimize their impact on the
devices they are running on. Many management stations have a graphical user interface to
allow the network manager to inspect the status of the network and take action when
required.
Most real networks are multivendor, with hosts from one or more manufacturers,
bridges and routers from other companies, and printers from still other ones.
In order to allow a management station (potentially from yet another supplier) to talk
all these diverse components, the nature of the information maintained by all the devices
must be rigidly specified. Having the management station ask a router what its packet loss
rate is of no use if the router does not keep track of its loss rate. Therefore, SNMP describes
the extract information in each kind of agent has to maintain and the format it has to supply in
it. The largest portion of the SNMP model is the definition of who has to keep track of what
and how this information is communicated.
3. Management Information
Very briefly, each device maintains one or more variables that describe its state. In the
SNMP literature, these variables are called objects, but the term is misleading because they
are not objects in the sense of an object-oriented system because they have just state and
no methods. Nevertheless, the term is so ingrained that we will use it there. The collection of
all possible objects in a network is given in a data structure called MIB (Management
Information Base).
4. A Management Protocol
The management station interacts with the agents using the SNMP protocol. This
protocol allows the management station to query the state of an agent’s local objects, and
125
Unit 11 Application Layer
change them if necessary. Most of SNMP consists of this query response type
communication.
However, sometimes events happen that are not planned. Managed nodes can crash
and reboot, lines can go down and come back up, congestion can occur, and so on. Each
significant event is defined in a MIB module. When an agentnotices that a significant event
has occurred, it immediately reports the vent to all management stations in its configuration
list. This report is called an SNMP trap. The report usually just states that some event has
occurred. The model of polling at long intervals with acceleration on receipt of a trap is called
trap directed polling.
This model assumes that each managed node is capable of running an SNMP agent
internally. Older devices or devices not originally intended for use on a network may not have
this capability. To handle them, SNMP defines what is called proxy agent, namely an agent
that watches over one or more non SNMP devices and communicates with the management
station on their behalf, possibly communicating with the devices themselves using some
nonstandard protocol.
Finally, security and authentication play a major role in SNMP. A management station
has the capability of learning a great deal about every node under its control and also has
the capability of shutting them all down. Hence it is of great importance that agents can be
convinced that queries allegedly coming from the management station, in fact, come from the
management station.
Cryptography
The word cryptography comes from the two Greek Words KpuTM7- means hidden or
secret β Kripto.
3>Kå 5- means writing β Graph
“Cryptography is the art of secret writing”
“Cryptography is the art and science of keeping messages secure”
“Cryptography is a technique of encoding and decoding the message so they are not
understood by anybody except sender and receiver.”
Cryptography plays a very important role in Internet that is payment details, money
transfer contract documents and Business plans etc.
The method consisted of replacing the letters of alphabet in the original text by letters
that are of a fixed number of places away.
126
Unit 11 Application Layer
Plain- A B C D E F G H I J K L M N O P Q R S T U V
Code- C D E F G H I J K L M N O P Q R S T U V W X
Dimensions of Cryptography
Cryptography systems are characterized along three independent dimensions:
1. The type of operations used for transforming plain text to cipher text.
Encryption algorithm are based on two general principles:
a. Substitution
b. Transposition
2. The number of keys used
If both sender and receiver use the same keys the system is referred to as symmetric,
single- key secret key or conventional encryption. If the sender and receiver use the
different keys, the system is referred to as asymmetric, two- key or public key
encryption.
3. The way in which the plain text is processed.
There are two ways in which the plain text is processed:
a. Block Cipher
This processes the input one block off elements at a time, producing output block for
each input element.
b. Stream Cipher
This processes the input elements continuously producing output one element at
a time, as it goes along.
Some Terminologies
1. Cryptographers: who invent clever secret codes i.e., who practiced cryptography.
2. Cryptanalysts: Practitioners of cryptanalysis i.e., who attempt to break the codes.
3. Cryptology: The branch of mathematics encompassing both cryptography and
cryptanalysis.
4. Cryptologists: Practitioners of cryptology
Success of the cryptographers rests on the Fundamental Tenet of Cryptography
127
Unit 11 Application Layer
“If lots of smart people have failed to solve a problem, them it probably won’t be
solved (soon).”
128
Unit 11 Application Layer
Modes of Operation
A cryptographic mode usually combines the basic cipher, some sort of feedback and
some simple operations. The operations are simple because the security is the function of
the cipher and not the mode. There are five modes of operation which are discussed one by
one:
1. Electronic Code Book Mode (ECB)
129
Unit 11 Application Layer
Decryption Process
The cipher text block is passed through the decryption alga using the same key which
was used during the encryption process for all plain text block. The output of this step
is XOR’ed with the IV to produce the plain text.
Application.Authentication General Purpose block oriented transmission.
130
Unit 11 Application Layer
Step 3. Now the bits of IV are shifted left by j position. The rightmost j bit position of
the IV contains unpredictable data or vacant bits which are filled by the cipher text
created in the previous step.
Step 4. Repeat steps 1, 2, and 3 until the plain text fully encrypted.
Application.Authentication, General purpose stream oriented transmission.
131
Unit 11 Application Layer
Advantages:
1. Hardware efficiency 4. Random access
2. Software efficiency 5. Provable security
3. Preprocessing 6. Simplicity
Types of Cryptography
There are two types of cryptography: Secret key encryption/ cryptography and Public key
encryption/ cryptography.
Problems
Secret key encryption has number of problems:
1. One problem is that of key agreements and distributions
In the first place, how do two parties agree on a key one way is for somebody from
the sender. Say A to physically visit the receiver say B, handover the key.
Another way is to courier a paper on which the key is written.
A third way is to send the key over the network to be and ask for the confirmation but
then if an intruder gets the message he can interpret the subsequent message.
2. Second problem is that the same key is used for encryption and decryption, one
key per communicating parties is required.
Solution:
DES (Data Encryption Standard) specifies a method for encrypting. A way is simple to
use DES -3, where key 1 is used to encrypt first, key 2 is used to re encrypt the
encrypted lock and key is used once again to re encrypt doubly encrypted block.
132
Unit 11 Application Layer
133
Unit 11 Application Layer
134
Review Questions
135
Unit 12
Security
Unit Objectives
137
Unit 12 Security
138
Unit 12 Security
Attack on Availability
Destroy hardware (cutting fiber) or software
Modify software in a subtle way
Corrupt packets in transit
139
Unit 12 Security
140
Unit 12 Security
141
Unit 12 Security
Cryptographic Toolkit
Confidentiality: Encryption
Integrity: ?
Authentication: ?
Provenance: ?
142
Unit 12 Security
143
Unit 12 Security
Cryptographic Toolkit
Confidentiality: Encryption
Integrity: Cryptographic Hash
Authentication: ?
Provenance: ?
144
Unit 12 Security
Cryptographic Toolkit
Confidentiality: Encryption
Integrity: Cryptographic Hash
Authentication: Decrypting nonce
Provenance: ?
Digital Signatures
Suppose Alice has published public key KE
If she wishes to prove who she is, she can send a message x encrypted with her
private key KD
o Therefore: anyone w/ public key KE can recover x, verify that Alice must have
sent the message
o It provides a digital signature
o Alice can’t deny later deny it non-repudiation
145
Unit 12 Security
146
Unit 12 Security
Managing Trust
The most solid level of trust is rooted in our direct personal experience
o E.g., Alice’s trust that Bob is who they say they are
o Clearly doesn’t scale to a global network!
In its absence, we rely on delegation
o Alice trusts Bob’s identity because Charlie attests to it ….
o …. and Alice trusts Charlie
Trust is not particularly transitive
o Should Alice trust Bob because she trusts Charlie …
o … and Charlie vouches for Donna …
o … and Donna says Eve is trustworthy …
o … and Eve vouches for Bob’s identity?
147
Unit 12 Security
To publish a public key, ask the CA to digitally sign a statement indicating that
they agree (“certify”) that it is indeed your key
o This is a certificate for your key (certificate = bunch of bits)
Includes both your public key and the signed statement
o Anyone can verify the signature
Delegation of trust to the CA
o They’d better not screw up (duped into signing bogus key)
o They’d better have procedures for dealing with stolen keys
o Note: can build up a hierarchy of signing
Components of a PKI
Digital Certificate
Signed data structure that binds an entity with its corresponding public key
o Signed by a recognized and trusted authority, i.e.,
148
Unit 12 Security
Certification Authority
People, processes responsible for creation, delivery and management of digital
certificates
Organized in an hierarchy
o To verify signature chain, follow hierarchy up to root
Registration Authority
People & processes responsible for:
o Authenticating the identity of new entities (users or computing devices), e.g.,
By phone, or physical presence + ID
o Issuing requests to CA for certificates
The CA must trust the Registration Authority
o This trust can be misplaced
Certificate Repository
A database accessible to all users of a PKI
Contains:
o Digital certificates
o Policy information associated with certs
o Certificate revocation information
149
Unit 12 Security
150
Unit 12 Security
151
Unit 12 Security
DNS Security
Redirection for these domain names to Verisign web portal: “to help you search”
o and serve you ads…and get “sponsored” search
152
Unit 12 Security
Solutions
153
Unit 12 Security
154
Review Questions
155
References
Books:
Peterson, Larry, et.al. (2012). Computer Networks: A System Approach 5th Edition. Elseview,
Inc. 850p.
Tittel, Ed. (2002). Schaum’s Outline of Theory and Problems of Computer Networking.
McGraw-Hill Companies, Inc. 318p.
Online Reference:
156
Appendix A
Course Syllabus
COMPUTER NETWORKS
Course Description
Course Objectives
157
Appendix A
Course Outline
I. Computer Networks
II. Network Architecture
III. Data Communication Concept
IV. TCP/IP
V. IPV6
VI. The 7 Open Systems Interconnection (OSI) Model
VII. Collision Free Protocols
VIII. Wireless
IX. Routing
X. DNS, HTTP
XI. Application Layer
XII. Security
158
Appendix B
Committee Certification
This is to certify that Mr. Jose Mari N. Cabading, a faculty member of the
College of Information Technology, had developed an instructional material for the
course Computer Networks.
This certifies further that the said worktext was reviewed, evaluated and
approved by the members of the Instructional Materials Evaluation Committee of the
College of Information Technology and deemed useful for the said course.
DANNILYN U. MACATO
Technical Writer
EDUARDO C. CORPUZ
Dean
___________________________
Date Approved
159
Appendix C
Systemof Evaluation of Instructional Materials
COLLEGE LEVEL:
The faculty develops an instructional material based from the syllabus and submits it
for evaluation.
The instructional material shall be evaluated by the College Instructional Material
Evaluation Committee (IMEC) composed of the Department Chairperson as
Chairman and two (2) members from the College Pool of Faculty, one (1) subject
specialist and one (1) technical writer.
CAMPUS LEVEL:
After the instructional material has been evaluated by the college IMEC, it will be
forwarded to the Office of Instruction.
The Head for Instruction will convene the members of the Campus IMEC. The
Campus IMEC is composed of the Head of Instruction as chairman and two
members, 1 subject specialist and 1 technical writer.
The instructional material will be forwarded to the University Instructional Material
Evaluation Committee (U-IMEC).
UNIVERSITY LEVEL:
After the process of evaluation, the instructional material will be returned back to the
College with a certification that it went through a series of evaluation.
The instructional material shall be evaluated based from its functionality and validity.
College Instructional
Office of Instruction
Faculty Material Evaluation
Committee
160
Appendix C
DEPARTMENT
CHAIRPERSON
SUBJECT
TECHNICAL WRITER
SPECIALIST
161
Appendix D
Proof of Utilization
This is to certify that the Instructional Materialdeveloped by Jose Mari N. Cabading of the
College of Information Technology, is utilized as a Worktext in the course Computer Networks
for the 2ndSemester of School Year 2015 - 2016.
RUBYLYN C. NARRA
Campus Librarian
_______________
Date Signed
162