Вы находитесь на странице: 1из 62

7 Layer OSI Model

Figure:

Tasks involved in sending a letter

THE OSI MODEL


Established in 1947, the International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement on international standards. An ISO standard that covers all aspects of network communications is the Open Systems Interconnection (OSI) model. It was first introduced in the late 1970s.

Seven layers of the OSI model

The interaction between layers in the OSI model

7 Layers of the OSI Model


Layer Responsible For: 7.) Application Provides Services to User Apps 6.) Presentation Data Representation

5.) Session
4.) Transport 3.) Network 2.) Data Link 1.) Physical

Communication Between Hosts


Flow Ctrl, Error Detection/Correction End to End Delivery, Logical Addr Media Access Ctrl, Physical Addr Medium, Interfaces, Puts Bits on Med.

Examples
Layer Example
7.) Application HTTP, FTP, SMTP 6.) Presentation ASCII, JPEG, PGP 5.) Session 4.) Transport BOOTP, NetBIOS, DHCP, DNS TCP, UDP, SPX

3.) Network
2.) Data Link 1.) Physical

IP, IPX, ICMP


Ethernet, Token Ring, Frame Relay Bits, Interfaces, Hubs

Encapsulation
Data exists at each layer contained within a unit called a Protocol Data Unit (PDU) The process by which data moves between PDU types is called Encapsulation PDU move through interfaces between layers using Service Access Points (SAP)

PDUs And the OSI Model


Layer 7.) Application PDU Name Data

6.) Presentation Data

5.) Session
4.) Transport 3.) Network 2.) Data Link 1.) Physical

Data
Segment Packet Frame Bits

Layer 1: The Physical Layer


Defines physical medium and interfaces Determines how bits are represented Controls transmission rate & bit synchronization Controls transmission mode: simplex, halfduplex, & full duplex PDU: Bits Devices: hubs, cables, connectors, etc

Layer 2: The Data Link Layer


PDU: Frames Keeps Link alive & provides connection for upper layer protocols Based on physical (flat) address space Physical addresses are fixed and dont change when the node is moved Medium/media access control

The Data Link Layer (cont.)


Flow control and error detection/correction at the frame level. Think collisions Topology Ex: Ethernet, Token Ring, ISDN Sublayers: MAC (framing, addressing, & MAC) & LLC (logical link control gives error control & flow control) Devices: switches, bridges, NICs

Layer 3: The Network Layer


PDU: Packet End to end delivery of packets Creates logical paths Path determination (routing) Hides the lower layers making things hardware independent Uses logical hierarchical addresses

The Network Layer (cont.)


Logical hierarchical addresses do change when a node is moved to a new subnet Devices: routers, firewalls

Layer 4: The Transport Layer


PDU: Segment Service Point Address (more often called a port) used to track multiple sessions between the same systems. SPAs are used to allow a node to offer more than one service (i.e. it could offer both mail and web services) This layer is why you have to specify TCP or UDP when dealing with TCP/IP

The Transport Layer (cont.)


Must reassemble segments into data using sequence numbers Can use either connectionless or connection oriented sessions Connectionless sessions rely on upper layer protocols for error control and are often used for faster less reliable links Ex: UDP (used by things like NFS & DNS)

The Transport Layer (cont.)


Connection oriented sessions require the sender to first request a connection, the receiver to acknowledge the connection, and that they negotiate how much data can be sent/received before its reception is acknowledged Uses acknowledgements & retransmission for error correction Example: TCP (used by things like telnet, http)

Layer 5: The Session Layer


PDU: Data (from here on up) Sometimes called the dialog controller, this layer establishes, maintains, and terminates sessions between applications Sets duplex between applications Defines checkpoints for acknowledgements during sessions between applications

The Session Layer (cont.)


Provides atomization Multiple connections can be treated as one virtual session. If one fails or is terminated, all should be terminated. Identifies raw data as either application data or session control information Uses fields provided by layers 3 & 4 to track dialogs between applications / services Provides translations for naming services Ex: RPC, X-Windows, LDAP, NFS

Layer 6: The Presentation Layer


Data formatting, translation, encryption, and compression Ex: ASCII, EBCDIC, HTML, JPEG

Layer 7: The Application Layer


Provides communication services to applications Ex: HTTP, FTP, SMTP

TCP/IP PROTOCOL SUITE

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 TCP/IP protocol suite is made of five layers: physical, data link, network, transport, and application.

Figure : TCP/IP and OSI model

ADDRESSING Four levels of addresses are used in an internet employing the TCP/IP protocols: physical, logical, port, and specific.

Relationship of layers and addresses in TCP/IP

A node with physical address 10 sends a frame to a node with physical address 87. The two nodes are connected by a link (bus topology LAN). As the figure shows, the computer with physical address 10 is the sender, and the computer with physical address 87 is the receiver.

Most local-area networks use a 48-bit (6-byte) physical address written as 12 hexadecimal digits; every byte (2 hexadecimal digits) is separated by a colon, as shown below: 07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address.

Example
Figure shows two computers communicating via the Internet. The sending computer is running three processes at this time with port addresses a, b, and c. The receiving computer is running two processes at this time with port addresses j and k. Process a in the sending computer needs to communicate with process j in the receiving computer. Note that although physical addresses change from hop to hop, logical and port addresses remain the same from the source to destination.

Port addresses

Example
A port address is a 16-bit address represented by one decimal number as shown.

