83
Introduction to This Class Instructor: Stephan Bohacek [email protected], 302-831-4274 http://www.eecis.udel.edu/~bohacek Textbook: Kurose and Ross: Computer Networks (6 th edition) Web page has syllabus class notes videos lectures of some topics (most, but not all topics are covered) homework assignments project assignments announcements Issues Programming languages: C++ or java? Computers: >=2GB ram? Windows or Linux?

Introduction to This Class Instructor: Stephan Bohacek [email protected], 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

  • View
    227

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Introduction to This Class

• Instructor: Stephan Bohacek

[email protected], 302-831-4274

• http://www.eecis.udel.edu/~bohacek

• Textbook: Kurose and Ross: Computer Networks (6th edition)

• Web page has– syllabus

– class notes

– videos lectures of some topics (most, but not all topics are covered)

– homework assignments

– project assignments

– announcements

• Issues– Programming languages: C++ or java?

– Computers:• >=2GB ram?

• Windows or Linux?

Page 2: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Introduction to Data Networking

• Chapter 1: Overview and general principles– Protocol stack– Sharing

• Statistic multiplexing• Packet switching• Circuit switching

– Performance of packet switching networks

• Chapter 2: Application layer– TCP and UDP,

multiplexing and ports– Applications

• http, ftp, email, DNS, P2P, DHT

• Chapter 3: Transport layer– Tools for reliable transport– TCP

• Chapter 4: Network layer– IP and IPv6

– NAT

– Routing• Intra-network routing

• Inter-network routing

• Chapter 5: Datalink and MAC layer– Multiple access

– ARP

– Ethernet

– Switches and hubs

– Link layer routing

Kurose and Ross: Computer Networking: A Top Down Approach

Page 3: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

The Internet

• What is the longest time that you have gone without using “the Internet?”

• What is the Internet?

• How do you use the Internet?

• Do you only watch TV over the Internet, or do you have cable?

• Skype?

• Facebook?

• IM?

• Twitter?

• Smart phone?

• Do you only have a data plan on your phone?

Page 4: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Networking Basics

• Core components of the Internet – the protocol stack

• Multiplexing, circuit switching, and packet switching

• Loss and delays

• The structure of the Internet

Page 5: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Networking Basics

• Core components of the Internet – the protocol stack

• Multiplexing, circuit switching, and packet switching

• Loss and delays

• The structure of the Internet

Page 6: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Core components

• End-hosts

• Applications– ?

• Packets– TCP

– UDP

• Routers and gateways and groups of routers (ISPs)

• Links– ?

• Protocols

Page 7: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Core components

• End-hosts

• Applications– Web

– Email

– File transfer

– File sharing

• Packets– TCP

– UDP

• Routers and gateways and groups of routers (ISPs)

• Links– Fiber

– Coaxial

– Twisted pair

– Wireless

• Protocols

Page 8: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Application Layer – where the applications live

• Email:– Rules/protocols for how an end-host gets mail from the mail server

• Web: – Rules/protocols for how the end-hosts gets a web page from the web servers

• Question:– How is a networking application different from a non-networking application

(e.g., MS Word). That is, why, when talking about networking application, do we focus on protocols, but do not focus on protocols when discussing non-networked applications such as MS-Word?

– Answer: The networking applications must communicate, and rules are required to define the communication.

• Roles that end-hosts play: – Client, server, and peer

– The client asks the server for a service.• E.g., The client asks the server to send a mail for it.

• The client asks the server for a web page

• The client asks the server to translate a web address to an IP address.

– Peer: A host can act as both a client and a server. But usually in one transaction, the host takes only one role

• End-hosts

• Applications– Web– Email– File transfer– File sharing

• Packets– TCP– UDP

• Routers and gateways and groups of routers (ISPs)

• Links– Fiber– Coaxial– Twisted pair– Wireless

• Protocols

Page 9: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Layers 2-4

• End-hosts

• Applications– Web– Email– File transfer– File sharing

• Packets– TCP– UDP

• Routers and gateways and groups of routers (ISPs)

• Links– Fiber– Coaxial– Twisted pair– Wireless

• Protocols

clientserver

Which are the end-host?

Routers

Page 10: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Layers 2-4

• End-hosts

• Applications– Web– Email– File transfer– File sharing

• Packets– TCP– UDP

• Routers and gateways and groups of routers (ISPs)

• Links– Fiber– Coaxial– Twisted pair– Wireless

• Protocols

clientserver

Goal: move messages from server to the clientApproach: break the problem into little pieces.Each piece is a layer in the “protocol stack”

Why is this a good approach?1.Small problems are easier to

understand/solve.2.Different solutions can be

