CS 3640: Introduction to Networks and Their Applications Fall 2018, - - PowerPoint PPT Presentation

cs 3640 introduction to
SMART_READER_LITE
LIVE PREVIEW

CS 3640: Introduction to Networks and Their Applications Fall 2018, - - PowerPoint PPT Presentation

CS 3640: Introduction to Networks and Their Applications Fall 2018, Lecture 3: Switching Instructor: Rishab Nithyanand Teaching Assistant: Md. Kowsar Hossain 1 Rules of engagement: Recap There should be no gaps in seating. Ask and


slide-1
SLIDE 1

1

CS 3640: Introduction to Networks and Their Applications

Fall 2018, Lecture 3: Switching Instructor: Rishab Nithyanand Teaching Assistant: Md. Kowsar Hossain

slide-2
SLIDE 2

2

Rules of engagement: Recap

  • There should be no gaps in seating.
  • Ask and answer questions.
  • Avoid use of electronics in class.
  • Collaborate and be helpful.
slide-3
SLIDE 3

3

You should…

  • Have found the course on Piazza
  • http://piazza.com/uiowa/fall2018/cs3640
  • Have found and explored the class website
  • https://www.rishabn.com/cs3640-f18
  • Have Python and Jupyter notebooks ready to go
  • Assignment 1 releasing this week (groups will be announced on Piazza)
  • Know and understand the three Internet design principles
slide-4
SLIDE 4

4

This week in class

1.

Recap: Design principles

2. 3.

Circuit & packet switching Performance & delays

slide-5
SLIDE 5

Recap: Layering Provide protocols for applications to use (HTTP, email, etc.) Provide (reliable) end-to-end delivery Provide best-effort global delivery Put bits on the medium

Each layer only provides a service to the layer above it. Make the Internet modular and layered.

slide-6
SLIDE 6

Recap: The end-to-end principle

  • Functionality should be implemented at the lower layer if and
  • nly if:
  • It can be implemented completely
  • It can be implemented correctly
  • It is not made redundant by a higher layer
  • We can make exceptions for performance optimizations.
  • As long as it does not add a burden to applications that do not need the

functionality.

  • This is a principle, not a rule.
  • Violations exist on the Internet today.
  • Examples: Firewalls, proxies, and NATs. (We’ll get to them later in the term).
slide-7
SLIDE 7

7

Recap: Fate-sharing

  • Store network state only in the entities that rely on this state.
  • This way critical state information is lost only when the entity that relies on

it fails.

  • Simpler: Trust entities with a task only if they benefit from

the successful completion of that task.

slide-8
SLIDE 8

8

Recap: Building blocks of the Internet

  • End-hosts (all layers)
  • Users of the Internet
  • Can be clients or servers
  • Access networks (network + link layer)
  • Local Internet Service Providers (ISPs)
  • Facilitate end-user access to the network core.
  • Network core (network + link layer)
  • Regional and global ISPs
  • Establish connections with access networks around the world through connections

with other networks

slide-9
SLIDE 9

9

Recap: Encapsulation and packets

Data Application Header Transport Data Header Network Header Data Header Link Data Header Header

slide-10
SLIDE 10

10

This week in class

1.

Recap: Design principles

2. 3.

Circuit & packet switching Performance & delays

slide-11
SLIDE 11

11

Recap: Access networks

  • Access networks connect end-hosts to the Internet infrastructure.
  • This is what your Internet Service Provider (ISP) does. They may provide

cable, DSL, dial-up, or satellite access networks.

Local ISP “A” Local ISP “B” Local ISP “C” Home network Enterprise network Mobile network

slide-12
SLIDE 12

12

Access networks: What do they look like?

  • Who owns them?
  • A lot of the time, you know them primarily as phone or cable companies.
  • Why?
  • All three technologies use the same infrastructure (and it already exists)!
  • This is why you get “package deals”.
slide-13
SLIDE 13

13

Access networks: Cable/DSL access technology

Shared vs. point-to-point access

  • Cable: shared access
  • DSL: point-to-point access

Reasons: historical. Impact: Misleading advertising of cable download speeds.

slide-14
SLIDE 14

Recap: The network core

  • This is the core infrastructure of the Internet
  • The core is where your local ISP connects to other “larger” ISPs. The larger ISPs do the
  • same. Eventually, we end up with a large hierarchical network of networks – the Internet.

Local ISP Local ISP Local ISP Home network Enterprise network Mobile network Regional ISP Regional ISP Global ISP Global ISP

slide-15
SLIDE 15

15

The network core: What should it look like?

  • This is where the magic happens.
  • Thousands of routers that enable scalability and connect billions
  • f end-points with each other.

Discuss: which one is better?

slide-16
SLIDE 16

16

The network core: What should it look like? + Cheap. O(n) links

  • Capacity (1/n)
  • Resilience (limit: 1 link)

+ High resilience (limit: n-1) + Capacity (1)

  • Expensive! O(n2) links.

