CcompSci 356 Computer Network Architecture Lecture 25: Final review - - PowerPoint PPT Presentation

ccompsci 356 computer network architecture lecture 25
SMART_READER_LITE
LIVE PREVIEW

CcompSci 356 Computer Network Architecture Lecture 25: Final review - - PowerPoint PPT Presentation

CcompSci 356 Computer Network Architecture Lecture 25: Final review Xiaowei Yang xwy@cs.duke.edu What we have learned Key components of the Internet What happens when data is sent from one host to another What the Internet looks like


slide-1
SLIDE 1

CcompSci 356 Computer Network Architecture Lecture 25: Final review

Xiaowei Yang xwy@cs.duke.edu

slide-2
SLIDE 2

What we have learned

  • Key components of the Internet
  • What happens when data is sent from one host

to another

slide-3
SLIDE 3

What the Internet looks like

email WWW phone... SMTP HTTP RTP... TCP UDP… IP ethernet PPP… CSMA async sonet... copper fiber radio... Ethernet ATM Framerelay IP/SONET Ethernet Ethernet 802.X Wireless Host Host Host Host Host Host Host Host Host Host Host Host Host Host Host

Tier 1 Tier 1

Tier 2 Tier 2 Tier 2

Tier 3

The Internet

BGP RIP, OSFP Distance Vector Link-State

Ethernet, CSMA/CD Bridges, Switches, Spanning Tree Bandwidth x Delay TCP Performance

Modulation Coding FDMA, TDMA

IP Blocks, CIDR, Subnets Longest Prefix Match, Fragmentation, MTU

slide-4
SLIDE 4

Functions/Concepts at different layers

Bandwidth, latency, throughput, delay-bandwidth product Encoding, framing, error detection, reliability media sharing, switching Forwarding, Routing, Addressing Reliable transport, multiplexing Application protocols vs Applications

slide-5
SLIDE 5

CPU

Network adapter

To network

I/O bus

Cache

Memory

From network

Physical properties of a link

slide-6
SLIDE 6

Bandwidth

  • Bandwidth of a link refers to the number of bits it can

transmit in a unit time

– A second of time as distance – Each bit as a pulse of width

  • Fast link
  • Slow link
slide-7
SLIDE 7

Latency to transmit a packet

  • Has four components

– Link propagation delay – Transmission/serialization latency – Queuing delay – Processing delay (often ignored)

slide-8
SLIDE 8

Round trip time (RTT)

  • Time to send a packet and receive an

acknowledgement

slide-9
SLIDE 9

How to determine the “optimal” sliding window size

  • Discuss midterm problem 3
  • What does “keep the pipe full” mean?
slide-10
SLIDE 10

Mechanisms at Different layers

  • Link layer

– Encoding

  • NRZ, NRZI, Manchester, 4B/5B

– Framing

  • Byte-oriented, bit-oriented, time-based
  • Bit stuffing

– Error detection

  • Parity, checkshum, CRC

– Reliability

  • FEC, sliding window
slide-11
SLIDE 11

Link layer continued

  • Multi-access link

– Ethernet

  • Collision Sense Multiple Access/Collision Detection

(CSMA/CD)

– WIFI

  • Carrier-sense multiple access with collision avoidance

(CSMA/CA)

  • Cannot send and receive at the same time
  • Must send when channel is idle
  • RTS/CTS
slide-12
SLIDE 12

Link layer continued

  • Virtual circuit switching

– ATM

  • Datagram switching

– Ethernet learning bridges

  • Spanning tree algorithm
  • Source routing
slide-13
SLIDE 13

The network layer

  • The Internet Protocol
  • Classless Interdomain Routing (CIDR)

– Addressing format – Subnet, network prefix

  • Forwarding

– Longest prefix matching

slide-14
SLIDE 14

The network layer continued

  • Routing

– Distance vector – Link state – BGP

  • Auxiliary functions

– ARP, ICMP, DHCP, NAT, IP Tunnel

  • Multicast
  • QoS
slide-15
SLIDE 15

The transport layer

  • UDP

– Datagram, connectionless, multiplexing multiple applications

  • TCP

– Reliable, byte stream

slide-16
SLIDE 16

TCP

  • Connection establishment
  • Reliability

– Sliding window – Loss recovery

  • Time out, duplicate acks, selective ACKs
  • Flow control
  • Congestion control and avoidance
slide-17
SLIDE 17

TCP congestion control

  • 1. Probing for the available bandwidth

