Computer Networks and The Internet
Computer Networks and The Internet
Computer Networks and The Internet
8/23/2016
Comcast
network
AT&T
network
core network
cable
fiber
enterprise network
smartphones
access point
cell tower
1 of 35
8/23/2016
When we talk about computer networks, we are really talking about the Internet
because no networks today are isolated, they are all interconnected forming part of the
Internet
The Internet is so hugh, you can view it as a network of networks and these networks
cooperate with each other by running the same or compatible protocols
It should be noted that the web is not a network but rather just one of many
distributed applications that use the communication services provided by the Internets
Roughly, the Internet operates at two tiers, namely, the access networks and the core
network
Access networks connect users to the Internet and the core network interconnects the
access networks
Access networks are owned and operated by regional ISPs (Internet Service Providers)
such as AT&T and Comcast in Memphis, other ISPs include Pacific Bells, Road
Runner, Cox, Charter, etc. in other states
Memphis was served by Road Runner until it swapped territories with Comcast
Comcast is consistently rated the worst customer service in the country
AT&T owns the twisted copper wires to the homes because of the legacy telephone
network
2 of 35
8/23/2016
AT&T provides subscribers with DSL (Digital Subscriber Line) gateways that connect
users computers and smartphones to its access network
DSL uses equipment at the CO to condition the signals on the copper wires making it
suitable for carrying digital signals between homes and the CO
On the user side, these gateways support both Ethernet and wifi interfaces, increasing
wifi is the interface of choice
Depending on the distance from user homes to the CO, the maximum speeds of DSL
are around a few Mbps (one million bits per second); the shorter the length of the
copper wire, the faster the DSL will be
If users connect their computers via Ethernet cables, Ethernet frames are directly
exchanged between the user computers and the gateways
If users connect their computers via wifi, Ethernet frames are first encapsulated in wifi
frames and sent to the gateways and the gateways recover the Ethernet frames from the
wifi frames
Between the AT&T gateways and the access network, the Ethernet frames are carried
in ATM (Asynchronous Transfer Mode) cells; ATM cells are fixed size packets of 53
bytes long
3 of 35
8/23/2016
ATM was originated from the telcos for extending the their voice network to a packet
switch network
Because delay and delay variation are important to voice, to control the delay
variation, ATM cells are short fixed at 53 bytes
To control the delay, the path within the ATM network is pre-established reserving
resource in the ATM switches along the path. It uses the so called signalling to find the
best path. Signalling supports routing and resource reservation
Because the short distance between the homes and DSLAMs (typically less than half a
mile), the speed can be up to hundreds of Mbps and that is the reason AT&T can offer
triple play (voice, Internet, and TV) service - by the way, the service is called U-verse
Many new development areas around Memphis are still waiting for the U-verse service
Comcast owns the coaxial cable to the homes because of the legacy cable TV network
Coaxial cables inherently support high bandwidth and therefore, high bit rate
Comcast provides subscribers with cable modems that connect users computers and
smartphones to its access network
4 of 35
8/23/2016
Like DSL gateways, cable modems support both Ethernet and wifi interfaces
All cable provider networks are actually Ethernet networks, i.e., based on the physical
layer of CSMA-CD (Carrier Sense Multiple Access - Collision Detection)
Because it is Ethernet, the claimed high speeds (> 100 Mbps) are shared by all
subscribers who share the cable of the neighborhood
Comcast also offers triple play service but generally less reliable than DSL because
telephones were designed for live line, not cable
DSL gateways and cable modems serve two additional important functions, namely,
supplying an IP address to each of the home user devices using DHCP (Dynamic Host
Control Protocol) and translating addresses between the home user IP addresses and
the IP address seen in the Internet
The core network itself is made up of many smaller administratively separate peer core
networks owned and operated by different companies of different countries
The operators of the smaller core networks do not charge each other for the traffic
flowing through their networks
The operators are free to derive and retain revenue from their own customers
The core networks are long-haul, connects no end users, and utilizes expensive fast
core routers interconnected by fibers
5 of 35
8/23/2016
The core network also uses optical switches support DWDM (Dense Wavelength
Division Multiplexing) and wavelength switching
To interoperate between these smaller core networks, the operators agree to run the
same protocols for exchanging traffic between these networks and this protocol is
called the Border Gateway Protocol (BGP)
The entire Internet is a packet switched network in which it ships packets of user
information from points to points around the world
What is a packet?
source
address field
48 bits
priority
field
3 bits
data
field
up to 12,000 bits
error protection
field
32 bits
6 of 35
8/23/2016
Some of the switches connect the hosts, at the edge of the network, allowing them to
send and receive packets and other switches do not connect any hosts but serving
internal switching function only
The location of the switches can be localized within a small geographic area like a city
or spread across continents
The figure below shows a 10x10 switch drawing and a rack mount router switch
A packet switch is an electronic device that has two or more input lines for receiving
packets and two or more output lines for transmitting packets
It uses the input packets recipient addresses and directs the packets to the outputs that
lead to the eventual delivery of the packets to the intended destination
7 of 35
8/23/2016
B
Host
Host
packet
switch
F
E
physical link
D
Host
Host Host
Host
Host
Host
Host
Host Host
All packet switches are store-and-forward meaning that entire packets are received,
stored, processed, and then forwarded
The delay experienced by a packet traversing a packet switch, called nodal delay,
consists of four components, namely, transmission delay, propagation delay,
processing delay, and queueing delay:
8 of 35
8/23/2016
10x10
Packet
Switch
- Transmission Delay. If the length of a packet is L bits and the physical link is R bps
L
(bit per second), then it takes Transmission Delay = --- seconds to receive the
R
complete packet
- Propagation Delay. It takes finite amount of time for signal to propagate from point
A to point B. If the distance between A and B is d meters (m) and the signal
propagation speed is v m/s (v is a fraction of speed of light in medium other than the
d
air), then Propagation Delay = --v
9 of 35
8/23/2016
For example, let L = 1kByte , R = 1Gbps , the length of a coast-to-coast optical fiber
is 8,000 km (signal moves in fiber at 2/3 of light speed in air), 1 GHz processor and it
takes 100,000 clock cycles to process a packet. An output port of the switch is lightly
10 of 35
8/23/2016
8000= 8s ,
Transmission Delay = ----------9
10
8000 ( 1000 )
Propagation Delay = ------------------------------------------------- = 18ms , and
3--- ( 3 ) ( 100000000 )
2
100000
Processing Delay = ------------------ = 100s The average delay through the switch is
1000
Delay = 0.008 + 18 + 0.1 + 10 28ms . If there are ten switches on the path from the
source to destination, then the total average end-to-end delay is 280ms which is really
small unless one or more of the switches are under congestion
We can see that the small end-to-end delays make real-time applications possible in the
Internet
It prioritizes the storage and processing of packets based on the priority encoded in the
packets. This way QoS (Quality of Service) is achieved
It selectively drops packets if congestion occurs and there is no space available to store
packets
11 of 35
8/23/2016
The performance of the switches is a critical factor determining the performance of the
network
The number of inputs and outputs ranges from under ten for small switches to
hundreds for large switches
The line speed ranges from 100 Mbps to 100 Gbps (100 billion bits per second)
The total capacity ranges from 1 Gbps to over tens of Tbps (1 tera bits per second or
1012 bits per second)
They cost from under $100 for small layer 2 bridges to over $1M for layer 3 and above
core routers
A physical link connects two or more switches together so that the switches can
exchange packets with each other
A physical link can be a copper cable for Ethernet, optical fiber for SONET
(Synchronous Optical NETwork), FTTH (Fiber To The Home), or wireless for 802.11
wifi or LTE (Long Term Evolution) cellular
12 of 35
8/23/2016
SONET such as OC-192 (10 Gbps) is deployed in high speed long haul transport in the
core network (OC stands for Optical Carrier)
What is a host?
A host can be anything that connects to the Internet such as computer, smartphone,
server, web enabled appliances such as set top box, smart TV, and game console, etc.
To satisfy applications such as web surfing, email, video streaming and conferencing,
online gaming, online shopping, etc., hosts communicate with each other by
exchanging packet via the Internet in which one or more hosts generate packets and
one or more hosts consume the packets
There are hundreds of millions of hosts connected to the Internet and billions of users
What is a protocol?
A protocol is set of procedures that defines (1) the format, (2) meaning, and (3) the
actions taken by the hosts or switches
13 of 35
8/23/2016
Protocol are used (a) as a common language for exchanges messages, (b) for reliable
data transfer, (c) for controlling congestion, (d) for exchanging routing information, (e)
exchanging user messages, etc.
What is an Intranet?
A private Internet, including all its attached resources, that can only be accessed by
authorized users. Attached resources include web and content servers, data storage,
printers, computing, document. etc.
It should be noted that the web is not a network but rather just one of many
distributed applications that use the communication services provided by the Internet
14 of 35
8/23/2016
Applications, hardware, software, and control of networks are very complex and we
use a layered approach to facilitate the ease of design, implementation, upgrade, and
maintenance of networks
Application (Layer 7)
Presentation (Layer 6)
Session (Layer 5)
Application (Layer 5)
Transport (Layer 4)
Transport (Layer 4)
Network (Layer 3)
Network (Layer 3)
Physical (Layer 1)
Physical (Layer 1)
8/23/2016
There is a clear distinction between functions executed in different layers but functions
within a layer are similar
The design, implementation, and maintenance of the layers are de-coupled so that a
layer can be modified, deleted, or added without affecting other layers
A layer uses the service provided by the immediate lower layer and provides service to
the immediate upper layer
The interface between two adjacent layers defines what information and services a
layer must provide to its upper layer; the method of information exchange and services
across an interface is implementation dependent
Layer 1, 2, and 3 are the network support layers that actually move data across the
network between peers
If layer 1, peers are the two nodes at the end points of a physical link
If layer 2 or 3, peerr are the end-to-end hosts
16 of 35
8/23/2016
A node supporting layer n must also support layer n-1, n-2, and 1
Application
5 - 4 interface
Transport
4 - 3 interface
intermediate node
intermediate node
Network
Network
Network
3 - 2 interface
3 - 2 interface
3 - 2 interface
end system B
Application
5 - 4 interface
Transport
4 - 3 interface
Network
3 - 2 interface
Data Link
Data Link
Data Link
Data Link
2 - 1 interface
2 - 1 interface
2 - 1 interface
2 - 1 interface
Physical
Physical
Physical
Physical
physical communication
The Network Model of the 5-Layer Internet Model
8/23/2016
An intermediate node may support layer 1 and 2 only and is known as a bridge
- A bridge knows how to forward data to the next node using the layer 2 destination
address
- Two or more bridges form a bridged network
Data may traverse one or more of the intermediate nodes in order to arrive at the
destination node
Layer 5 is the user applications such as the HTTP (HyperText Transfer Protocol),
SMTP (Simple Mail Transfer Protocol), etc.
18 of 35
8/23/2016
The application layer protocols reside on hosts (user computers) where user network
applications are run. Network applications means any applications that require data
transfer over the Internet, or network in general.
Common Internet application include World Wide Web running the HTTP (Hypertext
Transfer Protocol) protocol, email running the SMTP (Simple Mail Transfer Protocol)
protocol, and reliable file transfer using the FTP (File Transfer Protocol), video
conferencing running the RTP (Real-time Transport Protocol), voice and video
streaming, cloud storage and computing, name service running the DNS (Domain
Name System), etc.
Application layer protocols use the service provided by the immediate lower layer, the
transport Layer, for exchanging messages with other hosts attached to the Internet
19 of 35
8/23/2016
The transport layer provides application layer message transport service between
application endpoints
Two protocols are supported in the transport layer, namely, TCP (Transmission
Control Protocol) for reliable large file transfer and UDP (User Datagram Protocol)
for not-so-reliable small data transfer
TCP provides a connection-oriented service to its applications where the two endpoints
of the application maintain a connection for the entire life of the application
20 of 35
8/23/2016
UDP does not provide segmentation service requiring the application layer to pass
messages of length no larger than the maximum user datagram length
Transport layer protocols use the service provided by the immediate lower layer, the
network layer, for exchanging segments with other hosts attached to the Internet
Network Layer
The Internets network layer is responsible for moving network layer packets known as
datagrams from one host to another
The transport layer protocol (TCP or UDP) in a source host passes a transport layer
segment or user datagram and a destination address to the network layer. The network
layer provides the service of delivering the segment or user datagram to the transport
layer in the destination host
The network layer includes the IP Protocol, which defines the fields in the datagram as
well as how the end systems and routers act on these fields
All Internet components that have a network layer must run the IP protocol
21 of 35
8/23/2016
A host connected to the Internet must has an IP addresses and the IP address uniquely
identifies the hosts in the Internet
The IP address IPv4 (IP version 4) is 32 bits long and IPv6 is 128 bits long. It is
expected that 128-bit address can never run of space
Network layer contains routing protocols that determine the routes that datagrams take
between sources and destinations
Network layer has many routing protocols (called layer 3 routing) such as RIP
(Routing Information Protocol), OSPF (Open Shortest Path First), BGP (Border
Gateway Protocol), etc.
8/23/2016
Data link layer has two sublayers, namely, LLC (Logical Link Control) and MAC
(Medium Access Control). LLC is closer to the network layer and MAC is closer to the
physical layer
The data link MAC sublayer has its own address space known as MAC address which
is 48 bits long
Every physical network interface has a universally unique MAC address which has no
geographic significant but rather assigned by the manufacturers of the network
interface hardware
We will refer the data link layer unit of data transfer as a frame
Independent of the network layer routing, data link layer can move frames from the
source host to the destination host. The protocol is known as layer 2 bridging
Because MAC address has no geographic significant, layer 2 network is not very
scalable
The services provided by the LLC sublayer depend on the specific link layer protocol
that is employed over the link (the link between the two endpoints of the link, not the
link between two adjacent hosts)
23 of 35
8/23/2016
Some link-layer protocols provide reliable delivery and flow control, from transmitting
node, over one link, to receiving node
- This reliable delivery service is per link, not end-to-end (TCP delivers end-to-end
reliable service)
- Flow control can temporary stop the source from transmitting more frames. For
example, a station on the Ethernet can request all other stations to stop transmission
Examples of data link layer protocols include Ethernet, WiFi, and the cable access
networks DOCSIS protocol
The moving of packets in the Internet relies on both the layer 3 routing and layer 2
bridging. A packet may be switched by different routing protocols and switched by
different bridging protocol. You will learn more about these important switching
technique
The MAC sublayer is also responsible for recovering the frame from the raw bit stream
presented to it from the physical layer
Frames on the raw physical layer bit stream to recover the packet
24 of 35
8/23/2016
The physical layer coordinates the functions required to move individual bits within a
layer 2 frame from one node to the next over a physical medium
The protocols in this layer are link dependent and further depend on the actual
transmission medium of the link (for example, twisted-pair copper wire, single-mode
fiber optics)
For example, Ethernet has many physical-layer protocols: one for twisted-pair copper
wire, another for coaxial cable, another for fiber, and so on. In each case, a bit is moved
across the link in a different way
25 of 35
8/23/2016
Encapsulation
A hosts application layer generates messages and passes the message down to the
transport layer for delivery
The transport layer encapsulates the fragments, one at a time, with a transport layer
header and trailer to form layer 4 segments, which is then passed down to the network
layer for delivery
The network layer encapsulates the segments with a network layer header and trailer to
form layer 3 packets, which is then passed down to the network layer for delivery
The data link layer encapsulates the packets with a data link layer header and trailer to
form layer 2 frames, which is then passed down to the physical layer for delivery
At one end of physical link, the physical layer transmits the layer 2 frames bit-by-bit to
the other end-point of the link
The figure below shows the entire process of encapsulation of the five layers
Decapsulation
26 of 35
8/23/2016
Message
TL header
Network
NL header
TL header
Data Link
DL header
NL header
Physical
Message
Message
TL header
TL CRC
TL CRC
NL CRC
Message
TL CRC
NL CRC
DL CRC
The node, at the other end of physical link, the physical layer receives and recovers the
bits and passes them to the data link layer
(a) Frames on the raw bit stream to recover the MAC frame
27 of 35
8/23/2016
Uses the extracted MAC address to look up the layer 2 forwarding table for the output
link to forward the frame (we will study how the layer 2 forwarding table is created
later in this course)
(c) If the extracted MAC address matches the MAC address of the nodes network
interface, from which this frame was received, then
Strips off the layer 2 header and trailer (decapsulate) of the MAC frame to obtain the
IP packet and passes it to the network layer, else
drops the MAC frame (because the frame is not intended for this node)
Extracts the destination IP address from the packet and users it to look up the routing
table for the output link to forward the packet (we will study how the routing table is
created later in this course)
The hosts IP address should match the destination IP address contained in the packet
28 of 35
8/23/2016
Strips off the layer 3 header and trailer of the packet to obtain the layer 4 segment and
passes the segment to the transport layer
Application
encapsulation
decapsulation
Transport
Application
Transport
Network
Network
Network
Network
Data Link
Data Link
Data Link
Data Link
Physical
Physical
Physical
Physical
29 of 35
8/23/2016
The physical path between the source S and destination D is pre-established before
they exchange data
switch
B
q
host S
A
r
link
t
s D
C
u
y F z
x
w E
host D
8/23/2016
Packets must identify to the switches which path they belong to and this is
accomplished by the path identifier field in every packet
Packets having the same path identifier traverse hop-by-hop across the switches along
the same established path to the destination
Each switch on path maintains the path information such as the input to output port
mapping, the bandwidth and delay requirement, etc.
When host S and host D cease the conversation, the path must be teared down either
explicitly or by time-out
If tear down explicitly, S (D) sends tear-down messages down the path so that the
switches on the path remove the state information about the path
If tear down by time-out, a switch on the path removes the state information about the
path if it has not seen any data on the path for a predetermined amount of time
31 of 35
8/23/2016
Switches in the network do not maintain any state information about any path between
two hosts, and therefore, there is no physical path pre-established between the source
and destination hosts
The destination address must be included in every packet sent by the source
Switches in the network forward packets hop-by-hop based on the destination address
of the packets
Packets originated from the same source may take different routes to the destination
Switches may prioritize packets based on the priority encoded in the packets to provide
some QoS, but not as strong as the path CO service
32 of 35
8/23/2016
Prior to data transfer, two hosts use control packets to exchange control information to
establish a connection first. The transport layer TCP (Transmission Control Protocol)
is an excellent example of this service in the Internet
The source and destination hosts maintain the state information (the control
information) about the connection
Delivery in the order the packets are sent is by means sequence numbers, buffering,
and retransmission
While the major use of the end-to-end CO service is to provide very reliable data
transfer, the major use of path CO service is to provide QoS such as low delay, delay
variation, packet loss
33 of 35
8/23/2016
The source host wishes to send packets to a destination host, simply sends the packets
containing the address of the destination host without pre-establishing an end-to-end
connection
If packets are dropped in transit to the destination host, the hosts would not know or
more precisely the transport layer used in the Internet would not know
If packets arrive to the destination host out-of-order, the transport layer also would not
know
34 of 35
8/23/2016
Capabilities can be built right into the applications to detect packet loss and out-oforder arrival defects
Some video streaming applications use user UDP across the Internet because it neither
requires QoS not high reliability
35 of 35