Vous êtes sur la page 1sur 43

CNT 3004

Module 2
1.1

Chapter 2 Network Models

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

Chapter 2 Network Models

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

Note on Chapter 2
Chapter 2 (Network Models) in the 5th Edition has been reduced significantly and many details given in the 4th Edition have been deleted and migrated to other chapters. Some of these chapters are not covered in CNT 3004 but the information, diagrams and examples on Network Models migrated to these chapters are needed in CNT 3004. The slides for Chapter 2 presented in CNT 3004 reflect the new presentation approach of the 5th Edition but also retain the essential information given in the 4th Edition.
2.4

LAYERED TASKS
A three-layer protocol (4th Ed Textbook)
Sending postal mail from Maria to Ann

Maria

Ann

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

A three-layer protocol (5th Ed textbook)


Sending mail from Maria to Ann

Postal carrier facility

2.6

This slide is for information only.

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. OSI was first introduced in the late 1970s.
ISO is the organization. OSI is the model.

Seven layers of the OSI model

The OSI model is composed of seven ordered layers as shown in the figure. Within a single machine, each layer calls upon the services of the layer below it. For example, the Network layer uses the services of the Data Link layer and provides services for the Transport layer.

The 7-layer OSI model has not succeeded in practice. The 5-layer TCP/IP Protocol Suite is the communication model widely used in practice.
2.8

TCP/IP PROTOCOL SUITE


The layers in the TCP/IP protocol suite do not exactly match those in the OSI model. Two layers in the OSI model (Presentation layer and Session Layer) do not exist in the TCP/IP Protocol Suite.

The TCP/IP protocol suite is made of five layers: physical, data link, network, transport, and application. The next slide shows these five layers with some of the protocols (or applications) that are used in each layer.

TCP/IP Protocol Suite

An exchange using the OSI model


Each layer in the sending device adds its own information to the message it receives from the layer just above it, then passes the whole package to the layer just below it. The added information in each layer takes the form of a header and possibly a trailer. Starting from layer 7, the data unit moves down from layer to layer. When the data unit reaches layer 1 (physical layer), it is converted to an electromagnetic or a radio signal and transported along the wired or wireless transmission medium.

Seven layers of the OSI model


The passing of data down through the layers of the sending device and
back up through the layers of the receiving device is accomplished by an interface between each pair of adjacent layers. As long as a layer provides the expected services to the layer above it, implementation of the functions within this layer can be modified without requiring changes to the surrounding layers. This is called modular design. Between machines, layer X on the receiving machine is the only layer that can understand and process the header added by layer X on the sending machine. This is called peer-to-peer communication (see figure on next slide). At the receiving machine, the message is unwrapped layer by layer, with each layer removing the header and possibly the trailer created by its peer layer. As the message travels from the sender to the receiver, it may pass through many intermediate nodes. These nodes are usually routers and involve only the first three layers of the OSI model.

The interaction between layers in the OSI model

Logical Connections between Layers in the TCP/IP Protocol Suite


The logical connection between layer X on the receiving machine and layer X on the sending machine is similar to the OSI peer-to-peer communication between these two layers.

Logical connections

2.14

Identical Objects in the TCP/IP Protocol Suite


The layer in the source machine and the corresponding layer in the destination machine use identical objects. For example the two data link layers use data frames with identical format.

Identical objects (messages) Identical objects (segment or user datagram) packet Identical objects (datagram) Identical objects (frame) packet Identical objects (datagram) Identical objects (frame)

Identical objects (bits)

Identical objects (bits)

2.15

Description of Each Layer


In this section we describe the functions of each layer in the communication stack of the TCP/IP Protocol Suite.

Topics discussed in this section:


Physical Layer Data Link Layer Network Layer Transport Layer Application Layer

Physical Layer
The figure below shows the position of the physical layer with respect to the transmission medium and the data link layer.

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

Physical Layer
The physical Layer is concerned with the following:

Representation of bits the type of encoding (how 1s and 0s are changed to


signals).

Data Rate the transmission rate the number of bits sent each second. Link configuration i.e. point-to-point dedicated link or multipoint shared
link.

Physical topology- how devices are connected to make a network (mesh,


ring, bus, star, hybrid).

Transmission mode simplex, half-duplex, full-duplex.

Data Link Layer


The Data Link Layer adds a header containing the physical (MAC) addresses of the source node and destination node. It also adds a trailer for bit error detection. The MAC address of a node is of length 48 bits (12 hexadecimal digits) and is the address assigned to the Network Interface Card of the node.

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

Data Link Layer


Responsibilities of the data link layer: Framing: divides the stream of bits received from the network layer into
manageable units called frames.

Flow control: if the data sending rate is more than the rate at which the data
are absorbed by the receiver, the data link layer imposes a flow control to avoid overwhelming the receiver.

Error Control: The data link layer uses a mechanism to detect and
retransmit damaged or lost frames. Error control is usually achieved by adding a trailer to the end of the frame.

Access Control: when multiple devices are connected to the same link, the
data link medium access control (MAC) protocol is used to determine which device has control over the link (i.e., can transmit).

Hop-to-hop Delivery
To send data from node A to node F, three frame deliveries are made. First, A sends a frame to B (router). Second, B sends a new frame to E. Finally E sends a new frame to F.

The frames sent by the three nodes A, B and E have different source and destination address values in the header. Specifically the destination addresses in these frames are B, E and F, respectively.

Network Layer

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