753
A 16-bit port address represented as one single number.

Background of IP Addressing

Over 500,000 networks are connected to the Internet (2002)

This number grows every year

Network numbers are managed by non-profit organization called ICANN to avoid conflicts

ICANN delegated parts of address space to various regional authorities

Which gives out IP addresses to ISPs & other companies

IP Addresses

An IP address is 32-bit binary address that

Uniquely & universally defines connection of a host or router on Internet Internet address are usually written in decimal notation with decimal point separating the bytes

Classful Addressing

IP started with concept of classes


Architecture is called classful addressing

1990s -> new architecture classless addressing introduced

This will eventually supersede original architecture

However
Most of Internet is still using classful addressing Migration is slow

Classful Addressing - IP Classes

IP address is divided into 5 classes

A, B, C, D, & E

Finding Class in Binary Notation

Finding Class in Dotted-Decimal Notation


First byte -> determine class of address Each class -> specific range of numbers

Netid and Hostid


Claas A, B & C -> divided into netid & hostid Class D & E -> not divided into netid & hostid

Classes and Blocks


Each class is divided into fixed number of blocks with each block having a fixed size Class A -> divided into 128 blocks

Each block have a different netid 1st block -> addresses from 0.0.0.0 to 0.255.255.255 (netid 0) 2nd block -> addresses from 1.0.0.0 to1.255.255.255 (netid 1) Last block -> addresses from 127.0.0.0 to 127.255.255.255 (netid 127)

first & last block in each class is reserved for special purposes. In addition One block (netid 10) -> private addresses total number of organizations that can have class A is only 125
Each block in a class contains 16,777,216 address . Millions of class A addresses are wasted . Next slide shows blocks in class A graphically

Blocks in Class A
An organization granted a block with netid 73 uses its addresses First address in block used to identify organization from rest of Internet -> address is called network address

It defines network of organizations not individual hosts

Class B

Divided into 16, 384 blocks with each block having different netid

Sixteen blocks reserved for private addresses leaving


16,368 blocks for assignment to organizations

1st block -> addresses from 128.0.0.0 to 128.0.255.255


(netid 128.0) Last block -> addresses from 191.255.0.0 to 191.255.255.255 (netid 191.255)

Total number of organizations that can have class B is 16,368


Each block in a class contains 65,536 classes Next slide shows blocks in class B graphically

Blocks in Class B

Organization granted block with netid 180.8

First address is network address

Class C

Divided into 2,097,152 blocks with each block having different netid

256 blocks used for private addresses leaving

2096,896 blocks for assignment to organzations

1st block -> addresses from 192.0.0.0 to


128.0.0.255 (netid 192.0.0) Last block -> addresses from 223.255.255.0 to 223.255.255.255 (netid 223.255.255) Next slide shows blocks in class C graphically

Blocks in Class C

Network Address

Network address is one that is assigned to organization

Range of addresses can automatically be inferred from network address

Example -> given network address 17.0.0.0, find the class, the block, and range of addresses
This is class A address -> first byte is between 0 & 127 Block has a netid of 17

Range of addresses range from 17.0.0.0 to 17.255.255.255

Mask

Mask is 32-bit binary number that gives first address in block i.e., network address when

ANDed bitwise with an address in block

Default Masks
The network address is the beginning address of each block It can be found by applying the default mask to any of the addresses in the block (including itself). It retains the netid of the block and sets the hostid to zero

Class A

Mask in binary 11111111 00000000 00000000 00000000

Mask in-dotted decimal 255.0.0.0

B C

11111111 11111111 00000000 00000000 11111111 11111111 1111111100000000

255. 255.0.0 255. 255. 255.0

Applying the Mask

Given address is 23.56.7.91 & default class A mask, find the network address?

Given address 201.180.56.5 & class C default mask, find network address?

Example - Network Address

Multihomed Devices

Multihomed -> A computer connected to different networks

Will have more than one address, each possibly belonging to a different class

A router must be connected to more than one network otherwise -> it cannot route

Router has more than one IP address, one for each interface Figure shows one multihomed computer & one router

Special IP addresses

IP address 0.0.0.0 is used by hosts when they are booted IP addresses with 0s as network number refer to the current network Address with all 1s allows broadcasting on local network All address of form 127.xx.yy.zz are reserved for loop back testing

Example - This Host on This Network

Example - Specific Host on This Network

Example - Broadcast on Local Network

Example - Broadcast on Distant Network

Example - Loopback Address

Private Addresses

Number of blocks in each class are assigned for private use

Not recognized globally

class Netids A B C 10.0.0.0 172.16 to 172.31 192.168.0 to 192.168.255

Blocks 1 16 256

Example - Sample Internet with Classful Addresses

Practice Question 3

Suppose that instead of using 16 bits for network part of a class B address originally, 20 bits had been used. How many class B networks would there have been?

Solution Practice Question 3

With a 2-bit prefix, there would have been 18 bits left over to indicate the network

Consequently, the number of networks would have been 218 or 262,144.

However, all 0s and all 1s are special, so only 262,142 are available.

Practice Question 4

A network on Internet has a subnet mask of 255.255.240.0. What is maximum no. of hosts it can handle?

Solution Practice Question 4

The mask is 20 bits long, so the network part is 20 bits

The remaining 12 bits are for the host, so 4096 host addresses exist

THE END

Вам также может понравиться