ch02-forouzanV2

48
2.1 Chapter 2 Network Models Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

description

electronic things

Transcript of ch02-forouzanV2

Page 1: ch02-forouzanV2

2.1

Chapter 2

Network Models

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 2: ch02-forouzanV2

2.2

2-1 LAYERED TASKS2-1 LAYERED TASKS

We use the concept of We use the concept of layerslayers in our daily life. As an in our daily life. As an example, let us consider two friends who communicate example, let us consider two friends who communicate through postal mail. The process of sending a letter to a through postal mail. The process of sending a letter to a friend would be complex if there were no services friend would be complex if there were no services available from the post office. available from the post office.

Sender, Receiver, and CarrierHierarchy

Topics discussed in this section:Topics discussed in this section:

Page 3: ch02-forouzanV2

2.3

Figure 2.1 Tasks involved in sending a letter

Page 4: ch02-forouzanV2

2.4

2-2 THE OSI MODEL2-2 THE OSI MODEL

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

development of universally compatible network protocoldevelopment of universally compatible network protocol..

Layered ArchitecturePeer-to-Peer ProcessesEncapsulation

Topics discussed in this section:Topics discussed in this section:

Page 5: ch02-forouzanV2

2.5

Figure 2.2 Seven layers of the OSI model

ISO is the organization. OSI is the model.

Page 6: ch02-forouzanV2

2.6

Interaction between Layers : Peer-to-Peer Process Figure 2.3 illustrate the interaction between layers in the

OSI model. At physical layer, the communication is direct. At the higher layers, however, communication must move

down through the layers on device A, over to device B, and then back up through the layers.

Each layer in the sending device adds its own information to the message it receives from the layer above it and passes the whole package to the layer below it.

At layer 1, the entire package is converted to a form that can be transmitted to the receiving device.

At the receiving end, the message is unwrapped layer by layer, with each process receiving and removing the data meant for it.

Page 7: ch02-forouzanV2

2.7

Figure 2.3 The interaction between layers in the OSI model

Page 8: ch02-forouzanV2

2.8

How does information passed from one layer to the next in the OSI model? Fig. 2.4 illustrates an overall view of the OSI layers. D7 means the data unit at layer 7, D6 means the data unit at layer

6, and so on. The process starts at layer 7 (application layer), then moves from

layer to layer in descending , sequential order. At each layer, a header, or possibly a trailer, is added to the data

unit. Commonly, the trailer is added only at layer 2. When the formatted data unit is added through the physical layer,

it is changed to electromagnetic signal and transported along a physical link.

Upon reaching its destination, the signal passes into layer 1 and is transformed to digital form.

The data unit then moves up through the OSI layers. As each block of data reaches the next higher layer, the headers

and trailers attached to it at the corresponding sending layer are removed. Actions appropriate to that layer are taken.

As it reaches layer 7, the message is again in a form appropriate to the application and is made available to the recipient.

Page 9: ch02-forouzanV2

2.9

Figure 2.4 An exchange using the OSI model

Page 10: ch02-forouzanV2

2.10

Encapsulation Figure 2.3 also illustrates encapsulation.

Page 11: ch02-forouzanV2

2.11

2-3 LAYERS IN THE OSI MODEL2-3 LAYERS IN THE OSI MODEL

In this section we briefly describe the functions of each In this section we briefly describe the functions of each layer in the OSI model.layer in the OSI model.

Physical LayerData Link LayerNetwork LayerTransport LayerSession LayerPresentation LayerApplication Layer

Topics discussed in this section:Topics discussed in this section:

Page 12: ch02-forouzanV2

2.12

Physical Layer The physical layer is responsible for ensuring that a stream of

bits are transmitted between two nodes sharing a single link. The physical layer coordinates all functions required to

transmit a bit stream over a physical medium. It defines:

Physical characteristics of interfaces/ connectors and media:Defines the characteristics of the interface between devices and the transmission medium. It also defines the type of transmission medium.

Representations of bits: how raw data (0s and is) are encoded (transformed) into signals (electrical or optical)

Data rate: the number of bits transmitted per sec (bps) Synchronization of bits between sender and receiver Line configuration: multipoint or point-to-point Physical topology: mesh, star, tree, ring or bus Transmission mode: simplex, half duplex or full-duplex

Page 13: ch02-forouzanV2

2.13

Figure 2.5 Physical layer

The physical layer is responsible for movements ofindividual bits from one hop (node) to the next.

Page 14: ch02-forouzanV2

2.14

Data Link Layer The data link layer is responsible for ensuring that a packet

of data is successfully transmitted between two adjacent nodes in the network.

The data link layer attempts to make the physical layer appear error free to the layers above it in the model as well as controlling node-to-node delivery (or also known as hop-to-hop delivery).

It defines: Access control: deciding when a device connected to the link

can transmit at any given time (who gets to talk and when) Framing: Identifies the start and the end of each packet and

which part of the packet is the address Physical Addressing: the address of the next node along the

