Information, Computation, and Communication Networks 1 ICC Module - - PowerPoint PPT Presentation

information computation and communication
SMART_READER_LITE
LIVE PREVIEW

Information, Computation, and Communication Networks 1 ICC Module - - PowerPoint PPT Presentation

ICC Module Systems Networks Information, Computation, and Communication Networks 1 ICC Module Systems Networks Computer Networks 2 ICC Module Systems Networks Outline Communication protocols Packet switching Protocol


slide-1
SLIDE 1

ICC Module Systems – Networks

1

Information, Computation, and Communication

Networks

slide-2
SLIDE 2

ICC Module Systems – Networks

2

Computer Networks

slide-3
SLIDE 3

ICC Module Systems – Networks

3

§ Communication protocols § Packet switching § Protocol structure and packet headers § Protocol modularization § Example: Internet protocols (TCP / IP)

Outline

slide-4
SLIDE 4

ICC Module Systems – Networks

4

§ A set of rules that governs a communication

A Communication Protocol

slide-5
SLIDE 5

ICC Module Systems – Networks

5

§ All communication is governed by a protocol § Includes the communication between humans, i.e.,

  • Classrooms
  • Over the telephone

The Notion of a Protocol

slide-6
SLIDE 6

ICC Module Systems – Networks

6

§ A protocol between humans can be vaguely defined § A protocol between computers must be precise in all of its details Difference with Communication between Computers

slide-7
SLIDE 7

ICC Module Systems – Networks

7

§ Communication protocols § Packet switching § Protocol structure and packet headers § Protocol modularization § Example: Internet protocols (TCP / IP)

Outline

slide-8
SLIDE 8

ICC Module Systems – Networks

8

§ The information arrives in bursts (periods of low volume followed by sudden high volumes of information) § When there is communication, the required bandwidth is very high, otherwise the bandwidth is 0. § Recall, bandwidth (computing) is the rate of data transfer, measure in bits per second (bit/s)

Communication between Computers

bandwidth time

slide-9
SLIDE 9

ICC Module Systems – Networks

9

Communication between Computers

Which bandwidth to choose? In any case, inefficient ? ?

bandwidth time

slide-10
SLIDE 10

ICC Module Systems – Networks

10

§ We split the information in packets § We send them to the destination, a packet at a time § Model “Post Office”

Packet Switching

slide-11
SLIDE 11

ICC Module Systems – Networks

11

Example: How to Send a File

file to send packet 0 packet 1 packet 2 packet 3 time decompose file into packets send packets one by one

slide-12
SLIDE 12

ICC Module Systems – Networks

12

Example: How to Receive a File

packet0 packet1 packet2 packet3 time receive packets one by one put packets together in order reconstruct original file

slide-13
SLIDE 13

ICC Module Systems – Networks

13

§ Packets may be lost on the way § Packets may arrive out of order § We will see later how to handle such cases

Packet Switching: Problems!

slide-14
SLIDE 14

ICC Module Systems – Networks

14

§ Internet § Almost all computer networks § Internet telephone (e.g., Skype) § Protocol = the set of rules

  • E.g. WiFi, Ethernet, …

Packet Switching is Common in Protocols

slide-15
SLIDE 15

ICC Module Systems – Networks

15

§ Communication protocols § Packet switching § Protocol structure and packet headers § Protocol modularization § Example: Internet protocols (TCP / IP)

Outline

slide-16
SLIDE 16

ICC Module Systems – Networks

16

§ Let’s say that computer A wants to:

  • send a packet to computer B
  • know if the packet has arrived

A Protocol Example

slide-17
SLIDE 17

ICC Module Systems – Networks

17

§ B sends a special-type packet called acknowledgement (ACK) to A § ACK means “OK, I received it”

Principle of an Acknowledgement (ACK)

slide-18
SLIDE 18

ICC Module Systems – Networks

18

§ Computer A may mistake an acknowledgment packet for a data packet! § We must be able to distinguish between

  • the data packets, and
  • the acknowledgement packets

§ How to do that?

  • put in each packet info about its “type”

Attention!

slide-19
SLIDE 19

ICC Module Systems – Networks

19

Inclusion of Packet Type

type data

type = data packet, acknowledgement packet

slide-20
SLIDE 20

ICC Module Systems – Networks

20

§ What does A do when the acknowledgement does not arrive?

So…

slide-21
SLIDE 21

