chapter 1: networking

56
COSC 465: Networking Week 1

Upload: ronny72

Post on 08-May-2015

271 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Chapter 1: Networking

COSC 465: Networking

Week 1

Page 2: Chapter 1: Networking

Applications

• P2P– napster, gnutella, bit torrent

• email

• Web (HTTP)

• FTP

• Skype

• streaming video

Page 3: Chapter 1: Networking

Hosts on the internet

• Computers– mac / PC / unix

• Devices– PDAs– Vending machines– Toasters

• Why is this possible (or even desirable)?

Page 4: Chapter 1: Networking

Protocols

• Speakeasies in the 1920s– “banana pastry”

• Hello / Hi / How are you? / Just fine

• Hello / Hi / How are you? / Bite me

• Answering the phone:– Hello– (checks caller ID) Fred, quit calling me!s

Page 5: Chapter 1: Networking

Switching (draw picture on the board)

• Circuit-switched network– Dedicated connection– Telephone

• Packet-switched network– Break transmission into packets– Internet– Snail-mail

Page 6: Chapter 1: Networking

Circuit-switched network

• Dedicated connection between 2 endpoints– Telephone

• landlines

– Trains

• Overhead required to establish and maintain the dedicated resources for the connection

Page 7: Chapter 1: Networking

Multiplexing on circuit-switched networks

• Necessary because we can’t have dedicated wires between every possible pair of endpoints

• Frequency-Division Multiplexing (FDM)– FM radio– Bus lane / HOV lane

• Time-Division Multiplexing (TDM)– Train tracks

Page 8: Chapter 1: Networking

Inefficiencies of circuit-switched network?

Page 9: Chapter 1: Networking

Inefficiencies of circuit-switched network?

• During a pause in telephone conversation– Resources are still dedicated

• Establishing and maintaining dedicated connections requires complex software

Page 10: Chapter 1: Networking

How long does it take:

• 1,600,000 bit file

• 3.2 Mbps connection

• 16 slots TDM

• 1 second to establish the connection

• (figure out how long it takes)

• (now how long would it take if we didn’t use TDM)

Page 11: Chapter 1: Networking

Packet-switched network

• Break messages up into pieces– Packets

• Send packets along links– Store-and-forward– Must receive entire packet before the first bit

can be sent out• Effects of packet size?

Page 12: Chapter 1: Networking

Packet switched delays

• Store and forward delay– L bits

– R bps

– L/R store-and-forward-delay

• Queuing delays– routers need to buffer packets while links are busy

– If the buffer gets full while the link is saturated• packets get dropped!

– Unpredictable

Page 13: Chapter 1: Networking

Disadvantages of packet-switching

• variable and unpredictable end-to-end delays– Telephones– video-conferencing

Page 14: Chapter 1: Networking

Comparison of circuit and packet switched networks

• 1 Mbps pipe

• 10 users– each is active only 10% of time (0.10)

• Circuit-switching– 100 kbps per user– maximum of 10 users

Page 15: Chapter 1: Networking

Haha! These look like future exam questions

• Very possible…

• But the more important issue here is being comfortable doing back-of-the-envelope calculations to guesstimate stuff– Very important skill for a scientist– Helps prevent me from making outrageous

claims

Page 16: Chapter 1: Networking

Packet-switching

• 35 users– 0.0004 chance of 11 or more being active at the

same time• Math involved in computing this…

– If we get 11 or more users, performance degrades until we get back under 1 Mbps total usage

Page 17: Chapter 1: Networking

Suppose one user generates a lot of data

• circuit switching– they just have to wait

• packet switching– if others are inactive, then they can use more

bandwidth

Page 18: Chapter 1: Networking

Statistical Multiplexing

• Taking advantage of how often people use the system– Efficiently use the network– Better tolerance for heavier bursts of data

Page 19: Chapter 1: Networking

Take-home message here

• Packet-switching is the model predominantly used by the internet– Important to understand the tradeoffs– And that there are other ways of building a

network

Page 20: Chapter 1: Networking

Net Neutrality

• ISPs want to give preference to certain types of traffic– higher-paying customers get preference for

their traffic• video conferencing

• virtual private network (VPN)

Page 21: Chapter 1: Networking

Datagram vs Virtual Circuit (VC) networks

• VC networks maintain state in the routers– Similar to circuit-switched networks– X.25– frame relay– asynchronous transfer mode (ATM)

• Datagram networks forward packets based only on the addresses– The internet

