You are on page 1of 37

ELEC1010 Electronic & Information Technology

Chapter 6 - Computer Networks


and the Internet

P.1
Topics in this Chapter
• What’s the Internet?

• What’s a protocol?

• Network core: circuit/packet switching

• Content Distribution Networks

• Peer-to-Peer Networks

*Many slides and contents in Chapter 6 are adapted from ppt slides (in
substantially unaltered form) available from “Computer Networking: A Top-Down
Approach,” 4th edition, by Jim Kurose and Keith Ross, Addison-Wesley, July 2007.

P.2
Lecture 21 - Nuts and bolts view of
the Internet

3
What’s the Internet: “nuts and bolts” view
• The public Internet is a world-wide
computer network. It is a network that
interconnects billions of computing
devices throughout the world.
• The interconnected computing
devices include: PCs, UNIX-based
workstations, PDAs, TVs, cell phones,
automobiles, environmental sensing
devices, home electrical and security
systems, webcam servers, etc.

IP picture frame World’s smallest web server Web-enabled


http://www.ceiva.com/ http://www-ccs.cs.umass.edu/~shri/iPic.html toaster+weather forecaster 4
What’s the Internet: “nuts and bolts” view
• All the devices that are interconnected to the network are
called hosts or end systems.
• End systems are connected together by communication
links.
• Communication links are made up of different types of
physical media, including coaxial cables, copper wires,
fiber optics and radio spectrum.
• Different communication links can transmit data at different
rates, with the transmission rate of a link measured in
bits/second.
• Routers forward packets (chunks of data).

5
What’s a protocol?
• End systems and other pieces of the Internet run
protocols (sets of rules) that control the sending and
receiving of information within the Internet.
• Protocols define format, order of messages sent and
received among network entities, and actions taken on
message transmission/receipt.

6
The Network Core
• The network core is the mesh
of routers that interconnected
the Internet’s end systems.

• There are two fundamental


approaches to building a
network core: circuit switching
and packet switching.

7
Network Core: Circuit Switching
• The resources needed along a
path to provide for communication
between the end systems are
reserved for the duration of the
communication session.

• Reserves a constant transmission


rate in the network’s link for the
duration of the connection.

• Performance is guaranteed.

• Requires call setup.

8
Network Core: Circuit Switching
• First establish a circuit
between end points Caller
– E.g., done when you
dial a phone number
– Message propagates
from the caller towards
the callee, establishing (1)
some states in each Establish
switch

• Then, end systems send (2) DATA


data (“talk”) to each other Communicate

• After call, tear down (close)


circuit (3) Tear down
– Remove state

P.9
Network Core: Packet Switching
• Resources are not reserved; a session’s messages use
the resources on demand, and as a consequence, may
have to wait (that is, queue) for access to a
communication link.
• Long messages are broken into chunks of data known
as packets.
• Each packet contains control information in a header.
• Control information includes:
– Destination address Header Data

– Source address
– Size of messages, etc

10
Network Core: Packet Switching
• Most packet switches use store-and-forward transmission
at the inputs to the links.
• Store-and-forward means that the switch must receive the
entire packet before it can begin to transmit the first bit of
the packet onto the outbound link.
• Store-and-forward packet switches introduce a store-and-
forward delay at the input to each link along the packet’s
route.
• The store-and-forward delay
= the length of a packet L bits / outbound link transmission rate R bps

Note: This formula will be given during


the final exam.

11
Packet Switching: Statistical Multiplexing

100 Mb/s C
A Ethernet statistical multiplexing

100 Mb/s
B
queue of packets
waiting for output
link

D E

Sequence of A & B packets does not have fixed pattern, bandwidth shared
on demand  statistical multiplexing (first-come first-served).

