36
IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

Embed Size (px)

DESCRIPTION

3 Data Communications Data communication system components: –Message Information (data) to be communicated. –Sender Device that sends the data message. –A computer, a workstation, video camera, etc. –Receiver Device that receives the data message. –A computer, a workstation, a Television, etc. –Transmission medium The physical path by which a message travels from sender to receiver. –Twisted pair, coaxial cable, optical fiber, radio waves. –Protocol A set of rules that govern the data communication. –Without a protocol, devices may be connected but not communicating.

Citation preview

Page 1: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

IS370Data Communications

and Computer Networks

1st semester 1428-1429

Chapter 1 : Introduction

Instructor: Mr Mourad Benchikh

Page 2: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

2

Data Communications• Telecommunication

– Communication at a distance. • Data

– Information presented in whatever form is agreed upon by the parties creating and using the data.

• Data communications – Exchange of data between two devices via some form

of transmission medium such as a wire cable.– These devices must be part of a data communication

system made of a combination of hardware and software

Page 3: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

3

Data Communications• Data communication system components:

– Message• Information (data) to be communicated.

– Sender• Device that sends the data message.

– A computer, a workstation, video camera, etc.– Receiver

• Device that receives the data message.– A computer, a workstation, a Television, etc.

– Transmission medium• The physical path by which a message travels from sender to receiver.

– Twisted pair, coaxial cable, optical fiber, radio waves.– Protocol

• A set of rules that govern the data communication.– Without a protocol, devices may be connected but not communicating.

Page 4: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

4

Data Communications• Data representation: information comes in different forms

– Text• Represented as a sequence of bit pattern (sequence of 1s and/or 0s).

– Use of different codes : Unicode, ASCII.

– Numbers• Converted in to a binary number.

– Image• Represented by bit patterns.

– An image is composed of a matrix of pixels. Image resolution = number of pixels. More pixels => better image representation.

– Each pixel is assigned a bit pattern. For a black-and-white image, 1-bit pattern represents a pixel

– Audio• Refers to recording or broadcasting of sound or music.

– Video• Refers to recording or broadcasting of a picture or movie.

Page 5: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

5

Data Communications• Data flow between two devices can occur in 3 ways

– Simplex• The communication is unidirectional (i.e. on one way). One sends and the other

only receives.– Ex.: Keyboards and traditional monitors

– Half-Duplex• Each station can both transmit and receive but not at the same time.

– Ex.: Walkie-talkies

– Full-Duplex (or Duplex)• Both stations can transmit and receive simultaneously.

– Ex.: Telephone network

Page 6: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

6

Networks• A network

– A set of devices (often referred to as nodes) connected by communication links. • A node

– A computer, printer, or any other device capable of sending and/or receiving data generated by other nodes on the network

• Communication link – Pathway transferring data from one device to another.

• Two types of connections between devices and links– Point-to-point

• A dedicated link between two devices (Two and only two devices are connected to the link.)– Multipoint

• More than two specific devices share a single link.

Page 7: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

7

Networks•Physical topology– Two or more devices connect to a link. Two or more links form a topology.–Network Topology: Geometric representation of the relationship of all the links and

nodes to one-another. Four basic topologies:• Mesh topology

– Every device has a dedicated point-to-point link to every other device.– Ex.: connection of telephone regional offices that need to be connected to every other regional office..

• Star topology– Each device has a dedicated point-to-point link only to a central controller called a hub.– A sending device sends data to the hub which relays it to the receiving device– Ex.: often used with LANs

• Bus topology– Based on multipoint connections.– A long cable acts as a backbone to link all the devices in a network.– Nodes connected to the bus cable by drop lines and taps.– There is a limit on the number of taps a bus can support and the distance between those taps.– Ex.: used in the design of earlier LANs