Source-to-destination delivery
The network layer is particularly useful when the source node and destination node are attached to different networks. In this case, the network layer ensures that each packet is routed correctly from its point of origin to its final destination. Logical Addressing: the network layer of the sender adds a header containing the logical IP addresses (of length 32 bits) for both the sender and receiver nodes. Routing: the network layer of the connecting devices (called routers or switches) route or switch the packets to their final destination.

Transport Layer
From application layer To application layer

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

Process-to-process delivery of a message

Two popular transport protocols are: UDP and TCP

Transport Layer
Responsibilities of the transport layer: Process-to-process delivery: the transport layer header includes a servicepoint address, called the port number, that ensures the correct delivery to a specific process running on the destination computer. The network layer gets each packet to the correct computer and the transport layer delivers whole messages (collection of ordered data segments) to the correct application process.

Connection Control: in the connection-oriented (TCP) mode, the transport


layer handles connection establishment and termination.

Error Control: like the data link layer, the transport layer uses a mechanism
to detect and retransmit damaged or lost segments. Error control is done on an end-to-end basis and not across each single link.

Flow Control: like the data link layer, the transport layer is responsible for
flow control, which is done on an end-to-end basis and not across each single link.

Application Layer

HTTP

FTP

SMTP

HTTP

FTP

SMTP

To transport layer

From transport layer

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

ADDRESSING
Four levels of addresses are used in an internet employing the TCP/IP protocols: physical or MAC address (48 bits) logical or IP address (32 bits) port address (16 bits) specific address (application dependent)

Addresses in TCP/IP

Relationship of layers and addresses in TCP/IP

Example 1
In the figure on the next slide, 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).
Note: the values 10 and 87 are used as simplified MAC addresses in this example. Real MAC addresses consisting of 48 bits do not have small values like 10 or 87.

Physical addresses

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
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:

04:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address.
Exercise: represent the least significant byte (hexadecimal value 4B) in
binary and in ASCII (American Standard Code for Information Interchange).

The physical address of a computer is the address of its network interface card, which is a unique address assigned bye the manufacturer.

Example: Ethernet uses 48-bit physical addresses


Ethernet Frame Format
Preamble SD 6 bytes Destination Address 6 bytes Source Address 4 bytes Length Information Pad FCS

Preamble: a sequences of seven octets that repeats the bit pattern 10101010 . SD: start delimiter equal to the bit pattern 10101011. Destination Address: physical address of 48 bits identifying the station or stations that are to receive the frame. It can be a unicast, multicast, or broadcast address. Source Address: physical address of 48 bits identifying the station that originated the frame. It must be a unicast address. Length: indicates the number of bytes in the information field. Information field: carries the data payload. Pad: ensures that the frame size is at least 64 bytes. FCS: the frame check sum is used for error checking .

Network Interface Card (NIC)


The hardware component that connects a computer to a network is called the network interface card (NIC), also known as the network interface controller, network adapter, or LAN adapter. Because of Ethernet popularity, most computers use Ethernet NICs for network connectivity. In the past, Ethernet NICs were commonly implemented on expansion cards that plug into a computer bus, but most newer computers have a network interface built into the motherboard.
Ethernet hardware addresses are 48 bits, expressed as 12 hexadecimal digits. For example 00-C0-4F-78-9A-BC The most significant 6 digits correspond to the vendor and the least significant 6 digits specify the interface serial number for that vendor.

Network Interface Card

2.34

Exercise
The most significant 24 bits (6 hexadecimal digits) of an Ethernet MAC (physical) address correspond to the vendor code. Use your browser to view the Ethernet vendor codes posted on the following web page http://standards.ieee.org/develop/regauth/oui/oui.txt Notice that a large vendor needs multiple 24-bit codes. For example some of the codes assigned to Cisco are 009086 , 009092 , 0090A6

Example 3
The figure on the next slide 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. The logical address is represented by a letter (e.g., A) and the physical address is represented by a number (e.g., 10). For example, the notation A/10 represents the two addresses of the sending machine. 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.

An IPv4 address is a logical address of length 32 bits

The physical addresses change from hop to hop, but the logical addresses remain the same from the source to destination.

Example: IPv4 uses 32-bit logical addresses


IPv4 Packet Format

Source Address (32 bits): gives the IPv4 address of the source machine Destination Address (32 bits): gives the IPv4 address of the destination

IPv4 uses 32-bit logical addresses. IPv6 uses 128-bit logical addresses. In CNT 3004, we will assume IPv4 is used.

IPv4 Addresses
IP addresses are represented by a 32-bit unsigned binary value, which is usually expressed in a dotted decimal format, e.g., 193.205.80.5. The binary format of the 32-bit IP address 193.205.80.5 is: 193 . 205 . 80 . 5 11000001 .11001101. 01010000 .00000101 An easier way to remember IP addresses is by assigning a domain name to each address, e.g., www.ucf.edu which is resolved through the Domain Name System (DNS) to the IP address 132.170.0.0

Example: TCP and UDP use 16-bit Port addresses


TCP Header Format

Example 4
The figure on the next slide shows two computers communicating via the Internet. The sending computer (with IP address A) is running three processes at this time with port addresses a, b, and c. The receiving computer (with IP address P) 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 the physical addresses change from hop to hop, logical and port addresses remain the same from the source to destination.

Port addresses

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

753
The above 16-bit port address is represented as one single number.

Vous aimerez peut-être aussi