Layered Protocol architecture

raggedsquadΔίκτυα και Επικοινωνίες

30 Οκτ 2013 (πριν από 3 χρόνια και 5 μήνες)

59 εμφανίσεις

Layered Protocol architecture
.


No matter how we slice it, we must arrange




L
ayered

approach to architecture

Communication

protocol specification

Interface specs & Architecture
.

Interface = Service





SYSTEM A

SYSTEM B







Protocol

Interface

Entities

Large message unit

Multiple
consecutive packets

Multiple frames

A stream of bits at
interface

And a series of

Reverse actions

Each subsystem comprises a number of independent
hardware/software modules called “entities”.


Across exchange of data and control information at the
same layer level is according to
protocol.


Servi
ce is across
interface

within the same system but
across layer boundary.


For well defined interface points and protocol specification,
a
layered architecture

accords an open system
implementation.


Open System Interconnection models.


OSI Protocol refere
nce model.


Has 7 layers. Other protocol suits based on this may have
lower number of layers.



APPLICATION

PRESENTATION

SESSION

TRANSPORT

NETWORK

DATA LINK

PHYSICAL


Application layer
: Unified virtual terminal layout on
incompatible terminals systems over network. File
Transfer. Remote login. Te
lnet. Remote copy. Program
browser.


Presentation layer
: Syntax and semantics of information
presented. Encoding data in a standard way. Basically
management of abstract data structures.



Session layer
: Creation and maintenance of a session on
different
machines. Dialog control. Traffic bidirectional?
One at a time? Token management problems.
Synchronization issues after machines crash?

Transport layer
: Take the message from the session layer,
split into packets, give them to Network layer and ensure
that

they arrive at the other end correctly. Split traffic on
multiple transport lines for high throughput.

Multiplex multiple lines on a single transport to save
money.


True end
-
to
-
end layer. Type of service. Error free or no
guarantee? Broadcast? Multicas
t?


Network layer:

Controls the operation of subnet. Figures
out how packets must be routed from source to destination.
Handling of network congestion. Handling of various
packet sizes.


Data Link
: To make the raw transmission facility appear
error
-
free e
ven in a buggy environment. Flow control
making sure fast sender does not overwhelm slow
receivers. Error detection and correction. Piggybacking for
acks when they are expensive to make.


Physical
: Transmission of raw
-
bits over communication
channel. Here
major issues are with the interface
procedures and definition of data.


Typically the protocol Architecture would see flows in the
following way.



Sender ↔ Router ↔ Receiver




IP Protocol Stack. An alternative to OSI/ISO model. Also
known as TCP/IP Protocol stack.

APPLICATION

PRESENTATION

SESSION

TRANSPORT

NETWORK

DATA LINK

PHYSICAL

APPLICATION

PRESENTATION

SESSION

TRANSPORT

NETWORK

DATA LINK

PHYSICAL

APPLICATION

PRESENTATION

SESSION

TRANSPORT

NETWORK

DATA LINK

PHYSICAL




Typical
protocols:


Application layer:
FTP, HTTP, DNS, POP3, NTP, NNTP,
SMTP,

SNMP, SSH, RTP, rlogin, …


Transport layer
: TCP, UDP, DCCP, …


IP layer:
IP (IPv4, IPv6), ICMP, IGMP, ARP, RARP, ..


DataLink
: Ethernet, Token
-
ring, Wi
-
Fi, PPP, SLIP, FDDI,
ATM, Frame Relay, Bluetooth, …


Physical:

Modems, ISDN, RS232, USB, …


IP Address.


Application

Application

Transport

Transport

Network

Network

Network

Network

DLink

li

DLi nk

li

DLi nk

li

DLi nk

li

Physi cal

p

li

Physi cal

p

li

Phys
i cal

p

li

Physi cal

p

li

Peer
-
to
-
Peer

Peer
-
to
-
Peer


IP address class:


Class A: 0 + 7 network ID bits + 24 host ID bits

Class B: 10 + 14 network ID bits + 16 host ID bits

Class C: 110 + 21 network ID bits + 8 host ID bits

Class D: 1110 + 28 multicast address bits


Address formats:


network. local.local
.local (for class A IDs)


network.network.network.local (for class C IDs)


IP address of a device
MAC address (physical ID)

MAC address is a permanently stamped address. IP
address is stored in a configuration file in the loca
l
disk.


Subnets:


A single network may be split into a multiple
networks for internal use but appear as a single
network to outsider. This is the concept of subnets.


Subnet mask. An address such that when added to
network address (in bitwise
-
and) splits

the address
into network + subnet + host address.


e.g. IP address: 12.11.10.9 subnet mask 255.254.0.0


Since the leading bit begins with 0, it’s a Class A
network with address 12.0.0.0



00001100 00001011 00001010 00001001

IP

+
11111111 11111110 000
00000 00000000

Subnet

___________________________________________


00001100 00001010 |
00000000 00000000



Network is extended by 7 more bits. Therefore, this is
subnet 10.


The remaining host part is 0.1.10.9 is the host
address.


IP and subnet masks

are often presented together in
this format. e.g. Network address = 154.4.32.0 ,
subnet mask = 255.255.224.0. In this case, the
network address can be written as 154.4.32.0/19

indicating subnet has 19 bits for the network portion
of address, and has rema
ining 13 bits for host part.


Therefore, total number of subnets =

-
2 = 6

Total numbe of hosts per subnet =


Classless Interdomain Routing (CIDR)


Classfull addresses waste a lot of addresses. Ideally,
we
could bunch similar network addresses together
and reduce ARP table considerably. For a good
example, see Tanenbaum


Some distinct networks:

a.

127.0.0.0 is used for loop
-
back address
(typically in the form of 127.0.0.1)

b.

When host address is either all 0s (4
.2BSD) or
all 1s (Unix OS standard), it’s considered a
broadcast message.

c.

For mobile objects, two addresses: Home
address (permanent), and a care
-
of address. Used
only for forwarding IP datagrams and admin
functions. Higher layers never use them.

d.

Care
-
of a
ddresses two types: Foreign agent
address, and Co
-
located care of address where
mails are sent directly to the device on a foreign
net.


TCP/IP includes a protocol suit ARP (Address
Resolution Protocol) to map IP addresses to physical
addresses by network

administrators. The constructed
table is called ARP cache.


RARP = Reverse Address resolution Protocol permits
the inverse mapping from MAC to corresponding IP
address. Hosts such as diskless workstations only
knows their MAC addresses when booted but not

their IP addresses. This must be obtained from an
RARP server source. (RFC 903 for details).