CNS Co1
CNS Co1
CNS Co1
© 2020-21 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 1
Session-2
Introduction
© 2020-21 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED
2
1.0 Technology Revolution
3
What is a Computer Network
◆A set of communication elements connected by
communication links
router
workstation
➭ Communication elements server
● Computers, printers, mobile phones, … mobile
● Routers, switches, ... local ISP
➭ Communication links
● optic fiber
● coaxial cable regional ISP
● twisted pair
● wireless (radio, microwave, satellite)
➭ Topologies
● Ring, Star, Bus, Tree, Mesh
company
4 network
What is a Computer Network
◆ A software/hardware infrastructure
➭ Share resources
● data, files, computing power, video,…
➭ Information highway
● communication between geographically dispersed users
➭ Electronic Society
● Cyberspace
● Virtual global nation
5
Introduction
⚫ Computer Network
– an interconnected collection of autonomous computers
Internet: “network of networks”
– loosely hierarchical
– public Internet versus private intranet
WWW a distributed systems run on the top of Internet
⚫ Distributed System
– High degree of cohesiveness and transparency
– A software system built on top of a network
6
1.1 Uses of Computer Networks
•Business Applications
•Home Applications
•Mobile Users
•Social Issues
7
Business Applications of Networks
a. Resource sharing (hardware, software, information, …)
b. Providing communication medium (e-mail, videoconferenceing)
c. Doing business electronically (B2B, B2C, e-commerce)
8
Goals of Networks for Companies
⚫ Resource sharing: equipment, programs, data
⚫ high reliability
– replicated data
– hardware
⚫ Saving money
– mainframe: 10 times faster, but 1000 times more expensive than PC
– client-server model
⚫ Scalability
– mainframe: replace a larger one
– client-server model: add more servers
⚫ Communication medium for separated employees
9
Business Applications of Networks (2)
a. Two processes are involved
b. A communication network is needed
• The client-server model involves requests and replies.
10
Session-3
Introduction
© 2020-21 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED
11
Home Network Applications
12
⚫ Networks for People
– Access to remote information
• e.g.: financial, shopping, customized newspapers, on-line digital library,
WWW
– Person-to-person communication
• email, video conference, newsgroup
– Interactive entertainment
• VOD, interactive movies or TVs, game playing
13
Home Network Applications (2)
• In peer-to-peer system there are no fixed clients and servers.
14
Home Network Applications (3)
• Some forms of e-commerce.
15
Mobile Network Users
• Combinations of wireless networks and mobile computing.
mobile-commerce
16
Social Issues
•Politics
•Religion
•Sex
•Privacy
•Crime
•junk mail, ill-information
Each country has different laws.
Debate rages!
17
Session-4
Introduction
© 2020-21 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED
18
Network Hardware
19
Network Hardware
20
Network Hardware
– Broadcast networks
• single communication channel shared by all machines
• broadcasting or multicasting (via packets)
– broadcasting: a special code in address field
– multicasting: reserve one bit to indicate multicasting, the remaining n-1address
bits can hold a group number. Each machine can subscribe to any groups
• used by localized networks (or satellites)
– point-to-point networks
• many hops
• routing algorithms: multiple routs are possible
• used by large networks
21
Classification of interconnected processors by scale
22
Local Area Networks (LANs)
· Characterics of LANs: (a) privated-owned, (b) small size,
(c) transmission technology, (d) topology
· Ethernets are most popular (up to 10 Gb/s)
24
Metropolitan Area Networks
• A metropolitan area network based on cable TV.
25
Wide Area Networks (WANs)
·WANs are point-to-point networks
·WANs consist of two distinct components:
transmission lines (copper, fiber, microwave) and switches (electronics, optics)
Store-and-forward or packet-switched subnet
27
Subnet (WANs)
• Subnet (WANs) is consists of two components:
• transmission lines (circuits, channels, trunks)
• move bits between machines
• switching elements
• connect transmission lines
• Router: also called packet switching nodes, intermediate systems, and data switching
exchanges
• Operate in store-and-forward, or packet-switched mode.
28
Wide Area Networks (2)
• A stream of packets from sender to receiver. (virtual- circuit)
29
9/17 End
Wireless Networks
30
Wireless Networks (2)
33
⚫ Fundamentally different properties
1. Devices have to be easy to install
2. The network and devices have to be foolproof in
operation
3. Low price is essential
4. The network needs sufficient capacity ( for multimedia
application)
5. The network interface and wiring have to be stable for
many years
6. Security and reliability will be very important
(minimize false alarm or misalarm)
⚫ Home networks may be wired or wireless
34
Internetworks
• Internetworks connect networks with different hardware
• and software
• A collection of interconnected networks is called
• an internetwork or internet
• Internet is one specific internet
• Gateways are used to make the connection and to
• provide the necessary translation (protocol convertion)
35
Network Software
• Protocol Hierarchies (Layer structure)
• Design Issues for the Layers
• Connection-Oriented and Connectionless Services
• Service Primitives
• The Relationship of Services to Protocols
36
Network Software
• Protocol Hierarchies
• a series of layers (levels)
• lower layer provides service to higher layers
• protocol:
• an agreement between the communication parties on how communication is to
proceed
• Peers:
• the corresponding layers on different machines.
• Network architecture: a set of layers and protocols
• Protocol stack:
• a list of protocols used by a certain system, one protocol per layer
37
Network Software Virtual
Protocol Hierarchies Communication
→ Peer
Physical
Communication
39
Protocol Hierarchies (2)
• The philosopher-translator-secretary architecture.
40
Protocol Hierarchies (3)
Message segmentation Encapsulation
• Example information flow supporting virtual communication in layer 5.
41
Design Issues for the Layers
42
Design Issues for Layers
⚫ Identify senders and receivers
– multiple computers and processes: addressing
⚫ Data transfer
– simplex, half-duplex, full-duplex communication
– # of logical channels per connections, priorities
⚫ Error control
– error detection
– error correction
⚫ Sequencing of pieces
43
Design Issues for Layers
⚫ Flow control
– feedback from the receiver
– agreed upon transmission rate
⚫ Length of messages
– long messages: disassemble, transmit, and reassmeble messages
– short messages: gather several small messages
⚫ Multiplexing and Demultiplexing
– when expensive to set up a separate connection
– needed in physical layer
⚫ Routing: split over two or more layers
– High level: London -> France or Germany -> Rome
– Low level: many available circuits
44
Connection-Oriented and Connectionless Services
• Six different types of service.
45
Service Primitives (Operations)
A service is formally defined by a set of primitives (operations) available to a user
process to access the services.
Service Providers
Reference Models
© 2020-21 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED
49
Reference Models
50
The design principle of the OSI reference model
•A layer should be created where a different abstraction is needed
•Each layer should perform a well defined function
•The function of each layer can be chosen as an international standard
•The layer boundaries should be chosen to minimize the information
flow across the interfaces
•The number of layers should be not too large or not too small
51
Reference Models
The OSI
reference model.
52
The functions of the seven layers
• The physical layer is concerned with transmitting raw bit streams over a communication
channel BITS to SIGNALS,analog and digital
• The data link layer performs flow control and also transforms a raw transmission facility into a
line that appears error free (ARQ), error control and uses physical address(MAC),frames
• The network layer controls the operation of the subnet, e.g. routing, path determination,
packet transfer using logical addressing(IPv4,IPv6),masking, internetworking, packets
• The transport layer performs segmentation, flow-control and error-control. assembling and
disassembling, isolates the upper layers from the changes in the network hardware, and
determines the type of services (TCP,UDP)
The session layer establishes sessions , Establish , Manage & Terminate connection
ex: login & logout Authorization and Authentication
• The presentation layer is concerned with the Translation(syntax and semantics), Data
Compression, Encryption
• The application layer contains a variety of commonly used protocols (e.g. Hyper Text Transfer
Protocol for WWW, file transfer, e-mail, network news,…)
53
Reference Models (2)
• The TCP/IP reference model.
54
Reference Models (3)
• Protocols and networks in the TCP/IP model initially.
55
Comparing OSI and TCP/IP Models
•Concepts central to the OSI model
•Services: defines layer’s semantics
•Interfaces: tells the processes above it how to access it.
•Protocols
56
A Critique of the OSI Model and Protocols
57
Bad Timing
• The apocalypse of the two elephants.
investment
opportunity
right time to
new discovery
make
58
Bad Technology
•The choice of seven layers was political
• - session and presentation layers are nearly empty
• - Data and network layers are overfull
•The OSI model is extraordinarily complex
•Some functions e.g. addressing, flow control, error control reappear
again and again
59
Bad Implementations
•Huge, Unwieldy, and Slow
•Bad Politics
•Bureaucrats involved too much (European telecommunication
ministries, community, us government)
60
A Critique of the TCP/IP Reference Model
• Problems:
• Service, interface, and protocol not distinguished
• Not a general model
• Host-to-network “layer” not really a layer (is an interface)
• No mention of physical and data link layers
• Minor protocols deeply entrenched, hard to replace
• (The virtual terminal protocol, TELNET, was designed for mechanical teletype
terminal)
61
Hybrid Model
• The hybrid reference model to be used in this book.
62
Session-7&8
Introduction
63
Data Link Layer Design Issues
•Services Provided to the Network Layer
•Framing
•Error Control
•Flow Control
•Access Control
Functions of the Data Link Layer
•Provide service interface to the network layer
•Dealing with transmission errors
•Regulating data flow
• Slow receivers not swamped by fast senders
• Frame management forms the heart of what data link layer does
Functions of the Data Link Layer (2)
Relationship between packets and frames.
Services Provided to Network Layer
• The function of the data link layer is to provide services to the network layer.
• The principal service is transferring data from the network layer on the source
machine to the network layer on the destination machine.
• The data link layer can be designed to offer various services. The actual services
offered can vary from system to system. Three reasonable possibilities that are
commonly provided are
➢ 1. Unacknowledged connectionless service.
➢ 2. Acknowledged connectionless service.
➢ 3. Acknowledged connection-oriented service.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 67
Services Provided to Network Layer
• What the physical layer does is accept a raw bit stream and attempt to deliver it to the destination. This bit
stream is not guaranteed to be error free.
• The usual approach is for the data link layer to break the bit stream up into discrete frames and compute
the checksum for each frame.
• Breaking the bit stream up into frames is more difficult than it at first appears. One way to achieve this
framing is to insert time gaps between frames, much like the spaces between words in ordinary text.
• Since it is too risky to count on timing to mark the start and end of each frame, other methods have been
devised. Now we will look at three methods:
➢ 1. Character count.
Bit stuffing
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in receiver’s memory after destuffing.
Error Detection and Correction
•Error-Correcting Codes
•Error-Detecting Codes
Error-Correcting Codes
Use of a Hamming code to correct burst errors.
Error-Detecting Codes
Error Control
77
Error Detection and Correction
• Types of Errors
• Detection
• Error Correction
Error Detection and Correction
Example 1
Suppose the sender wants to send the word world.
In ASCII the five characters are coded as
1110111 1101111 1110010 1101100 1100100
The following shows the actual bits sent
11101110 11011110 11100100 11011000 11001001
Detection -examples
Example 2
Now suppose the word world in Example 1 is received by the receiver without
being corrupted in transmission.
11101110 11011110 11100100 11011000 11001001
The receiver counts the 1s in each character and comes up with even numbers
(6, 6, 4, 4, 4). The data are accepted.
Detection -examples
Example 3
Now suppose the word world in Example 1 is corrupted during transmission.
11111110 11011110 11101100 11011000 11001001
The receiver counts the 1s in each character and comes up with even and odd
numbers (7, 6, 5, 4, 4). The receiver knows that the data are corrupted, discards
them, and asks for retransmission.
Two –Dimensional Parity Check
Detection - example
Example 4
Suppose the following block is sent:
10101001 00111001 11011101 11100111 10101010
However, it is hit by a burst noise of length 8, and some bits are corrupted.
10100011 10001001 11011101 11100111 10101010
When the receiver checks the parity bits, some of the bits do not follow the
even-parity rule and the whole block is discarded.
10100011 10001001 11011101 11100111 10101010
Detection(cont’d)
• CRC(Cyclic Redundancy Check)
~ is based on binary division.
Detection(cont’d)
• CRC generator
~ uses modular-2
division.
Binary Division
in a
CRC Generator
Detection(cont’d)
• Polynomials
• CRC generator(divisor) is most often represented not as a string of 1s and 0s,
but as an algebraic polynomial.
Detection(cont’d)
• A polynomial representing a divisor
Detection(cont’d)
• Standard polynomials
Detection(cont’d)
• Checksum
~ used by the higher layer protocols
~ is based on the concept of redundancy(VRC, LRC, CRC ….)
Detection(cont’d)
• Checksum Generator
Detection(cont’d)
• To create the checksum the sender does the following:
• The unit is divided into K sections, each of n bits.
• Section 1 and 2 are added together using one’s complement.
• Section 3 is added to the result of the previous step.
• Section 4 is added to the result of the previous step.
• The process repeats until section k is added to the result of the previous step.
• The final result is complemented to make the checksum.
Detection(cont’d)
• data unit and checksum
Detection(cont’d)
Detection(cont’d)
• Example ( at a sender)
Original data : 10101001 00111001
10101001
00111001
--------------
11100010 Sum
00011101 Checksum
10101001 00111001 00011101
Detection(cont’d)
• Example ( at a receiver)
Received data : 10101001 00111001 00011101
10101001
00111001
00011101
---------------
11111111 Sum
00000000 Complement
Error Correction
Error correction can be handled in two ways
ex) For value of m is 7(ASCII), the smallest r value that can satisfy this
equation is 4
24 7 + 4 + 1
Error Correction(cont’d)
Relationship between data and redundancy bits
Error Correction(cont’d)
• Hamming Code
~ developed by R.W.Hamming
• positions of redundancy bits in Hamming code
Error Correction(cont’d)
• each r bit is the VRC bit for one combination of data bits
r1 = bits 1, 3, 5, 7, 9, 11
r2 = bits 2, 3, 6, 7, 10, 11
r4 = bits 4, 5, 6, 7
r8 = bits 8, 9, 10, 11
Error Correction(cont’d)
Redundancy bits calculation(cont’d)
Error Correction(cont’d)
Redundancy bits calculation(cont’d)
Error Correction(cont’d)
Calculating the r values
Error Correction(cont’d)
Error Detection and Correction
Error Correction(cont’d)