Summary of Network Related Terms and Concepts
Networking Concepts
- OSI seven layer network model - understand intuitively what
each layer does....especially the physical, link, network, and
transport layers.
- TCP/IP- usually refers to the network, transport and
application layers. It is assumed that the network layer can
work with any link layer over any top of physical network.
- Addressing/Identifiers-
- Application level name spaces -
- Example: web browsing assumes objects named by Uniform
Resource Locator (e.g.,
http://www.cs.clemson.edu/~jmarty/index.html)
- Unique network host names
- Human readable: domain names
- Network addresses: (IPv4 or IPv6 defined)
- The Domain Name System (DNS) provides a service to
dynamically learn the IP address of a Domain Name (or
the reverse!!).
- DNS uses a distributed database that contains the
names/address binding
- UDPEchoClient2.c - the call to inet_addr is passed
a string that is either a domain name
(koala2.cs.clemson.edu) or a IP address in dotted
notation (130.127.48.77). Inet_addr converts an
address in dotted notation to a sin_addr (32 bit
number for IPv4) or a -1 if an error occurs....an
error will occur if the serverIP is a domain name.
It then calls DNS (gethostbyname) to resolve the
domain name.
- /* Construct the server address structure */
- memset(&serverAddress, 0,
sizeof(serverAddress));
- /* Zero out structure */
serverAddress.sin_family = AF_INET; /* Internet
addr family */
- serverAddress.sin_addr.s_addr =
(in_addr_t)inet_addr(serverIP); /* Server IP
address */
- /* If user gave a dotted decimal address, we
need to resolve it */
- if (serverAddress.sin_addr.s_addr == -1) {
- thehost = gethostbyname(serverIP);
- serverAddress.sin_addr.s_addr = *((unsigned
long *) thehost->h_addr_list[0]);
- }
- serverAddress.sin_port = htons(serverPort); /*
Server port */
- whois : user interface to the distributed DNS
database
- Machine addresses
- computers that communicate directly on a network -
requires machine addresses
- Think MAC headers ---> Section 6.4.1 in kurose
(slides 6-9) of datacom102.
- The address resolution protocol (ARP) is used to
automate learning the binding between a MAC address
and a Network address.
- ARP- client software called the resolver
issues a broadcast to learn the MAC address of a
specific destination Host (given a destination
IP address)
- UDPEchoClient2.c : The very first sendto()
will cause an ARP exchange.
- Error detection - applicable at multiple layers. Errors might
be bit errors within a frame or a message, or frames dropped in
the network. The latter might be due to poor channel conditions
prevent any port of a transmission from being received, or due
to a congested router which might drop packets if they arrive at
a router with a full queue.
- Error recovery -For our purposes, this simply means the
receiver conveys to the sender a request to retransmit. Or, the
sender learns of an error implicitly when a timeout occurs.
- Reliable Data Transfer Protocol - See Kurose, chapter 3.4. A
RDP provides a service abstraction to applications- a reliable
data service. This involves both error detection AND recovery.
Terms related to the performance and control of a network
- Performance metric: Conceptually, a performance metric is
something (usually a quantitative result) that reflects how well
the system (or the specific thing under study) is performing.
It's important for performance metrics to be precisely
identified/described so that they can be repeated by others in
any similar system.
- Examples:
- Vehicles: fuel efficiency, reliability measures
- The US postal system: average time to deliver mail,
average number of items lost per day
- Telephone networks: call quality (note....might be
hard to nail this quantitatively as human perception
comes into play), rate of call drops, rate of failed
call attempts
- Packet switched network:
- Latency: the time it takes for data to be sent from
one location to another.
- Round trip time (RTT) - When it makes sense, we might
want to assess the time it takes for one computer to
send a message to a partner until when the desired
response is received.
- Loss rate: When sending packets from one computer to
another over a network, it is possible that not all
packets arrive at the receiver. The loss rate describes
the ratio of lost packets (number lost / total attempts
)
- Rate at which data is transferred. There is a family
of terms that fall in this general metric category.
Examples include:
- Bandwidth - still a general term. Let's define
based on a EE or a CS background:
- An electrical engineer will think of bandwidth
at the physical medium layer. A ‘channel
bandwidth’ might refer to the ‘analog
bandwidth’. This corresponds to the ‘spectrum
range’ of the communications channel. So it is
the difference between the highest and lowest
frequencies that can operate over the channel.
Another way to state this is that the channel
bandwidth is the fastest continuously
oscillating signal that can be sent over the
channel. It is measured in cycles per second or
Hertz (hz). The baud rate is a measure of how
the communications method actually uses the
channel bandwidth. Therefore, the baud rate is
the transmitter’s maximum signal rate. The baud
rate will be at most the channel bandwidth.
However, to ensure robust communications over
possibly noisy channel conditions, the baud rate
is likely lower than the channel bandwidth. A
measure of the efficiency of a communications
system is how close the baud rate comes to the
channel bandwidth.
- The baud rate along with the number of
bits that are ‘encoded’ in each information
symbol determines the data rate.
- Data rate = baud * log2(#signal levels)
(eq. 6.1 in the text).
- A Computer Engineer or a CS (software engineer)
might thinkof Bandwidth in one of several
ways....depending on the layer or boundary of the
system of interest. Note the units differ
depending on the specifics...
- In physical layer communications, the term
bandwidth relates to the spectral width of
electromagnetic signals or to the propagation
characteristics of communication systems. In
the context of data networks, the term
bandwidth quantifies the data rate that a
network link or a network path can transfer.
- Other variants
- Effective data rate: the physical layer
data rate adjusted for the amount of
physical layer overhead. •
- Link rate: The rate at which a link
layer protocol can send and receive data
from higher layers. This takes into
account the link layer overhead. •
- Network bandwidth : the rate that a
network can send and receive data. •
- Available bandwidth : A network (large
or small) might not be able to provide to
a particular user all of capacity as there
might be congestion, channel errors, or
network service provider policy limits. At
a given time instant, the amount of
capacity that can be allocated to a user
is referred to as the available bandwidth.
- Throughput: This usually refers to the
rate at which data can be transferred
between two endpoints. It might assume
transport layer overhead (or not).
- Goodput: This usually implies the rate
at which application data (excluding all
overhead) is sent over a socket. The units
usually assumed are bits per sec (bps).
- Flow control - Networking mechanism that allows a receiving
side to indicate to the sending side to slow down. It is usually
referred to as a speed-matching mechanism. It might be
implemented at different layers - hop-by-hop, network entry to
senders, network exit (egress) to entry (ingress), or
end-to-end.
- TCP's congestion control blends end-to-end flow control
with network congestion control.
- Congestion control - Network congestion results from too much
demand for network bandwidth- more precisely, demand exceeds
capacity.
- See slide 5 datacom102.
- Network congestion typically means that one or more
routers along a path has a queue of packets waiting for
their turn to be transmit over the network interface.
- Measurables: Increased latency and non-zero packet
loss
- All Hosts and Routers will allow packets to be queued if
the output interface (the Network Interface Card, NIC) is
busy.
- Simple problem: h1---->R1-----h2
- H1 sending at a rate of 1 Mbps, the h1-R1 link
rate is 100Mbps, R1-h2 is 2 Mbps.
- Let's say that for a period of 5 seconds, H1 sends
at a rate of 10 Mbps.
- At the end of the 5 second period, how many
packets are queued?
- Model this as: H1---> R1 sends at a rate of
8 Mbps (10Mbps-2Mbps) which represents the rate
at which data is queued
- X(amount Queued) = ((8*10000000 bps * 5
seconds ) / 8 bits/byte) = 50Mbytes
- If packets sizes are 1000 bytes, this is a
queue level of 50000 packets!!
- What is the queue delay that packets
experience if the queue level is 50000 packets
(and if the 'drain rate' of the queue is 2
Mbps)?
- 50Mbytes*8)/2 Mbps) = 200 seconds!
- Hosts/Routers allow the maximum queue capacity to be set
through configuration. At some point, the router will start
dropping packets that arrive to a full queue.
- End-to-end congestion control - responds to explicit or
implicit congestion notifications from the network. The
sending hosts are expected to 'react' appropriately - TCP
congestion control defines the correct reaction for hosts in
an Internet.
- Explicit- the network sends a specific congestion
indication message to sending hosts.
- Implicit - the network does nothing in particular
other than dropping packets once queue levels reach
capacity. The end points can assume network congestion
when either packet loss is observed or evidence of
sustained queuing delay is observed.
- The Internet method is based on TCP congestion control
which uses implicit indications (packet loss) to tell
sending hosts the network is congested and to slow down.
- Basic TCP behavior: it reduces it's send window
significantly by either reducing it by a factor or 2
OR by setting the window all the way down to 1
packet.
Application communication models
- client/server
- client
- server
- interactive (sequential) server
- concurrent server
- Peer-to-peer - Any node can be a client or server. Think
bitTorrent.
- Broadcast oriented
- Broadcast (one to all) on a single network is easy - use
the all one's address (try ping 255.255.255.255 )
- Multicast (one to a group) - think content providers using
IP Video based on UDP/multicast.
- Modern equivalent is HTTP-based Adaptive Streaming (HAS) -
it involves unicast sessions to the end points. But it
likely multicasts content out to edge content servers.
- Publish/subscribe - An old model but it's now relevant due to
Internet of Things. Devices can publish data- well suited for
power constrained devices.
Terms :
- Elastic application - an application that is 'OK' with
whatever bandwidth it obtains from a network. Examples are file
transfer or to a lesser degree, web browsing
- Traffic model - when analyzing systems, we need to
characterize the network traffic.
- Some applications are easy to model:
- File Transfer - an 'always on ' sender
- Ping - on/off for timescales of packet times
- web browser - on/off over timescales of seconds
- VoIP - on/off over timescales of 'talking' times
- Network games (like call of duty) - on/off at the
timescale of player input and output changes (typically
based on default time intervals)
- Internet Video (HTTP-based Adaptive Streaming) -
on/off based on 'chunks of video' downloaded (although
the download rate of chunks can change)
- Application level performance metrics
- RTT's appropriate for web browsing and ping applications
- Throughput appropriate for FTP and HAS video
- One-way latency and loss appropriate for VoIP or network
games
Data Transmission
- Terms
- bandwidth
- throughput
- propagation dealy
- full-duplex
- What's the general idea of Nyquist's theorem?
- List three different types of physical media.
Packet Transmission
- Terms
- packet
- multiplexing
- transmission errors
- frame
- Ethernet
- collision and CSMA/CD
- Maximum transmission Unit (MTU)
- Frame versus Packet versus Datagram versus Message
TCP/IP Concepts (we did
not cover these topics in detail....I won't ask specific questions
on these topics but you should be familiar with what they roughly
correspond to)
- IP addressing
- Classful address mechanism - given an address like
130.127.49.1, is it Class A, B, or C?
- Difference between Class A,B,C
- Intent of classful address
- broadcast addresses
- multicast addresses
- Private addresses
- IP
- ARP
- Datagram formats
- Forwarding
- Fragmentation
- UDP/TCP
- Conceptually what do these layers do?
- What does an Ethernet MAC frame look like that contains a IP
Packet that contains a UDP message?
Socket Programming
- What is a socket? What is it used for?
- The following code is from our UDPEcho client
- clientAddressSize = sizeof(clientAddress);
- alarm(TIMEOUT); //set the timeout
- /* Recv a response RTT_MODE , client address/port will be
filled in on return */
- recvMsgSize = recvfrom(sock, echoBuffer, MAX_DATA_BUFFER,
0, (struct sockaddr *) &clientAddress,
&clientAddressSize);
- alarm(0); //clear the timeout
- You should be prepared for questions such as:
- on the recvfrom, why is a pointer to clientAddress
provided? What are we exepting the system to provide in
clientAddress?
- Answer: a recvfrom pulls the next IP datagram from
the sockets Rx buffer that was targeted (dst IP/port
to this socket endpoint) to process. The system
copies the data from the IP datagram (if any) to the
caller's echoBuffer), and returns the number copied
in recvMsgSize
- How does the client know if the recvfrom returns but
something abnormal might have happened?
- The recvMsgSize return code is '-1' (the standard
Unix system call error indication), and then details
about the error are in the global variable errno.
- Related to UDPEcho and messages.c: Let's say our client sends
a DataMessage with 100 bytes of application data. Draw a rough
picture of the MAC frame that gets sent over the wire?
Probability and Stats topics
- Review concepts including
- sample spaces
- events
- probability of events based on counting techniques
- From a freshly shuffled deck of cars, you are dealt 2
cards (from a deck of 52). What is the probability that
you are dealt a blackjack?
- established probabiltiy models
- Continuous - a uniform distribution
- Discrete - You roll two die.What is the probability
you roll two 6's?
- multiple, identical experiments
- random variable
- sample space of the random variable
- standard RVs :
- Continuous - a uniform RV
- Discrete - roll two die. Define a RV X to
represent the sum of both dice. Find the probability
that X is greater than 12.
- Expected value, E[X]
- measurements and experimental statistics
- Time series
- Independent samples (vs correlated)
- Sample mean, sample variance
- Visualizing time series data
- histograms and sample distribution plots
last updated: 3/11/2019