Supplementary Notes

advertisement
Ch. 10 – Internet and Internet Technology
Supplementary Notes
What is Internet?
 “The Internet is a global network of interconnected computers which enables users to share
information along multiple channels.” (Wikipedia)
 “Inter” and “Net”: The Internet is a network of networks. LANs at different places are
connected together by routers.
 Watch “History of the Internet” at YouTube:
http://www.youtube.com/watch?v=9hIQjrMHTv4&fmt=22
 More history: http://en.wikipedia.org/wiki/History_of_the_Internet
 Internet = World Wide Web?
NO! Internet is the network while (WWW) is a service running on the Internet.
Connecting to the Internet (pp.8-12)
 Internet Service Provider (ISP) provides Internet access service for users and organizations.
 Internet access:
 Dial-up:
Modem = modulator
and demodulator
 Data is sent as analog signal (sound) through telephone line.
 Dialup modem is needed for digital-to-analog and analog-to-digital conversion of
signals. Modem may be internal or external (connected to serial port or USB).
 The theoretical highest bandwidth is 56kbps (bit per second).
 Broadband:
 Using telephone network (ADSL technology), cable TV network, or optical fiber

network (Fiber to building or home).
 Network interface card (NIC) is needed.
 Special modem, such as ADSL modem or cable modem, may be needed.
 Typical (downstream) bandwidths (unit: Mbps) are 1.5, 3, 6, 8, 10, 100, etc.
 Note: upstream bandwidth for ADSL is lower (“A” for “Asymmetric”), e.g. 512kbps.
(More download than upload in normal use of the Internet)
Wireless:
 Through wireless LAN (Wi-Fi) or mobile phone network (e.g. GPRS or 3G
technology).
 Wireless NIC or mobile network adapter is needed.


The bandwidth is low compared to wired broadband, but higher than dial-up
connection. Wireless connection may be less stable than wired connection.
Free services (Time-limited):
 GovWiFi (Government Wi-Fi Programme/香港政府 Wi-Fi 通)
http://www.gov.hk/en/theme/wifi/
 Location limited (near “Hot Spot” where access point is installed).
 Connection maybe insecure without encryption (signals may be captured)
Ref: http://en.wikipedia.org/wiki/Internet_access

Others: Leased line, T-carrier, etc.
S4 CIT Ch.10 Supplementary Notes
P.1/6
Ch. 10 – Internet and Internet Technology
Supplementary Notes
Transferring Data on the Internet
 Network Models (for background knowledge only):

The Open Systems Interconnection Reference Model (OSI Reference Model) is an
abstract description for layered communications and computer network protocol design.
Ref: http://en.wikipedia.org/wiki/Osi_model

The TCP/IP model is a description framework for computer network protocols:
Application Layer
Transport Layer
Internet Layer
Link Layer
FTP
HTTP
SMTP
DNS
TCP
DNS
TFTP
UDP
IP (Internet Protocol)
Connection between two nodes
Example:
Data Encapsulation in UDP Transmission
Ref: http://en.wikipedia.org/wiki/TCP/IP_model
 Protocol is an agreed format for transmitting data between two nodes.
Ref: http://webopedia.internet.com/TERM/p/protocol.html
 Different protocols:

Internet Protocol (IP):
IPv4 – 32 bits
 For communicating data across a packet-switched inter-network IPv6 – 128 bits
 Data are stored in packets for delivery between nodes.
 Transmission based on IP address (Source IP and Destination IP in packet header).
Ref: http://en.wikipedia.org/wiki/Internet_protocol

“TCP/IP” – TCP over IP
Transmission Control Protocol (TCP):
 Connection-oriented: Connection is established before data is transmitted.
 Data are divided into packets for transmission.
 Ordered data transfer, retransmission of lost packets and discarding duplicate packets
 Error-free data transfer (checksum for error detection; re-transmit if error found)
 Flow control; Congestion control
Ref: http://en.wikipedia.org/wiki/Transmission_Control_Protocol
S4 CIT Ch.10 Supplementary Notes
P.2/6
Ch. 10 – Internet and Internet Technology
Supplementary Notes

User Datagram Protocol (UDP):
 Connectionless: Unreliable (delivery not guaranteed), Not ordered, Lightweight.
Ref: http://en.wikipedia.org/wiki/User_Datagram_Protocol

Other application protocols: HTTP, FTP, NNTP, SMTP, POP, IMAP, …
Each application protocol corresponds to a certain kind of application on the Internet.

