Title: ELEG 651 CPEG 419
1ELEG 651 / CPEG 419
Introduction to Data Networking
- Review of Lecture 1 and continuation of chapter 1
2Announcements
- Homework 1 due next week
- Project 1 due next week
3Today
- Recent News
- Review and complete Chapter 1
- Start Chapter 2
4In the news
- News sources
- www.lightreading.com (general networks)
- www.unstrung.com (wireless and mobile)
- www.darkreading.com (network security)
- www.alleyinsider.com (general tech business news)
- arstechnica.com (general tech news)
5Comcast Defends P2P Management
http//www.lightreading.com/document.asp?doc_id14
6016sitecdn
- P2P file sharing is responsible for a
- large share to the bytes send over the Internet,
- but only a small fraction of the connections
- Thus, a few P2P users are using most of the
bandwidth - ISPs would rather give good service to users
other than to P2P users - If a transfer of a large file takes a bit longer,
it does not impact the utility (the user does not
really care) - If a short file transfer takes longer, it greatly
impact utility (delaying a web page or a VoIP
packet is a big problem for a user) - Ideally, service is provided according to user
utility, more utility results in more bandwidth - Possibly, Comcast uses equipment to ensure that
short connections receive the maximum possible
bandwidth at the expense of long connections. - Comcast denies this
- Some claim that Comcast cut P2P connections in
general - This seems doubtful
- P2P users claim that comcast is not abiding by
network neutrality
6network neutrality
- Net neutrality is about allowing any type of
connections and providing the same type of
service with any decimation. - Depending on your prospective, it is a good idea
or bad idea. - Google likes the idea that they do not have to do
anything special to get bandwidth - ISPs and some application developers are against
net neutrality - Suppose that an ISP allows cheap or free access
but charges google for searches. If google does
not want to pay, then the ISP directs searches to
yahoo, microsoft, or ask.com - Would you rather get free access or ensure that
all your searches go where you want. - Google is very afraid of lack of customer
loyalty. - Net-flex and amazon and others would like to sell
video over the network. However, the network is
too slow. They might be willing to pay for a
faster service. - Net neutrality is blamed for a lack of video
on-demand - Politically motivated censoring
- google.cn and china in general blocks network
content that is against Chinese government - There is little doubt that without net
neutrality, if Rupert Murdock (the owner of fox
tv) owned an ISP, he would block access to web
sites with non-conservative viewpoints - There have been several attempts to pass net
neutrality laws (one is currently pending), but
so far, net neutrality is not a law - The comcast vs P2P is being used to motivate the
current bill
7The Protocol Stack
- The application layer includes network
applications and network application protocols - e.g. of applications web, IM, email
- e.g., application protocols OSCAR, http, smtp,
ftp, DNS. - Provide a service to a user or another
application. - Require service from the lower layers, but
typically only interact with the transport layer.
8The Protocol Stack
- The transport layer (typically)
- Different transport layer protocols provide
different types of services. - Types of services MAY include
-
-
-
-
-
-
-
-
- Note that when a transport protocol provides
these services, the application does not have to.
- This makes implementation of applications easier.
- This allows careful design of transport
protocols, following the divide and conquer
approach - The transport layer uses the network layer to
deliver packets, but does not require any type of
service guarantees from the network layer - In practice, the transport layer hopes for in
order delivery.
9Transport layer protocols TCP and UDP
- TCP and UDP are the most widely used transport
protocols. - Other protocols include SCTP (UD and Cisco are
active in developing SCTP), RTP (for multimedia
such as VoIP) - TCP and UDP will be covered in great detail
later. But for now - TCP provides many services
-
-
-
-
-
- UDP provides few services
-
-
-
- TCP requires a connection to be established, UDP
does not
10Transport Multiplexing
- Transport layers use ports to provide
multiplexing - A two hosts can have multiple simultaneous
connections by using ports. - Well known ports can be used to specify a
particular application - E.g., web servers will accept TCP connections on
port 80 - A host can have two connections with a web server
by using different ports
host (web server)
host
TCP
UDP
TCP
UDP
0
0
0
0
4567
80
4568
216-1
216-1
216-1
216-1
11Sockets gateway between the app layer and the
transport layer
- process sends/receives messages to/from its
socket - socket analogous to door
- sending process shoves message out door
- sending process relies on transport
infrastructure on other side of door which brings
message to socket at receiving process
12TCP Sockets
- An application accesses TCP and UDP through
sockets. - TCP is connection based so one host must be
listening and the other must be connecting
(calling) - The basic steps for a TCP listener
- Define socket variable as a TCP socket
- Bind socket to a port (the bind function)
- If some other application is or was recently (120
sec) listening on this port, this function will
fail. - The application must check that this command
succeeds. - Listen on this port (the listen function)
- When a the other host connects, the listen
function completes and data can be send or
received. - Close socket
- Basic steps for TCP caller
- Define socket variable as a TCP socket
- No port is given, the OS will assign which ever
port is available. The application has no control
over the port - Connect
- Send data
- Close socket
13UDP Sockets
- UDP are connectionless.
- A host sends a packet when it wants.
- There is no concept of one host connecting to
another. - There is only the concept of one host sending a
packet and the other host receiving the packet.
And either host can send or receive - Steps to send and then receive a UDP message
- Define socket as a UDP socket
- Bind socket to a port
- If this port is in use, bind will fail
- Send message
- Wait for message
- There are two ways to wait for messages, blocking
or non-blocking - A blocking function will wait for a message to
arrive. It might wait forever. - A non-blocking will return immediately, but if no
message was waiting in the transport layer, then
no message is returned - select function allows a time out to be set. So
the function will wait until a message arrives or
the timeout time to elapse. - Close socket
- Steps to receive a UDP message
- Define socket as a UDP socket
- Bind socket to a port
- If this port is in use, bind will fail
14Project 1
Due 2/25
- In this project messages will be sent over TCP
and UDP. - The project is description currently at
- www.eecis.udel.edu/bohacek/Classes/ELEG651Spring2
008/Project1/Project1.htm - Once mycourses is up, it will be listed there.
- All the required information should be online.
Post questions on mycourses (if it is up) - This project can be completed by cut and pasting
from the web site. But try to understand the
steps. - Let me know if there are typos.
15The Protocol Stack
- The network layer
- The network layer gets packets from the transport
layer or from the link layer. - Depending on the destination address, the network
layer will give the packet to the transport
protocol or to a specific link layer to send on a
specific link - The network layer also provides fragmenting of a
large packet into chunks suitable for the link
layer
16The Protocol Stack
- The link layer moves packets (frames) between two
hosts - However, the link layer may provide a wide range
of services including -
-
-
-
17The Protocol Stack
- The physical layer
- This requires putting the bits onto a physical
medium and decoding them from the medium. - In this course we mostly neglect the physical
layer and assume that is works correctly (each
layer always assumes that the other layers work
correctly) - But the performance of a protocol at a layer
often dependent on the other layers. - One approach is for cross-layer design
18Encapsulation
source
message
application transport network link physical
segment
datagram
frame
switch
destination
application transport network link physical
router
19Packet Switching vs. Circuit Switching
- Packet switching
- Circuit switching
- Circuit switching might lead to
- Packet switching leads to
20The delay goes to infinity at utilization goes to
1
Discrete-time queuing theory Markov Chains
- Suppose that at each time step either
- The queue increases by length one with
probability p - If the queue is not empty, it decreases by length
1 with probability q 1 p - If the queue is empty, then it stays empty with
probability q 1 - p
Diagram of the states the queue can take
Required for ELEG 651 but optional for CPEG 419
21The delay goes to infinity at utilization goes to
1
Discrete-time queuing theory Markov Chains
- Suppose that at each time step either
- The queue increases by length one with
probability p - If the queue is not empty, it decreases by length
1 with probability q 1 p - If the queue is empty, then it stays empty with
probability q 1 - p
Diagram of the states the queue can take
Required for ELEG 651 but optional for CPEG 419
22The delay goes to infinity at utilization goes to
1
p
p
p
p
p
p
Q0 (empty)
Q1
Q2
Qi-1
Qi
Qi1
q
q
q
q
q
q
q
Define P(i) to be the probability that the queue
has i packets
Required for ELEG 651 but optional for CPEG 419
23The delay goes to infinity at utilization goes to
1
Required for ELEG 651 but optional for CPEG 419
24The delay goes to infinity at utilization goes to
1
Required for ELEG 651 but optional for CPEG 419
25The delay goes to infinity at utilization goes to
1
Expected queue occupancy
Required for ELEG 651 but optional for CPEG 419
26The delay goes to infinity at utilization goes to
1
Required for ELEG 651 but optional for CPEG 419
27Delay in Packet Networks
- Types of delay in packet networks
-
-
-
-