ICC Module Systems – Networks

21

§ After some time t, A retransmits the packet to B § Until an acknowledgement is received § After a number of attempts, A quits

Retransmission Principle

slide-22
SLIDE 22

ICC Module Systems – Networks

22

§ How does B know if a packet it received is

  • a retransmission, or
  • a new packet?

§ The packet has to be identified § We put in the packet a sequence number

Is this correct?

slide-23
SLIDE 23

ICC Module Systems – Networks

23

Inclusion of a Sequence Number

type data

seq# = 0, 1, 2, …

seq#

slide-24
SLIDE 24

ICC Module Systems – Networks

24

§ A has to indicate that the packet is for B § A has to indicate that the packet comes from A § Put the addresses for A and B in the packet

Addressing

slide-25
SLIDE 25

ICC Module Systems – Networks

25

Inclusion of Addressing

type data seq# sender recipient

slide-26
SLIDE 26

ICC Module Systems – Networks

26

§ Every packet consists of:

  • data, and
  • a header: type, a sequence number, size, address, sender and

receiver, etc.

Contents of a Packet

data header

slide-27
SLIDE 27

ICC Module Systems – Networks

27

Transmission of a File in Packets

file packet0 packet1 packet2 packet3 header file to send decompose file into packets add headers and send packets one by one

slide-28
SLIDE 28

ICC Module Systems – Networks

28

Receiving a File in Packets

file packet0 packet1 packet2 packet3 receive packets one by one remove headers and put data together in order reconstruct original file

slide-29
SLIDE 29

ICC Module Systems – Networks

29

§ During a packet transmission, the protocol…

  • receives the data
  • adds a header to each packet
  • transmits the packet

§ Receiving a packet, the protocol…

  • removes header from each packet
  • passes the data

How does a Protocol Work?

slide-30
SLIDE 30

ICC Module Systems – Networks

30

§ Communication protocols § Packet switching § Protocol structure and packet headers § Protocol modularization § Example: Internet protocols (TCP / IP)

Outline

slide-31
SLIDE 31

ICC Module Systems – Networks

31

§ A protocol can become very complicated § Modularization is a way to control this complexity

Modularization: the goal

slide-32
SLIDE 32

ICC Module Systems – Networks

32

§ The protocol is divided in layers § Every layer has its own:

  • Function
  • Header
  • Software

§ The layers are placed one on top of another

Modularization: What is it?

slide-33
SLIDE 33

ICC Module Systems – Networks

33

§ Each layer exists on every computer § From a logical point of view

  • Communication between same-level layers

§ From a physical point of view

  • Communication between previous- and next-level layers within

in the same computer

  • Except at level 1

Modularization: How does it Work?

slide-34
SLIDE 34

ICC Module Systems – Networks

34

§ From a logical point of view

  • You talk to your friend

§ From a physical point of view

  • You speak into your mobile
  • Your friend listens into their mobile

Analogy

slide-35
SLIDE 35

ICC Module Systems – Networks

35

How does it work?

layer 5 layer 4 layer 3 layer 1 layer 2 computer 1 layer 5 layer 4 layer 3 layer 1 layer 2 computer 2

slide-36
SLIDE 36

ICC Module Systems – Networks

36

“Logical” Communication

layer 5 layer 4 layer 3 layer 1 layer 2 computer 1 layer 5 layer 4 layer 3 layer 1 layer 2 computer 2

slide-37
SLIDE 37

ICC Module Systems – Networks

37

Physical Communication

layer 5 layer 4 layer 3 layer 1 layer 2 computer 1 layer 5 layer 4 layer 3 layer 1 layer 2 computer 2

slide-38
SLIDE 38

ICC Module Systems – Networks

38

In Reality, it is More Complicated

layer 5 layer 4 layer 3 layer 1 layer 2 computer 1 layer 5 layer 4 layer 3 layer 1 layer 2 computer 2 layer 3 layer 1 layer 2 router

slide-39
SLIDE 39

ICC Module Systems – Networks

39

§ Each layer has its own header § Function of layer N:

  • Receives the packet coming from layer N+1
  • (including the headers of layers N+1, N+2, …)
  • Puts a new header for its own layer

§ Layer N=1 transmits packet through network § Layer N>1 passes the packet to level N-1

Principle of Encapsulation - Transmission

slide-40
SLIDE 40

ICC Module Systems – Networks

40