• Ring topology– Each device has a dedicated point-to-point connection with only two devices on either side of it.– A signal is passed along the ring in one direction, from device to device, until it reaches the destination.– The repeater of each device in the ring regenerates the received signal intended to other devices.– Ex.: IBM LAN (Token Ring).

• Hybrid topology– Can have a main star topology with each branch connecting several stations in a bus topology.

Page 8: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

8

Networks

Page 9: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

9

Networks• Network models

– Standards are needed to allow heterogeneous networks (created by different entities) to communicate.

– The two best-known standards : OSI and TCP/IP.• Categories of networks

– Two main categories of networks: LANs and WANs.– The category in which a network falls is determined

by its size.• A LAN covers an area less than 2 miles (1 mile=1.609344

kilometers)• A WAN can be worldwide.• Of a size in between, referred as MAN (spans 10 of miles).

Page 10: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

10

Networks•LAN (Local Area Network)

–Usually privately owned and links the devices in a single office, building, or campus.–Limited to a size of a few Kms.–Allow resources (hardware –printer- or software –application program- or data) to be shared

between PCs or workstations.–Distinguished from other types of network by their transmission media (generally one type

of medium is used) an topology (most common: bus, ring, and star).–Earlier LAN had data rates in [4, 16] Mbps.–Today range [100, 1000]Mbps.–Wireless LANs the newest evolution of LAN technology

A LAN connecting 12 computers to a hub in a closet.

Page 11: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

11

Networks•WAN (Wide Area Network)

– Provides long-distance transmission of data, image, audio, and video information over a large geographical area that may comprise a country, a continent, or even the whole world.

– Switched WAN• Connects the end systems, which usually comprise a router (internetworking connecting device) that

connects to another LAN or WAN• Ex.: X25 an early switched WAN. The backbone that connect the Internet. ATM.

– Point-to-point WAN• A line leased from a telephone or a TV cable provider that connects a home computer or a small

LAN to an Internet Service Provider (ISP).• Ex.: the simple dial-up line that connects a home computer to the Internet.

Page 12: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

12

Networks• MAN (Metropolitan Area Network)

–A network with a size between a LAN and a WAN.–It normally covers the area inside a town or a city.–Ex.: The part of the telephone company network that can provide a high-speed DSL line to the

customer. The cable TV network that originally was designed for cable TV but today can also be used for high-speed data connection to the Internet.

• Internetwork: Interconnection of networks–An internetwork, or internet, is the connection of two or more networks (LAN, MAN, or WAN). –Ex.: A switched WAN connecting two LANs and the manager’s computer. Three point-to-point

WANs (DSL line or cable modem line) are used for the connection.

Page 13: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

13

Internet• The most notable internet with a collaboration of more than

hundred of thousands of interconnected networks (private individuals, organizations, etc.).

• It is made up of many WANs and LANs joined by connecting devices and switching stations.

• It has an hierarchical structure based on TCP/IP suite protocols.• End users who want Internet connection use the service of an ISP

(Internet Service Provider).• ISPs hierarchy

– International ISPs (top level): connect nations together.– National ISPs (second level): -like Nesma, AwalNet, etc.,- are backbone

networks created and maintained by specialized companies. • They are connected by complex switching stations called NAPs (Network Access

Points)– Regional ISPs (third level): small ISPs that are connected to one or more

national ISPs.– Local ISPs (last level): which provide direct access to end users. They are

connected to regional ISPs or directly to national ISPs.

Page 14: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

14

Internet

Page 15: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

15

Protocols and Standards• Protocol

– A set of rules that govern data communications between two communicating entities in different systems.

• An entity is anything capable of sending and receiving information in a system

– The key elements of a protocol are:• Syntax: refers to the structure or format of the data.

– Ex.: The first 8 bits of data is the address of the sender, the second 8 bits are the address of the receiver, and the rest is the message itself.

• Semantic: refers to the meaning of each section of bits.– Ex.: Does an address identify the route to be taken or the final destination of

the message?• Timing: when data should be sent and how fast they can be sent.