Page 22: Chapter 1: Networking

Datagram networks are stateless inside the network

• Switches forward packets based on destination address only

• Analogy:– Snail mail through the post office

• Advantages?

• Disadvantages?

Page 23: Chapter 1: Networking

Residential access

• Modem– Does anyone remember these?

• DSL– FDM of the telephone wire– Reserve more space for downstream

• Cable modem– hybrid fiber coaxial cable (HFC)– also reserves more bandwidth for downstream– broadcasts all data from neighborhood access points

Page 24: Chapter 1: Networking

Tradeoffs between DSL/HFC

• Both are always on– advantage or disadvantage?

• Cable is a shared broadcast technology

Page 25: Chapter 1: Networking

Local Area Network

• College campus• Company• Big edge router

– Lots of other machines/devices connected to that

• You can do interesting things on a LAN– iTunes for sharing music– networked video games

• LANs use ethernet– broadcast– switched

Page 26: Chapter 1: Networking

Wireless

• cell phones– radio waves

• WAP (wireless access protocol)

• Wireless broadband access is better in Japan than in the US

Page 27: Chapter 1: Networking

Wireless access in the developing world

• Easier to put up cell towers than to wire houses

• Same for internet

• Business model– “long tail”– “The World is Flat”

Page 28: Chapter 1: Networking

Physical layer

• Two media– twisted-pair copper wire– fiber and coaxial cable

• bits get sent over these media– electromagnetic waves– optical pulses

Page 29: Chapter 1: Networking

Internet backbone

• The internet is really a meta-network– complicated picture– details aren’t terribly important…

• tier 1– international and interconnected– exclusive club– not really regulated

• Not all ISPs are created equally– tier 2 ISP != tier 278 ISP

Page 30: Chapter 1: Networking

Who’s in charge of the internet?

• China does various things to censor internet traffic

• “Don’t route any packets through Canada”

• IP addresses are not distributed equally

Page 31: Chapter 1: Networking

Internet Corporation For Assigned Names and Numbers (ICANN)

“ICANN is responsible for the global coordination of the Internet's system of unique identifiers. These include domain names (like .org, .museum and country codes like .UK), as well as the addresses used in a variety of Internet protocols. Computers use these identifiers to reach each other over the Internet. Careful management of these resources is vital to the Internet's operation, so ICANN's global stakeholders meet regularly to develop policies that ensure the Internet's ongoing security and stability”

• ICANN is a California non-profit– Function used to be done by the US government

– ICANN exists under a “remit” from the US Dept. of Commerce

• ICANN lacks teeth to prevent commercial organizations from having .org

Page 32: Chapter 1: Networking

Total Nodal Delay

• processing delay• queuing delay• transmission delay• propagation delay

Page 33: Chapter 1: Networking

processing delay

• Time to read the packet’s headers– Possibly perform checksums or other error-

detection algorithms– typically very, very fast on modern routers

• microseconds

Page 34: Chapter 1: Networking

queuing delay

• unpredictable– based on traffic at that router at any given

moment– depends on what everyone else is doing

Page 35: Chapter 1: Networking

transmission delay

• all bits must arrive before the first bit can be sent out– L bit packet– R bits/second link– L/R

Page 36: Chapter 1: Networking

propagation delay

• depends on the speed of the physical medium– fiber, twisted-pair, copper-wire, etc

• 2 * 10^8 to 3 * 10^8 m/sec• close to the speed of light

– 2.99 * 10^8 m/sec

• distance between routers / propagation speed– d / s– millis for Wide-Area Networks (WANs)

Page 37: Chapter 1: Networking

transmission vs propagation

• transmission is the time to receive and forward the whole packet– function of packet’s length and the speed of the

outgoing link

• propagation delay is how long it takes for the packet to travel between the routers– takes into account distance between routers

Page 38: Chapter 1: Networking

queuing delays revisited

• Very active research area• a is packets/sec (arrival rate)• R is bits/sec (transmission rate)• L is packet size (assume all packets are

uniform size)• La/R is the traffic intensity

Page 39: Chapter 1: Networking

Traffic intensity

• La/R > 1– packets will be buffered– buffers are finite, thus packets will be lost

• La/R <= 1– What does this mean?

• Think about how the traffic arrives…

Page 40: Chapter 1: Networking

La/R <= 1

• If packets arrive in bursts, there can be significant queuing delays