P.12
Summary of Lecture 21
• We have discussed the nuts and bolts of the Internet.
• Protocols define format, order of messages sent and
received among network entities, and actions taken on
message transmission/receipt.
• Circuit switching reserves a constant transmission rate in
the network’s link for the duration of the connection.
• Packet switching uses the network resources on demand,
and as a consequence, may have to wait (that is, queue)
for access to a communication link. Long messages are
broken into chunks of data known as packets.
• Due to much less queuing delay, packet switching is
much more efficient than circuit switching for transferring
data.
13
ELEC1010 Electronic & Information Technology

Lecture 22 - Content Distribution


Networks & Peer-to-Peer Networks

14
Content Distribution Networks (CDNs)
• Clients may be far from servers, with many Internet
Service Providers (ISPs) in between
– increasing the likelihood of significant delay and loss.
• Popular contents, such as hit MP3 songs, videos, etc., will
likely be sent many times through the same ISPs (and
over the same communication links)
– consuming significant bandwidth to send the same info.
• Content Distribution Networks (CDNs) provide an
approach to alleviate the above two issues.

15
Recalled a world-wide computer network:

Mesh of routers
from WAN of
other regions

16
Content distribution networks (CDNs)
origin server
• The content providers are in North America
the CDN customers.
• CDN company’s services:
– installs hundreds of servers CDN distribution node
throughout the Internet
– places servers in a data
center close to ISP access
networks & the clients
– replicates its customer’s
CDN server
content in the CDN servers in S. America
CDN server
CDN server
in Asia
– server content is refreshed in Europe
whenever a customer
updates its content
17
Content distribution networks (CDNs)
• When a client requests origin server
content, the content is in North America

provided by the CDN


server that can best
deliver the content to the CDN distribution node

specific client.
• This server may be the
closest or has the least
congested path to the
client. CDN server
CDN server
CDN server
in S. America in Asia
in Europe

18
Content distribution networks (CDNs)
www.youtube.com

origin server
in North America
Congested

CDN distribution node

Not congested
Client in
Hong Kong

CDN server CDN server


in S. America CDN server
in Asia
in Europe

19
CDNs advantages:

1. Improving delivery time


– distributing contents closer to clients
2. Reducing bandwidth cost
– reducing the amount of data origin servers it must
provide
3. Increasing content availability
– distributed nature can handle more traffic and
withstand better hardware failure
4. Improving security
– providing additional security measure (i.e security
certificate, ….)

20
Peer-to-Peer Networks (P2P)
• A peer-to-peer (or P2P) computer network is a network
that relies primarily on the computing power and
bandwidth of the participants in the network rather than
concentrating it in a relatively few servers.
• Examples
Communications -- Skype
File sharing -- BitTorrent

21
Peer-to-Peer Networks (P2P)

1. PC to PC – Do NOT involve central servers

2. Exploit resources at the edge of the Internet:


- storage and content
- computing power
- bandwidth

3. Resources at the edge of the Internet can have


intermittent connectivity, being added or
removed

P.22
Peer-to-Peer Networks – QQ
• QQ is a powerful online platform for chatting, gaming, shopping, as
well as space and microblog …

P.23
Peer-to-Peer Networks – QQ

Client A connects to Server Client B connects to Server


Server

Once Client A and Client B


are connected, the data will
be transferred directly
Client A Client B
between A and B, rather
than through the server

Client.Server Client.Server

Client.Client Client.Client

P.24
Internet Services -- VoIP
• Voice over Internet Protocol, also called VoIP, IP Telephony,
Internet telephony, Broadband telephony, Broadband Phone
and Voice over Broadband is the routing of voice conversations
over the Internet or through any other IP-based networks.

P.25
VoIP (How it works)
Gateways allow
PCs to also reach
Public Switched phones
Telephone Network
PSTN
Initially, PC/phone to (HK)
PC/phone voice calls Gateway
over the Internet

Multimedia
Smart phone PC
IP Network
Gateway
Multimedia
PC Smart phone

…or phones to
PSTN
reach phones
(NY)

P.26
Skype – a proprietary VoIP
• Skype is a proprietary peer-to-peer Voice over IP (VoIP) network

• The Skype communications system is notable for its broad range of