– Ex.: data lost if the sender produces data at 100Mbps but the receiver can process only 1Mbps.

Page 16: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

16

Protocols and Standards• Standard

– Guidelines to manufacturers, vendors, ISPs, etc. that are essential to ensure the kind of interconnectivity necessary in today’s marketplace and in international communications.

– Two categories for data communication standards : • De facto (by fact or by convention): standards that have not been approved by an

organization body but have been adopted as standards through widespread use.• De jure (by law or regulation): standards that have been legislated by an officially

recognized body.– Standards organizations : standards are created through the cooperation of:

• Standard creation committees : organizations dedicated to the establishment of standards. Ex.: ISO, ANSI, IEEE, etc.

• Forums: developed by special-interest groups and made up of representatives from interested corporations that quickly evaluate and standardize new technologies.

• Regulatory agencies : all communications technology is subject to regulation by government agencies such as FCC in USA.

– Internet standards• An Internet standard is a thoroughly tested specification that is useful to and adhered to by

those who work with the Internet.• Procedure by which a specification attains Internet standard status

– A specification begins as an Internet draft (i.e. a work in progress) with no official status and a 6-months lifetime.

– Upon recommendation from the Internet authorities, a draft may be published as an RFC (Request For Comment).

– Each RFC is edited, assigned a number and made available.

Page 17: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

17

Layered Tasks• We use the concept of layers in our daily life. We use the concept of layers in our daily life.

– Ex. Two friends who want to communicate through postal mail. Ex. Two friends who want to communicate through postal mail. – The process of sending a letter to a friend would be complex if there were no The process of sending a letter to a friend would be complex if there were no

services available from the post officeservices available from the post office

– Each layer at the sending site uses the services of the layer immediately below it.Each layer at the sending site uses the services of the layer immediately below it.• The sender at the higher layer uses the services of the middle layer, which in turn, uses The sender at the higher layer uses the services of the middle layer, which in turn, uses

the services of the lower layerthe services of the lower layer

Page 18: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

18

OSI model• ISO (International Standards Organization) is a multinational body responsible on agreement on international standards.

• OSI (Open Systems Interconnection) model is the ISO standard that covers all aspects of network communications.

• OSI model is not a protocol but a layered architecture for the design of network systems that allow communication between all types of computer systems even incompatible systems (i.e. open systems).

• It consists of 7 separate but related layers, each of which defines a part of the process of moving information across a network.

• Understanding the OSI model provides an understanding of data communication.

Page 19: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

19

OSI model• When a message is sent from device A to device B, it may pass through intermediate nodes.

– These intermediate nodes usually involve only the first three layers of the OSI model.• A process on layer x on one machine communicates with a process on layer x on another

machine using the peer-to-peer protocol (xth layer).– The processes on each machine that communicate at a given layer are called peer-to-peer-to-peer

processes. Machine communication => peer-to-peer process communication using a protocol.• At the physical layer, the communication is direct.• At the highest layers, however, the communication must move down through the layers on

device A, over to device B and then back up through the layers.• Within a single machine, each layer calls upon the services of the layer just below it.

– Ex. Layer 3 uses services provided by layer 2 and provide services for layer 4.• Each layer in the sending device adds its own information to the message it receives from the

layer just above it and passes the whole package to the layer just below it.– A header ( and possibly a trailer at layer 2) can be added to the data unit to form a packet.

• Encapsulation concept: the data portion of a packet at level N-1 carries the whole packet (data and header and may be trailer) from level N.

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

• An interface between each pair of adjacent layers is used to pass the data and network information down through the layers of the sending device and back up through the layers of the receiving device.– Each interface defines the information and services a layer must provide for the layer above it.– As long as a layer provides the expected services to the layer above it, the specific implementation

of its functions can be modified or replaced without changes to the surrounding layers (=> modularity).

Page 20: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

20

OSI model

