chapter 1: networking

Post on 08-May-2015

271 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

COSC 465: Networking

Week 1

Applications

• P2P– napster, gnutella, bit torrent

• email

• Web (HTTP)

• FTP

• Skype

• streaming video

Hosts on the internet

• Computers– mac / PC / unix

• Devices– PDAs– Vending machines– Toasters

• Why is this possible (or even desirable)?

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

Switching (draw picture on the board)

• Circuit-switched network– Dedicated connection– Telephone

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

Circuit-switched network

• Dedicated connection between 2 endpoints– Telephone

• landlines

– Trains

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

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

Inefficiencies of circuit-switched network?

Inefficiencies of circuit-switched network?

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

• Establishing and maintaining dedicated connections requires complex software

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)

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?

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

Disadvantages of packet-switching

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

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

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

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

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

Statistical Multiplexing

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

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

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)

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

Datagram networks are stateless inside the network

• Switches forward packets based on destination address only

• Analogy:– Snail mail through the post office

• Advantages?

• Disadvantages?

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

Tradeoffs between DSL/HFC

• Both are always on– advantage or disadvantage?

• Cable is a shared broadcast technology

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

Wireless

• cell phones– radio waves

• WAP (wireless access protocol)

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

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”

Physical layer

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

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

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

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

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

Total Nodal Delay

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

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

queuing delay

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

moment– depends on what everyone else is doing

transmission delay

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

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)

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

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

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…

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?

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

Who should handle a lost packet?

• (try to elicit class participation)

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

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?

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 * * *

Layered architecture

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

Layered architecture of the internet

Application

• HTTP• FTP• Email (SMTP)• AIM

Transport

• TCP– Transmission Control Protocol– Connection-oriented

• UDP– User Datagram Protocol– connectionless

Question:

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

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

Link Layer

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

Physical layer

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

smoke signals, whatever

How this works at the endpoints:

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

(ethereal demo, frame #9)

top related