06-Network Layer
06-Network Layer
the Internet
IT064IU - INTRODUCTION TO COMPUTING
SUMMER 2021
Instructor: Le Duy Tan, PhD
Email: [email protected]
1
Networking and the Internet
1. Network Fundamentals
2. The Internet
3. The World Wide Web
4. Internet protocols
5. Security
2
1. Network Fundamentals
3
Networking
• Computer network : A collection of computing devices connected so
that they can communicate and share resources
• Wireless: A network connection made without physical wires
• Node (host): Any addressable device attached to a network
• Data transfer rate (bandwidth): The speed with which data is moved
from one place to another on a network
• Protocol: A set of rules that defines how data is formatted and
processed on a network
Network Client/server model: A distributed approach in which a
Model client makes requests of a server and the server responds
P2P model: A decentralized approach that shares resources
and responsibilities among many “peer” computers
File server
Web server
Peer to Peer model Client/server model 4
Types of Networks
• Local-area network (LAN): A network connecting a small number of
nodes in a close geographic area: Wired/Wireless
• Wide-area network (WAN): A network connecting two or more local-
area networks
Gateway: A node that handles communication between its LAN
and other networks
• Metropolitan-area network (MAN): A network infrastructure
developed for a large city
• Internet: A wide-area network that spans the planet
Network topologies 6
Connecting Networks
• Repeater: A network device that strengthens and propagates a signal
along a long communication line. Extends a network
• Bridge: Connects two compatible networks
• Switch: Connects several compatible networks
• Router: A network device that directs a packet between networks
toward its final destination. Connects two incompatible networks
resulting in a network of networks called an internet
Router
Bridge
Switch
7
Building a large bus network from smaller
ones
8
Routers connecting two WiFi networks and an
Ethernet network to form an internet
9
Internet Connections
Who owns the Internet? - No one.
Internet service provider (ISP): An organization providing access to the
Internet. For example, VNPT, Viettel, FPT, etc.
Packet switching The approach to network communication in which
packets are individually routed to their destination, then reassembled
10
Package-shipping example
11
Open Systems
Open system A system that is based on a common model of network
architecture and an accompanying suite of protocols
Open Systems Interconnection (OSI) Reference Model: A seven-layer
logical breakdown of network interaction to facilitate communication
standards
12
Network Protocols
Ethernet: A network communication protocol that is integrated into
most personal computers
Protocol stack: Layers of protocols that build and rely on each other
Ping: A program used to test whether a particular network computer is
active and reachable
13
2. The Internet
14
mobile network
global ISP
home
network
regional ISP
institutional
network
16
Internet Architecture
Internet Service Provider (ISP)
o Tier-1
o Tier-2
17
Internet Addressing
A hostname is a unique identification that specifies a particular
computer on the Internet. Hostnames are generally readable
words separated by dots.
Eg: tuoitre.vn
hcmiu.edu.vn
hcmvnu.edu.vn
IP address: pattern of 32 or 128 bits often represented in dotted
decimal notation
• Example: 148.78.250.12
18
Domain Name System
Domain name: The part of a hostname that specifies a specific
organization or group
Top-level domain (TLD): The last section of a domain name,
specifying the type of organization or its country of origin
ICANN (Internet Corporation for Assigned Names and Numbers)
is the international authority that manages TLD names.
it.hcmiu.edu.vn
it hcmiu edu vn
subdomain organization top-level domain (.vn Country Code TLD)
19
Basic Internet Applications
• Network News Transfer Protocol (NNTP)
• File Transfer Protocol (FTP)
• Telnet and SSH
• Hypertext Transfer Protocol (HTTP)
• Electronic Mail (email)
o Domain mail server collects incoming mail and transmits
outing mail
o Mail server delivers collected incoming mail to clients via
POP3 or IMAP
POP Workflow IMAP Workflow
• Connect to server. • Connect to server.
• Retrieve all mail. • Fetch user requested content and cache it locally, e.g. list of
• Store locally as new new mail, message summaries, or content of explicitly
mail. selected emails.
• Delete mail from • Process user edits, e.g. marking email as read, deleting email,
server*. etc.
• Disconnect. • Disconnect. 20
HTTP overview
HTTP: hypertext transfer protocol
• Web s application layer protocol
• client/server model
◦ client: browser that requests, HT
TP
receives, (using HTTP req
protocol) and displays Web PC running HTT uest
objects Firefox browser Pr
esp
ons
◦ server: Web server sends e
(using HTTP protocol) objects t
in response to requests u es
r eq e server
P
Any information transmitted over HT
T
s po
ns
running
this network via HTTP is not T P r e Apache Web
private, so any credit card data HT server
and sensitive information should
not be submitted if you are on an iphone running
HTTP page. Safari browser
HTTPS: hypertext transfer
protocol secure and is the
encrypted version of HTTP 2-21
3 The World Wide Web
22
World Wide Web
World Wide Web (Web): An infrastructure of information and the
network software used to access it
Hypertext combines internet technology with concept of linked-
documents
o Embeds hyperlinks to other documents
23
A typical URL
Uniform Resource Locator (URL): A standard way of specifying the
location of a web page
24
Hypertext Markup Language (HTML)
Hypertext Markup Language (HTML) The language used to create or
build a web page
Encoded as text file
HTML5 is the newest HTML standard, with a streamlined tag system
and support for dynamic content
Contains tags to communicate with browser
◦ Appearance
• <h1> to start a level one heading
• <p> to start a new paragraph
◦ Links to other documents and content
• <a href = . . . >
◦ Insert images
• <img src = . . . >
25
A simple webpage (1/2)
26
A simple webpage (2/2)
27
An enhanced simple webpage (1/2)
28
An enhanced simple Web page (2/2)
29
HTML and CSS
HTML tags indicate what the
HTML
information is (such as a
paragraph, an image, or a list)
The style information defined by
CSS (Cascading Style Sheets)
indicates how you want that
information to be displayed (such CSS
as centered text, a border around
an image, or a background color)
Link:
https://www.w3schools.com/css/tr
yit.asp?filename=trycss_default
HTML
30
HTTP request message HTTP request
Firefox browser
HTTP request message: server
running
◦ ASCII (human-readable format) Apache Web
server
carriage return character
line-feed character
request line
(GET, POST, GET /index.html HTTP/1.1\r\n
HEAD commands) Host: www-net.cs.umass.edu\r\n
User-Agent: Firefox/3.6.10\r\n
Accept: text/html,application/xhtml+xml\r\n
header Accept-Language: en-us,en;q=0.5\r\n
lines Accept-Encoding: gzip,deflate\r\n
Accept-Charset: ISO-8859-1,utf-8;q=0.7\r\n
carriage return, Keep-Alive: 115\r\n
line feed at start Connection: keep-alive\r\n
\r\n
of line indicates
end of header lines
31
HTTP response message HTTP request
HTTP response
PC running
status line Firefox browser server
(protocol running
status code HTTP/1.1 200 OK\r\n Apache Web
status phrase) Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n server
Server: Apache/2.0.52 (CentOS)\r\n
Last-Modified: Tue, 30 Oct 2007 17:00:02
GMT\r\n
header ETag: "17dc6-a5c-bf716880"\r\n
Accept-Ranges: bytes\r\n
lines Content-Length: 2652\r\n
Keep-Alive: timeout=10, max=100\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html; charset=ISO-8859-
1\r\n
\r\n
data, e.g., data data data data data ...
requested
HTML file
32
HTTP response status codes
Status code appears in 1st line in server-to-client
response message.
Some sample codes:
200 OK
◦ request succeeded, requested object later in this msg
301 Moved Permanently
◦ requested object moved, new location specified later in this msg
(Location:)
400 Bad Request
◦ request msg not understood by server
404 Not Found
◦ requested document not found on this server
505 HTTP Version Not Supported
33
4 Internet Protocols
34
mobile network
global ISP
home
network
regional ISP
institutional
network
35
Internet Layers – TCP/IP Model
qApplication: Constructs message with address
qTransport: Chops message into packets
qNetwork: Handles routing through the
Internet
qLink: Handles actual transmission of packets
37
TCP/IP Protocol
Transport Layer
Suite
oTransmission Control Protocol (TCP)
oUser Datagram Protocol (UDP)
Network Layer
oInternet Protocol (IP)
• IPv4: 32 bits (4 bytes) IP Address, 192.168.1.10
• IPv6: 128 bits (16 bytes) IP Address,
2001:0db8:0000:0000:0000:8a2e:0370:7334 38
Choosing between TCP and UDP
40
5. Security
41
Security
Attacks
o Malware (viruses, worms, Trojan horses, spyware, phishing
software)
o Denial of service (DoS)
o Spam
Protection
o Firewalls
o Spam filters
o Proxy Servers
o Antivirus software
44
Security
Attacks
o Malware (viruses, worms, Trojan horses, spyware, phishing
software)
o Denial of service (DoS)
o Spam
Protection
o Firewalls
o Spam filters
o Proxy Servers
o Antivirus software
47
Public-key encryption
HTTPS uses protocol secure socket layer (SSL)
Public-key Encryption
oPublic key: Used to encrypt messages
oPrivate key: Used to decrypt messages
Trusted sites called Certificate authorities (CA) maintain
accurate lists of parties and their public keys
48
Quiz
1. What is digital signatures? Which key (public or private) is used to
create a digital signature? Please explain?
2. What is phishing? How are computers secured against it?
49