Page 21: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

21

Layers in the OSI model• Physical Layer

– Responsible for movements of individual bits from one hop (node) to the next over the physical medium. • Physical characteristics of interface and medium

– Defines the characteristics of the interface and between the devices and the transmission medium.

– Defines the type of transmission medium.• Representation of bits.

– Defines the type of encoding bits into signals –electrical or optical.• Data rate.

– Defines the number of bits sent in each second.• Synchronization of bits.

– The sender and the receiver clocks to be synchronized.• Line configuration.

– Connection of the device to the media (point-to-point or multipoint configuration)• Physical topology.

– Defines how the devices are connected to make a network (mesh, bus, etc.)• Transmission mode.

– Defines the direction of the transmission (simplex, half-duplex, etc.).

Page 22: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

22

Layers in the OSI model•Data link Layer

–Responsible for moving frames from one hop (node) to the next.•Framing.

–Divides the stream of bits received from the network layer into frames.•Physical addressing.

–Adds a header to the frame to define the sender, and/or the receiver of the frame. • If the frame is intended for a system outside the sender’s system, the address is of the device

that connects the network to the next

•Flow control.–Imposes a flow control mechanism to avoid overwhelming the receiver.

•Error control.–Adds reliability to the physical layer by adding mechanisms to detect and retransmit

damaged or lost frames (achieved normally through the trailer). Detect also duplicate frames.

•Access control.–Determines which device has control over the link at any time when two or more

devices are connected to the same link.

Page 23: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

23

Layers in the OSI model• Data Link Layer (cont’d)

– Ex. Hop-to-hop delivery • Communication at the data link layer occurs between adjacent nodes.• Three partial delivery are made to send data from A to F.• First, the data link layer of A sends a frame to the data link layer at B (router).• The data link layer at B sends a new frame to the data link layer at E.• Finally, the data link layer at E sends a new frame to the data link layer of F.• The frame exchanged between the three nodes have different values in the headers

(the trailers can also be different).

Page 24: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

24

Layers in the OSI model• Network Layer

– Responsible for the delivery of individual packets from the source host to the destination host possibly across multiple networks.• Logical addressing.

– Need to use another addressing system to distinguish the source and destination systems when the packet passes the network boundary. This logical address will be included in the header added by the network layer.

• Routing.– Provides the mechanism to route (or switches) packets in an

internetwork to their final destination. Routers (or switches) are the devices connecting networks forming the internetwork.

Page 25: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

25

Layers in the OSI model• Network Layer (cont’d)

– EX.: source-to-destination delivery• The network layer at A sends the packet to the network layer at B.• The router B using its routing table, will then decides (based on the final

destination (F) of the packet) that the next hop will be the router E.• The network layer at B, sends then the packet to the network layer at E.• The network layer at E will, turn, send the packet to the network layer F.

Page 26: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

26

Layers in the OSI model• Transport Layer

– Responsible for the delivery of a message from one process (running program) to another. Whereas the network layer provides the source-to-destination delivery, the transport layer provides the process-to-process delivery.• Service-point addressing.

– Gets the entire message to the correct process on the destination computer. The transport layer header must therefore include a service-point address (or port address).

• Segmentation and reassembly.– Divide messages into segments and reassemble them into the original message.

• Connection control.– Provides a connection or connectionless oriented service.

• Flow control.– Provides an end-to-end flow control.

• Error control.– Provides a process-to-process error control of entire messages (no loss, duplication,

damage).

Page 27: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

27

Layers in the OSI model• Session Layer

– Responsible for the dialog control and synchronization.• Dialog control.

– Allows two systems to enter into a dialog.• Half-duplex or full-duplex process communication

• Synchronization.– Allows a process to add checkpoints, or synchronization points, to a stream of

data.

• Presentation layer– Responsible for translation, compression, and encryption.

• Translation.– Allow interoperability of two computers using different encoding methods.

