0% found this document useful (0 votes)
38 views

Chapter1 - Introduction

Uploaded by

Hasbiy Robbiy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Chapter1 - Introduction

Uploaded by

Hasbiy Robbiy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 82

COM320 Computer Networks and

Operating Systems

Introduction to Networks
Dr. Sait DEMİR
Karabuk University
Attendance
Texts, Labs & Notes
Main Books:

1. Kurose, J., Ross, K. (2020) Computer Networking: A Top-Down Approach 8th


edition, Pearson, ISBN: 1292153598

• All content on Blackboard but also mirrored on


https://kevincurran.org/teaching/computer-networks/

• Book is online….free
What is a network?
- A network can be defined as two or more computers
connected together in such a way that they can share
resources.

- The purpose of a network is to share resources.

- A resource may be a file, folder, printer or just about


anything else that exists on a computer.

A network is simply a collection of


computers or other hardware devices that
are connected together, either physically or
logically, using special hardware and
software, to allow them to exchange
information and cooperate. Networking is
the term that describes the processes
involved in designing, implementing,
upgrading, managing and otherwise
working with networks and network
technologies
The Internet: “nuts and bolts” view
PC  billions of connected
mobile network
computing devices:
server
• hosts = end systems
global ISP
wireless • running network apps
laptop

smartphone home
 communication links network
• fiber, copper, radio, satellite regional ISP
• transmission rate:
wireless bandwidth
links
wired
links

 packet switches: forward


packets (chunks of data)
institutional
• routers and switches network
router
What’s the Internet: “nuts and bolts” view

 Internet: “network of networks” mobile network


• Interconnected ISPs global ISP

 protocols control sending, receiving of messages


• e.g., TCP, IP, HTTP, Skype, 802.11

 Internet standards
• RFC: Request for comments
• IETF: Internet Engineering Task Force regional ISP

 Infrastructure that provides services to applications:


• Web, VoIP, email, games, e-commerce, social home network
nets, …

 Provides programming interface to apps


• hooks that allow sending and receiving app
programs to “connect” to Internet
• provides service options, analogous to postal
service

institutional
network
The Internet

What is the difference


between the Web and the
Internet?
The Internet

In simple terms, the Internet is the physical infrastructure on which services like the Web run. The Web may be the biggest service
running on the Internet, but there are other important services, such as email, FTP and mobile apps.

Infrastructure: the Internet


the Internet, Internet, internet (noun): a vast global network of computers, servers and other electronic devices connected
underground, overground, undersea and through space by wires, cables, radio and satellite. - The project to create the Internet began
in the 1960s, long before the World Wide Web came into being.

Services: World Wide Web and other examples


the World Wide Web, WWW, the Web, the web (noun): an information service on the Internet accessible to users through browsers
using a standard hyper-text transfer protocol (HTTP) that allows websites and webpages to link to each other and transport visitors
around the web
Let us start with Switching
 Early Landlines - you had to ask a switchboard operator (who was a real human) to connect
you with your friend from another city. The operator said “OK,” hung up, and then later they
called you back with your friend “on line.”

 What you may not know is the procedure this operator had to do for you. They switched
cables from one port to another to create the connection.

 This operation is called circuit switching which is s a method of establishing a connection


between two nodes of a network when they have a dedicated channel to communicate through.
It means that when you dial a friend, there is someone or something that literally builds up a
cable path from you to your friend.

• This type of commutation does not suit the Internet well. It


simply does not scale.

• Implementing physical cable switching would be too expensive


and even more expensive to maintain.

• Instead, the Internet is built upon packet switching. In this type


of communication, there is no physical cable switching.
Packet Switching Underlies Internet
• When we send a message from our computer to our friend’s computer, it goes through
different networks, each of those transferring the message to the path that it thinks would
be the best.

• This may sound mad, but most of the time there is no “main coordinator” of the Internet
who decides where every packet must go. Our computer simply “throws” the packet to the
network, and all the devices in this network are trying to decide where this packet should
travel. Surprisingly, almost all the time these devices do their job pretty well.

• All thanks to the protocols.


Whats a protocol?
A protocol is a set of rules defined to allow nodes of a network to transmit data properly. You
probably know some high-level protocols such as HTTP, SSH, IMAP and DHCP.

human protocols: network protocols:


 “what’s the time?”  machines rather than humans
 “I have a question”  all communication activity in Internet
 introductions governed by protocols

… specific messages sent


… specific actions taken when messages
received, or other events

protocols define format, order of


messages sent and received among
network entities, and actions taken on
message transmission, receipt

Human protocol Vs Computer network protocol:


Protocols
 You can imagine “layers of protocols”
as a collection of different sweet wrappers… e.g.
You order a chocolate gift

 First, a cook wraps a chocolate bar with its wrapper.