Principle of Encapsulation - Transmission

Application layer 5 layer 4 layer 3 layer 2 layer 1 data

slide-41
SLIDE 41

ICC Module Systems – Networks

41

Principle of Encapsulation - Transmission

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data h5

slide-42
SLIDE 42

ICC Module Systems – Networks

42

Principle of Encapsulation - Transmission

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data data h5 h5 h4

slide-43
SLIDE 43

ICC Module Systems – Networks

43

Principle of Encapsulation - Transmission

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data data data h5 h5 h5 h4 h4 h3

slide-44
SLIDE 44

ICC Module Systems – Networks

44

Principle of Encapsulation - Transmission

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data data data data h5 h5 h5 h5 h4 h4 h4 h3 h3 h2

slide-45
SLIDE 45

ICC Module Systems – Networks

45

Principle of Encapsulation - Transmission

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data data data data data h5 h5 h5 h5 h5 h4 h4 h4 h4 h3 h3 h3 h2 h2 h1

slide-46
SLIDE 46

ICC Module Systems – Networks

46

§ Layer N=1 receives the network packet § Layer N>1 receives the packet of layer N-1 § At every step, the N-th layer

  • Removes the N-th header
  • Passes the packet to level N+1

Principle of Encapsulation - Reception

slide-47
SLIDE 47

ICC Module Systems – Networks

47

Principle of Encapsulation - Reception

Application layer 5 layer 4 layer 3 layer 2 layer 1 data h5 h4 h3 h2 h1

slide-48
SLIDE 48

ICC Module Systems – Networks

48

Principle of Encapsulation - Reception

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data h5 h5 h4 h4 h3 h3 h2 h2 h1

slide-49
SLIDE 49

ICC Module Systems – Networks

49

Principle of Encapsulation - Reception

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data data h5 h5 h5 h4 h4 h4 h3 h3 h3 h2 h2 h1

slide-50
SLIDE 50

ICC Module Systems – Networks

50

Principle of Encapsulation - Reception

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data data data h5 h5 h5 h5 h4 h4 h4 h4 h3 h3 h3 h2 h2 h1

slide-51
SLIDE 51

ICC Module Systems – Networks

51

Principle of Encapsulation - Reception

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data data data data h5 h5 h5 h5 h5 h4 h4 h4 h4 h3 h3 h3 h2 h2 h1

slide-52
SLIDE 52

ICC Module Systems – Networks

52

Principle of Encapsulation - Reception

Application layer 5 layer 4 layer 3 layer 2 layer 1 data data data data data data h5 h5 h5 h5 h5 h4 h4 h4 h4 h3 h3 h3 h2 h2 h1

slide-53
SLIDE 53

ICC Module Systems – Networks

53

§ Communication protocols § Packet switching § Protocol structure and packet headers § Protocol modularization § Example: Internet protocols (TCP / IP)

Outline

slide-54
SLIDE 54

ICC Module Systems – Networks

54

5 Application Several 4 Transport TCP 3 Network IP 2 Link Several 1 Physical Several

The Five Internet Layers

slide-55
SLIDE 55

ICC Module Systems – Networks

55

§ Between two ends of the same application § A protocol for each application § Examples:

  • The HTTP protocol
  • Between browser and Web server
  • Between two Skype clients
  • Between the client and the mail server

Layer 5 – “Application”

Skype Client layer 4 Skype Client layer 4

… …

slide-56
SLIDE 56

ICC Module Systems – Networks

56

§ Between two processes § Flow control and data stream support § e.g. the TCP (Transmission Control Protocol) § TCP addresses numerous reliability issues:

  • data arrives in-order
  • data has minimal error (i.e., correctness)
  • duplicate data is discarded
  • lost or discarded packets are resent
  • includes traffic congestion control

Layer 4 – “Transport”

slide-57
SLIDE 57

ICC Module Systems – Networks

57

§ Between two computers anywhere § IP (Internet Protocol) § Each device has a IP-address, e.g., 192.168.0.74 § Responsible for routing (finding a route from one computer to another one)

Layer 3 – “Network”

slide-58
SLIDE 58

ICC Module Systems – Networks

58

§ Between two computers on the same network § Layer 2 (link layer)

  • At network access level, responsible for, e.g., error checking
  • Uses address (called MAC) of network interface controller

(NIC)

  • Wifi-protocols, Ethernet…