mixed and matched

Page 11: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Layers 2-4

• End-hosts

• Applications– Web– Email– File transfer– File sharing

• Packets– TCP– UDP

• Routers and gateways and groups of routers (ISPs)

• Links– Fiber– Coaxial– Twisted pair– Wireless

• Protocols

clientserver

Top down approach of breaking problems into small pieces4. Transport layer

• Reliability: The server must make sure that the client gets the dataCongestion control (or lack there of) (http://www.youtube.com/watch?v=RjrEQaG5jPM)

• Congestion Control: The server should send data as fast as possible, but not too fast• TCP provides these features (services), while UDP does not

5. Network layer (could be called the routing layer, but it isn’t)• The packets must find their way through the network.• Each packet has the IP address of the destination• By examining the IP address, routers decide where to send the packet next

6. Link Layer or MAC layer (link layer and MAC layer)• Links connect the routers/gateways and end-hosts• This layer provides logical and control for communicating across links.• Services that this layer might provide include

• congestion control, media access, error detection/correction

Page 12: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Layers 2-4

• End-hosts

• Applications– Web– Email– File transfer– File sharing

• Packets– TCP– UDP

• Routers and gateways and groups of routers (ISPs)

• Links– Fiber– Coaxial– Twisted pair– Wireless

• Protocols

Top down approach of breaking problems into small pieces…..2. Link Layer or MAC layer (link layer and MAC layer)

• Links connect the routers/gateways and end-hosts• This layer provides logical and control for communicating across links.• Services that this layer might provide include congestion control, media access,

error detection/correction

• Media access. The “air” is a shared medium. If two nodes transmit at the same time, there will be a collision. Thus, a scheme must be developed to determine which node transmits when.

• Error detection/correction. If interference does occur, then errors might occur. If an error is detected, then 1. the error could be corrected with forward error correction, or2. the receiving link could request a retransmission

Page 13: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Layers 2-4

• End-hosts

• Applications– Web– Email– File transfer– File sharing

• Packets– TCP– UDP

• Routers and gateways and groups of routers (ISPs)

• Links– Fiber– Coaxial– Twisted pair– Wireless

• Protocols

clientserver

Top down approach of breaking problems into small pieces4. Transport layer

1. Reliability: The server must make sure that the client gets the dataCongestion control (or lack there of)

2. Congestion Control: The server should send data as fast as possible, but not too fast3. TCP provides these features (services), while UDP does not

5. Network layer (could be called the routing layer, but it isn’t)1. The packets must find their way through the network.2. Each packet has the IP address of the destination3. By examining the IP address, routers decide where to send the packet next

6. Link Layer or MAC layer1. Links connect the routers/gateways and end-hosts2. This layer provides logical and control for communicating across links.3. Services that this layer might provide include

1. congestion control, media access, error detection/correction7. Physical layer

1. Logical bits are encoded as physical quantities, e.g., as voltage levels, as shifts in phase, …2. This course does not cover the physical layer

Page 14: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Protocols

• End-hosts

• Applications– Web– Email– File transfer– File sharing

• Packets– TCP– UDP

• Routers and gateways and groups of routers (ISPs)

• Links– Fiber– Coaxial– Twisted pair– Wireless

• Protocols

protocols define format, order of msgs sent and received among network entities, and actions taken on msg

transmission, receipt

Hi

Hi

Got thetime?

2:00

TCP connection request

TCP connectionresponse

Get http://www.awl.com/kurose-ross

<file>

time

Page 15: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Internet protocol stack

• application: supporting network applications– FTP, SMTP, HTTP

• transport: process-process data transfer– TCP, UDP

• network: routing of datagrams from source to destination

– IP, routing protocols

• link: data transfer between neighboring network elements

– PPP, Ethernet

• physical: bits “on the wire”

application

transport

network

link

physical

Page 16: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

ISO/OSI reference model

• presentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine-specific conventions

• session: synchronization, checkpointing, recovery of data exchange

• Internet stack “missing” these layers!

– these services, if needed, must be implemented in application

– needed?

application

presentation

session

transport

network

link

physical

Page 17: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Layers 1-5 (7)

• Why is L3 Communications called L3?

• What does the L7 filter web page discuss? Why is it called L7

Page 18: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

ApplicationTransportNetwork

LinkPHY

LinkPHY

NetworkLink LinkPHY PHY

ApplicationTransportNetwork

LinkPHY

It was a dark and…

It was a dark and…

pktpkt

pkt

LinkPHY

LinkPHY

pkt

LinkPHY

switch

router

pktpkt

pktpktpkt

LinkPHYpkt

pkt

pkt

It was a dark and…

pktpktpkt

LinkPHY

pktpkt

pktpkt

NetworkLink LinkPHY PHYpkt

pktpkt

pktpkt

LinkPHY pkt

pkt

LinkPHY pkt

pkt

It was a dark and…

Page 19: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Today – networking basics

• Core components of the Internet – the protocol stack

• Multiplexing, circuit switching, and packet switching

• Loss and delays

• The structure of the Internet

• This lecture covers much of chapter 1 in the textbook.

Page 20: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Circuit switching versus Packet switching

• Packet switching brought the networking revolution

• Circuit switching

• Virtual circuit networking– A half-way point between packet switched and circuit switched

networking

Page 21: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Circuit switching

• Circuit switching– Old style phone system– Each connection gets its own wire or

bandwidth– Note: calls must be set-up.– E.g.,

• Me: operator, get my the president.• Operator: one moment please.• Then she plugs a cable into a socket so

now I have a physical wired between me and the president.

– Instead of each connection getting a whole wire, connections can share a wire via multiplexing

– The first automatic circuit switching was developed by Almon Strowger – an undertaker. There were two undertakers in a small town and the switch board operator was the wife of the other undertaker. So Strowger invented an automatic circuit switch to rid both husband and wife of employment.

Page 22: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Frequency division multiplexing

toll office end office phonephone end office

300 3400 100300 103400 200300 203400 300 3400

On each hop, the connection gets its own bandwidth

Frequency division multiplexing is used in•TV & radio•Cell phones (not so much today)

Page 23: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Time division multiplexing

4321

4321

4321

bytes

1

1 byte every 1/8000 seconds

Or 7×8000=56Kbps(1Kbps=1000bps)(7 bits of data & 1

bit of control)

1 byte for each channel every 1/8000 seconds

Or 24×7×8000+overhead

= 1.544Mbps(DS1 or T1)

1 byte for each channel every 1/8000 seconds

Or 28×24×7×8000+overhead

= 44.736Mbps (DS-3)

Multiplex 28 DS1= 28*24*64kbps + overhead = 44.736Mbps DS-3

Multiplexing 810 channels + overhead = 51.84 = STS-1/OC-1STS is electrical and oc is opticalOC3 = 155.52Mbps (150.336 payload)OC12 = 633.08 Mbps (601.344 payload)OC48 = 2.488Gbps (2.405Gbps)OC192 = 9.953Gbps (9.6Gbps payload)

There are standard bit-rates that support multiplexing different numbers of calls

phone

23

Page 24: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Time division multiplexing

4321

4321

4321

bytes

1

1 byte every 1/8000 seconds

Or 7×8000=56Kbps(1kbps=1000bps)

(7 bits of data 1 bit of control)

1 byte for each channel every 1/8000 seconds

Or 24×7×8000+overhead

= 1.544Mbps(DS1 or T1)

1 byte for each channel every 1/8000 seconds

Or 28×24×7×8000+overhead

= 44.736Mbps (DS-3)

Multiplex 28 DS1= 28*24*64kbps + overhead = 44.736Mbps DS-3

Multiplexing 810 channels + overhead = 51.84 = STS-1/OC-1STS is electrical and oc is opticalOC3 = 155.52Mbps (150.336 payload)OC12 = 633.08 Mbps (601.344 payload)OC48 = 2.488Gbps (2.405Gbps)OC192 = 9.953Gbps (9.6Gbps payload)

There are standard bit-rates that support multiplexing different numbers of calls

phone

23

• Note all the control overhead: if the bit is 1, then payload is control.

• Lots of control is needed to setup a circuit. How is it possible to get channels at each hop?

• Also, if there is not data, then nothing is sent. This wastes data.• But the circuit is yours, guaranteed!

Page 25: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet switching - Statistical multiplexing

• Data is in packets, not streams.

• Must be digital

• Each packet has an address

• A switch/router reads the whole packet, then reads the address and forwards the packet – store and forward

clientServer: address = 1

1data

Packet format specification specifies where the address is

Page 26: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet switching - Statistical multiplexing

• Data is in packets, not streams.

• Must be digital

• Each packet has an address

• A switch/router reads the whole packet, then reads the address and forwards the packet – store and forward

clientServer: address = 1

1data

AB

C

D

F E

If destination is 1, then next

hop is B

If destination is 1, then next

hop is C

If destination is 1, then next

hop is

1data

1data

1data

Page 27: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet switching - Statistical multiplexing

• Data is in packets, not streams.

• Must be digital

• Each packet has an address

• A switch/router reads the whole packet, then reads the address and forwards the packet – store and forward

• No reservations are needed. First come first serve.

• Major benefit:– If you need more bandwidth, then you can get it, it you don’t need it, then maybe someone else

can use it.

• Major drawback:– What happens if two packets arrive at a switch and both need to go to the same output

interface. Picture. One packet is either dropped, or is placed in a buffer. Either way, something bad has happened, the packet is gone or is delayed. This would never happen on a circuit switched network. queuing delay and packet loss

Page 28: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet switching - Statistical multiplexing

• Data is in packets, not streams.

• Must be digital

• Each packet has an address

• A switch/router reads the whole packet, then reads the address and forwards the packet – store and forward

clientServer: address = 1

1data 1data

other client

1other

Page 29: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet switching - Statistical multiplexing

• Data is in packets, not streams.

• Must be digital

• Each packet has an address

• A switch/router reads the whole packet, then reads the address and forwards the packet – store and forward

clientServer: address = 1

1data 1data

other client

1other

1other

1data 1other

1data 1other

Page 30: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet switching - Statistical multiplexing

• Data is in packets, not streams.

• Must be digital

• Each packet has an address

• A switch/router reads the whole packet, then reads the address and forwards the packet – store and forward

• No reservations are needed. First come first serve.

• Major benefit:– If you need more bandwidth, then you can get it, it you don’t need it, then maybe someone else

can use it.

• Major drawback:– What happens if two packets arrive at a switch and both need to go to the same output

interface. One packet is either dropped, or is placed in a buffer. Either way, something bad has happened, the packet is gone or is delayed. This would never happen on a circuit switched network. queuing delay and packet loss

Page 31: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet vs. Circuit Switching

If usage is random (e.g., web surfing) statistical multiplexing is better.

Suppose that

1. We have a 5Mbps link

2. Each user needs 50kbps

3. And each user is active 20% of the time. (Note that this condition does not matter for circuit switching. Why?)

Circuit switching caseThe total number of users that can be accommodated with circuit switching is 5×106/50×103 = 100 users

How many users can be accommodated under circuit switching and how many can be accommodated under packet switching?

Page 32: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet Switching Case

Now suppose there are 200 users, what is the probability that there are 150 or more active users?

In this case, there would be a problem, since the network cannot support more than 100 active users.

!!

!

knk

n

k

n

Is the number of ways that you can select k out of n

Is the number of ways that you can select 150 people out of 200

150200150 2.012.0

The probability of any 150 users being active and the rest in active is

This is the Binomial distribution

Simpler questions: What is the probability of 150 particular users being active and 50 other being inactive?

How many different ways can I select these 150 active users?

200150

200150

0.21501 0.2200 150

Page 33: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet Switching Case

What is the probability of more than 100 users being active?

We conclude that if there are 200 users, then in “pretty much always” things will work fine

The probability of 101 users being active plus, 102 users being active, plus …., plus 200 users being active, which is

Suppose that there are 300 users:

Suppose that there are 400 users:Might be acceptable performance (if there is some other mechanism to recover!)

Therefore: circuit switching could support 100 users, while packet switching can support 400 users. A factor of 4 more!!!

14200200

101102.012.0

200

kk

k kThis is the binomial complementary cumulative distribution

Still pretty good 8300300

101102.012.0

300

kk

k k

004.02.012.0400 400400

101

kk

k k

Page 34: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet Switching vs. Circuit Switching

A couple of things:

This means that• when you walk into the switching center, the probability of finding overload is 10 -8.• Or, if you random access the link, the probability of finding it in overload.• Once you find it in overload, or not, the probability that is will be in overload in the next second is more

complicated and requires queuing theory. This analysis might reveal worst performance.

What does this probability really mean?

In this example, we assumed 20% user utilization (they were active 20% of the time)If it the user utilization is smaller, then the difference between packet switching and circuit switching is even greater. But if it is larger, then there is less of a difference.What is your user utilization? •For web surfing •For cell phone usage•VoIP call•For music streaming•P2P

004.02.012.0400 400400

101

kk

k k

Page 35: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet Switching vs. Circuit Switching

• If loss and delay are permissible and usage is random, then packet switching is better than circuit switching.

• If usage is very regular (e.g. TV!), circuit switching is best.

• If losses and delay are not permissible, then circuit switching is best (e.g., remote controlled surgery).

• With packet switching, congestion control is required. Also, there is more overhead for each packet.

• For circuit switching, once the circuit is setup, it can be very efficient. But circuits must be set-up.

• So, for short file transfer, packet switching is good but for long file transfers, circuit switching might be better.

Page 36: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet Switching vs Statistical Multiplexing

• There is a subtle difference between packet switching and statistical multiplexing.

• Statistical multiplexing means to use the resource as needed.

• This leads to the performance improvements mentioned but also the complications (delay and loss).

• Statistical multiplexing requires packet switching to put data into chunks

• Circuit switching can work with data packets/chunks, but there is no need for an address

• The phone network uses circuit switching, but the circuits are statistically multiplexed between users.

• In packet switching, links are statistically multiplexed.

Page 37: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet Switching: Statistical Multiplexing

Sequence of A & B packets does not have fixed pattern, bandwidth shared on demand statistical multiplexing.

TDM: each host gets same slot in revolving TDM frame.

A

B

C100 Mb/sEthernet

1.5 Mb/s

D E

statistical multiplexing

queue of packetswaiting for output

link

Page 38: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Time division multiplexing

4321

4321

4321

bytes

1

1 byte every 1/8000 seconds

Or 7×8000=56Kbps(1kbps=1000bps)

(7 bits of data 1 bit of control)

1 byte for each channel every 1/8000 seconds

Or 24×7×8000+overhead

= 1.544Mbps(DS1 or T1)

1 byte for each channel every 1/8000 seconds

Or 28×24×7×8000+overhead

= 44.736Mbps (DS-3)

Multiplex 28 DS1= 28*24*64kbps + overhead = 44.736Mbps DS-3

Multiplexing 810 channels + overhead = 51.84 = STS-1/OC-1STS is electrical and oc is opticalOC3 = 155.52Mbps (150.336 payload)OC12 = 633.08 Mbps (601.344 payload)OC48 = 2.488Gbps (2.405Gbps)OC192 = 9.953Gbps (9.6Gbps payload)

There are standard bit-rates that support multiplexing different numbers of calls

phone

23

• Note all the control overhead: if the bit is 1, then payload is control.

• Lots of control is needed to setup a circuit. How is it possible to get channels at each hop?

• Also, if there is not data, then nothing is sent. This wastes data.• But the circuit is yours, guaranteed!

Page 39: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Packet-switching: store-and-forward

• takes L/R seconds to transmit (push out) packet of L bits on to link at R bps

• store and forward: entire packet must arrive at router before it can be transmitted on next link

• delay = 3L/R (assuming zero propagation delay)

Example:

• L = 7.5 Mbits

• R = 1.5 Mbps

• transmission delay = 15 sec

R R RL

more on delay shortly …

Page 40: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Today – networking basics

• Core components of the Internet – the protocol stack

• Multiplexing, circuit switching, and packet switching

• Loss and delays

• The structure of the Internet

• This lecture covers much of chapter 1 in the textbook.

Page 41: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Losses and delay in packet switched networks

• Losses– Transmission losses

• In fiber links, bit-error is 10-12 or better (i.e., less).– What is the probability of packet error when there are 1500 bytes in a packet?

» 1 - (1 - 10-12)1500×8 = 1.2×10-8

• In wireless links, the bit-error rate can be very high

– Congestion losses. • If too many packets arrive at the same time, then the buffers will fill up and

packets are lost.

• Increasing the link speeds or reducing the number of users can reduce the probability of loss.

• Increasing the size of the buffer reduces losses, but also increases delay.

• Delay– Queuing delay

– Transmission delay

– Propagation delay

– Processing delay

A

B

packet being transmitted (delay)

packets queueing (delay)

free (available) buffers: arriving packets dropped (loss) if no free buffers

Page 42: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Queuing delay

• Queuing delay occurs for the same reason as congestion losses.

• The more the network is utilized, the high the queueing delay (and losses)

• Utilization = := actual use / maximum possible use

A

B

packet being transmitted (delay)

packets queueing (delay)free (available) buffers: arriving packets

dropped (loss) if no free buffers

Suppose that

• the link bit-rate is Z,

• there are X users

• Each users uses data rate Y with probability p, and use no bandwidth with probability 1-p.

= X×(Y×p)/Z

Page 43: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Queuing delay

Is it possible to have a network run at full utilization?

No! The average delay would be infinite!

From queuing theoryDelay = /(1- )

Page 44: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Delay in packet switched networks

• Delay– Queuing delay

– Transmission delay

– Propagation delay

– Processing delay

How long does it take to transmit a packet?How long does it take to get all the bits from node on to the wire/air/fiber?

Suppose•Link bit rate is 10 Mbps•Packet size is 1400 bytesHow long to transmit the packet?

10*10^6 bits / sec

1400 *8 bits / packet= .0011 sec = 1.1 ms

Page 45: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Delay in packet switched networks

• Delay– Queuing delay

– Transmission delay

– Propagation delay

– Processing delay

How long does it take for a bit to travel along a wire/fiber/through the air?

– Suppose• Speed of light in a vacuum 3108 m/s while in a fiber it is 2108 m/s• How long does it take to transmit a bit from NY to LA = 3962km

– 20ms propagation delay

• How about from NY to Jakarta, Indonesia = 16,179km– 80ms

• How about to a Geostationary satellite?– 35,786,000 m above the equator– 35,786,000 m /3e8 = 120ms (each way), 240ms up and back– On the edge of coverage, the delay can be 280ms– Note: for voice, the maximum delay is 250ms one-way– For the Iraq war, two satellite hops were often used, resulting in a one-way delay over500ms

• Medium orbit satellites (e.g., GPS) – 60ms (each way)

• Low-earth orbit satellites (low-earth? What about middle-earth?)– Iridium at 10ms (each way_

» Note, Iridium paid 5 billion for the network and sold for 25million (1/2%->on sale 99.5% off, everything must go)– Teledesic. 10ms

– Solar powered aircraft – 0.125ms (each way)

Page 46: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

transmitter receiver

Page 47: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

0transmitter receiver

Start of bit 0

Page 48: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

0transmitter receiver

Transmitter is transmitting bit 0

Page 49: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

0transmitter receiver

Transmitter has finished transmitting bit 0, and is starting to transmit bit 1

1

Start of bit 1

Page 50: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

0transmitter receiver

Transmitter is transmitting bit 2

12

Page 51: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

… and so on …

Page 52: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

6transmitter receiver

The transmitter is transmitting bit 8The receiver is starting to receive bit 0

78 345 012

Page 53: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

6transmitter receiver

The transmitter is transmitting bit 9.The receiver has completed receiving bit 0 and is now starting to receive bit 1

78 345 0129

Page 54: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

… and so on …

Page 55: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

6transmitter receiver78 345 0129

Question: what is the transmission delay?Answer: The time to transmit a bit = 1/bit-rate

Question: What is this?

Answer: This is the length of a bit on the wire (in in the air)

Question: How is the length of a bit related to the bit rate and transmission delay?

Question: How far does the beginning of the bit travel while rest of the bit is being transmitted?

Question: How long does it take to transmit the bit?

Answer: If the link is wireless, then the signal is moving at 3108m/sec.In this case, the start of the bit has traveled 3108m/sec 1/bit-ratee.g., bit-rate is 10Mbps, the beginning of the bit has traveled: 3108m/sec / (10010-9sec) = 30m e.g., bit-rate is 10Gbps, the beginning of the bit has traveled: 3108m/sec / (10010-12sec) = 0.03m

If bit rate = 10Mbps, then the time to transmit a bit is 1/10×106=10-7sec=100nsec

Page 56: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

16transmitter receiver1

If the propagation delay is fixed, but the bit-rate is increased.Or, equivalentlyIf the propagation delay is fixed, but the transmission delay is decreased.

23456789101112131415

Higher bit rate => low transmission delay (less time to transmit a bit)=> More bits fit on the wire (or the air)

Page 57: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

1transmitter receiver1

If the propagation delay is fixed, but the bit-rate is deceased.Or, equivalentlyIf the propagation delay is fixed, but the transmission delay is increased.

Lower bit rate => higher transmission delay (more time to transmit a bit)=> Fewer bits fit on the wire (or the air)

2

Page 58: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

1transmitter receiver

If the propagation delay is fixed, but the bit-rate is deceased even more.Or, equivalentlyIf the propagation delay is fixed, but the transmission delay is increased even more.

The receiver receives the bits as the transmitter is still transmitting them.The wire (or air) doesn’t hold any complete bits

Page 59: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

3 012

Question: what is the propagation delay?Answer: The time for the start (or end) of a bit to move from the transmitter to receiver

The beginning of bit 0

00:00:0000:00:0100:00:0200:00:0300:00:0400:00:0500:00:0600:00:0700:00:0800:00:0900:00:1000:00:1100:00:1200:00:1300:00:1400:00:1500:00:1600:00:1700:00:1800:00:1900:00:2000:00:21

34 01234 01234 01234 012345 012345 012345 0126 345 0126 345 0126 345 0126 345 01267 345 01267 345 01267 345 012678 345 012678 345 012678 345 012678 345 0129 678 345 0129 678 345 0129 678 345 0129 678 345 0129 678 345 0129 678 345 0129 678 345 0129 678 345 0129 678 345 0129 678 345 0129 678 345 0129 678 345 0129

00:00:2200:00:2300:00:2400:00:2500:00:2600:00:2700:00:2800:00:2900:00:30

transmitter receiver

Of course, the time for the beginning of a bit to travel from the transmitter to receiver

is the same as the time for the end of a bit to travel from the transmitter to receiver

Page 60: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

0transmitter receiver

Question: How long to get a bit from transmitter to receiver?Or: Once a host starts transmitting, how long until the bit is received?

Three things1.Transmit the bit2.Bit must propagate to receiver3.Receive bitDuration = 2TtransmissionDelay + TpropagationDelay ???No

Page 61: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

0transmitter receiver

Question: How long to get a bit from transmitter to receiver?Or: Once a host starts transmitting, how long until the bit is received?

Three things1.Transmit the bit2.The end of the bit must propagate to receiver – at which point, the bit has been received3.Receive bit (already done)Duration = TtransmissionDelay + TpropagationDelay

0

Page 62: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

0transmitter receiver

Question: How long to get a packet from transmitter to receiver?Or: Once a host starts transmitting, how long until the packet is received?

Three things1.Transmit the packet2.The end of the packet must propagate to receiver – at which point, the packet has been received3.Receive packet (already done)Duration = packetSize TtransmissionDelayPerBit + TpropagationDelay

0

Important: This delay is incurred at each hop.a N hop path will have a transmission delay at each hop

Page 63: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

transmitter receiver

Mild correction:

x

voltage

Maybe a bit that has value 1 looks like this

length of bit

Page 64: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Delay in packet switched networks

Routers take a bit of time to process packets.

• moving packets inside the router

• Finding which is the next hop

• Applying security or QoS

• Delay– Queuing delay– Transmission delay– Propagation delay– Processing delay

Page 65: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

How to measure delay?

• Ping: > ping 216.109.124.73

• Ping gives help

• (linux) Ping –I 10 216.109.124.73 > file.txt

• Then read it in excel and plot delay

• Traceroute (linux), tracert (windows)

• Traceroute 216.109.124.73 gives the routers and an estimate of the delay to each router.

• (Question? Does it take larger packets longer to transmit than shorter packets?

• Of course, it does.

• Can we test it with ping?

• Not really. But try it with ping and wireshark)

1.Open wireshark2.Select correct interface3.Start recording4.There are too many packets5.Filter out everything that is not icmp6.Run ping for a bit7.In wireshark export only what is displayed

8. Open file in excel9. Delete things we don’t want10. Save file11. Open in matlab12. Plot13. Repeat for large packets

Page 66: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Estimating the distribution of queuing delay with Wireshark and other tools

1. ping -n 250 google.com

– type “ping” for help

2. Get/open wireshark

3. Find the correct interface

4. Start collecting data

– Notice packet are being captured

5. Start ping

6. When ping finishes, stop capture

7. Export data

– Select displayed packets option (lower left)

– Deselect Packet Details (lower right)

8. Open data in something like excel

9. Remove everything but the times

10. Resave as times.txt

11. Load times.txt in matlab

12. u = diff(times);

13. plot(u)

14. u = u(u<.2);

15. plot(u)

16. What is min(u)?

17. q = u – min(u);

18. hist(q,20)

you google

RTT = 2Tpropagation + Ttransmisison_1 + Ttransmisison_2 +…+ Q1 + Q2 + …

Page 67: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Little’s Theorem

• Let N = number of items in the system– Any system. E.g., the number of packets in the output interface of a router

• Let be the rate that items arrive into the system– E.g., the rate that packets at the output of the interface

• Let T be the duration an item spends in the system– E.g., the time a packet spends in the output of the interface

• Little’s theorem– N = T

is a rate, so T is the number of items that arrive during period T

• Suppose that N is the average number of packets in the router and suppose that it takes seconds to transmit a packet– What is the duration that a packet spends in the router?

– When the packet arrives, there are N packets already in the router. So the delay is N + , where the N is the time this packets spends in the router, and is the time sitting in the transmitter

– Thus, T = N + • Hence, T=N => (N + )=N

• ( N + )=N

• N (1- ) = • N = /(1- )

– Which is the same formula that shows that the buffer occupancy grows to infinity as the utilization, , goes to 1

Page 68: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Today – networking basics

• Core components of the Internet – the protocol stack

• Multiplexing, circuit switching, and packet switching

• Loss and delays

• The structure of the Internet

• This lecture covers much of chapter 1 in the textbook.

Page 69: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Internet structure: network of networks

• roughly hierarchical

• at center: “tier-1” ISPs (e.g., Verizon, Sprint, AT&T, Cable and Wireless), national/international coverage

– treat each other as equals

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

Tier-1 providers interconnect (peer) privately

Page 70: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Tier-1 ISP: e.g., Sprint

to/from customers

peering

to/from backbone

….

………

POP: point-of-presence

Page 71: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Internet structure: network of networks

• “Tier-2” ISPs: smaller (often regional) ISPs– Connect to one or more tier-1 ISPs, possibly other tier-2 ISPs

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

Tier-2 ISPTier-2 ISP

Tier-2 ISP Tier-2 ISP

Tier-2 ISP

Tier-2 ISP pays tier-1 ISP for connectivity to rest of Internet tier-2 ISP is customer oftier-1 provider

Tier-2 ISPs also peer privately with each other.

Page 72: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Internet structure: network of networks

• “Tier-3” ISPs and local ISPs – last hop (“access”) network (closest to end systems)

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

Tier-2 ISPTier-2 ISP

Tier-2 ISP Tier-2 ISP

Tier-2 ISP

localISPlocal

ISPlocalISP

localISP

localISP Tier 3

ISP

localISP

localISP

localISP

Local and tier- 3 ISPs are customers ofhigher tier ISPsconnecting them to rest of Internet

Page 73: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Internet structure: network of networks

• a packet passes through many networks!

Tier 1 ISP

Tier 1 ISP

Tier 1 ISP

Tier-2 ISPTier-2 ISP

Tier-2 ISP Tier-2 ISP

Tier-2 ISP

localISPlocal

ISPlocalISP

localISP

localISP Tier 3

ISP

localISP

localISP

localISP

Page 74: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

ISPs and the structure of the Internet

• http://som.csudh.edu/fac/lpress/netapps/hout/oneWilshire/index.htm

Page 75: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Said to be the most interconnected space in the world and the most expensive real estate in North America, the “Meet Me Room” (a telco industry term) is the heart of One Wilshire. Here the primary fiber optic cables are routed, split, and shared. Because of the presence of so many telcos in this room and the ability to freely interconnect between them, rackspace here becomes extremely valuable. For comparison, the average price for office space in downtown Los Angeles is $1.75 per square foot per month. At the Meet Me Room, $250 per square foot would be a bargain.

MEET ME ROOM

Page 76: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Some 1,800 known conduits contain the fiber optic cables that flow through the building’s stairwells and vertical utility corridors, called “risers.” Cable connects the commercial telco tenants on floors 5 through 29 to the 4th floor Meet Me Room, and to a new, “wireless” Meet Me Room constructed on the 30th floor.

CABLE RISERS

Page 77: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Whenever a permit is pulled by a city contractor for any underground repairs outside One Wilshire, the various telco companies with cable in the area come out and paint the cable routes on the asphalt, creating a visible graphic of the complexity of what lies just under the surface.

SURFACE CABLE MAP

Page 78: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Computers generate a lot of heat, and maintaining a stable, cool temperature and a low humidity is essential in telco hotels, so tenants sometimes demand to install their own cooling systems to safeguard their equipment. At One Wilshire, these units are installed primarily on the third floor roof. A new closed loop cooling system has been installed on the 30th floor roof.

HVAC

Page 79: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

As tenants’ needs change, cables can go unused. Cable mining is performed to thin out the obsolete cables and future congestion is alleviated through the installation of dedicated new ducts.

CABLE MINING

Page 80: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Power is supplied by DWP, but in the event of a blackout, the building’s five generators will kick in. It takes the generators three seconds to start up and stabilize. During this brief period, the entire building runs on batteries. There are 11,000 gallons of diesel stored on site, enough to run the generators for 24 hours before being refueled.

ELECTRICITY

ELECTRICITY

ELECTRICITY

ELECTRICITY

ELECTRICITY

Page 81: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

On the roof, microwave antennas link up One Wilshire to transmission towers located around the city. Though fiber’s higher capacity has given it dominance over microwave at One Wilshire, microwave’s relatively low cost over long distances continues to make it economical for some applications. The roof’s clear line of sight to the south, west, and to other high-rises, along with the ability to interface with the fiber inside, continues to make One Wilshire an attractive location for microwave-based transmission.

MICROWAVE

Page 82: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

Much can be learned about a building’s function by examining its roof. The existence of telco hotels in the region around One Wilshire is indicated by the presence of new and extensive cooling units on the roofs of adjacent buildings, many of which were nearly vacant until the telco companies moved in.

READING A ROOF

Page 83: Introduction to This Class Instructor: Stephan Bohacek bohacek@udel.edu, 302-831-4274 bohacek Textbook: Kurose and Ross: Computer

The main fiber optic cables connecting One Wilshire to the world enter the building from under the street through closets in the walls of the building’s parking garage. Given the importance of the building to the global communications network, access to the parking garage is controlled, and the building is said to be monitored continuously by federal security officials.

POINT OF ENTRY