• Encryption.– To ensure privacy, sensitive information will be encrypted.

• Compression.– Allows reducing the number of bits contained in the information (ex. audio).

Page 28: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

28

Layers in the OSI model• Application Layer

– Responsible for providing services to the user.• Network virtual terminal.

– Allows a user to log on to a remote host as a physical terminal.• File transfer, access and management.

– Access/retrieve/manage files in a remote host• Mail services.

– Provides the basis for e-mails forwarding and storage.• Directory services.

– Provides distributed database sources and access for global information about version objects and services.

Page 29: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

29

TCP/IP protocol suite• Defined originally as having four layers:

–host-to-network layer : equivalent to the combination of OSI physical and data link layers.–internet layer: equivalent to the OSI network layer.–Transport layer: equivalent to the OSI transport layer and part of the session layer. –Application layer: roughly doing the job of the OSI session, presentation, and application

layers.•We will assume later on that TCP/IP is made of five layers : Physical, Data Link, Network, Transport, and Application.

• TCP/IP is a hierarchical protocol–Whereas the OSI model specifies which functions belong to each of its layers, TCP/IP

protocol suite layers contain relatively independent protocols that can be mixed and matched depending on the needs of the system.

–Each upper-layer protocol is supported by one or more lower-level protocols (i.e. hierarchical)

• TCP/IP suite protocol defines the following protocols– Transport layer: three protocols are defined: TCP (Transmission Control Protocol), UDP

(User Datagram Protocol), and SCTP (Stream Control Transmission Protocol).–Network layer: the main protocol defined is IP (Internetworking Protocol). Other

protocols are defined to support data movement.

Page 30: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

30

Layers in TCP/IP protocol suite• Physical and Data Link Layers

– TCP/IP does not define at these layers any specific protocol.– It can support all the standards and proprietary protocols.– A network in a TCP/IP internetweork could be a LAN or a WAN.

• Network layer– TCP/IP supports at this layer the IP protocol.

• It is an unreliable and connectionless protocol –a best-effort service-.• Transports data in packets called datagrams.• These datagrams can travel along different routes and arrive out of sequence or be

duplicated.– IP protocol uses four supporting protocols:

• ARP (Address Resolution Protocol): used to associate a logical address with a physical address.

• RARP (Reverse Address Resolution Protocol): allows a host to discover its Internet address when it knows only its physical address.

• ICMP (Internet Control Message Protocol) : mechanism used by host and gateways to send notification of datagram problems back to the sender

• IGMP (Internet Group Message Protocol) : used to facilitate the simultaneous transmission of a message to a group of recipients

• Transport Layer– While IP is host-to-host protocol –meaning it can deliver a packet from one physical

device to another-, the protocols of this layer are transport level protocols –meaning responsible for the delivery of a message from a process to another process.

Page 31: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

31

Layers in TCP/IP protocol suite• Transport Layer (cont’d)

–Traditionally two protocols were defined (TCP and UDP). SCTP has been added to meet the needs of some new applications.

• UDP (User Datagram Protocol): it is the simpler transport protocol. It is a process-to-process protocol that adds only port addresses, checksum error control, and length information to the data from the upper layer.

• TCP (Transmission Control Protocol): provides full transport-layer services to applications. It is a reliable stream (stream i.e. connection oriented) transport protocol. At the sending side, TCP divides the stream of data into smaller segments. Each segment includes a sequence number. Segments are carried across the internet inside of IP datagrams. At the receiving side, TCP collects each datagram as it comes and reorders the transmission based on sequence numbers.

• SCTP (Stream Control Transmission Protocol): provides support for newer applications such as voice over the Internet. It combines the best features of UDP and TCP.

• Application layer–Many protocols are defined at this layer.

Page 32: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

32

Addressing• Four levels of addresses used with a TCP/IP internet each

related to a specific layer:1.Physical (link) addresses –Physical & Data Link Layers-