• Suppose N packets arrive simultaneously every (L/R*N) seconds– first packet?– second packet?– in general?

Page 41: Chapter 1: Networking

Traffic intensity conclusions

• La/R is helpful, but is not the full story– pattern of packet arrival effects queuing delays

• La/R is a good general guideline– > 1

• system will eventually fall down

– close to 1• high traffic intensity• packet loss

– close to 0• very low queuing delays• not much packet loss

Page 42: Chapter 1: Networking

Who should handle a lost packet?

• (try to elicit class participation)

Page 43: Chapter 1: Networking

Total End-to-End delays

• N -1 routers between source and destination– N hops– d-proc processing delay– d-trans transmission delay– d-prop propagation delay

Page 44: Chapter 1: Networking

Total End-to-End delays

• N -1 routers between source and destination– N hops– d-proc processing delay– d-trans transmission delay– d-prop propagation delay

• N -1 ( d-proc + d-trans + d-prop)• Other delays?

Page 45: Chapter 1: Networking

www.traceroute.org

Route from Colgate to MIT:

1 W92-RTR-1-W92SRV21.MIT.EDU (18.7.21.1) 0.817 ms 0.273 ms 0.257 ms 2 EXTERNAL-RTR-1-BACKBONE.MIT.EDU (18.168.0.18) 112.438 ms 7.047 ms 1.233 ms 3 ge-6-23.car2.Boston1.Level3.net (4.79.2.1) 0.525 ms 0.739 ms 0.508 ms 4 ae-5-5.ebr1.NewYork1.Level3.net (4.69.132.250) 5.242 ms * 16.197 ms 5 * ae-1-100.ebr2.NewYork1.Level3.net (4.69.132.26) 9.440 ms 17.718 ms 6 ae-24-52.car4.NewYork1.Level3.net (4.68.97.51) 5.535 ms ae-24-54.car4.NewYork1.Level3.net (4.68.97.115) 5.755 ms ae-24-56.car4.NewYork1.Level3.net (4.68.97.179) 5.558 ms 7 ROADRUNNER.car4.NewYork1.Level3.net (4.78.188.2) 18.827 ms 4.78.166.234 (4.78.166.234) 12.138 ms 4.78.166.238 (4.78.166.238) 12.282 ms 8 pos5-0.syrcnyspp-rtr02.nyroc.rr.com (24.24.7.17) 12.423 ms 18.396 ms 12.236 ms 9 rdc-24-24-7-86.nyroc.rr.com (24.24.7.86) 12.713 ms 18.542 ms 12.094 ms10 srp2-0.syrcnyrmh-rtr01.nyroc.rr.com (24.92.229.200) 13.812 ms 13.402 ms 13.853 ms11 fas0-1.syrcnyhml-swt03.nyroc.rr.com (24.92.225.174) 14.832 ms 21.988 ms 15.089 ms12 rrcs-72-43-89-2.nys.biz.rr.com (72.43.89.2) 15.125 ms 16.403 ms 15.526 ms13 * * *

Page 46: Chapter 1: Networking

Layered architecture

• Example in the book, page 47:– draw picture on the board

Page 47: Chapter 1: Networking

Layered architecture of the internet

Page 48: Chapter 1: Networking

Application

• HTTP• FTP• Email (SMTP)• AIM

Page 49: Chapter 1: Networking

Transport

• TCP– Transmission Control Protocol– Connection-oriented

• UDP– User Datagram Protocol– connectionless

Page 50: Chapter 1: Networking

Question:

• I thought that the internet doesn’t store any state?– How is TCP able to keep track of connections?

Page 51: Chapter 1: Networking

Network

• Datagrams– Different from UDP

• Internet Protocol layer– IP

• Everything on the internet uses IP– Well, there are routing protocols, but it all uses

IP

Page 52: Chapter 1: Networking

Link Layer

• routes IP datagrams from the level above• Ethernet• PPP• link layer packets are called frames

Page 53: Chapter 1: Networking

Physical layer

• moves bits along the physical medium– twisted pair, coaxial cable, fiber optic, satellite,

smoke signals, whatever

Page 54: Chapter 1: Networking

How this works at the endpoints:

Page 55: Chapter 1: Networking

Switches VS Routers

• I was a little loose with my terminology last week…– switches and router are different– switches forward Link-layer packets– routers forward packets Link-layer or

Network-layer packets– Draw picture from page 51 of K&R textbook

Page 56: Chapter 1: Networking

(ethereal demo, frame #9)