Você está na página 1de 6

16.1.

2 Layers of Networks

The data across a network is a complex operation that must be


carefully tuned to the physical characteristics of the network as well as the
logical character of the data being send. software must understand how
to avoid collision especially when working with different operating
systems and different cabling is added.

logical path
Application layer Application layer
Transport layer (TCP, UDP) Transport layer (TCP, UDP)

Internet layer(IP) Internet layer(IP)
† †
† †
The Host - to -Network Layer(Ethernet,Localtalk,FDDI)
† †
physical path
To make this complexity manageable , the different aspect of network
communication are separated into multiple layers. Each layer (see the
picture above )has a limted function . such as each layer will talk to the
† immediate above or below layer only.


The Host-to-Network Layer ( also known as Link layer , data link
layer or network -interface layer )

This layer defines how a particular network interface, such as


Ethernet card or a PPP connection sends IP data gram over its physical
connectgion to the local network and the world.

A part of this layer consists of the hardware used to connect different


computers like
Prof.T.N.shanmugam
http://www.annauniv.edu/shan
16.1.2 Layers of Networks
Wire,
Fiber -optic cables
Microwave relays, smoke signals.

Note that a Programmer need not worry about this layer.

But for the computers to communicate to each other it is not enough


that it is connected by wires and sending electricity back and forth.

It needs to agree on certain standards for how these signals are


interpreted.

Step 1. Determine how the packets of electricity or light or smoke map


into bits nad bytes of data.

Step 2. As the physical layer is analog and the bits & bytes are digital
this involves a digital -to- analog at the sending end & vice -versa on the
receiving end.

Step 3. As all the real analog system have noise error correction and
redundancy need to be built into the way data is translated into electricity.

All the above steps are done in the DATA LINK LAYER.

The most common DATA LINK LAYER is ETHERNET.


other popular Link Layers are TOKEN RING & LOCAL TALK.

A specific data link layer requires speicalized hardware.

Note that Ethernet cards won’t communicate to Token ring network. To


convert from one data link layer to another data link layers one requires a
GATEWAY.

The Internet layer :


The next layer of the network is the Internet layer. In model the OSI (
Open system interconnection), the internet layer goes by the more generic
term called the network layer. into larger groups called packets
A network layer protocol defines
1) how bits and bytes of data are organized
2) The addressing scheme by which different machines find each other.

The most widely used network layer protocol is the Internet protocol (IP)

Prof.T.N.shanmugam
http://www.annauniv.edu/shan
16.1.2 Layers of Networks
The other protocols used are

IPX used in the machines on Netware Networks.


AppleTalk used in Macintosh machines
NetBEUI is used Microsoft protocol used in windos workgroup &
Windows NT.

Note that each network layer protocol is independant of the lowerr layers.
hence all the above protocols can be used on Ethernet , Token Ring and
other data link layer.

Definition: A datagram is a data sent across the internet layer in


packets.

What a datagram contain?

Each datagram contains header from 20 to 60 bytes long and a payload


that contains upto 65,515 bytes of data.

The header of the data gram contains the following in order

1) 4-bit version number Always 0100 (decimal 4) for current IP will


be changed to 0110 (decimal 6) for IPv6 but the entire header format will
be changed for IPv6.

2) 4-bit header length


An unsigned integer between 0 to 15 specifying the number of 4 -byte
words in the header as the maximum value for header length field is
1111 ( decimal 15) an IP header can be atmost 60byte long.

3) 1-byte type of service A 3 -bit precedence field 4 types of service


bits ( minimize delay, maximize throughput , maximize reliability, minimize
monitary cost) and a o bit. Note that all service types are compatible.
Most of the computers and routers ignore these bits.

4) 2 byte datagram length


An unsigned integer specifying the length of the entire datagram,
including both header and payload.

5) 2 -byte identification number A unique identifier for each datagram


sent by a host : allows duplicate datagrams to be detected and thrown
away.

Prof.T.N.shanmugam
http://www.annauniv.edu/shan
16.1.2 Layers of Networks
6) 3 -bit flags The first bit is ‘0’ second bit is ‘0’ if this datagram may be
fragmented , 1 if it may not be ; second bit is ‘0’ if this is the last datagram 1
if there are more fragments.

7) 13 -bit fragment offset


In the event that the original IP datagram may be fragmented into
multiple pieces, it identifies the position of this fragment in the original
datagram.

8) 1-byte time-to -live (TTL),

Number of Nodes through which the datagram can pass before being
discarded; used to avoid infinite loops.

9) 1-byte protocol

Six for TCP, 17 for UDP, or a different number between 0 and 255 for
each of more than 100 different protocols refer the web site
http://www.jsi.edu/in-notes/iana/assignments/protocol-numbers
complete current list.

10) 2 -byte header checksum

A checksum of the header only calculated using a 16 -bit one’s


complement. ( not the entire datagram)

11) 4 -byte source address

The IP address of the sending Node

12) 4-byte destination address

The IP address of the destination Node.

13) 0-40 bytes of optional informations


like
a) information used for security options
b) routing records
c) time stamps

Prof.T.N.shanmugam
http://www.annauniv.edu/shan
16.1.2 Layers of Networks

The structure of an Ipv4 datagram


0 version 4 header 8 type of service16 20 datagram length 31
length

identification number flags fragment offset

Identification number protocol header checksum

Source address

destination address

options

data

The Transport layer


The Raw datagram have some drawbacks. Most important are that
a) There is no guaranteee that they will be delivered.
b) Even if it is delivered they may have been corrupted in the transit.
c) Even if it uncorrupted during the transit they may not arrive in the order
in which it is sent.

There are two protocols at the Trnasport layer they are

a) TCP ( Transmission control protocol) is a high -overhead


protocol , which is more reliable. and allows for retransmission of lost or
corrupted data and deliver the byte in the order in which it was sent .

Prof.T.N.shanmugam
http://www.annauniv.edu/shan
16.1.2 Layers of Networks
b) UDP ( User Datagram protocol) allows the receiver to detect
corrupted packets but does not guarenty that the packets are delivered in
the correct order , some times it may not be delivered at all and hence not
-reliable

However , UDP is often much faster than TCP.

Application Layer .
The layer that delivers data to the user is called the application Layer.
This Layer only decides what to do with the data after it is transfered.
Some of the Application Layer protocols are

a) For the World Wide Web. HTTP : (hyper text transfer protocol)
b) For the e-mail the protocols are SMTP ( Send mail transfer protocol),
POP ( post office protocol) , IMAP
c) For file transfer , FTP , FSP, TFTP
d) For file acess NFS, TELNET
e) For news transfer NNTP
f) Our programs can define their own application layer protocols
whenever necesary.

Prof.T.N.shanmugam
http://www.annauniv.edu/shan

Você também pode gostar