– Lowest-level address.– Address of the node as defined by its LAN or WAN.– It is included in the frame used by the data link layer.

– The size and the format of these addresses depend on the network• Ex.: The Network Interface Card (NIC) of most LANs (Ethernet, etc) use a 6-

byte (48-bit) physical address written as 12 hexadecimal digits with every byte separated by a colon: 07:01:02:01:2C:4B. LocalTalk uses a 1-byte address.

- Ex.: • 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).

• The data link layer at the sender receives data from upper layer, encapsulates the data in a frame adding the physical addresses of the sender and the receiver in

the header and adding extra bits for error detection in the trailer.• The packet is received by all stations which will drop it except station having

the address 87.• This station checks the frame, drops the header and the trailer, and the data part

is decapsulated and delivered to the upper layer.

Page 33: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

33

Addressing

2. Logical (IP) Addresses -Network Layer-– Physical addresses are not adequate in an internetwork where different networks can have

different address formats.– A logical address is a universal address that identify uniquely each host regardless of the

underlying physical network.– Actually a logical address in the Internet is on 32-bit that identify uniquely a visible host

connected to the Internet.– EX.:

– A part of an internet with two routers connecting three LANs is shown. – 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.

– The computer with logical address A (a number) and physical address 10 (i.e. A/10) needs to send a packet to the computer P/95

Page 34: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

34

Addressing- EX. (cont’d)

– Its network layer encapsulates the data in a packet and adds two logical addresses A and P.– The network layer needs to find the physical address of the next hop before the packet can be delivered.– By consulting its routing table, the network layer finds that the logical address of the next hop is F (router 1).– The ARP finds that the physical address of router 1 is 20 ???.– The network layer passes this address to the data link layer which encapsulates the packet with physical destination

address 20 and physical source address 10– The frame is received by every device and is discarded by all except the router 1 which decapsulates the packet from

the frame to read the logical destination address P. Since this logical address doesn’t match its logical address, the router knows that this packet needs to be forwarded.

– It consults its routing table and ARP to find the physical destination address of the next hop (router 2), creates a new frame, encapsulates the packet, and sends it to router 2.

– The source physical address has changed from 10 to 99 and the destination physical address has also changed from 20 to 33 (router 2 physical address). The logical source and destination addresses must remain the same otherwise the packet will be lost.

– At router 2 a similar scenario is followed.– When the frame reaches the destination, the packet is decapsulated. The destination logical address P matches the

logical address of the computer. The data are decapsulated from the packet and delivered to the upper layer.

Page 35: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

35

Addressing3. Port addresses –Transport Layer-

– Sending data from one computer to another is not complete because today computers can run multiple processes at the same time.– EX. : computer A can communicate with computer C by using TELNET and at

the same time it can communicate with computer B by using FTP.– Need to identify a process on a host.– TCP/IP architecture uses port addresses to label different processes.– Port address in TCP/IP is 16-bit in length.– Ex.

– Two computers are communicating via the Internet.– The sending computer is running three processes 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 needs to communicate with process j.– The transport layer encapsulates data from the application layer in a packet and

adds two port addresses, a and j (i.e. source and destination).– This packet is encapsulated in another packet at the network layer with logical

source and destination addresses (A and P).– Finally, this packet is encapsulated in a frame with the physical source and

destination addresses of the next hop.– The physical addresses will change from hop to hop inside the cloud (i.e.

Internet) which is not the case with the logical and port addresses.

Page 36: IS370 Data Communications and Computer Networks 1 st semester 1428-1429 Chapter 1 : Introduction Instructor: Mr Mourad Benchikh

36

Addressing

4. Specific addresses (Application Layer)• Some applications have user-friendly addresses that are designed for that

specific address.• E-mail address (ex. [email protected]) and the URL (Unified Resource Locator)

(ex. www.mhhe.com).• These addresses will be changed to the corresponding port and logical addresses by

the sending computer.