Chapter 5 DCC
Chapter 5 DCC
Objectives
Concept of Reference Model.
OSI Reference Model Concept.
Layers of OSI Reference Model.
4.1 Introduction– Layered Architecture , Peer-to- Peer Processes, Interfaces between Layer,
Protocols, Organization of the Layers, Encapsulation.
4.2 Layers of the OSI Reference Model (Functions of each Layer & Protocols used) –Physical
Layer, Data-Link Layer, Network Layer, Transport Layer, Session Layer, Presentation
Layer, Application Layer.
1
Following Example shows need to have layered Architecture
• Assume Maria and Ann are neighbors with a lot of common ideas.
• However, Maria speaks only Spanish, and Ann speaks only English.
• Since both have learned the sign language in their childhood, they enjoy meeting in
a cafe a couple of days per week and exchange their ideas using signs.
• Occasionally, they also use a bilingual dictionary.
• Communication is face to face and Happens in one layer as shown in Figure.
• Now assume that Ann has to move to another town because of her job.
• Although both are sad, Maria opens a packet that contains two small machines.
• The first machine can scan and transform a letter in English to a secret code or
vice versa.
• The other machine can scan and translate a letter in Spanish to the same secret
code or vice versa.
• Ann takes the first machine; Maria keeps the second one.
• The two friends can still communicate using the secret code, as shown in Figure.
2
ISO –OSI Open Systems Interconnection Model
• International standard organization (ISO) established a committee in 1977 to
develop an architecture for computer communication.
• Open Systems Interconnection (OSI) reference model is the result of this effort.
• In 1984, the Open Systems Interconnection (OSI) reference model was approved as
an international standard for communications architecture.
• Term “open” denotes the ability to connect any two systems which conform to the
reference model and associated standards.
• The OSI model is now considered the primary Architectural model for inter -
computer communications.
• The OSI model describes how information or data makes its way from application
programmes (such as spreadsheets) through a network medium (such as wire) to
another application programme located on another network.
• The OSI reference model divides the problem of moving information between
computers over a network medium into SEVEN smaller and more manageable
problems is known as layering.
• The OSI model is a theoretical blueprint that helps us understand how data gets
from one user’s computer to another.
• It is also a model that helps develop standards so that all of our hardware and
software talks nicely to each other.
• It aids standardization of networking technologies.
• It provides an organized structure for hardware and software developers to follow,
to insure their products are compatible with current and future technologies.
ISO is the organization; OSI is the model.
3
OSI: A Layered Network Model
• The process of breaking up the functions or tasks of networking into layers reduces
complexity.
• The lower 4 layers (transport, network, data link and physical - Layers 4, 3, 2, and 1)
are concerned with the flow of data from end to end through the network.
• The upper three layers of the OSI model (application, presentation and session-
Layers 7, 6 and 5) are orientated more toward services to the applications.
• The layers involved when a message is sent from device A to device B.
• As the message travels from A to B, it may pass through many intermediate nodes.
• These intermediate nodes involve only the first three layers of the OSI model.
• Each layer performs unique and specific task and it offers services to the layer
above it.
• For example, Layer 3 uses the services provided by layer 2 and provides
services for layer 4.
4
Peer-to-Peer processes
• The processes on each machine that communicate at a given layer are called peer-
to-peer processes.
• At the physical layer, communication is direct: Device A sends a stream of bits to
device B (through intermediate nodes).
• At higher layers each layer in the sending machines adds its own information to the
message it receives from the layer just above it and passes the whole package to the
layer just below it.
Interfaces between Layers
• An interface defines the operations and services offered by lower layer to the upper
layer. This is an interface between each pair of adjacent layers.
• The passing of the data and network information down through the layers of the
sending device and receiving device is made possible by an interface between each
pair of adjacent layers.
Data Encapsulation
• The outgoing information will travel down through the layers to the lowest layer.
• While moving down on the source machine, it acquires all the control information
which is required to reach the destination machine.
5
• The control information is in the form of Headers and Trailer which surrounds the
data received from the layer above.
• This process of adding headers and trailers to the data is called as data
encapsulation.
• The information added by each layer is in the form of headers or trailers.
• At layer 1 the entire package is converted to a form that can be transferred to the
receiving machine.
• At the receiving machine, the message is unwrapped layer by layer, with each
process receiving and removing the data meant for it.
• For example, layer 2 removes the data meant for it, then passes the rest to layer 3.
• Layer 3 then removes the data meant for it and passes the rest to layer 4, and so on.
• The headers and trailers contain control information. The headers and trailers form
the envelope which carries the message to the desired destination.
6
Example of Data Encapsulation
The figure shows the example of five layer stack for data encapsulation.
The fifth layer of sending machine wants to send a message M to the fifth layer of
destination machine.
The message M is produced by layer 5 of machine 1 and given to layer 4 for
transmission. Layer 4 adds header H4 in front of the message and pass it to layer 3.
Layer 3 breaks up the incoming message into small units as M1 and M2 and pass these
packets to layer 2.
Layer 2 adds the header as well as footer to each packet obtained from layer 3 and pass
it to layer 1 for physical transmission.
The physical layer is responsible for the movement of individual bits from one hop
(node) to the next. 7
Functions of Physical Layer
• Physical characteristics of interfaces and medium.
• It also defines the type of transmission medium.
• How many pins the network connector has and what each pin is used for.
• Representation of bits. What electrical signals should be used to represent a 1 and a 0.
• Data rate: How many nanoseconds a bit lasts and bits per second.
• Synchronization of bits.
• Sender and Receiver must be synchronized
• Physical topology
• Mesh, Ring, Star, etc.
• Transmission mode. Whether transmission may proceed simultaneously in both
directions.
• Simplex, Half duplex, Duplex
2. Data Link Layer
• Data link layer attempts to provide reliable communication over the physical layer interface.
• Breaks the outgoing data into frames and re-assemble the received frames.
• Create and detect frame boundaries.
• Handle errors by implementing an acknowledgement and retransmission scheme.
• Implement flow control.
The data link layer is responsible for moving frames from one hop (node) to the next.
8
• Access control-
• Determine which device has control over the link at any given time.
• Link establishment and termination:
• Establishes and terminates the logical link between two nodes.
• Frame sequencing:
• Transmits/receives frames sequentially.
• Frame acknowledgment:
• Provides/expects frame acknowledgments.
DLL is divided into two Sub-Layers
• LLC Sub Layer
• MAC Sub Layer
9
• The MAC sub layer determines where one frame of data ends and the next one starts
- frame synchronization.
• There are four means of frame synchronization:
• Time based,
• Character counting,
• Byte stuffing and
• Bit stuffing.
3. Network Layer
• It is responsible for source to destination delivery of individual packets across
multiple networks.
• Defines the most optimum path the packet should take from the source to the
destination
• Defines logical addressing so that any endpoint can be identified.
• Handles congestion in the network.
• Facilitates interconnection between heterogeneous networks (Internetworking).
• The network layer also defines how to fragment a packet into smaller packets to
accommodate different media.
The network layer is responsible for the delivery of individual packets from the
source host to the destination host.
10
Que: With the help of neat sketch describe the working of router. Describe in detail the
operation of router considering OSI model.
Answer: Router is a device that connects two or more computer network together this allows two
or more disparate computer network to send data to each other.
The figure shows a router connecting to two networks viz: A (Token Ring) and B
(Ethernet) at points X and Y respectively. This means that the router must have two
interfaces and also two Network interface cards (NICs) one to interact with network A at
point X, and the other to interact with network B at point Y. this enable it to send data
between the two networks A and B. A router connect more than two networks.
A router operates at a the physical, data link and network layer of the OSI model, as
shown in fig a router is termed as an intelligent device. A router is useful for
interconnecting two or more networks. These networks can be heterogeneous, which
means that they can differ in their physical characteristics such as frame size, transmission
rates, topologies, addressing etc. thus, if a router has to connect such different networks, it
has to consider all these issues. A router has to determine the best possible transmission
path among several available.
4. Transport Layer
• Purpose of this layer is to provide a reliable mechanism for the exchange of data
between two processes in different computers.
• Ensures that the data units are delivered error free.
• Ensures that data units are delivered in sequence.
• Ensures that there is no loss or duplication of data units.
• Provides connectionless or connection oriented service.
11
The transport layer is responsible for the delivery of a message from one process to another.
5. Session Layer
• Session layer provides mechanism for controlling the dialogue between the two
end systems.
• It defines how to start, control and end conversations (called sessions) between
applications.
• This layer requests for a logical connection to be established on an end-user’s
request.
• Any necessary log-on or password validation is also handled by this layer.
Functions of Session Layer
• Dialog control
• Synchronization, session and sub session
• Session closure
6. Presentation Layer
• Presentation layer defines the format in which the data is to be exchanged between
the two communicating entities.
• Also handles data compression and data encryption (cryptography).
12
Functions of Presentation layer:
• Translation: presentation layer is responsible for converting various formats into
required format of the recipient.
• Encryption: Data encryption and decryption is done by presentation layer for
security.
• Compression and Decompression: data to be transform compressed while
sending and decompress while receiving for reducing time of transmission.
7. Application Layer
• Application layer interacts with application programs and is the highest level of OSI
model.
• Application layer contains management functions to support distributed
applications.
• Examples of application layer are applications such as
• File Transfer,
• Electronic Mail,
• Remote Login Etc.
Functions of Application layer:
1. Network virtual terminal
2. File transfer access and management
3. Mail services and directory services
Horizontal communication
13
1. The horizontal communication is the logical connection between the layers, there is
no direct communication between them.
2. Information included in each protocol header by the transmitting system is a
message that will be carried to the same protocol in the destination system.
3. For two computers to communicate over a n/w, the protocol used at each layer of
the OSI model in the transmitting system must be duplicated at the receiving system.
4. The packet travels up through the protocol stack and each successive header is
stripped of by the appropriate protocol & processed.
5. When the packet arrived at its destination, the process by which the headers are
applied at the source is repeated in server.
Vertical communication:
1. In addition to communicating horizontally with the same protocol in the other
system, the header information also enables each layer to communicate with the
layer above & below it.
Eg. The n/w layer will communicate with the data link layer & transport layer.
2. This interlayer communication is called communication vertical.
3. When a system receives a packet & passes it up through various layers the data link
layer protocol header includes a field which specifies the name of n/w layer
protocol to be used to process the packet.
4. The n/w layer protocol header will specify the name of transport layer protocol to
be used to process the packet.
5. Due to vertical communication, it becomes protocol at each layer simultaneously.
14
Summery
Devices
Devices - Layer 7 Hosts PC Servers Mobile Phones, gateways
Devices - Layer 3 Routers
Devices - Layer 2 Bridges, Switches, NIC (Layers 1 & 2)
Devices - Layer 1 Hubs, repeaters NIC (Layers 1 & 2) Media: Coax, Fiber,
Twisted Pair, Wireless
15
Chapter 5
IP Addressing and TCP/IP SUITE
Objectives:-
TCP/ IP Model Concept.
Defining/functioning of different Layers of TCP / IP suite.
Address Space:
IPv4 uses 32-bit addresses, which means that the address space is 232 or
4,294,967,296 (more than 4 billion).
This means that, theoretically, if there were no restrictions, more than 4 billion
devices could be connected to the Internet.
Notations
There are two prevalent notations to show an IPv4 address: Binary notation and Dotted
decimal notation.
Binary Notation:
o In binary notation, the IPv4 address is displayed as 32 bits.
o Each octet is often referred to as a byte.
1
o So it is common to hear an IPv4 address referred to as a 32-bit address or a
4-byte address.
o The following is an example of an IPv4 address in binary notation:
01110101 10010101 00011101 00000010
Dotted-Decimal Notation:
o To make the IPv4 address more compact and easier to read, Internet
addresses are usually written in decimal form with a decimal point (dot)
separating the bytes.
o Each byte is identified by a decimal number in the range [0..255].
o The following is the dotted decimal notation of the above address:
117.149.29.2
o Example:
Example: Change the following IPv4 addresses from binary notation to dotted-
decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
Solution:
We replace each group of 8 bits with its equivalent decimal number and add dots for
separation.
a. 129.11.11.239
b. 193.131.27.255
IP Address classes
IPv4 addressing, at its inception, used the concept of classes.
This architecture is called classful addressing.
In classful addressing, the address space is divided into five classes: A, B, C, D,
and E.
Each class occupies some part of the address space.
We can find the class of an address when given the address in binary notation or
dotted-decimal notation.
If the address is given in binary notation, the first few bits can immediately tell
us the class of the address.
2
Fig: Finding the class in binary notation.
If the address is given in decimal-dotted notation, the first byte defines the
class.
3
Class A:
• The high-order (First) bit in a class-A address is always set to zero.
• The next seven bits complete the network ID.
• The remaining 24 bits represent the host ID.
• This allows for 128 networks and 16,777,214 hosts per network.
• In this 7 bits are used for network field and 24 bits for host field.
• Class A IP address range includes 1.0.0.0 to 127.255.255.255
Class B:
• Class B addresses are assigned to medium-sized to large-sized networks.
• The two high-order bits in a class B address are always set to binary 1 0.
• The next 14 bits complete the network ID.
• The remaining 16 bits represent the host ID.
• This allows for 16,384 networks and 65,534 hosts per network.
• Class B IP address range includes 128.0.0.0 to 191.255.255.255
Class C:
• Class C addresses are used for small organizations with a small number of attached
hosts or routers.
• The three high-order bits in a class C address are always set to binary 1 1 0.
• The next 21 bits complete the network ID.
• The remaining 8 bits (last octet) represent the host ID.
• This allows for 2097152 networks and 256 hosts per network.
• Class C IP address range includes 192.0.0.0 to 223.255.255.255.
Class D:
• Class D addresses are reserved for IP multicast addresses.
• The four high-order bits in a class D address are always set to binary 1 1 1 0.
• The remaining bits recognize hosts.
• Class D IP address range includes 224.0.0.0 to 239.255.255.255
4
Class E:
• Class E is an experimental address that is reserved for future use.
• The high-order bits in a class E address are set to binary 1111.
• Class E IP address range includes 240.0.0.0 to 255.255.255.255
Mask
Although the length of the netid and hostid (in bits) is predetermined in classful
addressing, we can also use a mask (also called the default mask/natural masks), a 32-
bit number made of contiguous 1’s followed by contiguous 0’s.
The masks for classes A, B, and C are shown in Table.
The concept does not apply to classes D and E.
The mask can help us to find the netid and the hostid.
For example, the mask for a class-A address has eight 1s, which means the first 8 bits of
any address in class A define the netid; the next 24 bits define the hostid.
Subnetting
If an organization was granted a large block in class A or B, it could divide the addresses
into several contiguous groups and assign each group to smaller networks (called
subnets) or, in rare cases, share part of the addresses with neighbors.
Subnetting increases the number of 1’s in the mask.
To create multiple logical networks that exist within a single Class A, B, or C network.
If you do not subnet, you are only able to use one network from your Class A, B, or C
network, which is unrealistic.
5
The subnet mask follows two rules:
o If a binary bit is set to a 1 (or on) in a subnet mask, the corresponding bit in the
address identifies the network.
o If a binary bit is set to a 0 (or off) in a subnet mask, the corresponding bit in the
address identifies the host.
Finding The Subnet Address: We use binary notation for both the address and the mask
and then apply the AND operation to find the subnet address.
Example: What is the subnetwork address if the destination address is 200.45.34.56 and
the subnet mask is 255.255.240.0?
Solution :
Step 1: Convert given IP and Subnet mask to Binary
Step 2: Perform AND Operation on these two.
11001000 00101101 00100010 00111000 Binary 200.45.34.56
11111111 11111111 11110000 00000000 Subnet Mask 255.255.255.0
6
Subnet 1:
The bit combination is 001.
Taking last octet in binary:0 0 1 0 0 0 0 0 = 32 (10)
Hence the subnet address is, 201.70.64. 32
Subnet 2:
The bit combination is 01 0.
Taking last octet in binary:0 0 1 0 0 0 0 0 = 64(10)
Hence the subnet address is, 201.70.64. 64
Subnet 3:
The bit combination is 011.
Taking last octet in binary:0 1 1 0 0 0 0 0 = 96(10)
Hence the subnet address is, 201.70.64. 96
Subnet 4:
The bit combination is 100.
Taking last octet in binary :1 0 0 0 0 0 0 0 = 128(10)
Hence the subnet address is, 201.70.64. 128
Subnet 5:
The bit combination is 101.
Taking last octet in binary :1 0 1 0 0 0 0 0 = 160(10)
Hence the subnet address is, 201.70.64. 160
Subnet 6:
The bit combination is 110.
Taking last octet in binary :1 1 0 0 0 0 0 0 = 192 (10)
Hence the subnet address is, 201.70.64. 192
Example 3:
A company is granted the site address 181.56.0.0 (class B). The company needs 1000
subnets. Design the subnets.
Solution:
The number of 1s in the default mask is 16 (class B).
The company needs 1000 subnets.
This number is not a power of 2.
The next number that is a power of 2 is 1024 (210).
We need 10 more 1’s in the subnet mask.
The total number of 1’s in the subnet mask is 26 (16 + 10).
The total number of 0’s is 6 (32 - 26).
The mask is
11111111 11111111 11111111 11000000
or
255.255.255.192
7
The number of subnets is 1024.
The number of addresses in each subnet is 26 (6 is the number of 0s) or 64.
Supernetting
The most of the class A and class B addresses were exhausted; however, there was still
a huge demand for midsize blocks.
The size of a class C block with a maximum number of 256 addresses did not satisfy the
needs of most organizations.
One solution was supernetting.
In supernetting, an organization can combine several class C blocks to create a larger
range of addresses.
In other words, several networks are combined to create a supernetwork or a supernet.
An organization can apply for a set of class C blocks instead of just one.
For example, an organization that needs 1000 addresses can be granted four contiguous
class C blocks.
The organization can then use these addresses to create one supernetwork.
Supernetting decreases the number of 1’s in the mask.
For example,
o if an organization is given four class C addresses, the mask changes from 24 to 22.
Example:
We need to make a supernetwork out of 16 class C blocks. What is the supernet mask?
Solution:
We need 16 blocks.
For 16 blocks we need to change four 1s to 0s in the default mask. So the mask is
11111111 11111111 11110000 00000000
Or
8
255.255.240.0
Address Depletion
The flaws in classful addressing scheme combined with the fast growth of the
Internet lead to the near depletion of the available addresses.
Yet the number of devices on the Internet is much less than the 232 address space.
We have run out of class A and B addresses, and a class C block is too small for
most midsize organizations.
One solution that has alleviated the problem is the idea of classless addressing.
Classless Addressing
To overcome address depletion and give more organizations access to the
Internet, classless addressing was designed and implemented.
In this scheme, there are no classes, but the addresses are still granted in blocks.
Address Blocks
In classless addressing, when an entity, small or large, needs to be connected to
the Internet, it is granted a block (range) of addresses.
The size of the block (the number of addresses) varies based on the nature and
size of the entity.
For example, a household may be given only two addresses; a large organization
may be given thousands of addresses.
An ISP, as the Internet service provider, may be given thousands of addresses
based on the number of customers it may serve.
Restriction: To simplify the handling of addresses, the Internet authorities impose
three restrictions on classless address blocks:
1. The addresses in a block must be contiguous, one after another.
2. The number of addresses in a block must be a power of 2 (1, 2, 4, 8, ...).
3. The first address must be evenly divisible by the number of addresses.
Example:
A company needs 600 addresses. Which of the following set of class C blocks can be used to
form a supernet for this company?
1. 198.47.32.0 198.47.33.0 198.47.34.0
2. 198.47.32.0 198.47.42.0 198.47.52.0 198.47.62.0
3. 198.47.31.0 198.47.32.0 198.47.33.0 198.47.52.0
4. 198.47.32.0 198.47.33.0 198.47.34.0 198.47.35.0
Solution:
1: No, there are only three blocks.
2: No, the blocks are not contiguous.
3: No, 31 in the first block is not divisible by 4.
4: Yes, all three requirements are fulfilled.
9
5.3 Layered Structure of the TCP / IP Model – Host-to-Network, Internet,
Transport, Application Layer.
The TCP/IP protocol suite was developed prior to the OSI model.
Therefore, the layers in the TCP/IP protocol suite do not exactly match those in the
OSI model.
The original TCP/IP protocol suite was defined as having four layers: host-to-
network, internet, transport, and application.
10
This layer is concerned with the format of datagrams as defined in the internet
protocol(IP).
The protocols in this layer include Address Resolution Protocol (ARP),
Reverse Address Resolution Protocol (RARP) and
Internet Control Message Protocol (ICMP).
11
Fig: TCP/ IP Protocol Suite
Host-to-Network Layer Protocol
Host to network Layer Defines two protocols
SLIP
PPP
SLIP and PPP Protocols allow a user to dial into an ISP over Telephone Line.
12
Password Authentication Protocol(PAP):
The second is of authentication.
Password Authentication is used.
Network Control Protocol (NCP):
After authentication is done, PPP sends NCP packet.
This packet tells ISP server what kind of traffic is to be passed over PPP link.
IP Control Protocol (IPCP):
Finally the IP packets are exchanged.
IPCP Establishes and terminates the Network layer connection.
SLIP Vs PPP
SLIP PPP
Serial Line Internet Protocol does In PPP, LCP (Line Control Protocol) is
not establish or maintain connection responsible for establishing, maintaining and
between the client and ISP server. termination connection between two end
points.
Communication starts once the Communication begins only after
connection between two modems authentication and the types of traffic is sent
are established. by the client.
Type of traffic cannot be selected in Type of traffic can be selected by
SLIP. NCP( Network Control Protocol)
No protocol for termination. IPCP(IP Control Protocol) terminates a
network layer connection between the user
and ISP.
No addressing mechanism provided. Additional services for addressing mechanism
is provided
Doesn’t allow error control Allows error control
No provision for data compression Provides Data compression.
ARP takes the IP address of a host as input & gives its corresponding physical
address as the output.
The Internet is based on IP addresses
Data link protocols (Ethernet, FDDI, ATM) may have different (MAC)
addresses
The ARP and RARP protocols perform the translation between IP addresses and
MAC layer addresses.
ARP sends the IP broadcast message to all the computer on the network.
The computer whose IP address matches the broadcast IP address sends a reply and
along with, its physical address to the broadcasting computer.
All other computers ignore the broadcast message.
Address Translation with ARP
Example:
ARP request: Argon broadcasts an ARP request to all stations on the network: “What is
the hardware address of Router137?”
ARP Reply: Router137 responds with an ARP Reply which contains the hardware address
14
ARP Packet Format
E th e rn e t II h e a d e r
6 6 2 28 10 4
H a rd w a re typ e (2 b yte s ) P ro to co l ty p e (2 b y te s )
H a rd w a re a d d re s s P ro to co l a d d re ss
O p e ra tio n c o d e (2 b y te s)
le n g th (1 b y te ) le n g th (1 b yte )
S o u rce h a rd w a re a d d re s s *
S o u rc e p ro to c o l a d d re s s*
T a rg e t h a rd w a re a d d re s s*
T a rg e t p ro to co l a d d re ss *
IP Header Format
Fields Of IP Header:
Version (4 bits): current version is 4.
Header length (4 bits): length of IP header, in multiples of 4 bytes
DS/ECN field (1 byte): This field was previously called as Type-of-Service (TOS)
field.
Differentiated Service (DS) (6 bits): Used to specify service level (currently
not supported in the Internet)
Explicit Congestion Notification (ECN) (2 bits):New feedback mechanism
used by TCP.
Identification (16 bits): Unique identification of a datagram from a host.
Incremented whenever a datagram is transmitted.
Flags (3 bits):
First bit always set to 0
DF bit (Do not fragment)
MF bit (More fragments)
Time To Live (TTL) (1 byte): Specifies longest paths before datagram is dropped.
16
Role of TTL field: Ensure that packet is eventually dropped when a routing
loop occurs.
Used as follows:
Sender sets the value (e.g., 64)
Each router decrements the value by 1
When the value reaches 0, the datagram is dropped
Protocol (1 byte):
Specifies the higher-layer protocol.
Functions of the IP
1. Addressing:
In order to perform the job of delivering datagrams, IP must know where to
deliver them to. For this reason, IP includes a mechanism for host addressing.
2. Data Encapsulation and Formatting/ Packaging:
IP accepts data from the transport layer protocols UDP and TCP.
It then encapsulates this data into an IP datagram using a special format
prior to transmission.
17
IP fragment IP datagrams into pieces.
The receiving device uses the reassembly function to recreate the whole IP
datagram again.
4. Routing / Indirect Delivery:
When an IP datagram must be sent to a destination on the same local
network, this is done using direct delivery.
However, if the final destination is on a distant network not directly attached
to the source datagram must be delivered indirectly.
IPV6
IP version 6 (IPv6) is an advanced version of IPv4.
It takes all good features of IPv4 and adds new ones.
Larger address space: IPv6 uses 128 bit(16 Bytes) Address.
Better header format: This simplifies and speeds up the routing process.
New options. IPv6 has new options to allow for additional functionalities.
Allowance for extension: IPv6 is designed to allow the extension of the protocol if
required by new technologies or applications.
IPv6 major goals:
1. Support billions of hosts.
2. Reduce the size of the routing tables.
3. Simplify the protocol.
4. Provide better security (authentication and privacy).
5. More attention to the type of service
6. Aid multicasting by allowing scopes to be specified.
7. Make it possible for a host to roam without changing its address.
8. Allow the protocol to evolve in the future.
9. Permit the old and new protocols to coexist for years.
Header Fields:
Version (4-bit): Defines the version number of the IP. For IPv6, the value is 6.
Priority(4-bit): Defines the priority of the packet with respect to traffic congestion.
Flow label (3-byte /24-bit): It is designed to provide special handling flow of data.
Payload length(2-byte): Defines the length of the IP datagram excluding the base
header.
18
Hop limit (8-bit): Serves the same purpose as the TTL field in IPv4.
Next header (8-bit):
Defines the header that follows the base header in the datagram.
The next header is either one of the optional extension headers used by IP or
the header of an encapsulated packet such as UDP or TCP.
Note that this field in version 4 is called the protocol.
Source address.:
The source address field is a 16-byte (128-bit)
Internet address that identifies the original source of the datagram.
Destination address.
The destination address field is a 16-byte (128-bit)
Internet address that usually identifies the final destination of the datagram.
However, if source routing is used, this field contains the address of the next
router.
IPv4 IPv6
1. Source and destination addresses are 1. Source and destination addresses are 128
32 bits (4 bytes) in length. bits(16 bytes)in length.
2. Uses broadcast addresses to send 2. There are no IPv6 broadcast addresses.
traffic to all nodes on a subnet. Instead, multicast scoped addresses are
used.
3. Fragmentation is supported at 3. Fragmentation is not supported at routers.
Originating hosts and intermediate It is only supported at the
routers.
4. IP header include a checksum. 4. IP header does not include a checksum.
5.IP header includes options. 5. All optional data is moved toIPv6
extension headers.
6.IPsec support is optional 6.IPsec support is required in a full IPv6
implementation.
7. No identification of payload for QoS 7. Payload identification for QoS handling By
Handling by routers is present within routers is included in theIPv6 header using
the IPv4 header. the Flow Label field.
8. Address must be configured either 8. Addresses can be automatically assigned
manually or through DHCP. using stateless address auto configuration,
assigned using DHCPv6, or manually
configured.
9. IP address represented in decimal 9. IP address is represented in hexadecimal
number system number system
10. “.” used as seperator 10. ‘ : ‘ used as separator .
11. Uses host address (A) resource 11. Uses host address (AAAA) resource
records in the domain name system to records in the domain name system to map
map host names to IPv4 addresses. host names to IPv6 addresses.
4. ICMP
It is internet control message protocol.
19
It reports error and sends control messages.
Error reporting messages include – destination unreachable, source quench ,
time exceed, parameter problem, redirection etc.
Query message includes –echo request and reply, time stamp request and reply,
router solicitation and advertisement, etc.
TCP is Reliable-
Reliable means that every transmission of data is acknowledged by the receiver.
Reliable does not mean that things don't go wrong, it means that we find out when
things go wrong.
If the sender does not receive acknowledgement within a specified amount of time,
the sender retransmits the data.
2. UDP
UDP is user datagram protocol.
It is connectionless protocol because data is sent without establishing a connection
between sender and receiver before sending the data.
UDP is unreliable because data is delivered without acknowledgement.
UDP does not perform Auto retransmission.
UDP does not use flow control .
UDP has high transmission speed.
21
UDP Vs TCP
UDP TCP
Complexity UDP is less complex TCP is more complex
Connection UDP is connection less protocol TCP is connection oriented protocol
Reliability It provides unreliable delivery It provides reliable delivery of
of messages messages
Function By using this protocol one As a message makes its way across
program can send a load of the internet from one computer to
packets to another and that another. This is connection based.
would be the end of the
relationship.
layer they exist Transport layer Transport layer
Flow controlling UDP has no flow control TCP has flow control
Overhead Overhead is very low Overhead is low
Which is powerful UDP is less powerful TCP is more powerful.
SMTP
SMTP is simple mail transfer protocol.
It is connection oriented text based protocol.
Sender communicates with receiver using a command and supplying data over
reliable TCP connection.
SMTP is standard application layer protocol for delivery of email over TCP/IP
network.
SMTP establish a TCP connection between sender and port number 25 of receiver.
Electronic Mail
22
Three major components:
user agents
mail servers
simple mail transfer protocol: SMTP
User Agent
Also called as “mail reader”
composing, editing, reading mail messages e.g., Eudora, Outlook, Mozilla
Thunderbird
outgoing, incoming messages stored on server.
Mail Servers
mailbox contains incoming messages for user
message queue of outgoing (to be sent) mail messages
SMTP
protocol between mail servers to send email messages
client: sending mail server
“server”: receiving mail server
Scenario: Alice sends message to Bob
1) Alice uses UA to compose message and “to” [email protected]
2) Alice’s UA sends message to her mail server; message placed in message queue
3) Client side of SMTP opens TCP connection with Bob’s mail server
4) SMTP client sends Alice’s message over the TCP connection
5) Bob’s mail server places the message in Bob’s mailbox
6) Bob invokes his user agent to read message
23
Sample SMTP interaction
FTP
FTP is used for copying a file from one host to the other.
Some of the problem in transferring files :
Two systems may use different file name conventions.
Two systems may represent text data in different types.
The directory structure of the two systems may be different.
FTP provides a simple solution to all these problems.
FTP established two connections between the client and server.
One is for data transfer and the other is for the control information.
24
FTP: separate control, data connections
FTP client contacts FTP server at port 21
client authorized over control connection.
client browses remote directory by sending commands over control connection.
when server receives file transfer command, server opens 2nd TCP connection (for
file) to client after transferring one file, server closes data connection.
server opens another TCP data connection to transfer another file.
FTP server maintains “state”: current directory, earlier authentication.
Control connection:
Control connection remains alive during the entire process.
The IP uses minimize delay type services because this is an interactive
connection between a user and server.
Data Connection:
Data connection uses the port 20 at the site.
This connection is opened when data to be transferred is ready and it is
closed when transfer of data is over.
The service types used by IP is maximize throughput.
TELNET
TELNET is abbreviation for Terminal Network.
It is standard TCP/IP protocol for virtual terminal services proposed by ISO.
TELNET enables establishment of connection to a remote system in such a way that
a local terminal appears to be terminal at remote system.
TELNET is general purpose client server application program.
Remote login
When user wants to access the application or utility located at the remote
machine ,he or she performs remote login.
Here the telnet client and server program come into use.
25
The user sends the keystrokes to local operating system. local operating system
accept is, but do not interpret them.
The characters are send to TELNET client.
TELNET client transform the character to a universal character set called Network
Virtual Terminal Character and deliver them to the local TCP/IP stack.
Summery
Connectionless protocols:
IP
ICMP
UDP
Connection oriented protocol:
TCP
SLIP
PPP
SMTP
26
5.5 Comparison between OSI and TCP / IP Network Model.
OSI reference model TCP/IP network model
1)It has 7 layers 1)It has 4 layers
2)Transport layer guarantees delivery 2)Transport layer does not guarantees
of packets delivery of packets
3)Horizontal approach 3)Vertical approach
4)Separate presentation layer 4)No session layer, characteristics are
provided by transport layer
5)Separate session layer 5)No presentation layer, characteristics
are provided by application layer
6)Network layer provides both 6)Network layer provides only
connectionless and connection oriented connection less services
services
7)It defines the services, interfaces and 7)It does not clearly distinguishes
protocols very clearly and makes a clear between service interface and protocols
distinction between them
8)The protocol are better hidden and 8)It is not easy to replace the protocols
can be easily replaced as the technology
changes
9)OSI truly is a general model 9)TCP/IP cannot be used for any other
application
10)It has a problem of protocol filtering 10) The model does not fit any protocol
into a model stack.
27
SNJB’S Shri HHJB Polytechnic, Chandwad
Chapter 5 Marks 20
Reference Models
THE OSI MODEL
Established in 1947, the International Standards Organization (ISO) is a
multinationalbody dedicated to worldwide agreement on international standards. An ISO
standardthat covers all aspects of network communications is the Open Systems
Interconnectionmodel. It was first introduced in the late 1970s. An open system is a set of
protocols thatallows any two different systems to communicate regardless of their
underlying architecture.The purpose of the OSI model is to show how to facilitate
communicationbetween different systems without requiring changes to the logic of the
underlying hardwareand software. The OSI model is not a protocol; it is a model for
understanding anddesigning a network architecture that is flexible, robust, and
interoperable.
The OSI model is a layered framework for the design of network systems thatallows
communication between all types of computer systems. It consists of seven separatebut
related layers, each of which defines a part of the process of moving informationacross a
network (see Figure 5.1). An understanding of the fundamentals of the OSImodel provides a
solid basis for exploring data communications.
Layered Architecture
The OSI model is composed of seven ordered layers: physical (layer 1), data link (layer
2),network (layer 3), transport (layer 4), session (layer 5), presentation (layer 6),
andapplication (layer 7). Figure 5.2 shows the layers involved when a message is sent
fromdevice A to device B. As the message travels from A to B, it may pass through
manyintermediate nodes. These intermediate nodes usually involve only the first three
layersof the OSI model.
In developing the model, the designers distilled the process of transmitting data toits
most fundamental elements. They identified which networking functions had relateduses
and collected those functions into discrete groups that became the layers. Eachlayer defines
a family of functions distinct from those of the other layers. By definingand localizing
functionality in this fashion, the designers created an architecture that isboth
comprehensive and flexible. Most importantly, the OSI model allows
completeinteroperability between otherwise incompatible systems.
Within a single machine, each layer calls upon the services of the layer just belowit.
Layer 3, for example, uses the services provided by layer 2 and provides services forlayer 4.
Between machines, layer x on one machine communicates with layer x onanother machine.
This communication is governed by an agreed-upon series of rulesand conventions called
protocols. The processes on each machine that communicate ata given layer are called peer-
to-peer processes. Communication between machines istherefore a peer-to-peer process
using the protocols appropriate to a given layer.
Peer-to-Peer Processes
At the physical layer, communication is direct: In Figure 5.2(a), device A sends a
streamof bits to device B (through intermediate nodes). At the higher layers, however,
communicationmust move down through the layers on device A, over to device B, and
thenback up through the layers. Each layer in the sending device adds its own informationto
the message it receives from the layer just above it and passes the whole package tothe
layer just below it.
The passing of the data and network information down through the layers of the
sendingdevice and back up through the layers of the receiving device is made possible byan
interface between each pair of adjacent layers. Each interface defines the informationand
services a layer must provide for the layer above it. Well-defined interfaces andlayer
functions provide modularity to a network. As long as a layer provides theexpected services
to the layer above it, the specific implementation of its functions canbe modified or
replaced without requiring changes to the surrounding layers.
Upon reaching its destination, the signal passes into layer 1 and is transformedback into
digital form. The data units then move back up through the OSI layers. Aseach block of data
reaches the next higher layer, the headers and trailers attached to it atthe corresponding
sending layer are removed, and actions appropriate to that layer aretaken. By the time it
reaches layer 7, the message is again in a form appropriate to theapplication and is made
available to the recipient.
Encapsulation
Figure 5.2(b) reveals another aspect of data communications in the OSI model:
encapsulation. A packet (header and data) at level 7 is encapsulated in a packet at level 6.
The whole packet at level 6 is encapsulated in a packet at level 5, and so on.
In other words, the data portion of a packet at level N - 1 carries the whole packet
(data and header and maybe trailer) from level N. The concept is called encapsulation; level
N - 1 is not aware of which part of the encapsulated packet is data and which part is the
header or trailer. For level N - 1, the whole packet coming from level N is treated as one
integral unit.
In this section we briefly describe the functions of each layer in the OSI model.
1.Physical Layer
The physical layer coordinates the functions required to transmit a bit stream over a
physical medium. It deals with the mechanical and electrical specifications of the interface
and transmission media. It also defines the procedures and functions that physical devices
Mr. P R Sali 4 DCC (22414)
SNJB’S Shri HHJB Polytechnic, Chandwad
and interfaces have to perform for transmission to occur. Figure 5.3 shows the position of
the physical layer with respect to the transmission media and the data link layer.
1. Physical characteristics of interfaces and media. The physical layer defines the
characteristics of the interface between the devices and the transmission media. It also
defines the type of transmission medium.
2. Representation of bits. The physical layer data consists of a stream of bits (sequence of
0s or 1s) without any interpretation. To be transmitted, bits must be encoded into signals:
electrical or optical. The physical layer defines the type of representation (how 0s and 1s are
changed to signals).
3. Data rate. The transmission rate-The number of bits sent each second is also defined by
the physical layer. In other words, the physical layer defines the duration of a bit, which is
how long it lasts.
4. Synchronization of bits. The sender and receiver not only must use the same bit rate but
also must be synchronized at the bit level. In other words, the sender and the receiver
clocks must be synchronized.
The data link layer transforms the physical layer, a raw transmission facility, to a
reliable link. It makes the physical layer appear error- free to the upper layer (network
layer). Figure 5.4 shows the relationship of the data link layer to the network and physical
layers.
The data link layer is responsible for transmitting frames from one node to the next.
1. Framing. The data link layer divides the stream of bits received from the network layer
into manageable data units called frames.
3. Flow control. If the rate at which the data are absorbed by the receiver is less than the
rate produced in the sender, the data link layer imposes a flow control mechanism to
prevent overwhelming the receiver.
4. Error control. The data link layer adds reliability to the physical layer by adding
mechanisms to detect and retransmit damaged or lost frames. It also uses a mechanism to
prevent duplication of frames. Error control is normally achieved through a trailer added to
the end of the frame.
5.Access control. When two or more devices are connected to the same link, data link layer
protocols are necessary to determine which device has control over the link at any given
time.
The bottom two OSI layers, the physical layer and the data-link layer, define how multiple
computers can use the network simultaneously without interfering witheach other.The
IEEE802 project incorporated the specifications in those two layers to create standardsthat
have defined the dominant LAN environments. Figure 5.5 shows the data-link layer and its
two sublayers.After deciding that more detail was needed at the data-link layer, the 802
standards committee divided the data-link layer into two sub-layers:
• Logical Link Control (LLC) Establishing and terminating links, controlling frame traffic,
sequencing frames, and acknowledging frames
• Media Access Control (MAC) Managing media access, delimiting frames, checking frame
errors, and recognizing frame addresses
The LLC sub-layer manages data-link communication and defines the use of logical
interface points called service access points (SAP), Other computers can refer to and use
SAPs to transfer information from the LLC sub-layer to the upper OSI layers. Category 802.2
defines these standards.
MAC sublayer is the lower of the two sublayers, providing shared access to the
physical layer for the computers' NICs. The MAC layer communicates directly with the NIC
and is responsible for delivering errorfree data between two computers on the network.
Categories 802.3, 802.4, 802.5, and 802.12 define standards for this sublayer and OSI layer
1, the physical layer.
3.Network Layer
If two systems are connected to the same link, there is usually no need for a network
layer. However, if the two systems are attached to different networks with connecting
devices between the networks, there is often a need for the network layer to accomplish
source-to-destination delivery. Figure 5.6 shows the relationship of the network layer to the
data link and transport layers.
1.Logical addressing. The physical addressing implemented by the data link layer handles
the addressing problem locally. If a packet passes the network boundary, we need another
addressing system to help distinguish the source and destination systems. The network
layer adds a header to the packet coming from the upper layer that, among other things,
includes the logical addresses of the sender and receiver.
4.Transport Layer
The transport layer is responsible for delivery of a message from one process to another.
1. Port addressing. Computers often run several processes (running programs) at the same
time. For this reason, process-to-process delivery means delivery not only from one
computer to the next but also from a specific process on one computer to specific process
on the other. The transport layer header must therefore include type of address called a
port address. The network layer gets each packet to the correct computer; the transport
layer gets the entire message to the correct process on that computer.
4. Flow control. Like the data link layer, the transport layer is responsible for flow control.
However, flow control at this layer is performed end to end rather than across a single link.
5. Error control. Like the data link layer, the transport layer is responsible for error control.
However, error control at this layer is performed end to end rather than across a single link.
5.Session Layer
The session layer is the network dialog controller. It establishes, maintains, and syn-
chronizes the interaction between communicating systems. Specific responsibilities of the
session layer include the following:
1. Dialog control. The session layer allows two systems to enter into a dialog. It allows the
communication between two processes to take place in either half-duplex (one way at a
time) or full-duplex (two ways at a time) mode. For example, the dialog between a terminal
connected to a mainframe can be half-duplex.
2. Synchronization. The session layer allows a process to add checkpoints (synchronization
points) into a stream of data. For example, if a system is sending a file of 2000 pages, it is
advisable to insert checkpoints after every 100 pages to ensure that each 100 page unit is
received and acknowledged independently. In this case, if a crash happens during the
transmission of page 523, the only pages that need to be resent after system recovery are
pages 501 to 523. Pages previous to 501 need not be resent. Figure 5.8 illustrates the
relationship of the session layer to the transport and presentation layers.
6.Presentation Layer
The presentation layer is concerned with the syntax and semantics of the
information exchanged between two systems. Figure 5.9 shows the relationship between
the presentation layer and the application and session layers.
1. Translation. The processes (running programs) in two Systems are usually exchanging
information in the form of character strings, numbers, and so on. The information must be
changed to bit streams before being transmitted. Because different computers use different
encoding systems, the presentation layer is responsible for interoperability between these
different encoding methods. The presentation layer at the sender changes the information
from its sender- dependent format into a common format. The presentation layer at the
receiving machine changes the common format into its receiver- dependent format.
3.Compression. Data compression reduces the number of bits contained in the information.
Data compression becomes particularly important in the transmission of multimedia such as
text, audio, and video.
7.Application Layer
The application layer enables the user, whether human or software, to access the
network. It provides user interfaces and support for services such as electronic mail remote
file access and transfer, shared database management, and other types of distributed
information services.
Figure 5.10 shows the relationship of the application layer to the user and the presentation
layer. Of the many application services available, the figure shows only three: X.400
(message-handling services), X.500 (directory services), and file transfer, access, and
management (FTAM). The user in this example uses X.400 to send an email message.
2. File transfer, access, and management (FTAM). This application allows a user to access
files in a remote host (to make changes or read data), to retrieve files from a remote
computer for use in the local computer, and to manage or control files in a remote
computer locally.
3.Mail services. This application provides the basis for email forwarding and storage.
4.Directory services. This application provides distributed database sources and access for
global information about various objects and services.
The ARPANET was a research network sponsored by the DoD (U.S. Department of Defense).
It eventually connected hundreds of universities and government installations, using leased
telephone lines. When satellite and radio networks were added later, the existing protocols
had trouble interworking with them, so a new reference architecture was needed. Thus, the
ability to connect multiple networks in a seamless way was one of the major design goals
from the very beginning. This architecture later became known as the TCP/IP Reference
Model, after its two primary protocols. It was first defined in (Cerf and Kahn, 1974).
The TCP/IP protocol suite was developed prior to the OSI model. Therefore, the layers
in the TCP/IP protocol suite do not exactly match those in the OSI model. The original TCP/IP
protocol suite was defined as having four layers: host-to-network, internet, transport, and
application. However, when TCP/IP is compared to OSI, we can say that the host-to-network
layer is equivalent to the combination of the physical and data link layers. The internet layer
is equivalent to the network layer, and the application layer is roughly doing the job of the
session, presentation, and application layers with the transport layer in TCP/IP taking care of
part of the duties of the session layer.
Network Layer
At the network layer (or, more accurately, the internetwork layer), TCP/IP supports
the Internetworking Protocol. IP, in turn, uses four supporting protocols: ARP, RARP, ICMP,
and IGMP.
unreliability of the underlying layers and does its best to get a transmission through to its
destination, but with no guarantees.
IP transports data in packet called datagram, each of which is transported separately.
Datagram can travel along different routes and can arrive out of sequence or be duplicated.
IP does not keep track of the routes and has no facility for reordering datagram once they
arrive at their destination.
The limited functionality of IP should not be considered a weakness, however. IP
provides bare-bones transmission functions that free the user to add only those facilities
necessary for a given application and thereby allows for maximum efficiency.
Transport Layer
Traditionally the transport layer was represented in TCP/IP by two protocols: TCP and
UDP. IP is a host-to-host protocol, meaning that it can deliver a packet from one physical
device to another. UDP and TCP are transport level protocols responsible for delivery of a
message from a process (running program) to another process. A new transport layer
protocol, SCTP, has been devised to meet the needs of some newer applications.
Application Layer
The application layer in TCPIIP is equivalent to the combined session, presentation,
and application layers in the OSI model. Many protocols are defined at this layer.
Communication at the network layer is host-to-host (computer-to-computer); a computer
somewhere in the world needs to communicate with another computer somewhere else in
the world. Usually, computers communicate through the Internet. The packet transmitted
by the sending computer may pass through several LANs or WANs before reaching the
destination computer. For this level of communication, we need a global addressing
scheme; we called this as logical addressing. Today, we use the term IP address to mean a
logical address in the network layer of the TCP/IP protocol suite.
The Internet addresses are 32 bits in length; this gives us a maximum of 232
addresses. These addresses are referred to as IPv4 (IP version 4) addresses or simply IP
addresses if there is no confusion. The need for more addresses, in addition to other
concerns about the IP layer, motivated a new design of the IP layer called the new
generation of IP or IPv6 (IP version 6).In this version, the Internet uses 128-bit addresses
that give much greater flexibility in address allocation. These addresses are referred to as
IPv6 (IP version 6) addresses.
Address mapping:
Internet Protocol (IP) as the main protocol at the network layer. IP was designed as a
best-effort delivery protocol, but it lacks some features such as flow control and error
control. It is a host-to-host protocol using logical addressing. To make IP more responsive to
some requirements in today's internetworking, we need the help of other protocols.
We need protocols to create a mapping between physical and logical addresses. IP
packets use logical (host-to-host) addresses. These packets, however, need to be
encapsulated in a frame, which needs physical addresses (node-to-node). We will see that a
protocol called ARP, the Address Resolution Protocol, is designed for this purpose. We
sometimes need reverse mapping-mapping a physical address to a logical address. For
example, when booting a diskless network or leasing an IP address to a host. Three
protocols are designed for this purpose: RARP, BOOTP, and DHCP. Lack of flow and error
control in the Internet Protocol has resulted in another protocol, ICMP that provides alerts.
It reports congestion and some types of errors in the network or destination host.
IP was originally designed for unicast delivery, one source to one destination. As the
Internet has evolved, the need for multicast delivery, one source to many destinations, has
increased tremendously. IGMP gives IP a multicast capability.
In Figure 5.12 a, the system on the left (A) has a packet that needs to be delivered to
another system (B) with IP address 141.23.56.23. System A needs to pass the packet to its
data link layer for the actual delivery, but it does not know the physical address of the
recipient. It uses the services of ARP by asking the ARP protocol to send a broadcast ARP
request packet to ask for the physical address of a system with an IF address of
141.23.56.23.
This packet is received by every system on the physical network, but only system B
will answer it. Now system A can send all the packets it has for this destination by using the
physical address it received.
Operation
Let us see how ARP functions on a typical internet. First we describe the steps
involved. we discuss the four cases in which a host or router needs to use ARP. These are
the steps involved in an ARP process:
1. The sender knows the IP address of the target. We will see how the sender obtains
this shortly.
2. IP asks ARP to create an ARP request message, filling in the sender physical
address, the sender IP address, and the target IP address. The target physical address field is
filled with Os.
3. The message is passed to the data link layer where it is encapsulated in a frame by
using the physical address of the sender as the source address and the physical broadcast
address as the destination address.
4. Every host or router receives the frame. Because the frame contains a broadcast
destination address, all stations remove the message and pass it to ARP. All machines except
the one targeted drop the packet. The target machine recognizes its IP address.
Mr. P R Sali 19 DCC (22414)
SNJB’S Shri HHJB Polytechnic, Chandwad
5. The target machine replies with an ARP reply message that contains its physical
address. The message is unicast.
6. The sender receives the reply message. It now knows the physical address of the
target machine.
7. The IP datagram, which carries data for the target machine, is now encapsulated in
a frame and is unicast to the destination.
RARP
Reverse Address Resolution Protocol (RARP) finds the logical address for a machine
that knows only its physical address. Each host or router is assigned one or more logical(IP)
addresses, which are unique and independent of the physical (hardware) address of the
machine. To create an IP datagram, a host or a router needs to know its own IP address or
addresses. The IP address of a machine is usually read from its configuration file stored on a
disk file. However, a diskless machine is usually booted from ROM, which has minimum
booting information. The ROM is installed by the manufacturer. It cannot include the IP
address because the IP addresses on a network are assigned by the network administrator.
The machine can get its physical address (by reading its NIC, for example), which is unique
locally. It can then use the physical address to get the logical address by using the RARP
protocol. A RARP request is created and broadcast on the local network. Another machine
on the local network that knows all the IP addresses will respond with a RARP reply. The
requesting machine must be running a RARP client program; the responding machine must
be running a RARP server program. There is a serious problem with RARP: Broadcasting is
done at the data link layer. The physical broadcast address, allis in the case of Ethernet,
does not pass the boundaries of a network. This means that if an administrator has several
networks or several subnets, it needs to assign a RARP server for each network or subnet.
This is the reason that RARP is almost obsolete. Two protocols, BOOTP and DHCP, are
replacing RARP.
DHCP (Dynamic Host Configuration Protocol) is a client-server protocol that uses DHCP
servers and DHCP clients. A DHCP server is a machine that runs a service that can lease out
IP addresses and other TCP/IP information to any client that requests them. The DHCP
server typically has a pool of IP addresses that it is allowed to distribute to clients, and these
clients lease an IP address from the pool for a specific period of time, usually several days.
Once the lease is ready to expire, the client contacts the server to arrange for renewal.
DHCP clients are client machines that run special DHCP client software enabling them to
communicate with DHCP server.
DHCP clients obtain a DHCP lease for an IP address, a subnet mask, and various DHCP
options from DHCP servers in a four-step process:
Notations
There are two prevalent notations to show an IPv4 address: binary notation and
dotted decimal notation.
Binary Notation
In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred
to as a byte. So it is common to hear an IPv4 address referred to as a 32-bit address or a4-
byte address. The following is an example of an IPv4 address in binary notation:
0111010110010101 0001110100000010
Dotted-Decimal Notation
To make the IPv4 address more compact and easier to read, Internet addresses are
usually written in decimal form with a decimal point (dot) separating the bytes. The
following is the dotted decimal notation of the above address:
117.149.29.2
Figure 5.13 shows an IPv4 address in both binary and dotted-decimal notation.
Note that because each byte (octet) is 8 bits, each number in dotted-decimal notation
is a value ranging from 0 to 255.
Classful Addressing
IPv4 addressing, at its inception, used the concept of classes. This architecture is
called classful addressing. Although this scheme is becoming obsolete, we briefly discuss it
here to show the rationale behind classless addressing.
In classful addressing, the address space is divided into five classes: A, B, C, D, and E.
Each class occupies some part of the address space.
We can find the class of an address when given the address in binary notation or
dotted-decimal notation. If the address is given in binary notation, the first few bits can
immediately tell us the class of the address. If the address is given in decimal-dotted
notation, the first byte defines the class. Both methods are shown in Figure 5.14
The Internet community originally defined five address classes to accommodate networks of
varying sizes. Microsoft TCP/IP supports class A, B, and C addresses assigned to hosts. The
class of address defines which bits are used for the network ID and which bits are used for
the host ID. It also defines the possible number of networks and the number of hosts per
network.
1) Class A
Class A addresses are assigned to networks with a very large number of hosts. The high-
order bit in a class A address is always set to zero. The next seven bits complete the network
ID. The remaining 24 bits (the last three octets) represent the host ID. This allows for 126
networks and 16,777,214 hosts per network. Figure illustrates the structure of class A
addresses.
2) Class B
Class B addresses are assigned to medium-sized to large-sized networks. The two high-order
bits in a class B address are always set to binary 1 0. The next 14 bits complete the network
ID. The remaining 16 bits represent the host ID. This allows for 16,384 networks and 65,534
hosts per network. Figure illustrates the structure of class B addresses.
3) Class C
Class C addresses are used for small networks. The three high-order bits in a class C address
are always set to binary 1 1 0. The next 21 bits complete the network ID. The remaining 8
bits (last octet) represent the host ID. This allows for 2,097,152 networks and 254 hosts per
network. Figure illustrates the structure of class C addresses.
4) Class D
Class D addresses are reserved for IP multicast addresses. The four high-order bits in a class
D address are always set to binary 1 1 1 0. The remaining bits are for the address that
interested hosts recognize. Microsoft supports class D addresses for applications to
multicast data to multicast-capable hosts on an internetwork.
5) Class E
Class E is an experimental address that is reserved for future use. The high-order bits in a
class E address are set to 1111.
1. Addressing: In order to perform the job of delivering datagrams, IP must know where to
deliver them to. For this reason, IP includes a mechanism for host addressing. Furthermore,
since IP operates over internetworks, its system is designed to allow unique addressing of
devices across arbitrarily large networks. It also contains a structure to facilitate the routing
of datagrams to distant networks if that is required.
2. Data Encapsulation and Formatting/Packaging: IP accepts data from the transport layer
protocols UDP and TCP. It then encapsulates this data into an IP datagram using a special
format prior to transmission.
3. Fragmentation and Reassembly: IP datagrams are passed down to the data link layer for
transmission on the local network. However, the maximum frame size of each
physical/data-link network using IP may be different. For this reason, IP includes the ability
to fragment IP datagrams into pieces so they can each be carried on the local network. The
receiving device uses the reassembly function to recreate the whole IP datagram again.
IPv4 IPv6
1. Source and destination 1. Source and destination
addressesare32 bits (4 bytes) in addresses are 128 bits(16 bytes)in
length. length.
2. Uses broadcast addresses to 2. There arenoIPv6 broadcast
send traffic to all nodes on a addresses. Instead, multicast
subnet. scoped addresses are used.
3. Fragmentation is supported at 3. Fragmentation is not supported
Originating hosts and intermediate at routers. It is only supported at
routers. the originating host.
4. IP header includes a checksum. 4. IP header does not include a
checksum.
5. IP header includes options. 5. All optional data is moved
toIPv6 extension headers.
6.IPsec support is optional 6.IPsec support Is required in a
fullIPv6 implementation.
7. No identification of payload for 7. Payload identification for QoS
QoS Handling by routers is present handling By routers is included in
within the IPv4 header. theIPv6 header using the Flow
Label field.
8.Address must be configured 8.Addresses can be automatically
either manually or through DHCP assigned using stateless address
auto configuration, assigned using
DHCP, or manually configured.
9. IP address represented in 9. IP address is represented in
decimal number system hexadecimal number system
10. ‘.’used as separator. 10. ‘ :’ used as separator.
Mr. P R Sali 25 DCC (22414)
SNJB’S Shri HHJB Polytechnic, Chandwad
Connection-Oriented Service
In a connection-oriented service, a connection is first established between the sender
and the receiver. Data are transferred. At the end, the connection is released. We will see
shortly that TCP and SCTP are connection-oriented protocols.
TCP UDP
1. TCP is connection oriented 1. UDP is connection less protocol
protocol
2. It provides reliable delivery of 2. It provides unreliable delivery of
messages messages
3. It assigns datagram size 3. Every datagram segment is of
dynamically for efficiency. the same size.
4. TCP has flow control 4. UDP has no flow control
5. Overhead is low 5. Overhead is very low.
6. Transmission speed is high 6. Transmission speed is very high
Connection less protocol: These protocols do not establish a connection between devices. It
is manually achieved by transmitting information in one direction, from source to
destination without checking to see if the destination is still there or if it is prepared to
receive the information.
Connection-oriented protocol: It means that when devices communication they perform
hand sharing to set up on end to end connection. Usually one device begins by sending a
request to open a connection, and the other responds.
1. IP
IP is internet Protocol.
It is unreliable protocol because it does not provide any error control and flow control.
Packets in IP are called “Datagram”
2. ICMP
It is internet control message protocol.
It reports error and sends control messages.
Error reporting messages include – destination unreachable, source quench, time exceed,
parameter problem, redirection etc.
Query message includes –echo request and reply, time stamp request and reply, router
solicitation and advertisement etc.
3.UDP
UDP is user datagram protocol.
It is connectionless protocol because data is sent without establishing a connection between
sender and receiver before sending the data.
UDP is unreliable because data is delivered without acknowledgement.
UDP does not perform Auto retransmission.
UDP does not use flow control.
1) TCP
TCP is transmission control protocol.
It is connection oriented protocol because connection must be established prior to
transmission of data.
TCP is reliable protocol because data is delivered with acknowledgement.
TCP perform Auto Retransmission if the data is lost.
TCP use flow control.
TCP has low speed of transmission.
2. SLIP
SLIP is serial line internet protocol
SLIP does not perform error detection and correction.
SLIP does not provide any authentication.
SLIP is not approved internet standard.
SLIP supports only Internet protocol (IP)
SLIP supports static IP address assignment
3. PPP
PPP is point to point protocol.
PPP perform error detection
PPP provides authentication and security.
PPP is approved internet standard.
PPP supports IP and other protocols.
PPP supports Dynamic IP address assignment
4. SMTP
SMTP is simple mail transfer protocol.
It is connection oriented text based protocol in which sender communicates with receiver
using a command and supplying data over reliable TCP connection.
SMTP is standard application layer protocol for delivery of email over TCP/IP network.
SMTP establishes a TCP connection between sender and port number 25 of receiver.