route to the intended final destination Error control: mechanisms for detecting and recovering from

transmission errors Flow control: prevents the network or receiver from being

swamped by controlling the release of data at the source

Page 15: ch02-forouzanV2

2.15

Figure 2.6 Data link layer

The data link layer is responsible for moving frames from one hop (node) to the next.

Page 16: ch02-forouzanV2

2.16

Figure 2.7 shows, communication at the data link layer occurs bet two adjacent nodes. To send data from A to F, three partial deliveries are made:

First, the data link layer at A sends frame to the data link layer at B (a router)

Second, the data link layer at B sends new frame to the data link layer at E.

Finally, data link layer at E sends a new frame to the data link layer at F

Note that the frames that are exchanged between the three nodes have different values in the headers (different destination and source addresses).

The value of the trailers can also be different if error checking includes the header of the frame.

Page 17: ch02-forouzanV2

2.17

Figure 2.7 Hop-to-hop delivery

Page 18: ch02-forouzanV2

2.18

Network Layer The network layer is responsible for getting am individual

packet of data from the source computer to the destination computer.

The responsibilities of the network layer Logical addressing: translates source and destination

addresses in ones that can be understood across all connected networks.

Example: IP address Routing: determining which path to take from source to

destination (most important when there are multiple possible routes) in large network or internetworks.

The connecting device called routers or switches are responsible in routing or switching the packets to the final destination.

Page 19: ch02-forouzanV2

2.19

Figure 2.8 Network layer

The network layer is responsible for the delivery of individual packets from the source host to the destination host.

Page 20: ch02-forouzanV2

2.20

Figure 2.9 shows the end-to-end delivery The network layer at A sends the packet to the network

layer at B. When the packet arrives at B, the router makes a decision

based on the final destination (in this case F) of the packet. Router B uses its routing table to find the next hop (in this

example is router E) The network layer at B, therefore sends the packet to the

networks layer at E. The network layer at E, in turn, sends the packet to the

network layer at F.

Page 21: ch02-forouzanV2

2.21

Figure 2.9 Source-to-destination delivery (end-to-end delivery)

Page 22: ch02-forouzanV2

2.22

Transport Layer The transport layer is responsible for getting the entire

message from the source process to destination process reliably.

The transport layer ensures that the whole message arrives intact and in order, overseeing both error control and flow control at the source-to-destination level.

A process is an application program running on a host. The transport layer manages end-to-end delivery between

two communicating software processes. Responsibilities of the transport layer include:

Segmentation and reassembly (packetising): Breaking up the message into packets of data at the source and reassembling them at the destination and numbering the packets.

Service-point addressing: ensuring that the message reaches the correct process (running program) at the destination. This is done by assigning service point address (or port address) to the message.

Flow control: similar to data link layer except end-to-end. Error control: similar to data link layer except entire message at

the final destination not single packets Connection control: establishes end-to-end connections if

required (connection or connectionless network).

Page 23: ch02-forouzanV2

2.23

Figure 2.10 Transport layer

The transport layer is responsible for the delivery of a message from one process to another (process-to-process

delivery)

Page 24: ch02-forouzanV2

2.24

Figure 2.11 Reliable process-to-process delivery of a message

Page 25: ch02-forouzanV2

2.25

Session Layer The session layer allows two communication processes to allows two communication processes to

co-ordinate the exchange of data.co-ordinate the exchange of data. This establishes, maintains, and synchronizes the

interaction between two communicating processes. Its responsibilities include:

Dialog control: Allows two systems to enter a dialog defining whether communication is half-duplex or duplex.

Synchronization: Allows a process to define synchronization define synchronization checkpoints in the messagecheckpoints in the message. This makes error/disaster recovery more efficient (example: can prevent having to resend an entire file when the link goes down)

Page 26: ch02-forouzanV2

2.26

Figure 2.12 Session layer

The session layer is responsible for dialog control and synchronization.

Page 27: ch02-forouzanV2

2.27

Presentation layer The presentation layer formats the data for interoperability,

security and efficiency of transmission. This layer deals with the syntax and semantics of the

information being exchanged between the communicating systems.

It is responsible for: Translation: from the machine specific characters sets

and data formats to generic sets (examples Unicode, ASCII)

Encryption: for security purposes Compression: to minimize the amount of bits needed to

be transmitted and to reduce delivery time.

Page 28: ch02-forouzanV2

2.28

Figure 2.13 Presentation layer

The presentation layer is responsible for translation, compression, and encryption.

Page 29: ch02-forouzanV2

2.29

Application Layer The application layer is the interface between the user and

the network. Allows the user (human or software) to access the network. Provides user interfaces such and support such electronic

mail. Remote file access transfer, shared DBMS, etc Services provided by the application layer include but not

limited to the following: Network virtual terminal: Remote software access to a

physical terminal. Instant messaging: such as chat File transfer, Access and Management (FTAM): Allows a

user to access, retrieve and manage file on a remote computer.