§ Layer 1 (physical layer)

  • At electrical signal level
  • Bit-by-bit or symbol-by-symbol delivery

Layers 2-“Link” and 1-“Physical”

slide-59
SLIDE 59

ICC Module Systems – Networks

59

§ IP = Internet Protocol § Send a packet

  • From any computer
  • To any computer

IP Layer in More Detail

slide-60
SLIDE 60

ICC Module Systems – Networks

60

§ Each computer (device/node) A has a unique IP address IPA in a network (used like a postal address to send and receive packages) § Two versions:

  • IPv4: 32 bits - 232 (~4.109) computers (nodes)
  • IPv6: 128 bits - ~256.109.109.109.109 nodes

IP - Addressing

Devices in the same sub-network usually get IP-addresses with same prefix, e.g., home networks usually start either with 192.168.0.x or 10.0.0.x.

slide-61
SLIDE 61

ICC Module Systems – Networks

61

§ The IP layer in A puts IPA and IPB in the IP header

A wants to send B a packet

IPA IPB

  • ptions

Packet TCP

slide-62
SLIDE 62

ICC Module Systems – Networks

62

§ How to find a way from A to B? § How to find the shortest path?

Routing Problem

Example from my laptop (connected to the EPFL network) to www.google.ch barbara@ic-do-nemo > traceroute www.google.ch traceroute to www.google.ch (172.217.18.99), 64 hops max, 52 byte packets 1 cv-gigado-v444.epfl.ch (128.179.144.1) 1.678 ms 1.601 ms 1.256 ms 2 c6-ext-v200.epfl.ch (128.178.200.1) 1.361 ms 1.635 ms 1.416 ms 3 swiel2.epfl.ch (192.33.209.33) 2.060 ms 2.421 ms 2.395 ms 4 swice1-100ge-0-1-0-3.switch.ch (130.59.38.193) 2.960 ms 2.714 ms 4.520 ms 5 swizh1-100ge-0-1-0-1.switch.ch (130.59.36.94) 7.951 ms 6.598 ms 6.659 ms 6 72.14.195.4 (72.14.195.4) 7.183 ms 6.895 ms 9.287 ms 7 66.249.95.137 (66.249.95.137) 7.563 ms 7.327 ms 7.311 ms 8 zrh04s05-in-f99.1e100.net (172.217.18.99) 6.899 ms 6.931 ms 9.193 ms

slide-63
SLIDE 63

ICC Module Systems – Networks

63

§ A “routing table” for every node

  • For every destination, which path to follow
  • Which is the distance to the destination through this path

IP Routing

slide-64
SLIDE 64

ICC Module Systems – Networks

64

Example Network

A B C D E

slide-65
SLIDE 65

ICC Module Systems – Networks

65

Routing Table of A

A B C D E

dest path via length B D 2 C C 1 D D 1 E E 1

slide-66
SLIDE 66

ICC Module Systems – Networks

66

Routing Table of D

A B C D E

dest path via length A A 1 B B 1 C A/E 2 E E 1

slide-67
SLIDE 67

ICC Module Systems – Networks

67

Routing Table of C

A B C D E

dest path via length A A 1 B A/E 3 D A/E 2 E E 1

slide-68
SLIDE 68

ICC Module Systems – Networks

68

A wants to send a packet to B

A B C D E

dest path via length B D 2 C C 1 D D 1 E E 1

slide-69
SLIDE 69

ICC Module Systems – Networks

69

D forwards the packet to B

A B C D E

dest path via length A A 1 B B 1 C A/E 2 E E 1

slide-70
SLIDE 70

ICC Module Systems – Networks

70

§ We look at the destination’s IP address § We look at the routing table § We send the packet to the node indicated on the table for this destination

In Every Step

slide-71
SLIDE 71

ICC Module Systems – Networks

71

§ The routing is done by “hearsay” (gossip) § Each node announces to its neighbors the “lengths” of the paths it knows § Each node retains and propagates the shortest path among the ones announced by its neighbors

How is a Routing Table Built?

slide-72
SLIDE 72

ICC Module Systems – Networks

72

Example

A B C D E “I am A” “I am A” “I am A”

slide-73
SLIDE 73

ICC Module Systems – Networks

73

Example

A B C D E

dest path via length A A 1 dest path via length A A 1 dest path via length A A 1

“I am A” “I am A” “I am A”

slide-74
SLIDE 74

