Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

Computer Basics

Network and Transport Layers

Mettu University
Engineering and Technology College
Electrical & Computer Eng. Department

Advanced
Computer Networking

Estifanos T. (MSc in Computer Networking)


Computer Basics
Network and Transport Layers

Lecture Three
Network and Transport Layers

Engineering and Technology College Mettu University 2


09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Outline
• Lesson 1: Network Layer

• Lesson 2: Transport Layer

Engineering and Technology College Mettu University 3


09/09/2022
Computer Basics
Network and Transport Layers

Lesson One
Network Layer

Engineering and Technology College Mettu University 4


09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Introduction to Network Layer

1
Engineering and Technology College Mettu University 5
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Introduction to Network Layer…

2
Engineering and Technology College Mettu University 6
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Introduction to Network Layer…


Common Network Layer Protocols
• Internet Protocol version 4 (IPv4)
• Internet Protocol version 6 (IPv6)

Legacy Network Layer Protocols


• Novell Internetwork Packet Exchange (IPX)
• AppleTalk
• Connectionless Network Service (CLNS/DECNet)

3
Engineering and Technology College Mettu University 7
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Introduction to Network Layer…


• Concerned with getting packets from source to destination

• The network layer must know the topology of the subnet and choose
appropriate paths through it

• When source and destination are in different networks, the network layer
(IP) must deal with these differences

4
Engineering and Technology College Mettu University 8
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

IPv4 Packet Header


• Version, Differentiated Services (DS), Time-to-Live (TTL),Protocol,
Source IP Address, Destination IP Address…
Byte 1 Byte 2 Byte 3 Byte 4

IP Header Differentiated Services


Version Total Length
Length
DSCP ECN

Identification Flag Fragment Offset

Time To Live Protocol Header Checksum

Source IP Address

Destination IP Address

Options (optional)
Padding 5
Engineering and Technology College Mettu University 9
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Network Layer Functions


• Three important functions
• Path Determination: route taken by packets from source to destination
– Routing Algorithms
• Switching: move packets from router’s input to appropriate router
output
• Call Setup: some network architectures require router call setup along
path before data flows

6
Engineering and Technology College Mettu University 10
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Routing
• Routing Algorithm is a part of the Network Layer responsibility for
deciding on which output line to transmit an incoming packet

• Algorithm Properties are correctness, simplicity, robustness, stability,


fairness, optimality, and scalability

• Routing Classified into two: Adaptive and Non-Adaptive Routings

7
Engineering and Technology College Mettu University 11
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Routing…
Adaptive Routing Non-Adaptive Routing

Based on current measurements of


traffic and/or topology 1. Flooding

1. Centralized 2. Static routing using shortest


path algorithms
2. Isolated
3. Distributed

8
Engineering and Technology College Mettu University 12
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Routing…
• Shortest Path Routing Algorithm

• Bellman-Ford Algorithm (Distance Vector) – RIP

• Dijkstra’s Algorithm (Link State) – OSPF

• What does it mean to be the shortest (or optimal) route?


• Minimize mean packet delay
• Maximize the network throughput
• Minimize the number of hops along the path

9
Engineering and Technology College Mettu University 13
09/09/2022
Computer Basics
Network and Transport Layers

Lesson Two
Transport Layer

Engineering and Technology College Mettu University 14


09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Introduction to Transport Layer


• The core or the heart of the whole protocol hierarchy
• It provides reliable, cost-effective data transfer from the source to the
destination on top of an unreliable network; process-to-process delivery
• The transport layer code runs on the users’ machines; the network layer
mostly runs on the routers (operated by a carrier for a WAN) and the
adequacy of the service can not be guaranteed

10
Engineering and Technology College Mettu University 15
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Introduction to Transport Layer…


• The position of the transport layer

11
Engineering and Technology College Mettu University 16
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Packetizing
• The transport layer creates packets out of the message received from the
application layer
• It divides a long message into smaller ones; they are then encapsulated into
the data field of the transport-layer packet and headers are added

Addressing
• At the data link layer, we need a MAC address
• At the network layer, we need an IP address
• At the transport layer, we need a transport-layer address, called a port
number, to choose among several processes
12