Then a packer put the bar into a branded bag. After
that, somebody from the delivery department uses
a piece of wrapping paper to make it look like a gift.
Finally, they pass the gift to the postal service.

 When the postal service gets the gift, they put it into
a box and write the address of your friend on this
box. Then they load a truck with the boxes like
yours and go to deliver.

 The process goes vice versa on your friend’s side.

 This wrapping on each step is literally how protocols


work on the Internet:
Protocols
Networks are complex, with many “pieces”:
 Hosts, routers, links of various media, applications, protocols,
hardware and software

Layering of airline functionality

 a series of steps

layers: each layer implements a service


 via its own internal-layer actions
 relying on services provided by layer below
Internet & OSI protocol stack
 application: supporting network applications  presentation: allow applications to interpret
• FTP, SMTP, HTTP meaning of data, e.g., encryption, compression,
 transport: process-process data transfer machine-specific conventions
• TCP, UDP  session: synchronization, checkpointing,
 network: routing of datagrams from source recovery of data exchange
• IP, routing protocols  Internet stack “missing” these layers!
 link: data transfer between neighboring • these services, if needed, must be
network elements implemented in application.
• Ethernet, 802.111 (WiFi), PPP
 physical: bits “on the wire”
Application
Presentation
Application
Session
Transport
Transport
Network
Network
Link
Link
Physical
Physical
Internet Stack
TCP/IP:
OSI Model
+ Very successful protocols that worked well and thrived OSI: + Very influential model with clear concepts
− Weak model derived after the fact from protocols - Models, protocols and adoption all bogged down
by politics and complexity
message M
source
application
Encapsulation
segment Ht M transport
datagram Hn Ht M network
frame Hl Hn Ht M link
physical
Network encapsulation refers to the
link
process of wrapping data packets with
headers) as they traverse through physical
different layers of the TCP/IP model.
This encapsulation process occurs at switch
each layer of the networking stack as
data moves from the application layer
down to the physical layer for
transmission over a network.
destination Hn Ht M network
M application
Hl Hn Ht M link Hn Ht M
Ht M transport physical
Hn Ht M network
Hl Hn Ht M link router
physical
OSI & TCP/IP History
 Historically - two main models describing protocol layers. One of them is theoretical — the OSI model
and another is practical — TCP/IP model.

 There were a lot of possibilities and a lot of problems to solve in the telecommunication area in the 70-
80s. Two groups

 The first group believed that the development of the language should be an open process, with all the
criticism discussed and all the issues resolved. This group named the standard they were trying
to create — OSI, standing for Open Systems Interconnection.

• Another group started to develop and test


protocols on the network they already had. They
created TCP — Transmission Control Protocol,
and IP — Internet Protocol.

• This happened on January 1st, 1983. This is when


the Internet was born.

• After that TCP/IP started to gain popularity


because it simply worked. Also, it was a free-of-
charge model. OSI wanted to get money for each
usage of their standards.
TCP/IP
 The key protocols of TCP/IP are obviously TCP and IP.
 E.g. Two applications on the network want to communicate. One of them generates a message.
This message may be formatted using a protocol like HTTP, or not, it does not matter. The
message is generated in Application Layer.

• This message is passed to the Transport Layer, where it’s prepended with a TCP or a UDP
header.
• The header contains information about the ports those applications are using and some other
important information which we will describe later. The result of this prepending may be called
a datagram or a segment.
TCP/IP
 Then, the segment is passed to the Internet Layer. It is pretended with an IP header, which
contains the addresses of the computers that run the communicating applications. The
combination of a segment and an IP header is called a packet.
 There is no big difference between datagrams, segments and packets. Most of the time all
of them are called “packets.” The terms “datagram” and “segment” are used when it’s
important to highlight the type of the protocol handling the entity.

• Finally, the packet is passed to the Link Layer, where it’s encoded and transmitted over the
network. There are protocols on this level that also add their headers to each packet, and the
result of this addition is a frame.
TCP/IP
• Frames usually contain not only the header but also the footer. E.g. here’s what
an Ethernet frame for our message may look like:

• When the frame is passed from one intermediate node to another during the
communication, these nodes disassemble the frame, check the packet’s header,
decide what they should do with the packet, then create a new frame for the packet
and pass it to the next node.

• So, when the message is passed through nodes like this:


TCP/IP
 The underlying data flow looks like this:

• At the start and at the end of the packet path all the TCP/IP layers are
involved, while the intermediate nodes use only Internet and Network Access
layers
• Now we know that TCP/IP specifies the protocols of the Transport and
Internet Layers, but does not care about the protocols of the Application and
Link Layers. Let’s see what’s going on on the Transport layer in detail.
TCP & UDP
 The Transport Layer of TCP/IP stands on two main protocols: Transmission
Control Protocol and User Datagram Protocol. There are other protocols on this
layer (e.g. QUIC) but they are not so commonly used yet.

 The protocols of the Transport Layer are used to address the packet from the