Mail services: control email exchange (X.400) Directory services: distributed database sources and

access to global information (X.500)

Page 30: ch02-forouzanV2

2.30

Figure 2.14 Application layer

The application layer is responsible for providing services to the user.

Page 31: ch02-forouzanV2

2.31

Figure 2.15 Summary of layers

Page 32: ch02-forouzanV2

2.32

2-4 TCP/IP PROTOCOL SUITE2-4 TCP/IP PROTOCOL SUITE

The layers in the The layers in the TCP/IP protocol suiteTCP/IP protocol suite do not exactly do not exactly match those in the OSI model. The original TCP/IP match those in the OSI model. The original TCP/IP protocol suite was defined as having four layers: protocol suite was defined as having four layers: host-to-host-to-networknetwork, , internetinternet, , transporttransport, and , and applicationapplication. However, . However, when TCP/IP is compared to OSI, we can say that the when TCP/IP is compared to OSI, we can say that the TCP/IP protocol suite is made of five layers: TCP/IP protocol suite is made of five layers: physicalphysical, , data linkdata link, , networknetwork, , transporttransport, and , and applicationapplication..

Physical and Data Link LayersNetwork LayerTransport LayerApplication Layer

Topics discussed in this section:Topics discussed in this section:

Page 33: ch02-forouzanV2

2.33

Internet Model : TCP/IP Protocol Suite History:

US DoD’s ARPA (Advanced Research Project Agency) funded a project to investigate the possibility of creating a nuclear war proof network.

Connecting computers via a new technology called packet-switching and the resulting network grew become what we now call the Internet

A series of protocol were developed in conjunction with the Internet. The two most popular being Transmission Control Protocol (TCP) and Internetworking Protocol (IP).

Page 34: ch02-forouzanV2

2.34

TCP/IP vs OSI ModelsOSI

OSI is strictly a model with no implementation

OSI is virtually unused today

OSI is copyrighted OSI is de jure standard Consists of 7 distinct layers

TCP/IP TCP/IP is a protocol suite

with an associated ‘stack’ TCP/IP is in widespread use TCP/IP is a de facto, free

standard TCP/IP is the basis of the

Internet Consists of 5 layers:

Application, Transport , Network Layer (also called the Internet layer), Logical Link Control (or Network Interface Layer/Data Link Layer) and Medium Access Control

Page 35: ch02-forouzanV2

2.35

Figure 2.16 OSI model and TCP/IP Protocol Stack

Page 36: ch02-forouzanV2

2.36

2-5 ADDRESSING2-5 ADDRESSING

Four levels of addresses are used in an internet employing Four levels of addresses are used in an internet employing the TCP/IP protocols: the TCP/IP protocols: physicalphysical, , logicallogical, , portport, and , and specificspecific..

Physical AddressesLogical AddressesPort AddressesSpecific Addresses

Topics discussed in this section:Topics discussed in this section:

Page 37: ch02-forouzanV2

2.37

Figure 2.17 Addresses in TCP/IP

Page 38: ch02-forouzanV2

2.38

Figure 2.18 Relationship of layers and addresses in TCP/IP

Page 39: ch02-forouzanV2

2.39

In Figure 2.19 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.

Example 2.1

Page 40: ch02-forouzanV2

2.40

Figure 2.19 Physical addresses

Page 41: ch02-forouzanV2

2.41

As we will see in Chapter 13, 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:

Example 2.2

07:01:02:01:2C:4B

A 6-byte (12 hexadecimal digits) physical address.

Page 42: ch02-forouzanV2

2.42

Figure 2.20 shows a part of an internet with two routers connecting three LANs. Each device (computer or router) has a pair of addresses (logical and physical) for each connection. In this case, each computer is connected to only one link and therefore has only one pair of addresses. Each router, however, is connected to three networks (only two are shown in the figure). So each router has three pairs of addresses, one for each connection.

Example 2.3

Page 43: ch02-forouzanV2

2.43

Figure 2.20 IP addresses

Page 44: ch02-forouzanV2

2.44

Figure 2.21 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.

Example 2.4

Page 45: ch02-forouzanV2

2.45

Figure 2.21 Port addresses

Page 46: ch02-forouzanV2

2.46

The physical addresses will change from hop to hop,but the logical addresses usually remain the same.

Note

Page 47: ch02-forouzanV2

2.47

Example 2.5

As we will see in Chapter 23, 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.

Page 48: ch02-forouzanV2

2.48

• The physical address also known as link address or hardware address, is the address of a node as defined by its LAN or WAN. It is included in the frame used by data link layer. It is the lowest-level address.

• Logical addresses are necessary for universal communications that are independent of the underlying physical networks. Logical address in the Internet is known as the IP address. It uniquely defines a host on the Internet. IPv4 IP address is 32 bit-address.

• The port address identifies a process on a host.

• A specific address is a user-friendly address.

• The physical addresses change from hop to hop, but the logical and port addresses usually remain the same.

Notes