features, including free voice and video conferencing.

P.27
P2P Services -- BitTorrent
• BitTorrent is the name of a peer-to-peer (P2P) file
distribution protocol, and is the name of a free software
implementation of that protocol.
• In 2002, B. Cohen debuted BitTorrent.
Key Motivations:
– E.g. CNN on 9/11, new movie/game release
– Focused on Efficient Downloading, not Searching
• Distribute the same file to all peers
• Single publisher, multiple downloaders
• BitTorrent is designed to distribute large amounts of data
widely without incurring the corresponding consumption in
costly servers and bandwidth resources.

P.28
BitTorrent – peer-to-peer file sharing

BitTorrent greatly reduces the load on “seeders,” because clients generally


download the file from each other. The colored bars beneath all of the clients
represent individual pieces of the file. After the initial pieces are transferred
from the seed, the pieces are individually transferred from client to client.
This demonstrates how the original seeder only needs to send out one copy
of the file for all the clients to receive a copy.
P.29
BitTorrent: Mechanism
• File is broken into blocks
– Typically each block is 256 KB
– Upload blocks while downloading blocks
• Block selection
– Select the rarest block in the beginning if there are
multiple sources with different number of blocks
– After that, select random blocks
• “Tit-for-tat”
– “I’ll share with you if you share with me”
– BT uploads to at most four peers
– Among uploaders, upload to the four that are
downloading to you at the highest rates
– A little randomness to avoid permanent starvation!
P.30
BitTorrent: Download

Seed

P.31
What is Bitcoin?
• an open-source software released in 2009
• credited as the world’s first cryptocurrency (digital
currency in which encrypted techniques are used)
• uses a P2P decentralized network (no central authority
between transactions)
• it is an unregulated and nongovernment digital currency.

Bank

C2S centralized network P2P decentralized network


https://www.researchgate.net/publication/323491592_The_Blockchain_as_a_Decentralized_Security_Framework_Future_Directions
P.32
What is Bitcoin?
- transfer bitcoins via a P2P network
- transfers are tracked on a blockchain
- each “block” in the chain is built up of a data structure
to protect the data and avoid double-spending
- data in the blocks is indelible
Blockchain

Block 1 Block 2 Block 3


index: 1 index: 2 index: 3
Timestamp: 17:15 1/1/2017 Timestamp: 17:17 1/1/2017 Timestamp: 17:19 1/1/2017
https://www.investope Data: “block1data” Data: “block2data” Data: “block3data”
hash: 0xea34….55 hash: 0x16e1…e1 hash: 0x9435….b1
dia.com/terms/b/block previous Hash: 0 previous Hash: 0xea34….55 previous Hash: 0x16e1…e1
chain.asp
P.33
How does Blockchain work?
A wants to send money to B
A wants to The transaction is The block is Those in the The block then can be
send money to represented online broadcasted to network approve added to the existing
B. as a ‘block’. every party in the transaction is Blockchain, which
the peer-to-peer valid. provides an indelible
network. and transparent record
of transactions.

The money
moves from
A to B.

https://aid.technology/could-blockchain-technology-help-the-worlds-poor/

P.34
Summary of Lecture 22
• Content Distribution Networks (CDNs) provide contents
to a client through a CDN server that is the closest or
has the least congested path to the client.

• A peer-to-peer (P2P) computer network is a PC/mobile


device-to-PC/mobile device network that relies primarily
on the computing power and bandwidth of the
participants in the network. Examples include QQ,
Skype, BT and Bitcoin.

35
Intended Learning Outcomes
• On successful completion of this course, you will be able
to
– Recognize the key technological developments of
electronic and information technology
– Identify the fundamental principles related to
electronic and information technology
– Use MS Excel to solve simple engineering problems
– Acquire engineering knowledge on up-to-date
electronic and information technology

P.36
36
Online Final Exam (50 minutes)

• Closed book / notes


• Cover all lectures, tutorials & homework
• Similar to mid-term exam
• Online

37

You might also like