ICC Module Systems – Networks

74

Example

A B C D E

dest path via length A A 1 dest path via length A A 1 dest path via length A A 1 I am at distance 1 from A I am at distance 1 from A I am at distance 1 from A

slide-75
SLIDE 75

ICC Module Systems – Networks

75

Example

A B C D E

dest path via length A A 1 I am at distance 1 from A

slide-76
SLIDE 76

ICC Module Systems – Networks

76

Example

A B C D E

dest path via length A A 1 I am at distance 1 from A dest path via length A D 2

slide-77
SLIDE 77

ICC Module Systems – Networks

77

Another Example

A C B E D F G H

slide-78
SLIDE 78

ICC Module Systems – Networks

78

Another Example

A C B E D F G H

dest path via length H H 1 dest path via length H H 1 dest path via length H G 2 dest path via length H D 2 dest path via length H D 2 dest path via length H C 3 dest path via length H E 3

slide-79
SLIDE 79

ICC Module Systems – Networks

79

From my Computer to my Phone

barbara@ic-do-nemo > traceroute 128.179.141.248 traceroute to 128.179.141.248 (128.179.141.248), 64 hops max, 52 byte packets 1 cv-gigado-v444.epfl.ch (128.179.144.1) 1.726 ms 1.167 ms 1.165 ms 2 tsf-436-wpa-5-248.epfl.ch (128.179.141.248) 714.707 ms 113.466 ms 46.443 ms Both are in the EPFL network -> same prefix 128.179.14xxx

slide-80
SLIDE 80

ICC Module Systems – Networks

80

From my Computer to EPFL and Google

barbara@ic-do-nemo > traceroute www.epfl.ch traceroute to www.epfl.ch.cdn.cloudflare.net (104.20.228.42), 64 hops max, 52 byte packets 1 cv-gigado-v444.epfl.ch (128.179.144.1) 84.216 ms 77.959 ms 2.849 ms 2 c6-ext-v200.epfl.ch (128.178.200.1) 1.208 ms 1.446 ms 1.236 ms 3 swiel2.epfl.ch (192.33.209.33) 1.696 ms 1.529 ms 1.814 ms 4 swils1-100ge-0-0-0-0.switch.ch (130.59.38.54) 2.440 ms 2.063 ms 1.938 ms 5 swizh1-100ge-0-1-0-1.switch.ch (130.59.36.94) 7.960 ms 4.439 ms 6.491 ms 6 as13335.swissix.ch (91.206.52.192) 4.796 ms 5.353 ms 6.563 ms 7 104.20.228.42 (104.20.228.42) 9.926 ms 16.402 ms 5.627 ms barbara@ic-do-nemo > traceroute www.google.com traceroute to www.google.com (216.58.215.228), 64 hops max, 52 byte packets 1 cv-gigado-v444.epfl.ch (128.179.144.1) 2.085 ms 1.595 ms 1.436 ms 2 c6-ext-v200.epfl.ch (128.178.200.1) 1.406 ms 1.257 ms 1.793 ms 3 swiel2.epfl.ch (192.33.209.33) 1.866 ms 1.859 ms 1.941 ms 4 swils1-100ge-0-0-0-0.switch.ch (130.59.38.54) 1.924 ms 2.854 ms 1.826 ms 5 swizh1-100ge-0-1-0-1.switch.ch (130.59.36.94) 4.760 ms 4.754 ms 4.866 ms 6 72.14.195.4 (72.14.195.4) 5.552 ms 7.475 ms 5.225 ms 7 74.125.243.145 (74.125.243.145) 6.503 ms 6.070 ms 6.143 ms 8 172.253.50.23 (172.253.50.23) 8.057 ms 7.259 ms 172.253.50.21 (172.253.50.21) 6.998 ms 9 zrh11s02-in-f4.1e100.net (216.58.215.228) 5.519 ms 5.735 ms 6.338 ms

slide-81
SLIDE 81

ICC Module Systems – Networks

81

On the Network right now

https://www.wireshark.org/

slide-82
SLIDE 82

ICC Module Systems – Networks

82

§ Communication protocols (e.g., WiFi, Ethernet, etc)

  • Set of rules for data transfer within/across computers

§ Packet switching

  • Group data into fixed-sized blocks
  • Several types of packets needed to implement protocols
  • Packet headers

§ Protocol layers § Example: Internet protocols (TCP / IP)

Summary