+ Cheap. O(n) links

  • Capacity (1/n)
  • Resilience (limit: 1 link)

Factors to consider

  • Resilience (#links that need to fail to fracture the network),
  • Cost (not too many links), and
  • Capacity (not too few links).
slide-17
SLIDE 17

17

The network core: Finding a compromise with switches

Routers vs. switches

  • Routers operate at the network layer (they make routing decisions)
  • Switches operate at the link layer (they put packets on the right wire)

We use these terms interchangeably in the network core. Why? Modern Internet backbone switches come with network-layer functionality. S S S Fully connected switches.

  • High resilience.

Adding another layer above routers.

  • O(m2) links.
  • (m/n) average capacity.

m (#switches) << n (#networks/routers)

slide-18
SLIDE 18

18

Switching: How do we share a common link? S S S

Method 1: Make a reservation

  • Reserve the maximum bandwidth you will

need ahead of time.

  • Reservation-based sharing.

Method 2: Just hope for the best

  • Just send packets when you have to.
  • On-demand sharing.

Discuss: Which is better?

Think about the end-to-end principle

Src1 Src2 Dst2 Dst1

slide-19
SLIDE 19

19

Switching: How do we share a common link?

Method 1: Make a reservation

  • Reserve the maximum bandwidth you will

need ahead of time.

  • Reservation-based sharing.

Method 2: Just hope for the best

  • Just send packets when you have to.
  • On-demand sharing.

Scenario:

  • Bandwidth of link: 30 Mbps.
  • Src1 needs 15 Mbps at peak and Src2 needs 15 Mbps at peak. They peak at

different times.

  • Both sources can send at maximum rate regardless of method.

15 Mbps 15 Mbps 15 Mbps 15 Mbps

slide-20
SLIDE 20

20

Switching: How do we share a common link?

Method 1: Make a reservation

  • If we allow peak rate reservation, we turn away Src2.
  • If we allow equal reservation, we underserve both

sources (12.5Mbps capacity/15Mbps source). Results in lag (reliable transport) or high packet loss (unreliable transport).

Scenario:

  • Bandwidth of link: 25 Mbps.
  • Src1 needs 15 Mbps at peak and Src2 needs 15 Mbps at peak. They peak at

different times.

15 Mbps 15 Mbps 15 Mbps 15 Mbps

slide-21
SLIDE 21

21

Switching: How do we share a common link?

Method 2: Hope for the best

  • Everything works out just fine!

Scenario:

  • Bandwidth of link: 25 Mbps.
  • Src1 needs 15 Mbps at peak and Src2 needs 15 Mbps at peak. They peak at

different times.

15 Mbps 15 Mbps 15 Mbps 15 Mbps

slide-22
SLIDE 22

22

Switching: How do we share a common link?

Which is better?

  • Bursty applications prefer on-demand sharing.
  • (peak rate/avg rate) is high, less predictable.
  • Smooth applications prefer reservation-based sharing.
  • (peak rate/avg rate) is low, more predictable.
  • Discuss: Which one is better for the Web? Which one is better for phones?

15 Mbps 15 Mbps 15 Mbps 15 Mbps 15 Mbps 15 Mbps 15 Mbps 15 Mbps

slide-23
SLIDE 23

Switching: How is reservation-based sharing implemented?

Circuit Switching.

  • Phase I: Circuit request and establishment.
  • Each switch reserves the requested bandwidth and forwards the request to the next one.
  • Confirmation sent to source back via reserved bandwidth.
  • Phase II: Data transfer.
  • Phase III: Circuit teardown.
slide-24
SLIDE 24

Switching: How is reservation-based sharing implemented?

Circuit Switching.

  • Phase I: Circuit request and establishment.
  • Phase II: Data transfer.
  • Data transfer happens via established circuit.
  • Phase III: Circuit teardown.
slide-25
SLIDE 25

Switching: How is reservation-based sharing implemented?

Circuit Switching.

  • Phase I: Circuit request and establishment.
  • Phase II: Data transfer.
  • Phase III: Circuit teardown.
  • A teardown request is sent via the circuit.
  • After the confirmation is sent from the destination, each switch deletes the reservation.
slide-26
SLIDE 26

Circuit switching: What does a “reservation” look like?

  • Time division multiplexing
  • Splitting time between each source.
  • Frequency division multiplexing
  • Split the link frequencies between each source.

S1 S2 S3 S1 S2 S3 S1 S2 S3 Where have you seen frequency division multiplexing before? Wi-Fi routers. 2.4GHz vs 5GHz. Trade-offs: The higher the frequency, the lower the range. The higher the frequency, the higher the bandwidth (more data/source or more sources). But if you have only a few devices, do you really need to spend more $$$ for a 5GHz router?

slide-27
SLIDE 27

Performance and efficiency of circuit switching S S

slide-28
SLIDE 28

Performance and efficiency of circuit switching S S

slide-29
SLIDE 29

Performance and efficiency of circuit switching S S

slide-30
SLIDE 30

Performance and efficiency of circuit switching: Why bursty traffic is bad S S

slide-31
SLIDE 31

Performance and efficiency of circuit switching: The minimum cost (~2 RTTs) is high S S

slide-32
SLIDE 32

Performance and efficiency of circuit switching: The cost of failure is high S1 S2 S3

slide-33
SLIDE 33

Summary: Circuit switching

  • Circuit switching is how reservation-based link sharing is

implemented.

  • Reserves peak resources end-to-end (from source to destination).
  • All packets take the same route from source to destination.
  • What does it handle well?
  • Smooth and predictable traffic.
  • Good for old phone systems.
  • What makes it unsuitable for the Internet?
  • Very inefficient for bursty traffic.
  • Failure cost is high. (switch/link failure = circuit failure)
slide-34
SLIDE 34

Switching: How is on-demand link sharing implemented?

Packet switching

  • Treat each packet independently of the others.
  • In contrast, circuit switching treated a collection of packets as one “flow”.

15 Mbps 15 Mbps 15 Mbps 15 Mbps

slide-35
SLIDE 35

Switching: How is on-demand link sharing implemented?

Packet switching

  • You don’t need to establish a circuit to get a packet to its destination.
  • You just need to put the packet on the right wire (forward it). Recall: Each packet has a

destination address on it.

  • Discuss: What happens if the traffic is too much for a link?
  • Use a buffer.
  • Size of the buffer determines how much burstiness you can handle.
  • Full buffer = dropped packets.

15 Mbps 15 Mbps 15 Mbps 15 Mbps

slide-36
SLIDE 36

Packet switching: The cost of failure

Scenario: Link failure during transmission. Discuss: What happens when a link or switch fails?

S S S Src1 Src2 Dst2 Dst1

slide-37
SLIDE 37

Packet switching: The cost of failure

What happens when a link or switch fails?

Packets just get routed around the failed link or switch.

S S S Src1 Src2 Dst2 Dst1

slide-38
SLIDE 38

Summary: Packet switching

  • Packet switching is how on-demand link sharing is implemented.
  • Treat packets independently.
  • Packets can take many different routes to get to their destination.
  • What does it handle well?
  • Failures and bursty traffic. This makes it great for the Internet!
  • What are its limitations?
  • Needs to buffer packets if there more coming in than can be put on the link.

Small buffers can result in lost packets.

slide-39
SLIDE 39

Circuit switching vs. Packet switching

slide-40
SLIDE 40

Packet-switched networks: How we assess performance

  • Discuss: How do we measure the performance of a packet-

switched network? What factors impact these metrics?

  • Delay (time to reach the destination), loss (how many packets are dropped),

and throughput (how fast is the destination getting data).

slide-41
SLIDE 41

41

Announcements

  • Office hours
  • Me: W 9-10 am [MLH 201L]
  • This week: W 11-12.
  • Md. Kowsar Hossain: M 1:30-2:30 pm [MLH 101N]
  • Assignments
  • Groups announced on Piazza.
  • Assignment 1 releasing tonight [2 days early]! Check the class website after 8 pm.
  • Iowa mid-term elections!
  • They matter! Frustrated with tuition increases?
  • Iowa executive office (Gov, Treasurer, etc.) + 4 national house + 25 state senate + all state house

seats are up for election!

  • Registration deadline: Oct 27, 2018.
  • Election day: Nov 6, 2018 (in-class office hours, no new material).
  • Get registered! Go vote!
slide-42
SLIDE 42

42

Assignment 1

  • Available online tonight!
  • 2 days early to help coordinate your groups and find each other.
  • Worth 13% of final grade.
  • Due: 9/13 @ 23:59. Late policy applies.

Assignment 1 Groups Group ID Group Hawk IDs 1 ['kdzhou', 'okueter', 'lburden', 'tnlowry', 'xxing2'] 2 ['mcagley', 'yzheng19', 'tsimonson', 'mfmrphy'] 3 ['dstutz', 'msmith3', 'sklemm', 'ymann'] 4 ['jmagri', 'zzhang103', 'uupadhyay', 'atran4'] 5 ['jglowacki', 'ppeterschmidt', 'kzhang24', 'tgoodmn'] 6 ['zhenbsong', 'bzhang22', 'ywang391', 'cweiske'] 7 ['xiaosong', 'bchoskins', 'jpflint', 'hpen'] 8 ['apatrck', 'xchen117', 'rdong6', 'weigui'] 9 ['jdhatch', 'susmerano', 'jpthiede', 'yitzhou'] 10 ['zluo1', 'godkin', 'nsonalkar', 'nicgoh'] 11 ['jstoltz', 'lye1', 'shangwchen', 'ywang455'] 12 ['hrunning', 'apizzimenti', 'yonghfan', 'jblue'] 13 ['gongyzhou', 'trjns', 'awestemeier', 'gmich']