– slow start (cwnd < ssthresh)

  • 2. Avoid overloading the network

– congestion avoidance (cwnd >= ssthresh)

slide-18
SLIDE 18

Slow Start

  • Initial value:

Set cwnd = 1 MSS

  • Modern TCP implementation may set initial cwnd to 2
  • When receiving an ACK, cwnd+= 1 MSS
  • If an ACK acknowledges two segments, cwnd is still

increased by only 1 segment.

  • Even if ACK acknowledges a segment that is smaller

than MSS bytes long, cwnd is increased by 1.

  • Question: how can you accelerate your TCP download?
slide-19
SLIDE 19

Congestion Avoidance

  • If cwnd >= ssthresh then each time an ACK is

received, increment cwnd as follows:

  • cwnd += MSS * (MSS / cwnd) (cwnd measured in

bytes)

  • So cwnd is increased by one MSS only if all

cwnd/MSS segments have been acknowledged.

slide-20
SLIDE 20

Slow Start

  • Initial value:

Set cwnd = 1 MSS

  • Modern TCP implementation may set initial cwnd to 2
  • When receiving an ACK, cwnd+= 1 MSS
  • If an ACK acknowledges two segments, cwnd is still

increased by only 1 segment.

  • Even if ACK acknowledges a segment that is smaller

than MSS bytes long, cwnd is increased by 1.

  • Question: how can you accelerate your TCP download?
slide-21
SLIDE 21

Congestion Avoidance

  • If cwnd >= ssthresh then each time an ACK is

received, increment cwnd as follows:

  • cwnd += MSS * (MSS / cwnd) (cwnd measured in

bytes)

  • So cwnd is increased by one MSS only if all

cwnd/MSS segments have been acknowledged.

slide-22
SLIDE 22

22

TCP congestion control modeling

  • Four sample types of controls
  • AIAD, AIMD, MIAD, MIMD
slide-23
SLIDE 23

23

Phase plot

x1 x2

slide-24
SLIDE 24

Application layer

  • Domain Name System (DNS)

– Problem 5 of homework

  • Socket interface
  • Application protocols vs applications

– Email

  • Security primitives
slide-25
SLIDE 25

Figure out the DNS server hierarchy

  • dig +norecurse @a.root-servers.net NS

www.cnn.com

slide-26
SLIDE 26
  • https://ns1.com/articles/using-dig-trace
  • dig +trace www.cnn.com
  • dig +trace turner-tls.map.fastly.net.
slide-27
SLIDE 27

Other examples

  • Sample final problem 4
  • Midterm problem 2
slide-28
SLIDE 28

Looking forward

  • Graduate networking class

– Datacenter networking – Future Internet architectures

slide-29
SLIDE 29

What to expect in the final

  • Networking knowledge

– Understanding

  • Application of networking knowledge
slide-30
SLIDE 30

Course evaluation

  • Please do it if you have not!
slide-31
SLIDE 31

An Example

slide-32
SLIDE 32
  • A user on host argon.tcpip-lab.edu (Argon) makes web

access to URL http://neon. tcpip-lab.edu/index.html.

  • What actually happens in the network?

A simple TCP/IP Example

argon.tcpip-lab.edu ("Argon") neon.tcpip-lab.edu ("Neon") Web request Web page Web client Web server

slide-33
SLIDE 33

HTTP Request and HTTP response

  • Web server runs an HTTP server program
  • HTTP client Web browser runs an HTTP client

program

  • sends an HTTP request to HTTP server
  • HTTP server responds with HTTP response

HTTP client

Argon

HTTP server

Neon HTTP request HTTP response

slide-34
SLIDE 34

HTTP Request