source port to the destination port. Moreover, the protocols do not know about
the differences between nodes on the used network. Everything the protocols
know about addressing is the fact that the source application is bound to a port,
and the destination application is also bound to a port. The actual “Internet
addressing” is done by Internet Protocol.

 UDP is much “lighter” and simpler than TCP, but


at the same time, UDP is not reliable and does not
do much work compared to TCP. To see the
difference between these protocols, let’s start with
the User Datagram Protocol.
UDP
 This protocol is used for “connectionless communication,” which means that the
connection is not set up before the actual sending. One node sends packets to the
network addressing them to another node. The sender node does not ensure that the
recipient node exists or is ready to receive the packets. The sender node also does not
wait for confirmation that the recipient node has got the previous packets.

 The packets handled by UDP are sometimes called datagrams. The term usually
describes the packets sent using any connectionless communication. UDP header
contains 8 bytes of information that includes: Source port, Destination port, Length
and Checksum.

 A typical UDP datagram looks like this:


UDP Server using node.js
• It is easy to set up a UDP server on your own. Here is an example
written in Node.js right from the official docs.

const dgram = require('dgram’);


const server = dgram.createSocket('udp4’);

server.on('error', (err) => {


console.log(`error:\n${err.stack}`);
server.close();
});

server.on('message', (msg, rinfo) => {


console.log(`got a message from ${rinfo.address}:${rinfo.port}: ${msg}`);
});

server.on('listening', () => {
const address = server.address();
console.log(`listening ${address.address}:${address.port}`);
});

server.bind(8082);

• We start the server as follows


$ node udp.js server listening 0.0.0.0:8082
UDP Server using node.js
 Now we can use netcat to send datagrams from another terminal window:
NOTE: netcat (nc) is a computer networking utility for reading from and writing to
network connections using TCP or UDP. The command is designed to be a
dependable back-end that can be used directly or easily driven by other programs and
scripts. At the same time, it is a feature-rich network debugging and investigation tool,
since it can produce almost any kind of connection its user could need and has a number
of built-in capabilities. Its list of features includes port scanning, transferring files, and port
listening: as with any server, it can be used as a backdoor.

$ nc -u 127.0.0.1 8082
Hello, server!
Do you have a minute to talk about UDP?

Our server successfully handles the datagrams we have sent:

$ node udp.js
server listening 0.0.0.0:8082
server got a message from 127.0.0.1:55823: Hello, reader!
server got a message from 127.0.0.1:55823: Do you have a minute to talk about UDP?
UDP Server using node.js
 As you see netcat has bound itself to the port 55823 to send the packets.

The source port is 55823 as netcat picked. The destination port is 8082 as we set it.
The length is 48 bytes because the first 8 bytes are occupied by the header and the rest
is the message we sent. Finally, there is even some checksum set by netcat.
As you see, there is no answer from the UDP server in the Wireshark log, so the client
cannot be sure that the server actually got the datagrams. That is why UDP is used when
it is fine to lose messages, e.g. for video or audio streaming.
It is possible to use TCP for these purposes, but as you will see in a moment the usage
of TCP slows down media streaming.
Transmission Control Protocol
 While UDP is simple and connectionless,
TCP is complex and connection-oriented.
It means that before sending the data, the
client and the server establish the
connection — they agree on some sort
of settings they will use to communicate.

 Unlike datagrams in UDP, packets


handled by TCP are called segments. TCP
ensures the order of the packets, delivery
& controls the flow of packets to avoid
network congestion.

 That’s a lot of work, so the TCP header’s


size is at least 20 bytes. The header
includes: Source port, Destination port,
Sequence number, Acknowledgment
number, Header length (or “Data offset”),
9 control bits (or “Flags”), Window size,
Checksum, Urgent pointer & Options.

 Source port, the destination port and the


checksum are the same as in the UDP
header.
Transmission Control Protocol
 Let us set up a simple TCP server using Node.js (again, using the code from
the official docs):
const server = net.createServer(connection => {
console.log('client connected’);

connection.on('end', () => {
console.log('client disconnected’);
});
connection.write('Hello, client!\n’);
// 'connection' is a stream which we can pipe
// first we pipe to stdout to print messages from the client
connection.pipe(process.stdout);
// then we pipe to itself to force this stream to read itself
// making the incoming messages outcoming connection.pipe(connection);
});

server.on('error', (err) => {


console.log(`server error:\n${err.stack}`);
server.close();
});

server.listen(8082, () => {
const address = server.address();
console.log(`server listening ${address.address}:${address.port}`);
});
TCP Server
 The code earlier looks like the UDP server we created earlier, but instead
of straightforward handling of incoming messages, we operate a connection object.
This connection object allows us not only to print the messages we get, but also
to detect when a client is connecting or disconnecting, and to send some responses
back.

 Let’s start the server using this code:


$ node tcp.js server listening :::8082

Note: A double colon instead of a “usual” IP means that the server is bound to the
localhost using IPv6, but it does not matter for now.

 Now use netcat to start a TCP connection to the server from another terminal:
$ nc 127.0.0.1 8082 Hello, client!

 The string we’ve got here has come from the server when the connection has been
successfully established. Here’s what we have in the server logs:
$ node tcp.js server listening :::8082 client connected
TCP Server
As you see the server got a notification from the client and it knows that the client
exists, and this client is going to send something. So let us send:
$ nc 127.0.0.1 8082
Hello, client! # message from the server
Hello, server! # our message
Hello, server! # reply from the server
Hey, stop it! # our message
Hey, stop it! # reply from the server
We’ve written an echo server, which sends back everything it gets from us.
Close netcat by pressing Ctrl+C and check the server logs:
$ node tcp.js
server listening :::8082
client connected
Hello, server!
Hey, stop it!
client disconnected
There are two messages we sent earlier and the notification about the disconnection.
TCP Server
 So, how is it possible for the server to know about the connection state while
we have not sent anything yet? Here’s how all the connection looks there:
Handshake
 When a client wants to send data to a server, first they both should establish
a connection. This “establishing” is usually called handshaking.
 The handshake consists of three steps: 1. A client sends a packet called SYN
to the server. 2. The server sends a packet called SYN-ACK to the client. 3. The
client sends a packet called ACK to the server.
 The names are derived from the flags that are set in the TCP headers of these
packets. Here’s how the first packet looks in Wireshark:
Handshake
 As you see, one of the bit flags is set to 1. This flag is called “Syn,” standing
for “Synchronization”.

 TCP is a reliable protocol, which means that the sender is always notified
whether or not the recipient has got the packet. To implement this feature
TCP specifies special types of packets (such as SYN, ACK, etc) and every
TCP header contains two numbers: Sequence number and Acknowledgment
number.

 The sequence number refers to the amount of data that the sender of the
packet has sent so far. The sequence number is increased by 1 when SYN
or FIN flags are set, it’s also increased by the payload size when the payload
exists. The number does not include the current packet. Thus, the first packet
sent by the client always has a sequence number set to 0.

 The acknowledgment number refers to the amount of data that the sender
of the packer has received for far. It’s a mirroring of the sequence number
from the opposite side of the connection, but with one step ahead. Thus, the
first packet sent by the server has an acknowledgment number set to 1.
Handshake
 Those numbers are useful because
they help to maintain the state
of communication on both sides. Both
the server and the client expects to get
exact acknowledgment and sequence
numbers from the other side. When the
actual numbers are not the same
as expected, it means that there
is an error somewhere and someone
should retransmit the data.

 Here’s how the handshake looks in our


case -

 When the handshake is done, our


server knows that there is a client
ready to communicate, and the server
waits for this communication.
Data Transfer
 When the handshake is done, it is time to send a payload.

As you see in the log above, each piece of information sent by one end
is ACK-ed by the other using a separate segment.
It looks straightforward, but that is because our example is simple. In the real
world, there are a lot of problems: packages may be lost, the channel may be
congested, an error might occur, and so on. TCP handles all these situations.
Termination
 When one of the nodes is going to close the connection, it initiates a termination
using the FIN flag. Here is the termination in our Wireshark log:

Here, the termination has taken four segments, which is not like a handshake. It works this
way because when the connection is terminated, the other party (the server in our case)
must first notify the Application Layer about the termination.
When the app is ready to close it, then the TCP of the other party sends its FIN packet.
By the way, sometimes termination is triggered by the RST flag instead of FIN. Also, the
RST flag is used for the attack which prevents TCP connection between the nodes.
Back to Basics
 We now look at the Internet in a broader manner
Worlds Fastest & Slowest Internet Speeds
Worlds Fastest & Slowest Internet Speeds
A closer look at network structure:
 network edge: mobile network
• hosts: clients and servers
• servers often in data centers
global ISP
 access networks, physical media:
wired, wireless communication links
home
 network core: network
• interconnected routers regional ISP
• network of networks

Connect end systems to edge router….


 residential access nets
 institutional access networks (school,
company)
 mobile access networks
keep in mind: institutional
 bandwidth (bits per second) of access network
network?
 shared or dedicated?
Access network: digital subscriber line (DSL)
central office telephone
network

DSL splitter
modem DSLAM

voice, data transmitted DSL access ISP


at different frequencies over multiplexer
dedicated line to central office

 use existing telephone line to central office DSLAM


• data over DSL phone line goes to Internet &
voice over DSL line goes to phone net

Digital Subscriber Line (DSL) is a type of technology used to provide high-speed internet
access over traditional copper telephone lines. It works by utilizing the unused frequency
spectrum of the telephone line to transmit digital data. DSL technology allows for
simultaneous internet access and voice communication over the same line without interfering
with each other.
Access network: digital subscriber line (DSL)
Digital Subscriber Line (DSL) comes in various forms, including:

1. Asymmetric DSL (ADSL): This is the most common type of DSL, where the download
speed is faster than the upload speed. It's suitable for typical internet usage patterns where
users tend to download more data than they upload.

2. Symmetric DSL (SDSL): Unlike ADSL, SDSL offers the same upload and download
speeds. It's more suitable for businesses or applications where uploading large files or
data is essential.

3. Very-high-bit-rate DSL (VDSL): VDSL offers higher speeds compared to ADSL and
SDSL but is limited to shorter distances from the telephone exchange. It's often used in
densely populated urban areas where there's a demand for high-speed internet access.

DSL technology has been widely adopted due to its cost-effectiveness and the ability to
leverage existing telephone infrastructure for broadband internet access. However, its speed
and performance may be limited by factors such as the distance from the telephone
exchange, line quality, and interference from other electronic devices.
Access network: cable network
cable headend

cable splitter cable modem


modem CMTS termination system

data, TV transmitted at different


frequencies over shared cable ISP
distribution network

A cable network, in the context of telecommunications and television services, refers to a


system of delivering television programming to consumers via coaxial cables. This technology
is often used to provide high-speed internet access, telephone services, and television
programming to residential and commercial customers.
Frequency division multiplexing: different channels transmitted
in different frequency bands
 HFC: hybrid fiber coax
• asymmetric: Generally downstream transmission rate is x15 upstream transmission rate
 network of cable, fiber attaches homes to ISP router
• homes share access network to cable headend
• unlike DSL, which has dedicated access to central office
Wireless access networks
 shared wireless access network connects end system to router
• via base station aka “access point”

wireless LANs: wide-area wireless access


 within building (100 ft.)  provided by telco (cellular) operator,
 802.11b/g/n/ac (WiFi): 11, 54, 10’s km
450 Mbps transmission rate  between 1 and 10 Mbps
 3G, 4G: LTE, 5G

to Internet

to Internet
Host: sends packets of data
host sending function:
 takes application message
 breaks into smaller two packets,
chunks, known as packets, L bits each
of length L bits
 transmits packet into
access network at 2 1
transmission rate R R: link transmission rate
• link transmission rate, host
aka link capacity, aka
link bandwidth

packet time needed to L (bits)


transmission = transmit L-bit =
delay packet into link R (bits/sec)
Physical media
 bit: propagates between
transmitter/receiver pairs
 physical link: what lies twisted pair (TP)
between transmitter & receiver  two insulated copper wires
 guided media: • Category 5: 100 Mbps, 1
Gbps Ethernet
• signals propagate in solid
• Category 6: 10Gbps
media: copper, fiber, coax
 unguided media:
• signals propagate freely,
e.g., radio
Physical media: coax, fiber
coaxial cable: fiber optic cable:
 two concentric copper  glass fiber carrying light
conductors pulses, each pulse a bit
 bidirectional  high-speed operation:
 broadband: • high-speed point-to-point
• multiple channels on cable transmission (e.g., 10’s-100’s
Gbps transmission rate)
• HFC
 low error rate:
• repeaters spaced far apart
• immune to electromagnetic
noise
Physical media: radio
 signal carried in radio link types:
electromagnetic spectrum  terrestrial microwave
 no physical “wire” • e.g. up to 45 Mbps channels
 bidirectional  LAN (e.g., WiFi)
 propagation environment • 54 Mbps
effects:  wide-area (e.g., cellular)
• reflection • 4G cellular: ~ 10-50 Mbps
• obstruction by objects  satellite
• Kbps to 45Mbps channel (or
• interference multiple smaller channels)
• 270 msec end-end delay
• geosynchronous versus low
altitude
The network core
The term "network core" refers to the central
part of a telecommunications network where
the majority of data traffic is routed and
managed. It serves as the backbone of the
network, handling the transmission and
exchange of data between different nodes,
devices, and endpoints.

 mesh of interconnected
routers
 packet-switching: hosts break
application-layer messages
into packets
• forward packets from one router
to the next, across links on path
from source to destination
• each packet transmitted at full
link capacity
Packet-switching: store-and-forward

L bits
per packet

3 2 1
source destination
R bps R bps

 takes L/R seconds to transmit one-hop numerical


(push out) L-bit packet into example:
link at R bps
 store and forward: entire  L = 7.5 Mbits
packet must arrive at router  R = 1.5 Mbps
before it can be transmitted  one-hop transmission
on next link delay = 5 sec
 end-end delay = 2L/R (assuming
zero propagation delay) more on delay shortly …
Packet Switching: queueing delay, loss

R = 100 Mb/s C
A
D
R = 1.5 Mb/s
B
queue of packets E
waiting for output link

queuing and loss:


 if arrival rate (in bits) to link exceeds transmission rate of link
for a period of time:
• packets will queue, wait to be transmitted on link
• packets can be dropped (lost) if memory (buffer) fills up
Two key network-core functions
routing: determines source-
destination route taken by forwarding: move packets
packets from router’s input to
 routing algorithms appropriate router output

routing algorithm

local forwarding table


header value output link
0100 3 1
0101 2
0111 2 3 2
1001 1
1
011

destination address in arriving


packet’s header
Alternative core: circuit switching
Circuit switching is a networking technique used to establish a
dedicated communication path (or circuit) between two parties before
they can communicate. In a circuit-switched network, this path is
reserved exclusively for the duration of the communication session,
ensuring a consistent and continuous connection between the sender
and receiver.

end-end resources allocated to,


reserved for “call” between
source & dest:
 in diagram, each link has four circuits.
• call gets 2nd circuit in top link and
1st circuit in right link.
 dedicated resources: no sharing
• circuit-like (guaranteed)
performance
 circuit segment idle if not used by call
(no sharing)
 commonly used in traditional
telephone networks
Packet switching versus circuit switching
packet switching allows more users to use network…..
example:
 1 Mb/s link each user:
• 100 kb/s when “active”
• active 10% of time
N

…..
 circuit-switching:
• 10 users users
 packet switching: 1 Mbps link
• with 35 users, probability > 10 active at same
time is less than .0004 *

Is packet switching a “slam dunk winner?”


 great for bursty data
• resource sharing
• simpler, no call setup
 excessive congestion possible: packet delay and loss
• protocols needed for reliable data transfer, congestion control
 Q: How to provide circuit-like behavior?
• bandwidth guarantees needed for audio/video apps - still an unsolved problem
Internet structure: network of networks
Internet Service Providers (ISPs) are companies or organizations that
provide individuals, businesses, and other entities with access to the
Internet. They offer various services and connectivity options, allowing
users to connect to the Internet via different technologies such as dial-up,
DSL, cable, fiber-optic, wireless, and satellite. ISPs play a crucial role in
enabling users to access online resources, communicate with others, and
utilize web-based services

 End systems connect to Internet via access ISPs (Internet


Service Providers)
• residential, company and university ISPs
 Access ISPs in turn must be interconnected.
• so that any two hosts can send packets to each other
 Resulting network of networks is very complex
• evolution was driven by economics and national policies
 Let’s take a stepwise approach to describe current Internet
structure
Internet structure: network of networks
Question: given millions of access ISPs, how to connect them
together?

access
… access
net
access
net …
net
access
access net
net
access
access net
net


access access
net net

access
net
access
net

access
net
access
… net
access access …
net access net
net
Internet structure: network of networks
Option: connect each access ISP to every other access ISP?

access
… access
net
access
net …
net
access
access
net
… … net

access
access net
net

connecting each access ISP



to each other directly doesn’t


access access

net
scale: O(N2) connections. net

access
net
access
net

access
net
access

… net
access access …
net access net
net
Internet structure: network of networks
Option: connect each access ISP to one global transit ISP?
Customer and provider ISPs have economic agreement.

access
… access
net
access
net …
net
access
access net
net
access
access net
net


global
access
net ISP access
net

access
net
access
net

access
net
access
… net
access access …
net access net
net
Internet structure: network of networks
But if one global ISP is viable business, there will be competitors
….

access
… access
net
access
net …
net
access
access net
net
access
access net
net
ISP A


access
net ISP B access
net

access
net
ISP C
access
net

access
net
access
… net
access access …
net access net
net
Internet structure: network of networks
But if one global ISP is viable business, there will be competitors
…. which must be interconnected
Internet exchange point

access
access
access
net net …
net
access
access net
net

access
IXP access
net
net
ISP A


access
net
IXP ISP B access
net

access
net
ISP C
access
net

access
net
peering link
access
… net
access access …
net access net
net
Internet structure: network of networks
… and regional networks may arise to connect access nets to
ISPs

access
… access
net
access
net …
net
access
access net
net

access
IXP access
net
net
ISP A


access
net
IXP ISP B access
net

access
net
ISP C
access
net

access
net regional net
access
… net
access access …
net access net
net
Internet structure: network of networks
… and content provider networks (e.g., Google, Microsoft,
Akamai) may run their own network, to bring services, content
close to end users
access
… access
net
access
net …
net
access
access net
net

access
IXP access
net
net
ISP A


Content provider network
access
net
IXP ISP B access
net

access
net
ISP C
access
net

access
net regional net
access
… net
access access …
net access net
net
Internet structure: network of networks

Tier 1 ISP Tier 1 ISP Google

IX IX IX
P P P
Regional ISP Regional ISP

access access access access access access access access


ISP ISP ISP ISP ISP ISP ISP ISP

 at center: small # of well-connected large networks


• “tier-1” commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), national &
international coverage
• content provider network (e.g., Google): private network that connects it
data centers to Internet, often bypassing tier-1, regional ISPs
What bandwidth for streaming?
How do packet delay and loss occur?
 packets queue in router buffers, waiting for turn for transmission
 queue length grows when arrival rate to link (temporarily) exceeds output link
capacity
 packet loss occurs when memory to hold queued packets fills up
packet being transmitted (transmission delay)

B
packets in buffers (queueing delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
Introduction: 1-64
Packet delay: four sources
transmission
A propagation

B
nodal
processing queueing

dnodal = dproc + dqueue + dtrans + dprop

dproc: nodal processing dqueue: queueing delay


 check bit errors  time waiting at output link for
 determine output link transmission
 typically < microsecs  depends on congestion level of
router
Introduction: 1-65
Four sources of packet delay
1.Propagation Delay: This is the time it takes for the signal to travel over the
physical medium, such as copper wire, fiber-optic cable, or wireless
transmission. It depends on the distance between the sender and receiver and
the speed of the signal in the medium.
2.Transmission Delay: This is the time required to push all the bits of the packet
into the link. It depends on the data rate of the link and the size of the packet.
3.Processing Delay: This is the time it takes for the routers or switches along the
path to examine the packet header, make forwarding decisions, and possibly
perform other processing tasks such as error checking or quality of service
(QoS) handling.
4.Queueing Delay: When packets arrive at a router or switch faster than they can
be transmitted, they are placed into a queue. The time spent waiting in this
queue before transmission is called queueing delay.
5.Jitter: This refers to variations in packet delay caused by network congestion,
route changes, or other factors. Jitter can affect the smoothness of real-time
applications such as voice or video streaming.
Caravan analogy
100 km 100 km

ten-car caravan toll booth toll booth toll booth


(aka 10-bit (aka link)
packet)
 car ~ bit; caravan ~ packet; toll  time to “push” entire caravan
service ~ link transmission through toll booth onto
 toll booth takes 12 sec to service highway = 12*10 = 120 sec
car (bit transmission time)  time for last car to propagate
 “propagate” at 100 km/hr from 1st to 2nd toll both:
100km/(100km/hr) = 1 hr
 Q: How long until caravan is lined
up before 2nd toll booth?  A: 62 minutes

Introduction: 1-67
Caravan analogy
100 km 100 km

ten-car caravan toll booth toll booth


(aka 10-bit (aka router)
packet)

 suppose cars now “propagate” at 1000 km/hr


 and suppose toll booth now takes one min to service a car
 Q: Will cars arrive to 2nd booth before all cars serviced at first booth?
A: Yes! after 7 min, first car arrives at second booth; three cars still at
first booth

Introduction: 1-68
Packet queueing delay (revisited)
 a: average packet arrival rate

average queueing delay


 L: packet length (bits)
 R: link bandwidth (bit transmission rate)

L .a arrival rate of bits “traffic


:
R service rate of bits intensity” traffic intensity = La/R 1

 La/R ~ 0: avg. queueing delay small La/R ~ 0

 La/R -> 1: avg. queueing delay large


 La/R > 1: more “work” arriving is
more than can be serviced - average
delay infinite!
La/R -> 1
Introduction: 1-69
“Real” Internet delays and routes
 what do “real” Internet delay & loss look like?
 traceroute program: provides delay measurement from source
to router along end-end Internet path towards destination.
For all i:
• sends three packets that will reach router i on path towards
destination (with time-to-live field value of i)
• router i will return packets to sender
• sender measures time interval between transmission and reply

3 probes 3 probes

3 probes

Introduction: 1-70
Real Internet delays and routes
traceroute: gaia.cs.umass.edu to www.eurecom.fr
3 delay measurements from
gaia.cs.umass.edu to cs-gw.cs.umass.edu
1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms 3 delay measurements
2 border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145) 1 ms 1 ms 2 ms
3 cht-vbns.gw.umass.edu (128.119.3.130) 6 ms 5 ms 5 ms to border1-rt-fa5-1-0.gw.umass.edu
4 jn1-at1-0-0-19.wor.vbns.net (204.147.132.129) 16 ms 11 ms 13 ms
5 jn1-so7-0-0-0.wae.vbns.net (204.147.136.136) 21 ms 18 ms 18 ms
6 abilene-vbns.abilene.ucaid.edu (198.32.11.9) 22 ms 18 ms 22 ms
7 nycm-wash.abilene.ucaid.edu (198.32.8.46) 22 ms 22 ms 22 ms trans-oceanic link
8 62.40.103.253 (62.40.103.253) 104 ms 109 ms 106 ms
9 de2-1.de1.de.geant.net (62.40.96.129) 109 ms 102 ms 104 ms
10 de.fr1.fr.geant.net (62.40.96.50) 113 ms 121 ms 114 ms
11 renater-gw.fr1.fr.geant.net (62.40.103.54) 112 ms 114 ms 112 ms looks like delays
12 nio-n2.cssi.renater.fr (193.51.206.13) 111 ms 114 ms 116 ms decrease! Why?
13 nice.cssi.renater.fr (195.220.98.102) 123 ms 125 ms 124 ms
14 r3t2-nice.cssi.renater.fr (195.220.98.110) 126 ms 126 ms 124 ms
15 eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135 ms 128 ms 133 ms
16 194.214.211.25 (194.214.211.25) 126 ms 128 ms 126 ms
17 * * *
18 * * * * means no response (probe lost, router not replying)
19 fantasia.eurecom.fr (193.55.113.142) 132 ms 128 ms 136 ms

* Do some traceroutes from exotic countries at www.traceroute.org


Introduction: 1-71
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
buffer
(waiting area) packet being transmitted
A

B
packet arriving to
full buffer is lost

* Check out the Java applet for an interactive animation (on publisher’s website) of queuing and loss
Introduction: 1-72
Throughput
 throughput: rate (bits/time unit) at which bits are being sent from
sender to receiver
• instantaneous: rate at given point in time
• average: rate over longer period of time

link capacity
pipe that can carry linkthat
pipe capacity
can carry
serverserver,
sendswith
bits Rsfluid at rate
bits/sec Rfluid at rate
c bits/sec
(fluid)
fileinto
of Fpipe
bits (Rs bits/sec) (Rc bits/sec)
to send to client
Introduction: 1-73
Throughput
Rs < Rc What is average end-end throughput?

Rs bits/sec Rc bits/sec

Rs > Rc What is average end-end throughput?

Rs bits/sec Rc bits/sec

bottleneck link
link on end-end path that constrains end-end throughput
Introduction: 1-74
Throughput: network scenario
 per-connection end-end
Rs throughput:
Rs Rs min(Rc,Rs,R/10)
 in practice: Rc or Rs is
R often bottleneck
Rc Rc
Rc
* Check out the online interactive exercises for more
examples: http://gaia.cs.umass.edu/kurose_ross/

10 connections (fairly) share


backbone bottleneck link R bits/sec
Introduction: 1-75
Network security
 field of network security:
• how bad guys can attack computer networks
• how we can defend networks against attacks
• how to design architectures that are immune to attacks
 Internet not originally designed with (much) security in mind
• original vision: “a group of mutually trusting users attached to a
transparent network”
• Internet protocol designers playing “catch-up”
• security considerations in all layers
• Side channel attacks

 malware can get in host from:


• virus: self-replicating infection by receiving 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
Bad guys: packet interception
packet “sniffing”:
 broadcast media (shared Ethernet, wireless)
 promiscuous network interface reads/records all packets (e.g.,
including passwords!) passing by

Wireshark software used for our end-of-chapter labs is a (free) packet-sniffer


Introduction: 1-77
Bad guys: fake identity
IP spoofing: injection of packet with false source address

Introduction: 1-78
Bad guys: denial of service
Denial of Service (DoS): attackers make resources (server,
bandwidth) unavailable to legitimate traffic by
overwhelming resource with bogus traffic

1. select target
2. break into hosts
around the network
(see botnet)
target
3. send packets to target
from compromised
hosts
Introduction: 1-79
Lines of defense:
 authentication: proving you are who you say you are
• cellular networks provides hardware identity via SIM card; no such
hardware assist in traditional Internet
 confidentiality: via encryption
 integrity checks: digital signatures prevent/detect tampering
 access restrictions: password-protected VPNs
 firewalls: specialized “middleboxes” in access and core
networks:
 off-by-default: filter incoming packets to restrict senders, receivers,
applications
 detecting/reacting to DOS attacks
… lots more on security (throughout, Chapter 8) Introduction: 1-80
Wireshark in Labs

application
(www browser,
packet
email client)
analyzer
application

OS
packet Transport (TCP/UDP)
capture copy of all Network (IP)
Ethernet
Link (Ethernet)
(pcap) frames
sent/receive Physical
d

https://www.wireshark.org/
Today’s Lab
Protocol Layers - Wireshark Network Packet Sniffing Word version
Command Line Tools - Ping, IPconfig, NSlookup and more.

Week 1 Supplementary Tutorials


Web Page Load Test - Run a diagnostic on www.ulster.ac.uk to see resource
loading waterfall charts, Page Speed optimization checks and suggestions for
improvements.
Web Page Load Comparison - Compare 2 sites such
as www.ulster.ac.uk and www.qub.ac.uk to see how optimised they are.

You might also like