Cn r19 Lecturenotes Unit 1
Cn r19 Lecturenotes Unit 1
Cn r19 Lecturenotes Unit 1
What is the Internet?, The Network Edge, The Network Core, Delay, Loss, and Throughput in
Packet-Switched Networks, Protocol Layers and their Service Models, Networks under attack,
History of Computer Networking and the Internet
In Internet jargon, all of these devices are called hosts or end systems. End systems access the
Internet through Internet Service Providers (ISPs), including residential ISPs such as local cable or
telephone companies; corporate ISPs; university ISPs; and ISPs that provide WiFi access in airports, hotels,
coffee shops, and other public places.
End systems, packet switches, and other pieces of the Internet run protocols that control the
sending and receiving of information within the Internet. The Transmission Control Protocol (TCP) and
the Internet Protocol (IP) are two of the most important protocols in the Internet. The IP protocol
specifies the format of the packets that are sent and received among routers and end systems. The
Internet’s principal protocols are collectively known as TCP/IP.
1.1.2 A Services Description we can also describe the Internet from an entirely different
angle—namely, as an infrastructure that provides services to applications. These applications include
electronic mail, Web surfing, social networks, instant messaging, Voice- over-IP (VoIP), video streaming,
distributed games, peer-to-peer (P2P) file sharing, television over the Internet, remote login, and much,
The following figure describes each customer’s DSL modem uses the existing telephone line
to exchange data with a digi- tal subscriber line access multiplexer (DSLAM) located in the telco’s
local central office (CO). The home’s DSL modem takes digital data and translates it to high-
frequency tones for transmission over telephone wires to the CO; the analog signals from many
such houses are translated back into digital format at the DSLAM.
Splitter
Central
DSL makes use of the telco’s existing local telephone infrastructure, cable Internet access makes use of
the cable television company’s existing cable television infrastructure. A residence obtains cable Internet
access from the same company that provides its cable television. As illustrated in following Figure, fiber
optics connect the cable head end to neighborhood-level junctions, from which traditional coaxial cable
is then used to reach individual houses and apartments.
DSL makes use of the telco’s existing local telephone infrastructure, cable Internet access makes use of
the cable television company’s existing cable television infrastructure. A residence obtains cable Internet
access from the same company that provides its cable television. As illustrated in Figure 1.6, fiber optics
connect the cable head end to neighborhood-level junctions, from which tradi- tional coaxial cable is then
used to reach individual houses and apartments
Coaxial cable
Fiber
Fiber cable
Fiber
DSL and cable networks currently represent more than 90 percent of residential broadband access in the
United States, an up-and-coming technology that promises even higher speeds is the deployment of
fiber to the home (FTTH)
As the name suggests, the FTTH concept is simple— provide an optical fiber path from the CO directly to
the home.
There are several competing technologies for optical distribution from the CO to the homes. The
simplest optical distribution network is called direct fiber, with one fiber leaving the CO for each home.
More commonly, each fiber leav- ing the central office is actually shared by many homes; it is not until
the fiber gets relatively close to the homes that it is split into individual customer-specific fibers. There
are two competing optical-distribution network architectures that perform this splitting: active optical
networks (AONs) and passive optical net- works (PONs).
The following Figure 1.7 shows FTTH using the PON distribution architecture. Each home has an
optical network terminator (ONT), which is connected by dedicated optical fiber to a
neighborhood splitter. The splitter combines a number of homes (typically less than 100) onto a
single, shared optical fiber, which connects to an optical line terminator (OLT) in the telco’s CO.
The OLT, providing conversion between optical and electrical signals, connects to the Internet via
a telco router
Optical
splitter
Optical
wireless LANs:
Ex:WiFi
people are accessing the Internet wirelessly from lap- tops, smart phones, tablets, and other
devicesIn a wireless LAN setting, wireless users transmit/receive pack- ets to/from an access point that is
connected into the enterprise’s network (most likely including wired Ethernet), which in turn is
connected to the wired Internet. A wireless LAN user must typically be within a few tens of meters of the
access point. Wireless LAN access based on IEEE 802.11 technology, more colloquially known as WiFi, is
now just about everywhere—universities, business offices, cafes, air- ports, homes, and even in
airplanes.
physical medium
The physical medium can take many shapes and forms and does not have to be of the same type
for each transmitter-receiver pair along the path. Examples of physi- cal media include twisted-pair
copper wire, coaxial cable, multimode fiber-optic cable, terrestrial radio spectrum, and satellite radio
spectrum
Physical media fall into two categories: guided media and unguided media. With guided
media, the waves are guided along a solid medium, such as a fiber-optic cable, a twisted-pair
copper wire, or a coaxial cable. With unguided media, the waves propagate in the atmosphere and
in outer space, such as in a wireless LAN or a digital satellite channel.
• Twisted-Pair Copper Wire
• Coaxial Cable
• Fiber Optics
• Terrestrial Radio Channels
• Satellite Radio Channels
Coaxial Cable
Like twisted pair, coaxial cable consists of two copper conductors, but the two conductors are
concentric rather than parallel. With this construction and special insulation and shielding, coaxial
cable can achieve high data transmission rates. Coaxial cable is quite common in cable television
systems. Coaxial cable can be used as a guided shared medium. Specifically, a number of end
systems can be connected directly to the cable, with each of the end systems receiving whatever is
sent by the other end systems.
Fiber Optics
An optical fiber is a thin, flexible medium that conducts pulses of light, with each pulse representing a
bit. A single optical fiber can support tremendous bit rates, up to tens or even hundreds of gigabits per
second. They are immune to electromag- netic interference, have very low signal attenuation up to 100
kilometers, and are very hard to tap. These characteristics have made fiber optics the preferred long-
haul guided transmission media, particularly for overseas links.
• terrestrial microwave
o e.g. up to 45 Mbps channels
• LAN (e.g., WiFi)
o 11Mbps, 54 Mbps
• wide-area (e.g., cellular)
o 3G cellular: ~ few Mbps
Satellite Radio Channels
A communication satellite links two or more Earth-based microwave transmitter/ receivers,
known as ground stations. The satellite receives transmissions on one fre- quency band, regenerates the
signal using a repeater (discussed below), and transmits the signal on another frequency.
➢ packet switching
➢ circuit switching
➢ network structure
There are two fundamental approaches to moving data through a network of links and switches:
packet switching and circuit switching
Packet switching
In a network application, end systems exchange messages with each other. To send a message
from a source end system to a destination end system, the source breaks long messages into smaller
chunks of data known as packets. Between source and destination, each packet travels through
communication links and packet switches (for which there are two predominant types, routers and link-
layer switches). Packets are transmitted over each communication link at a rate equal to the full
transmission rate of the link.
So, if a source end system or a packet switch is sending a packet of L bits over a link with
transmission rate R bits/sec, then the time to transmit the packet is L/R seconds.
Store-and-Forward Transmission
Most packet switches use store-and-forward transmission at the inputs to the links. Store-
and-forward transmission means that the packet switch must receive the entire packet before it can
begin to transmit the first bit of the packet onto the outbound link.
The following figure illustrates store-and-forward transmission with the help of router. In this
example, the source has three packets, each consisting of L bits, to send to the destination. At the
snapshot of time shown in Figure, the source has transmitted some of packet 1, and the front of packet
1 has already arrived at the router. at this instant of time, the router cannot transmit the bits it has
received; instead it must first buffer (i.e., “store”) the packet’s bits. Only after the router has received all
of the packet’s bits can it begin to transmit (i.e., “forward”) the packet onto the outbound link.
let’s now calculate the amount of time that elapses from when the source begins to send the packet
until the destination has received the entire packet
Here we will ignore propagation delay—the time it takes for the bits to travel across the wire at near
the speed of light—which will be discussed in Section 1.4.) The source begins to trans- mit at time 0; at
time L/R seconds, the source has transmitted the entire packet, and the entire packet has been received
and stored at the router (since there is no propa- gation delay). At time L/R seconds, since the router
has just received the entire packet, it can begin to transmit the packet onto the outbound link towards
the desti- nation; at time 2L/R, the router has transmitted the entire packet, and the entire packet has
been received by the destination. Thus, the total delay is 2L/R. If the switch instead forwarded bits
as soon as they arrive (without first receiving the entire packet), then the total delay would be L/R
since bits are not held up at the router.
Now let’s calculate the amount of time that elapses from when the source begins to send the first
packet until the destination has received all three packets. As before, at time L/R, the router begins
Packet Switching Versus Circuit Switching
Critics of packet switching have often argued that packet switching is not suitable for real-time
services (for example, telephone calls and video conference calls) because of its variable and
unpredictable end-to-end delays (due primarily to vari- able and unpredictable queuing delays).
(2) it is simpler, more efficient, and less costly to implement than circuit switching.
❖ circuit-switching:
▪ 10 users
❖ packet switching:
▪ with 35 users, probability > 10 active at same time is less than .0004 *
Internet Structure: Network of Networks
End systems (PCs, smart phones, Web servers, mail servers, and so on) connect into the Internet via
an access ISP. The access ISP can pro- vide either wired or wireless connectivity, using an array of
✓ End systems connect to Internet via access ISPs (Internet Service Providers)
o Residential, company and university ISPs
✓ Access ISPs in turn must be interconnected.
o So that any two hosts can send packets to each other
✓ Resulting network of networks is very complex
o Evolution was driven by economics and national policies
✓ Let’s take a stepwise approach to describe current Internet structure
The above figure illustrates the interconnection of ISPs.
Delay, Loss, and Throughput in Packet-Switched Networks
we would like Internet services to be able to move as much data as we want between
any two end systems, instantaneously, without any loss of data. Alas, this is a lofty goal, one that
is unachievable in reality. Instead, computer networks necessarily constrain throughput (the
amount of data per second that can be transferred) between end systems, introduce delays
between end systems, and can actually lose packets.
The performance of many Internet applications—such as search, Web browsing, email, maps,
instant messaging, and voice-over-IP—are greatly affected by network delays
transmission
A propagation
B
nodal
queueing
processing
Denote the length of the packet by L bits, and denote the transmission rate of the link from
router A to router B by R bits/sec. The transmission delay is L/R. This is the amount of time
required to push (that is, transmit) all of the packet’s bits into the link.
DTRANS: TRANSMISSION DELAY:
▪ L: packet length (bits)
▪ R: link bandwidth (bps)
▪ dtrans = L/R
Once a bit is pushed into the link, it needs to propagate to router B. The time required to
propagate from the beginning of the link to router B is the propagation delay.
DPROP: PROPAGATION DELAY:
▪ d: length of physical link
▪ s: propagation speed in medium (~2x108 m/sec)
▪ dprop = d/s
La R 1
Dependence of average queuing delay on traffic intensity
La/R ~ 0
Packet loss
queue (aka buffer) preceding link in buffer has finite capacity
packet arriving to full queue dropped (aka lost)
lost packet may be retransmitted by previous node, by source end system, or not at all
Throughput in Computer Networks
.To define throughput, consider transfer- ring a large file from Host A to Host B across a
computer network. This transfer might be, for example, a large video clip from one peer to another in a
P2P file sharing system. The instantaneous throughput at any instant of time is the rate (in bits/sec) at
which Host B is receiving the file. If the file consists of F bits and the transfer takes T seconds for Host B
to receive all F bits, then the average throughput of the file transfer is F/T bits/sec.
Simply
Throughput: rate (bits/time unit) at which bits transferred between sender/receiver
▪ instantaneous: rate at given point in time
▪ average: rate over longer period of time
Let Rs denote the rate of the link between the server and the router; and Rc denote the rate of the link
between the router and the client. Suppose that the only bits being sent in the entire network are those
from the server to the client. We now ask, in this ideal scenario, what is the server- to-client throughput?
To answer this question, we may think of bits as fluid and communication links as pipes
. Clearly, the server cannot pump bits through its link at a rate faster than Rs bps; and the router cannot
forward bits at a rate faster than Rc bps. If Rs < Rc, then the bits pumped by the server will “flow” right
through the router and arrive at the client at a rate of Rs bps, giving a throughput of Rs bps. If, on the other
hand, Rc < Rs, then the router will not be able to forward bits as quickly as it receives them. In this case,
bits will only leave the router at rate Rc, giving an end-to-end throughput of Rc.
Application
Application
Presentation
Transport
Session
Network Transport
Link Network
Link
Physical
Physical
In a top-down approach, first covering the application layer and then proceeding downwards.
Application Layer
The application layer is where network applications and their application-layer proto- cols reside. The
Internet’s application layer includes many protocols, such as the HTTP protocol (which provides for Web
document request and transfer), SMTP (which pro- vides for the transfer of e-mail messages), and FTP (which
provides for the transfer of files between two end systems). supporting network applications
▪ FTP, SMTP, HTTP
Transport Layer
The Internet’s transport layer transports application-layer messages between application
endpoints. There are two transport protocols, TCP and UDP, either of which can transport application-
layer messages.
TCP provides a connection-oriented service to its applications. This service includes guaranteed
delivery of application-layer messages to the destination and flow control. TCP also breaks long messages
into shorter segments and provides a congestion-control mechanism.
The UDP protocol provides a connectionless service to its applications. This is a no-frills service
that provides no reliability, no flow control, and no congestion control.
Network Layer
The Internet’s network layer is responsible for moving network-layer packets known as
datagrams from one host to another. The Internet transport-layer protocol (TCP or UDP) in a
source host passes a transport-layer segment and a destination address to the network layer.
Thus it is responsible for routing of datagrams from source to destination. IP, routing protocols.
Link Layer
The Internet’s network layer routes a datagram through a series of routers between the source and
destination. To move a packet from one node (host or router) to the next node in the route, the network
layer relies on the services of the link layer. data transfer between neighboring network elements.
Ethernet, 802.111 (WiFi), PPP
Physical Layer
The protocols in this layer are again link dependent and further depend on the actual transmission
medium of the link.
The OSI Model
The seven layers of the OSI reference model as shown in the above figure (B). The functionality of
five of these layers is roughly the same as their similarly named Internet counterparts. Thus, let’s consider
the two additional layers present in this model—the presentation layer and the session layer.
The role of the presentation layer is to provide services that allow communicating applications to
interpret the meaning of data exchanged. These services include data compression and data encryption
The session layer provides for delimiting and synchronization of data exchange, including the
means to build a check pointing and recovery scheme.
Encapsulation
message
source
applic
Encapsul
segment
ation
ation
datagram
frame transp
ort
networ
k switch
link
destination
applicphysic
ation al
router
transp
ort
Introduction 1-
networ
k
link
physic
al
The above figure describes the Hosts, routers, and link - layer switches; each contains a
different set of layers, reflecting their differences in functionality.
The above figure also illustrates the important concept of encapsulation. At the sending
host, an application-layer message is passed to the transport layer. In tthe transport layer takes
the message and appends additional information (so-called transport-layer header information,
Ht) that will be used by the receiver side transport layer.
The application-layer message and the transport-layer header information together constitute the
transport-layer segment. The transport-layer segment thus encapsulates the application-layer
message. The added information might include information allowing the receiver-side transport
layer to deliver the message up to the appropriate application, and error-detection bits that allow
the receiver to determine whether bits in the message have been changed in route. The transport
layer then passes the segment to the network layer, which adds network-layer header
information (Hn)such as source and destination end system addresses, creating a network-
layer datagram. The datagram is then passed to the link layer, which (of course!) will add its
own link-layer header information and create a link-layer frame. Thus, we see that at each layer,
a packet has two types of fields: header fields and a payload field. The payload is typically a
packet from the layer above.
Network security
The field of network security is about how the bad guys can attack computer networks and about how we,
soon-to-be experts in computer networking, can defend networks against those attacks.
The following are the some of the more prevalent types of attacks today.
1. The bad guys can put malware into your host via the Internet
2. The bad guys can attack servers and network infrastructure
3. The bad guys can sniff packets
4. The bad guys can masquerade as someone you trust
1. The bad guys can put malware into your host via the Internet
We attach devices to the Internet because we want to receive/send data from/to the Internet.
This includes all kinds of good stuff, including Web pages, e-mail messages, MP3s, telephone calls, live
video, search engine results, and so on. . But, unfortunately, along with all that good stuff comes
malicious stuff—collectively known as malware—that can also enter and infect our devices.
❖ malware can get in host from:
▪ virus: self-replicating infection by receiving/executing object (e.g., e-mail attachment)
▪ worm: self-replicating infection by passively receiving object that gets itself executed
❖ spyware malware can record keystrokes, web sites visited, upload info to collection site
❖ infected host can be enrolled in botnet, used for spam. DDoS attacks
2. The bad guys can attack servers and network infrastructure
Another broad class of security threats are known as denial-of-service (DoS) attacks. As the name
suggests, a DoS attack renders a network, host, or other piece of infrastructure unusable by legitimate
users.
Denial of Service (DoS): attackers make resources (server, bandwidth) unavailable to legitimate
traffic by overwhelming resource with bogus traffic. Most Internet DoS attacks fall into one of three
categories.
Vulnerability attack. This involves sending a few well-crafted messages to a vul- nerable application or operating
system running on a targeted host. If the right sequence of packets is sent to a vulnerable application or operating
system, the service can stop or, worse, the host can cra
Bandwidth flooding. The attacker sends a deluge of packets to the targeted host—so many packets that the target’s
access link becomes clogged, preventing legitimate packets from reaching the serv
Connection flooding. The attacker establishes a large number of half-open or fully open TCP connections at the target
host. The host can become so bogged down with these bogus connections that it stops accepting legitimate
connection
Many users today access the Internet via wireless devices, such as WiFi-connected laptops or handheld
devices with cellular Internet connections While ubiquitous Internet access is extremely convenient and
enables marvelous new applications for mobile users, it also creates a major security vulnerability—by
placing a passive receiver in the vicinity of the wireless transmitter, that receiver can obtain a copy of every
packet that is transmitted! These packets can contain all kinds of sensitive information, including
passwords, social security numbers, trade secrets, and private personal messages. A passive receiver that
records a copy of every packet that flies by is called a packet sniffer.
The ability to inject packets into the Internet with a false source address is known as IP spoofing,
and is but one of many ways in which one user can masquerade as another user.