GET /example.html HTTP/1.1 Accept: image/gif, */* Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 Host: 192.168.123.144 Connection: Keep-Alive

slide-35
SLIDE 35

HTTP Response

HTTP/1.1 200 OK Date: Sat, 25 May 2002 21:10:32 GMT Server: Apache/1.3.19 (Unix) Last-Modified: Sat, 25 May 2002 20:51:33 GMT ETag: "56497-51-3ceff955" Accept-Ranges: bytes Content-Length: 81 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html <HTML> <BODY> <H1>Internet Lab</H1> Click <a href="http://www.tcpip-lab.net/index.html">here</a> for the Internet Lab webpage. </BODY> </HTML>

  • How does the HTTP request get from Argon to Neon ?
slide-36
SLIDE 36

From HTTP to TCP

  • To send request, HTTP client program

establishes an TCP connection to the HTTP server Neon.

  • The HTTP server at Neon has a TCP server

running

HTTP client

TCP client Argon

HTTP server

TCP server Neon HTTP request / HTTP response TCP connection

slide-37
SLIDE 37

Resolving hostnames and port numbers

  • Since TCP does not work with hostnames and

also would not know how to find the HTTP server program at Neon, two things must happen:

  • 1. The name neon.tcpip-lab.edu must be

translated into a 32-bit IP address.

  • 2. The HTTP server at Neon must be identified

by a 16-bit port number.

slide-38
SLIDE 38

Translating a hostname into an IP address

  • The translation of the hostname neon.tcpip-lab.edu into an IP

address is done via a database lookup

– gethostbyname(host)

  • The distributed database used is called the Domain Name

System (DNS)

  • All machines on the Internet have an IP address:

argon.tcpip-lab.edu 128.143.137.144 neon.tcpip-lab.edu 128.143.71.21

HTTP client DNS Server argon.tcpip-lab.edu 128.143.136.15 neon.tcpip-lab.edu 128.143.71.21

slide-39
SLIDE 39

Finding the port number

  • Note: Most services on the Internet are reachable via well-known
  • ports. E.g. All HTTP servers on the Internet can be reached at

port number 80.

  • So: Argon simply knows the port number of the HTTP server at a

remote machine.

  • On most Unix systems, the well-known ports are listed in a file

with name /etc/services. The well-known port numbers of some of the most popular services are: ftp 21 finger 79 telnet 23 http 80 smtp 25 nntp 119

slide-40
SLIDE 40

Requesting a TCP Connection

  • The HTTP client at argon.tcpip-lab.edu requests the TCP client to establish

a connection to port 80 of the machine with address 128.141.71.21

HTTP client

TCP client argon.tcpip-lab.edu Establish a TCP connection to port 80 of 128.143.71.21

connect(s, (struct sockaddr*)&sin, sizeof(sin))

slide-41
SLIDE 41

Invoking the IP Protocol

  • The TCP client at Argon sends a request to establish a connection to port 80 at

Neon

  • This is done by asking its local IP module to send an IP datagram to

128.143.71.21

  • (The data portion of the IP datagram contains the request to open a

connection)

TCP client argon.tcpip-lab.edu IP Send an IP datagram to 128.143.71.21

slide-42
SLIDE 42

Sending the IP datagram to the default router

  • Argon sends the IP datagram to its default router
  • The default gateway is an IP router
  • The default gateway for Argon is

Router137.tcpip-lab.edu (128.143.137.1).

slide-43
SLIDE 43

Invoking the device driver

  • The IP module at Argon, tells its Ethernet device driver to send an

Ethernet frame to address 00:e0:f9:23:a8:20

  • Ethernet address of the default router is found out via ARP

argon.tcpip-lab.edu IP module Ethernet Send an Ethernet frame to 00:e0:f9:23:a8:20

slide-44
SLIDE 44

The route from Argon to Neon

  • Note that the router has a different name for each of its interfaces.
slide-45
SLIDE 45

Sending an Ethernet frame

  • The Ethernet device driver of Argon sends the

Ethernet frame to the Ethernet network interface card (NIC)

  • The NIC sends the frame onto the wire
slide-46
SLIDE 46

Forwarding the IP datagram

  • The IP router receives the Ethernet frame at interface 128.143.137.1

1. recovers the IP datagram 2. determines that the IP datagram should be forwarded to the interface with name 128.143.71.1

  • The IP router determines that it can deliver the IP datagram directly
slide-47
SLIDE 47
  • The IP protocol at Router71, tells its Ethernet device

driver to send an Ethernet frame to address 00:20:af:03:98:28

router71.tcpip-lab.edu IP module Ethernet Send a frame to 00:20:af:03:98:28

Invoking the Device Driver at the Router

slide-48
SLIDE 48

Sending another Ethernet frame

  • The Ethernet device driver of Router71 sends

the Ethernet frame to the Ethernet NIC, which transmits the frame onto the wire.

slide-49
SLIDE 49

Data has arrived at Neon

  • Neon receives the Ethernet frame
  • The payload of the Ethernet frame is an

IP datagram which is passed to the IP protocol.

  • The payload of the IP datagram is a TCP

segment, which is passed to the TCP server

HTTP server neon.tcpip-lab.edu TCP server IP module Ethernet