21
Network Layers CSC358 - Introduction to Computer Networks

CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

Network Layers

CSC358 - Introduction to Computer Networks

Page 2: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

Goal

Understand how application processes set up a connectionand exchange messages.Understand how addresses are determined

CSC358 - Introduction to Computer Networks

Page 3: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

Data Exchange Between Application Processes

CSC358 - Introduction to Computer Networks

Page 4: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

TCP Connection-Setup Between ApplicationProcesses

CSC358 - Introduction to Computer Networks

Page 5: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

TCP Connection-Setup Between ApplicationProcesses: Client

(1) Application Layer: Application process on client creates asocket, and specifies host IP address and the destinationport number for the application process on the host.

(2) Transport Layer: Chooses source port number and initialsequence number, and creates connection-requestsegment to be sent to the TCP on the server.

(3) Network Layer: Creates datagram and consults routingtable to find find IP-address of next interface.

(4) Data Link Layer: Looks-up LAN address of next interfaceand creates frame.

CSC358 - Introduction to Computer Networks

Page 6: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

Control Information Exchange between Layers: Client

(1) Transport layer gets from application layer IP address ofhost and port number of process on the host.

(2) Network layer gets from transport layer IP address of host.(3) Data link layer gets from network layer IP address of next

interface.

CSC358 - Introduction to Computer Networks

Page 7: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

TCP Connection-Setup Between ApplicationProcesses

CSC358 - Introduction to Computer Networks

Page 8: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

TCP Connection-Setup Between ApplicationProcesses: Server

(1) Transport Layer: Receives connection-request segmentand allocates buffer space to connection.

CSC358 - Introduction to Computer Networks

Page 9: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

TCP Connection-Setup Between ApplicationProcesses

CSC358 - Introduction to Computer Networks

Page 10: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

TCP Connection-Setup Between ApplicationProcesses (cont.)

Server:(1) Transport Layer: Chooses sequence number and sends

connection-granted segment.Client:(1) Transport Layer: Allocates buffer space.

CSC358 - Introduction to Computer Networks

Page 11: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

TCP Connection-Setup Between ApplicationProcesses

CSC358 - Introduction to Computer Networks

Page 12: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

TCP Connection-Setup Between ApplicationProcesses (cont.)

Client:(1) Transport Layer: Sends connection-granted segment.

Server:(1) Transport Layer: Passes connection-request to

application layer.(2) Application Layer: Creates socket.

CSC358 - Introduction to Computer Networks

Page 13: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

Data Exchange Between Application Processes

CSC358 - Introduction to Computer Networks

Page 14: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

Address Translation

Applications (processes) know hostnames (cs.toronto.edu)- but need to know IP address to request a (TCP)connection.Data link layer receives a destination IP address fromnetwork layer - but needs to use LAN address.

CSC358 - Introduction to Computer Networks

Page 15: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

Address Translation

Applications layer uses DNS (domain name system) totranslate hostnames to IP addressesData link layer uses ARP (address resolution protocol) totranslate IP addresses into LAN addresses.Note: DNS needs to provide address translation for wholeInternet. ARP only needs to provide address translation forLAN.

CSC358 - Introduction to Computer Networks

Page 16: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

DNS - Domain Name System

DNS is adistributed database implemented in a hierarchy of nameservers.application layer protocol that allows hosts and nameservers to communicate in order to provide the translationservice.

CSC358 - Introduction to Computer Networks

Page 17: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

DNS - Domain Name System

Local name serverEach ISP (Internet Service Provider) - such as anuniversity, a company, or a residential ISP - has a localname server. The IP address of the local name server istypically configured by hand (Control Panel - Network-TCP/IP - DNS).

Root name serverWhen a local name server can not satisfy a query from ahost, it queries itself a root name server (there are a dozenor so root name servers in the Internet).

Authoritative name serverWhen a root name server can not satisfy a query from alocal name server, it queries itself an authoritative nameserver for the hostname of the query. Every host isregistered with an authoritative name server. Typically, theauthoritative name server for a host is a name server in thehost’s local ISP.

CSC358 - Introduction to Computer Networks

Page 18: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

DNS - Domain Name Service

CSC358 - Introduction to Computer Networks

Page 19: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

ARP - Address Resolution Protocol

In each node, an ARP module keeps a table in its RAMcalled an ARP table, which contains the mapping of IPaddresses to LAN addresses.When an ARP module can not map an IP address, then itbroadcasts a request. The adapter with the requested IPaddresses then replies and provides the address mapping.

CSC358 - Introduction to Computer Networks

Page 20: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

Data Exchange Between Application Processes

CSC358 - Introduction to Computer Networks

Page 21: CSC358 - Introduction to Computer Networksmarbach/COURSES/CSC358_S19_1/l18.pdf · 2019. 1. 2. · CSC358 - Introduction to Computer Networks. DNS - Domain Name Service CSC358 - Introduction

Data Exchange Between Application Processes

CSC358 - Introduction to Computer Networks