Some standard services on the Internet use dedicated port for connection:
Protocol
HTTP
HTTPS
FTP
SMTP
Port
80
443
20,21
25
POP / POP3 110
IMAP / IMAP4 143
NNTP
119
DNS
53
NTP
123
Full Name
HyperText Transfer Protocol
HTTP over TLS/SSL
File Transfer Protocol
Simple Mail Transfer Protocol
Post Office Protocol (ver. 3)
Internet Mail Access Protocol
Network News Transfer Protocol
Domain Name System
Network Time Protocol
Description
For World Wide Web service
Secure channel for WWW
For file transfer
To deliver email
To retrieve email from server
To retrieve from and manage email at server
To post, distribute and retrieve news
For translation of domain name to IP address
For time synchronization
Ref: http://en.wikipedia.org/wiki/TCP_and_UDP_port_numbers
Internet services will be discussed in Ch.11.
IP Address and Domain Name
 IP Address is a 32-bit number, normally expressed as four numbers, each ranging from 0 to
255, separately by periods (dots, full stops). IP address on Internet is unique / IP address can
uniquely identify a host on the Internet.
 For example, 143.89.14.34  10001111 01011001 00001101 00100010
 Number of combinations = 232 = 4,294,967,296, BUT not every address can be used.
For example, host ID being all “0” or all “1” (see below).
 An IP address is divided into two parts: network ID and host ID. A subnet mask (or netmask)
is required to determine how many bits are network ID (and the remaining are host ID)
Example: A computer has an IP address 172.89.113.74, and a subnet mask of 255.255.255.0.
(It may be written as “172.89.113.74/255.255.255.0” or “172.89.113.74/24”).
172
255
10101100
11111111
10101100
00000000
IP Address (decimal)
Subnet mask (decimal)
IP Address (binary)
Subnet mask (binary)
Network/Subnet ID (binary)
Host ID (binary)
89
255
01011001
11111111
01011001
00000000
113
255
01110001
11111111
01110001
00000000
74
0
01001010
00000000
00000000
01001010
Thus, The network/subnet ID is 172.89.113.0, and the host ID is 0.0.0.74. More examples:
IP Address
143.89.14.34
172.63.100.4
10.0.0.1
Subnet Mask
255.255.255.0
255.255.0.0
255.0.0.0
No. of bits
24
16
8
Network ID
143.89.14.0
172.63.0.0
10.0.0.0
Host ID
0.0.0.34
0.0.100.4
0.0.0.1
 Broadcast address is an IP address that allows information to be sent to all machines on a given
subnet rather than a specific machine. It has a host ID with all bits being “1”.
Example, for the network 172.89.112.0/24, the broadcast address is 172.89.112.255.
S4 CIT Ch.10 Supplementary Notes
P.3/6
Ch. 10 – Internet and Internet Technology
Supplementary Notes
 Private IP addresses are the IP addresses reserved for private use (internal use) in LAN.
Name
IP address range
No. of IPs
Classful Description
Largest CIDR Block
24-bit block
10.0.0.0 – 10.255.255.255
16 777 215
Single class A
10.0.0.0/8
20-bit block
172.16.0.0 – 172.31.255.255
1 048 576
16 class Bs
172.16.0.0/12
65 535
256 class Cs
192.168.0.0/16
16-bit block 192.168.0.0 – 192.168.255.255
Ref: http://en.wikipedia.org/wiki/Private_network
 Hosts (computers) in the same network (subnet) should have IP addresses of same network ID,
i.e. leading bits (numbers).
 Data packets are delivered across different networks by the routers on the Internet. Routers
will exchange and update routing information based on the network status.
See also: http://static.howstuffworks.com/flash/router-inet.swf
 Static IP address refers the IP address manually configured for a host. Dynamic IP address is
one assigned automatically by the server (through DHCP, see below), and it may be different
when the computer requests an IP address next time.
 It is difficult to memorize IP address, as it is a set of meaningless numbers. Therefore, domain
name is used. Example, the domain name of the web server of our school is:
www.clsmss.edu.hk
Top Level Domain (TLD)
Hostname
Third-Level Domain
Second-Level Domain
 A hostname is the unique name by which a network-attached device is known on a network.
The hostname is not restricted to “www”, and in fact can be anything. Examples:
 en.wikipedia.org  “en” is the hostname
 hk.yahoo.com  “hk” is the hostname
 Internet domain names and hostnames are restricted to using only ASCII letters, numbers and
the hyphen (-). To allow multi-byte characters (e.g. in Asian languages), the Internationalized
domain name (IDN) system has been developed and is now in testing stage. Non-ASCII in
Unicode characters are translated into ASCII characters by Punycode.
Ref: http://en.wikipedia.org/wiki/Domain_name
http://en.wikipedia.org/wiki/Hostname
http://en.wikipedia.org/wiki/Internationalized_domain_name
 Top Level Domain (p.18):
 Generic (gTLD): com, org, net, edu, gov, mil, info, tel, biz, …
 Country code (ccTLD): hk, cn, tw, jp, au, uk, fr, it, de, mo, ma, tv, …
Ref: http://en.wikipedia.org/wiki/Top-level_domain
 Second Level (or above) Domains under a country code are managed by some organization of