Engineering and Technology College Mettu University 09/09/2022


Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

• Well-known port numbers: universal port numbers for servers; not


random since a client process cannot know it

• IANA (Internet Assigned Numbers Authority) Ranges


• IANA divided the port numbers into three ranges
• Well-known ports: assigned and controlled by IANA for standard
services
• Registered ports: are not assigned and controlled by IANA; can only be
registered with IANA to prevent duplication
• Dynamic ports: neither controlled nor registered; these are the
ephemeral ports

13

Engineering and Technology College Mettu University 09/09/2022


Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

• Socket Addresses
• process-to-process delivery needs two addresses: IP address and port
number at each end; the combination of an IP address and a port
number is called a socket address

• A transport-layer protocol needs a pair of socket addresses: the


client socket address and the server socket address
• The IP header contains the IP address; the UDP or TCP header
contains the port number 14

Engineering and Technology College Mettu University 09/09/2022


Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

Connection Control
• A transport-layer protocol can be either connectionless (UDP) or
connection-oriented (TCP)
• If connection-oriented, it first establishes a virtual connection, then
follows data transfer, then the connection is terminated

Reliability - UDP and TCP


• A transport-layer service can be either reliable or unreliable
• The choice depends on the needs of the application layer program
• A reliable transport-layer protocol (TCP) implements flow and error
control; a slower and more complex service
15

Engineering and Technology College Mettu University 09/09/2022


Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

• UDP - User Datagram Protocol


• Connectionless and unreliable transport layer protocol in the Internet
(no flow or error control, no retransmission if data is corrupted or
lost)
• Simple with a minimum of overhead
• Convenient for multimedia and multicasting applications
• For client-server situations

e.g., DNS can use UDP, give me the IP address of the host name
www.meu.edu.et

16

Engineering and Technology College Mettu University 09/09/2022


Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

• Some of the well-known ports used by UDP (see www.iana.org for a


complete list - also for TCP ports)
Port Protocol Description
    7 Echo Echoes a received datagram back to the sender
    9 Discard Discards any datagram that is received
  11 Users Active users
  13 Daytime Returns the date and the time
  17 Quote Returns a quote of the day
  19 Chargen Returns a string of characters
  53 DNS Domain Name Service
  67 Bootps Server port to download bootstrap information
  68 Bootpc Client port to download bootstrap information
  69 TFTP Trivial File Transfer Protocol
111 RPC Remote Procedure Call
123 NTP Network Time Protocol
161 SNMP Simple Network Management Protocol
162 SNMP Simple Network Management Protocol (trap) 17

Engineering and Technology College Mettu University 09/09/2022


Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

• TCP - Transport Control Protocol


• Reliable, but complex transport-layer protocol in the Internet
• It is called a stream connection-oriented and reliable transport protocol
• Like UDP, TCP uses port numbers as transport-layer addresses
• Note: if an application can use both UDP and TCP, the same port
number is assigned to this application; e.g., Daytime, DNS

18

Engineering and Technology College Mettu University 09/09/2022


Estifanos T. (MSc in Computer Networking)
Computer Basics
Network and Transport Layers

• Some of the well-known ports used by TCP

Port Protocol Description


   7 Echo Echoes a received datagram back to the sender
    9 Discard Discards any datagram that is received
  11 Users Active users
  13 Daytime Returns the date and the time
  17 Quote Returns a quote of the day
  19 Chargen Returns a string of characters
  20 FTP, Data File Transfer Protocol (data connection)
  21 FTP, Control File Transfer Protocol (control connection)
  23 TELNET Terminal Network
  25 SMTP Simple Mail Transfer Protocol
  53 DNS Domain Name Server
  67 BOOTP Bootstrap Protocol
  79 Finger Lookup information about a user
  80 HTTP Hypertext Transfer Protocol
111 RPC Remote Procedure Call 19

Engineering and Technology College Mettu University 09/09/2022


Computer Basics
Network and Transport Layers

End of Lecture Three

Engineering
Estifanos and
T. (MSc Technology
in Computer College
Networking) Mettu
Lecture 2: University
Distributed Architectures 09/09/2022

You might also like