Chapter 4.1
Chapter 4.1
Application layer
Principles of network applications
Web and HTTP
FTP
Electronic Mail
SMTP, POP3, IMAP
DNS
2
What is the task of application layer?
3
User Applications, Services and
Protocols
e-mail voice over IP
web real-time video
instant messaging conferencing
remote login grid computing
P2P file sharing
multi-user network
games
streaming stored video
clips
4
Application architectures
Client-server
Peer-to-peer (P2P)
Hybrid of client-server and P2P
5
Client-Server Model
The device requesting the information is called a client
The device responding to the request is called a server
Application layer protocols describe the format of the
requests and responses between the clients and servers
server:
always-on host
permanent IP address
server farms for
scaling
clients:
communicate with server
may be intermittently
connected
may have dynamic IP
addresses
Ch 3 - 6
Servers
A server is usually a computer that contains information to
be shared with many client systems
Some servers may require authentication of user control
information to verify the user has access rights
rely on a central list of user accounts and authorization
The server runs a service, or process, called a daemon
Ch 3 - 7
Peer-to-Peer Networks
Two or more computers are connected via a network and
can share resources without having a dedicated server
every connected end device, known as a peer, can function
either as a client or server
information can be located anywhere on any connected device
Ch 3 - 8
Peer-to-Peer Applications
Allows a device to act as both a client and server within the
same communication
requires each end device to provide a user interface and run a
background service
Can be used on peer-to-peer networks, client/server
networks and across the Internet
Ch 3 - 9
Hybrid of client-server and P2P
Skype
voice-over-IP P2P application
centralized server: finding address of remote
party:
client-client connection: direct (not through
server)
Instant messaging
chatting between two users is P2P
centralized service: client presence
detection/location
user registers its IP address with central
server when it comes online
user contacts central server to find IP
addresses of buddies
10
Processes communicating
Process: program
Client process: process
running within a host.
that initiates
within same host, two
communication
processes
Server process:
communicate using
process that waits to
inter-process
be contacted
communication
(defined by OS).
Note: applications with P2P
processes in different
architectures have client
hosts communicate by processes & server processes
exchanging messages
11
Addressing processes
to receive messages, identifier includes both
process must have IP address and port
identifier numbers associated
host device has unique with process on host.
32-bit IP address Example port numbers:
Q: Is IP address of host HTTP server: 80
on which process runs Mail server: 25
suffice for identifying to send HTTP message
the process?
A: No, many processes
to gaia.cs.umass.edu
web server:
can be running on
same host
IP address:
128.119.245.12
Port number: 80
12
Web and HTTP
Web page consists of
objects
Object can be HTML
file, JPEG image, Java
applet, audio file,…
Web page consists of
base HTML-file which
includes several
referenced objects
Each object is
addressable by a URL
Example URL:
www.someschool.edu/someDept/pic.gif
path name
13host name
HTTP overview
HTTP: hypertext transfer
protocol
Web’s application layer HT
TP
req
protocol PC running HT ues
TP t
client/server model Explorer resp
ons
e
client: browser that
requests, receives, st
ue
“displays” web objects req e Server
TTP o ns
server: Web server sends H p running
res
TP Apache Web
objects in response to HT
server
requests
Mac running
Navigator
14
HTTP connections
Nonpersistent HTTP Persistent HTTP
At most one object is Multiple objects can be
sent over a TCP sent over single TCP
connection. connection between
client and server.
15
Non-Persistent HTTP: Response
time
Round-Trip Time (RTT):
time for a small packet
to travel from client to
server and back. initiate TCP
connection
Response time:
RTT
one RTT to initiate TCP
request
connection file
time to
one RTT for HTTP request RTT
transmit
and first few bytes of file
file
HTTP response to return received
file transmission time
time time
total = 2RTT+transmit
time
18
Persistent HTTP
19
HTTP overview (continued)
HTTP is “stateless”
server maintains no information about past
client requests
Protocols that maintain “state” are complex!
past history (state) must be maintained
if server/client crashes, their views of “state”
may be inconsistent, must be reconciled
20
FTP: the file transfer protocol
22
Dynamic Host Configuration Protocol
DHCP uses UDP ports 67 (server) and 68 (client)
Allows a host to obtain an IP address automatically from a
DHCP server when it connects to the network
server leases an IP address from a pool to the host for a set
period
can pose a security risk
Ch 3 - 23
Electronic Mail outgoing
message queue
Three major components: user user mailbox
user agents agent
mail servers mail
user
server
agent
simple mail transfer protocol:
SMTP
SMTP mail
server user
User Agent SMTP agent
composing, editing, reading
SMTP
mail messages user
mail
e.g., Eudora, Outlook, elm, server agent
Mozilla, Thunderbird
outgoing, incoming messages user
stored on server agent
user
agent
24
Electronic Mail: mail servers
Mail Servers
user
mailbox contains incoming agent
messages for user
mail
user
message queue of server
agent
outgoing (to be sent) mail SMTP
messages mail
server user
SMTP protocol between
SMTP agent
mail servers to send email
messages SMTP
client: sending mail user
mail
agent
server server
“server”: receiving mail
user
server agent
user
agent
25
Electronic Mail: SMTP [RFC 2821]
uses TCP to reliably transfer email message from
client to server, port 25
direct transfer: sending server to receiving server
three phases of transfer
handshaking (greeting)
transfer of messages
closure
command/response interaction
commands: ASCII text
response: status code and phrase
26
SMTP and POP(Post Office Protocol )
POP and POP3 are inbound mail delivery protocols
MDA listens for a client connection to the server
29
DNS: Domain Name System
People: many identifiers: Domain Name System:
SSN, name, passport # distributed database
Internet hosts, routers: implemented in hierarchy of
IP address (32 bit) - used many name servers
for addressing datagrams application-layer protocol
“name”, e.g., host, routers, name servers
www.yahoo.com - used to communicate to resolve
by humans names (address/name
translation)
Q: map between IP note: core Internet
addresses and name ? function, implemented as
application-layer protocol
complexity at network’s
“edge”
31
Telnet
Telnet uses TCP port 23
Provides a method of emulating text-based terminals over
the network
allows a local device to access a remote device as if the
keyboard and monitor are connected to the remote device
directly
• AThe
connection using
runsTelnet is called a virtual terminal (VTY)
Telnet server a
session
service called the Telnet
daemon
Ch 3 - 33
Transport Layer
Transport layer
• Responsible for Process-to-Process Delivery:
Provide logical communication between app processes
running on different hosts. Protocols run in end systems
Send side: breaks app messages
into segments, passes to network layer
Rcv side: reassembles segments into
messages, passes to app layer
35
Process-to-Process Delivery
Client-Server Paradigm
Addressing
Multiplexing
Demultiplexing
Connectionless/Connection-Oriented
Reliable/Unreliable
36
Types of data deliveries
37
Port numbers
38
IP addresses versus port numbers
IANA ranges
39
Multiplexing and
demultiplexing
40
Connection Establishment
41
Connection Termination
42
Transport Layer Protocols
There are five basic protocols for the
Transport Layer:
Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
Datagram Congestion Control Protocol (DCCP)
Stream Control Transmission Protocol (SCTP)
Resource Reservation Protocol (RSVP)
43
UDP
Port Numbers
User Datagram
Applications
44
Note:
UDP is a connectionless,
unreliable protocol that has
no flow and error control. It
uses port numbers to
multiplex data from the
application layer.
45
Well-known ports used by UDP
Port Protocol Description
47
UDP
The calculation of checksum and its
inclusion in the user datagram are
optional.
UDP is not a convenient transport-layer
protocol for applications that provide flow
and error control. It is also used by
multimedia applications.
48
Use of UDP
UDP is suitable for a process that requires simple request-
response communication with little concern for flow and
error control. It is not usually used for a process such as
FTP that needs to send bulk data
UDP is suitable for a process with internal flow and error
control mechanisms. For example, the Trivial File Transfer
Protocol (TFTP) process includes flow and error control. It
can easily use UDP.
UDP is a suitable transport protocol for multicasting.
Multicasting capability is embedded in the UDP software
but not in the TCP software.
UDP is used for management processes such as SNMP.
UDP is used for some route updating protocols such as
Routing Information Protocol (RIP)
49
TCP
Port Numbers
Services
Sequence Numbers
Segments
Connection
Transition Diagram
Flow and Error Control
Silly Window Syndrome
50
Well-known ports used by TCP
Port Protocol Description
Echoes a received datagram back to
7 Echo
the sender
Discards any datagram that is
9 Discard
received
11 Users Active users
13 Daytime Returns the date and the time
17 Quote Returns a quote of the day
19 Chargen Returns a string of characters
File Transfer Protocol (data
20 FTP, Data
connection)
FTP, File Transfer Protocol (control
21
Control connection)
23 TELNET Terminal Network
25 SMTP Simple Mail Transfer Protocol
53 DNS Domain Name Server
51
67 BOOTP Bootstrap Protocol
TCP segment format
52
Three-step connection
establishment
53
Four-step connection
termination
54
Network layer
55
Network layer
TCP UDP Transport
This layer deals with Layer
Firewalls.. Etc.
Network Layer Protocols Media
IP – Internet Protocol (Provide packet
IP delivery)
ICMP ARP – Address Resolution Protocol
ARP (Defined the procedure of network
RIP address / mac address translation)
IGRP, IGMP… Etc. ICMP – Internet Control Message
Protocol (Defined the procedure of
error message transfer)
56
Network layer
Routes the information in the network
E.g. IP is a network layer implementation which
defines addresses in such a way that route
selection can be determined.
Single address space for the entire internetwork
adds an additional layer of addressing, e.g. IP
address, which is different from MAC address.
57
Addressing the Network IPv4
58
IP Address
What is an IP address?
An IP address is a unique global address for a
network interface
E.g. IPv4, IPv6
IPV6 provides a platform on new internet
functionality that will be needed in the immediate
future and provide flexibility for future growth
and expansion
An IPv4 address is 32 bits long
The IPv4 addresses are unique and universal.
59
IP Addresses
60
IP Address
The address space of IPv4 is 232 or
4,294,967,296.
61
Classful addressing
In classful addressing, the address space is
divided into five classes; A, B, C, D, and E .
Easy to work out but very wasteful.
Routers and hosts still assume class subnet
masks by default
Class A /8 255.0.0.0
Class B /16 255.255.0.0
Class C /24 255.255.255.0
62
Finding the classes in binary and dotted-decimal notation
63
Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111
Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
64
3 types of address
Every network has:
Network address – the first one
Broadcast address – the last one
Host addresses – everything in between
66
IP addressing
67
IP addressing
Classful addressing, which is almost obsolete,
is replaced with classless addressing.
In IPv4 addressing, a block of
addresses can be defined as:
x.y.z.t /n
in which x.y.z.t defines one of the addresses
and the /n defines the mask.
68
IPv4 address
69
Find the network address
70
Logical AND
72
Classless addressing
Any suitable prefix can be used
More flexible, less wasteful.
73
74
Classless addressing /16
172.16.0.0/16 mask 255.255.0.0
Broadcast address 172.16.255.255
172. 16. 0. 0
10101100 00010000 00000000 00000000
Hosts 172.16.0.1 to 172.16.255.254
65534 host addresses
75
Classless addressing /24
172.16.0.0/24
mask 255.255.255.0
Broadcast address 172.16.0.255
172. 16. 0. 0
10101100 00010000 00000000 00000000
76
Classless addressing /22
172.16.0.0/22
mask 255.255.252.0
172. 16. 0. 0
10101100 00010000 00000000 00000000
Broadcast address 172.16.3.255
Hosts 172.16.0.1 to 172.16.3.254
1022 host addresses
77
Classless addressing /26
172.16.0.0/26
mask 255.255.255.192
172. 16. 0. 0
10101100 00010000 00000000 00000000
Broadcast address 172.16.0.63
Hosts 172.16.0.1 to 172.16.0.62
62 host addresses
78
Classless addressing /28
172. 16. 0. 0
10101100 00010000 00000000 00000000
Hosts 172.16.0.1 to 172.16.0.14
14 host addresses
79
Calculating addresses
A host has IP address 192.168.1.70/24
What is the subnet mask?
What is the network address?
What is the broadcast address?
What is the range of host addresses in the
network?
80
192.168.1.70/24 – fill in the table
83
192.168.1.70/26 fill in the table
86
192.168.1.70/28 fill in the table
89
Unicast, Multicast, Broadcast
Unicast – a message addressed to one host
Broadcast – a message addressed to all hosts
on a network. Uses network’s broadcast
address or 255.255.255.255 locally
Multicast – a message addressed to a group of
hosts. Uses an address starting 224 - 239
90
Private IP addresses
Unrestricted use on private networks. Not
routed across the Internet.
10.0.0.0 – 10.255.255.255 (10.0.0.0/8)
172.16.0.0 – 172.31.255.255 (172.16.0.0/20)
192.168.0.0 – 192.168.255.255
(192.168.0.0/24)
91
Public IP addresses
Routed over the Internet
Master holder is IANA
Assigned to regional registries and then to
ISPs
ISPs allocate them to organisations and
individual users
Use is strictly controlled as duplicate
addresses are not allowed
92
Special addresses
0.0.0.0 “all addresses” in default route. Hosts
cannot be given addresses starting 0.
127.0.0.1 is loopback. Hosts cannot be given
addresses starting 127.
240.0.0.0 and higher – reserved for experimental
purposes.
169.254.0.0 - 169.254.255.255 local only
192.0.2.0 to 192.0.2.255 for teaching
93
Network address translation
A large number of hosts on a network use private
addresses to communicate with each other.
The ISP allocates one or a few public addresses.
NAT allows the hosts to share the public
addresses when they want to use the Internet
94
Addressing hosts
Static addressing
Address is configured by an administrator
Servers, printers, routers, switches need static
addresses
Dynamic addressing
Address is allocated automatically by DHCP by
leasing addresses from a pool
Dynamic addressing is best for workstations
95
Subnetting
96
Problems
IPv4 address scheme is limited by its 32 bits problems
to grow
97
Solutions
Subnet masking
Variable-length subnet masks
Route summarization
Classless interdomain routing
Network address translation
Address allocation for private internet
98
solution 1: get netids for all groups; impossible
solution 2: allow a network to be split into several parts
for internal use but still act like a single network to the
outside world (three levels of hierarchy: site, subnet,
host)
99
Subnetting
Split the host number portion of an IP address
into a subnet number and a (smaller) host
number.
Result is a 3-layer hierarchy
network prefix host number
100
Subnetting
router
101
Subneting
Networks divided into subnets thus:
saving IP address spaces
reduce broadcasting
use the network address more efficient
102
Subnet Masking
104
How to Create a Subnet
105
Steps Followed
Determine the number of required network IDs:
One for each subnet
One for each wide area network connection
Determine the number of required host IDs per subnet:
One for each TCP/IP host
One for each router interface
Based on the above requirements, create the following:
One subnet mask for your entire network
A unique subnet ID for each physical segment
A range of host IDs for each subnet
106
Subnet Masks
subnet mask is 32-bit value that allows the recipient of IP
packets to distinguish the network ID portion of the IP
address from the host ID portion of the IP address.
When assigning addresses you set both the IP address
and subnet mask.
Not all networks need subnets, meaning they use the
default subnet mask.
Default subnet mask is found by setting all network
address to 1 for each class.
107
Restrictions on borrowed bits
Reserved addresses
108
The Fast Way
Before starting, you need to do is answer five simple
questions:
mask produce?
109
1. How many subnets?
2x = number of subnets. x is the number of masked bits,
or the 1s.
For example, given a class C subnet mask of
255.255.255.192, the number of ones gives us 22 = 4
subnets.
Note that we only count the number of ones that are found
in the host part of the subnet mask.
For class C address 255.255.255.0 is the default subnet,
192=11000000 in binary, so there are only 2 ones.
110
2. How many hosts per subnet?
2y – 2 = number of hosts per subnet. y is the number
of unmasked bits, or the 0s. For example, in 11000000,
the number of zeros gives us 26 – 2 = 62 hosts per subnet.
You need to subtract two for the subnet address and
the broadcast address, which are not valid hosts.
3. What are the valid subnets?
First calculate the block size.
256 – subnet mask = block size, or increment number.
An example would be 256 – 192 = 64. The block size of
a 192 mask is always 64.
Second, start counting at zero in blocks of 64 until you
reach the subnet mask value and these are your
subnets. 0, 64, 128, 192.
111
4. What’s the broadcast address for each subnet?
Since we counted our subnets in the last section as 0,
64, 128, and 192, the broadcast address is always the
number right before the next subnet.
For example, the 0 subnet has a broadcast address of 63
because the next subnet is 64. The 64 subnet has a
broadcast address of 127 because the next subnet is
128, etc.
And remember, the broadcast of the last subnet is
always 255 for Class C.
112
5. What are the valid hosts?
Valid hosts are the numbers between the
subnets, omitting all the 0s and all 1s.
For example, if 64 is the subnet number and 127
is the broadcast address, then 65–126 is the valid
host range—it’s always the numbers between the
subnet address and the broadcast address.
These are the addresses you assign to nodes.
113
Example 1
We’re going to subnet the network address 192.168.10.0 and
subnet mask 255.255.255.224.
1. How many subnets?
224 is 11100000, so our equation would be 2 3 = 8.
115
Example 2
Subnetting 192.168.1.0/24
116
Subnetting 192.168.1.0/24
117
Subnetting 192.168.1.0/24
118
Subnetting 192.168.1.0/24
Bits borrowed 1 2 3 4 5 6
No of networks 2 4 8 16 32 64
120
Subnetting 192.168.1.0/24
Every time you borrow another bit you:
Double the number of subnets
Halve the size of the subnets
Each subnet has a network address, a
broadcast address, and everything in between
is a host address.
121
Exercises
Do full subnetting for the following addresses.
1. 192.168.10.0/28
2. 192.0.10.0/30
3. 192.1.1.0/25
122
An organization is granted the block
130.34.12.64/26. The organization needs
four subnetworks, each with an equal
number of hosts. Design the subnetworks
and find the information about each
network.
123
124
An organization is granted a block of addresses with the
beginning address 14.24.74.0/24. The organization needs
to have 3 subblocks of addresses to use in its three
subnets as shown below:
❑ One subblock of 120 addresses.
❑ One subblock of 60 addresses.
❑ One subblock of 10 addresses.
Solution
There are 232 − 24 = 256 addresses in this block. The first
address is 14.24.74.0/24; the last address is
14.24.74.255/24.
a. The number of addresses in the first subblock is not a
power of 2. We allocate 128 addresses. The subnet
mask is 25. The first address is 14.24.74.0/25; the last
address is 14.24.74.127/25.
125
b. The number of addresses in the second subblock is
not a power of 2 either. We allocate 64 addresses. The
subnet mask is 26. The first address in this block is
14.24.74.128/26; the last address is 14.24.74.191/26.
c. The number of addresses in the third subblock is not
a power of 2 either. We allocate 16 addresses. The
subnet mask is 28. The first address in this block is
14.24.74.192/28; the last address is 14.24.74.207/28.
d. If we add all addresses in the previous subblocks, the
result is 208 addresses, which means 48 addresses
are left in reserve. The first address in this range is
14.24.74.209. The last address is 14.24.74.255.
e. Figure shows the configuration of blocks. We have
shown the first address in each block.
126
127
Assume a company has three offices: Central, East,
and West. The Central office is connected to the
East and West offices via private, WAN lines. The
company is granted a block of 64 addresses with
the beginning address 70.12.100.128/26. The
management has decided to allocate 32 addresses
for the Central office and divides the rest of
addresses between the two other offices.
128
129
Exercise
An ISP is granted a block of addresses starting with
190.100.0.0/16 (65,536 addresses). The ISP needs to
distribute these addresses to three groups of customers
as follows:
❑ The first group has 64 customers; each needs
approximately 256 addresses.
❑ The second group has 128 customers; each needs
approximately 128 addresses.
❑ The third group has 128 customers; each needs
approximately 64 addresses.
We design the subblocks and find out how many
addresses are still available after these allocations.
130
Data Link layer
Receives services from physical layer and
provides services to network layer
Function – responsible for controlling the
transfer of frames across the media.
Node-to-node delivery
Local responsibility
Ensures reliable delivery
Defines frames
Physical addressing
Error control
Flow control
Medium access control
ERROR DETECTION AND CORRECTION
Types of Errors
Detection
Correction
Error Detection and Correction
Errors are inevitable
Interference
Corruption as a result of transmission
Reliable communication is dependent on
being able to detect and correct errors
How will we know an error occurred?
Do we retransmit or correct?
133
Types of Errors
Single-bit error
Burst error
134
Single-bit Errors
Only one bit is changed: 0 changed to 1, or a 1 to a
0
Least likely type of error since noise usually lasts
longer than the time to send one bit
More likely in parallel transmission
135
Burst Errors
Two or more bits in data unit are in error, not
necessarily consecutive in order
Most likely in serial transmission
Number of bits affected depend on data rate and
noise duration
136
Detection
Need to detect before message is processed
Redundancy may be used to add additional
bits to a message for error control
Process must be handled by destination
137
Redundancy
138
Detection Methods
Parity Check
Longitudinal Redundancy Check (LRC)
Checksum
Hamming Code
Cyclical Redundancy Check (CRC)
139
Parity Check
Most common and least expensive
In even-parity, a redundant bit (parity bit) is
appended to every data unit so total number of 1
bits is even;
odd-parity – total should be odd
140
Even-parity Check
141
Simple Parity Performance
Can detect all single-bit errors
May detect all burst errors as long as total
number of bits changed is odd
Cannot detect errors when total number of
bits changed is even since parity check will
pass even though errors had occurred
142
Two-Dimensional Parity Check
Data unit is divided into rows and columns;
parity checks are performed on
corresponding bits of each column
143
Two-Dimensional Parity
Performance
Increases likelihood of detecting burst errors
LRC of n bits can easily detect a burst error of n
bits
May also detect many burst errors of more than
n bits
Cannot detect errors when two bits in one data
unit are damaged and two bits in exactly the
same positions in another data unit are
damaged
144
Longitudinal Redundancy Check (LRC)
Organize data into a table and create a parity for
each column
11100111
11011101
00111001
10101001
10101010
145
Checksum
Performed by higher-layer protocols
Also based on concept of redundancy
146
Checksum Generator
At sender, checksum generator subdivides
data unit into k equal segments of n bits.
Segments are added together using one’s
complement arithmetic to get the SUM.
SUM is complemented and becomes the
checksum, and appended to the end of the
data.
147
Checksum
148
Checksum
149
Checksum example
Suppose the following block of 16 bits is to be sent
using a checksum of 8 bits
10101001 00111001
The numbers are added using one’s complement
10101001
00111001
11100010
Checksum 00011101
The pattern sent is 10101001 00111001 00011101
150
Checksum example
The receiver receives with no error
10101001
00111001
00011101
Sum 11111111
Complement 00000000 pattern is ok
151
Checksum Checker
Receiver subdivides data unit in k sections of
n bits
Sections are added together using one’s
complement to get the sum
Sum is complemented
If result is zero, data are accepted; otherwise,
rejected
152
Performance
Detects all errors involving odd number of
bits, most errors involving even number of
bits
Since checksum retains all carries, errors
affecting an even number of bits would still
change the value of the next higher column
and the error would be detected
If a bit inversion is balanced by an opposite bit
inversion, the error is invisible
153
Cyclic Redundancy Check (CRC)
Parity checks based on addition; CRC based
on binary division
A sequence of redundant bits (a CRC or CRC
remainder) is appended to the end of the data
unit
These bits are later used in calculations to
detect whether or not an error had occurred
154
CRC Steps
On sender’s end, data unit is divided by a
predetermined divisor; remainder is the CRC
When appended to the data unit, it should be
exactly divisible by a second predetermined
binary number
At receiver’s end, data stream is divided by
same number
If no remainder, data unit is assumed to be
error-free
155
Deriving the CRC
A string of 0s is appended to the data unit; n
is one less than number of bits in
predetermined divisor
New data unit is divided by the divisor using
binary division; remainder is CRC
CRC of n bits replaces appended 0s at end of
data unit
156
CRC Generator
Uses modulo-2 division
Resulting remainder is
the CRC
157
CRC Checker
Performed by receiver
Data is appended with
CRC
Same modulo-2
division
If remainder is 0, data
are accepted
Otherwise, an error has
occurred
158
Error Correction
Requires more redundancy bits; must know
not only that an error had occurred, but where
the error occurred in order to correct it
Correction simply involves flipping the bit
Hamming code may be applied to identify
location where error occurred by strategically
placed redundancy bits
159
Hamming code
1. Calculating the number of redundancy bits
required.
Eg 1001101 – number of data bits is 7, the value
of parity bits are calculated as
2r>= m+r+1
M=7;r=4, total=11bit of data
2. Determining the positions of various data bits
and redundancy bits. The various r bits are
placed at the position that corresponds to the
power of 2
3. Find the value of the redundant bit
160
Redundancy Bits
161
Example Hamming Code
For a 11-bit data sequence
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
162
Example Hamming Code
163
Error Detection using Hamming Code
164
Hamming code
To check for errors, check all of the parity bits.
The pattern of errors, called the error
syndrome, identifies the bit in error.
If all parity bits are correct, there is no error.
Otherwise, the sum of the positions of the
erroneous parity bits identifies the erroneous
bit.
For example, if the parity bits in positions 1, 2
and 8 indicate an error, then bit 1+2+8=11 is
in error. If only one parity bit indicates an error,
the parity bit itself is in error.
165
Standards: agreed-upon rules
Standards is essential in
Creating/maintaining open and competitive
markets
Guaranteeing national/international
interoperability
Two categories
De jure (“by law” or “by regulation’) standards
De facto (“by fact” or ‘by convention’)
standards
Proprietary standards: closed standards
Nonproprietary standards: open standards
1-166
Standards Organizations
Standards are developed by
Standards creation committees
Forums
Regulatory agencies
1-167
Standards Committees
ITU-T(International Telecommunications
Union-Telecommunication)
Formerly, CCITT formed by UN
ANSI(American National Standards Institute)
Private non-profit corporation in the US
IEEE(Institute of Electrical and Electronics
Engineers)
The largest engineering society in the world
EIA(Electronic Industries Association)
Non-profit organization in the US
1-168
Conn’t…
ISO(International Organization for
Standardization)
headquartered in Geneva, Switzerland,
collection of standards organizations representing 162
countries.
ISO’s goal is to establish international technological
standards to facilitate global exchange of information and
barrier free trade.
ISO not an acronym. iso is the Greek word for equal.
ISO’s authority is not limited to the information-processing
and communications industries.
It also applies to the fields of textiles, packaging, distribution
of goods, energy production and utilization, shipbuilding, and
banking and financial services.
The universal agreements on screw threads, bank cards, and
169even the names for currencies are all products of ISO’s work.
Protocols
Internet Standards
IETF (Internet Engineering Task Force)
Internet Draft
working document with no official
status
with a 6-month lifetime
RFC (Request for Comment)
Edited, assigned a number, and made
available to all interested parties
1-170
Protocols
171