that country (or district). E.g. HKDNR (Hong Kong Domain Name Registration Co. Ltd.)
S4 CIT Ch.10 Supplementary Notes
P.4/6
Ch. 10 – Internet and Internet Technology
Supplementary Notes
Domain Name System (DNS)
 Domain name of a server is easy to remember by human, but computers still need IP address for
communication. Therefore, it is necessary to translate domain name into IP address.
done by the Domain Name System (DNS).
Example: www.ust.hk  143.89.14.34
It is
 DNS Server, or name server, stores a database of DNS records. It also caches DNS responses
of recent lookups for a time specified by the time-to-live (TTL) value of the DNS record).
DNS servers communicate with each other from time to time to keep the records up-to-date.
 Example of how DNS works:
 User wants to open a web site at server www.ust.hk (HKUST’s web server)

The PC makes a request to the DNS server for the required IP address.


If DNS record is found, the DNS server will give a response of IP address to the PC.
At last, the PC can use the IP address to contact the remote host.
2A
User’s PC makes an request
to DNS Server for the IP
address of www.ust.hk if it 2
does not have it in cache.
If the DNS server does not have the
record in cache, it will ask other DNS
server for the information.
2B
DNS Server
(in LAN or at ISP)
Response: 143.89.14.34
DNS Server will cache the
record for some time.
3
Response: 143.89.14.34
User’s PC will cache the
record for some time.
4
5
1
DNS Server
(on the Internet)
User’s PC
User type in web browser:
http://www.ust.hk/
LAN
PC sends a request for web
page to 143.89.14.34
Response: data of the web page or
error message of “file not found”
HKUST’s
Web Server
www.ust.hk
143.89.14.34
 Types of DNS records:
 “A” (Address) record is used to translate a domain name to an IPv4 address

“MX” (Mail eXchange) record is used to translate from a name in the right-hand side of
an e-mail address to the name/address of a machine able to handle mail for that domain.
 “CNAME” (Canonical Name) record specifies a domain name alias.
 “PTR” (Pointer) record is commonly used for reverse DNS lookup (IP-to-name lookup).
Ref: http://en.wikipedia.org/wiki/List_of_DNS_record_types
 Note that it is possible to map multiple names to one IP address. It is also possible to map a
name to multiple IP addresses for load balancing (Round robin DNS).
 Dynamic DNS is a service for any host with dynamic IP address. Once a host has its IP
address changes (as assigned by the ISP), a program on the host will update the DNS record at
the Dynamic DNS server. The TTL (time-to-live) of the record is set to a very small number to
facilitate frequent updates.
Ref: http://en.wikipedia.org/wiki/Dynamic_dns
S4 CIT Ch.10 Supplementary Notes
P.5/6
Ch. 10 – Internet and Internet Technology
Supplementary Notes
Network Configuration on Computer
 In order to configure a computer to access a network, the following information are necessary:




The IP address a must for the computer itself.
Subnet mask is necessary to determine the network ID.
Default gateway is needed when communication to other networks (or Internet) is needed.
DNS Server(s) is/are needed if the user will contact other hosts by hostnames.
 The network configuration can either be set manually, or configured automatically by DHCP
(Dynamic Host Configuration Protocol). A DHCP server assigns IP address and other network
information, such as subnet mask, DNS server(s), etc, to a computer joining the network.
Ref: http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol
Other Addresses on the Internet
 Uniform Resource Locater (URL), also referred to as web address, is a type of Uniform
Resource Identifier (URI) that specifies where an identified resource is available and the
mechanism for retrieving it.
Syntax:
resource_type://domain:port/filepathname?query_string#anchor

Resource type can be: http, https, ftp, etc.


The registered domain name or IP address gives the destination location for the URL.
The port number is optional. If it is omitted, the default port for the resource type is
used. E.g. “80” for HTTP connection.
 The file path name indicates the location of the resource on the server.
 The query string contains data to be passed to web applications such as CGI programs.
 The anchor part when used with HTTP specifies a location on the page.
“query string” and
Ref: http://en.wikipedia.org/wiki/Url
“anchor” will be discussed
in web design chapters
 An email address identifies a location to which e-mail messages can be delivered.
 An e-mail address is generally recognized as having two parts joined with an at-sign (@).
The first part is the username, and the second part is the domain.
 The mail server, which handles emails delivered to the domain, is specified by the MX
record in DNS.
Ref: http://en.wikipedia.org/wiki/Email_address
Command Line Tools
Utility
ipconfig [/all]
ping
tracert
route [print]
netstat [-a]
Description
Show network information of the PC.
Send special packets to a host and check for replies, for checking the connectivity to a host.
Trace the route from the PC to a host; the addresses of routers are listed.
Manipulate or show the network routing tables.
Displaying protocol statistics and current TCP/IP network connections.
S4 CIT Ch.10 Supplementary Notes
P.6/6
Download