Lecture 2 - Department of Computing

Download Report

Transcript Lecture 2 - Department of Computing

How the Internet Works?
( TCP/IP, DNS, HKIX … )
CSC1720 – Introduction to Internet
Essential Materials
How computers send data?
Protocol
Connection
method
Channel
Address
CSC1720 – Introduction to Internet
2
All copyrights reserved by C.C. Cheung 2003.
Outline

Internet Hardware
– Modem, Wired, Hubs, Switches

Basic Internet Structure
– Postal service analogy

Internet Software
– IP address, Subnets
– Network Protocol
– DNS, WINS and Domains

HKIX and HARNET
CSC1720 – Introduction to Internet
3
All copyrights reserved by C.C. Cheung 2003.
Communication Channel
what kind of media?

Telephone line (Twist pair, Optical fiber)
– Modulator-Demodulator (Modem)
– Digital Subscriber Line (DSL)



Cable modem
Satellite, Microwave
Wireless connection (IR, RF)
CSC1720 – Introduction to Internet
4
All copyrights reserved by C.C. Cheung 2003.
Different medium






Twisted pair
RJ45 connector
Coaxial cable
BNC connector
Fiber optic cable
Different cabling length
– Optic > coaxial > Twisted pair
CSC1720 – Introduction to Internet
5
All copyrights reserved by C.C. Cheung 2003.
Use Modem
Digital data - 10101010101
Telephone line
Analog data


Modulation / De-modulation
E.g. CU Dialup Pool (56kbps max.)
CSC1720 – Introduction to Internet
6
All copyrights reserved by C.C. Cheung 2003.
Use Digital Subscriber
Line (DSL)
Traditional phone line
ADSL modem
Why ADSL?
CSC1720 – Introduction to Internet
7
All copyrights reserved by C.C. Cheung 2003.
Why ADSL?

Asymmetric DSL
– A slower upstream
(upload) can trade off a
faster downstream
(download) speed.
– 128 to 640 kbps
(upstream)
– 1.5M to 5M bps
(downstream)

E.g. PCCW - Netvigator
CSC1720 – Introduction to Internet
8
All copyrights reserved by C.C. Cheung 2003.
Use Cable Modems

Use coaxial cable to carry TV signal
and High speed Internet access
CSC1720 – Introduction to Internet
9
All copyrights reserved by C.C. Cheung 2003.
Satellite &
Microwave

Satellite systems
– Use satellites orbiting above the Earth to
relay signals from one part of a WAN to
another, cause 0.5 to 5 sec delays.

Microwave
– Costly to install but cheaper than satellite.
– It is very useful for connecting networks
that are separated by a barrier, such as a
highway or a lake.
CSC1720 – Introduction to Internet
10
All copyrights reserved by C.C. Cheung 2003.
Use Cellular Phone / Palm


Mobile computing
Latest technology – Bluetooth
– A wireless technology
CSC1720 – Introduction to Internet
11
All copyrights reserved by C.C. Cheung 2003.
Using A Computer To
Interconnect Networks

Special-purpose
computers are used to
interconnect networks.
– Using standard hardware
(CPU, memory, and
network interfaces)
– Running special-purpose
software
CSC1720 – Introduction to Internet
12
All copyrights reserved by C.C. Cheung 2003.
Network Interface Card
NIC


Physically connects a computer to the
transmission medium on a network.
What is device driver?
– NIC comes with different drivers for different
types of operating systems.
– A driver is the software that allows the operating
system to communicate with the network
interface card.

What is the major difference between an
expensive, 3Com, and a cheap, Filand, NIC?
CSC1720 – Introduction to Internet
13
All copyrights reserved by C.C. Cheung 2003.
Hardware/Physical/MAC
(Media Access Control) address


CSC1720 – Introduction to Internet
14
When a NIC is
manufactured, the
card is given a
unique hardware
address.
It never changes.
All copyrights reserved by C.C. Cheung 2003.
Routers

Interconnecting computers are called
routers by using the same protocol.
– Determining where to send packets
Router
CSC1720 – Introduction to Internet
15
All copyrights reserved by C.C. Cheung 2003.
Hubs


A network cable connects a
computer via a network card
to a hub.
Provides a central location.
CSC1720 – Introduction to Internet
16
All copyrights reserved by C.C. Cheung 2003.
Ports


CSC1720 – Introduction to Internet
17
A hub
contains
sockets or
ports.
Some LED
indicates
information
transferred
through the
port.
All copyrights reserved by C.C. Cheung 2003.
Ethernet Repeater

A repeater is a device that strengthens
and retransmits signals on a network.
CSC1720 – Introduction to Internet
18
All copyrights reserved by C.C. Cheung 2003.
Network Architecture


It refers how information transfers on networks.
Ethernet
– It the most popular architecture used to build
networks.
– Least expensive and easiest to setup

Token-ring architecture
– It was developed by IBM in 1984.
– They are popular found in large organizations, such
as banks and insurance companies.

Others: ARCnet, AppleTalk, …
CSC1720 – Introduction to Internet
19
All copyrights reserved by C.C. Cheung 2003.
Ethernet & Token Ring

Ethernet, Fast Ethernet, Gigabit
Ethernet (transmit data at 1Gbps).
CSC1720 – Introduction to Internet
20
All copyrights reserved by C.C. Cheung 2003.
Postal Services



You have to write a complete address on
the envelope specifying the country, state,
city, district, street, and so on.
After put the letter put into the mailbox, it
will be delivered (routed) to its destination
in a hierarchical way.
HK Post Office knows the letter is sent to
US, without concerning the actual address
to be routed within US.
CSC1720 – Introduction to Internet
21
All copyrights reserved by C.C. Cheung 2003.
Basic Internet Structure


The Internet works in a similar way as
postal services.
Roughly speaking, you may consider US, UK,
HK, China and so on, as individual networks
connecting to each other.
– Each network is further divided into smaller subnetworks such as CUHK, HKU, UST, and so on.


CUHK has its academic departments, etc.
The different pieces of the Internet are
connected by a set of computers (Gateways)
– Translates between protocols
CSC1720 – Introduction to Internet
22
All copyrights reserved by C.C. Cheung 2003.
Basic Internet Structure
(depicted)
CSC1720 – Introduction to Internet
23
All copyrights reserved by C.C. Cheung 2003.
Postage over the Internet


When delivering information via the Internet, the
information is split into small units called data
packets (1500 byte each)
When a packet is sent from US to a particular
host in CUHK.







The packet is first delivered to Hong Kong,
then is further transmitted to CUHK,
then is further transmitted to the appropriate
department,
finally arrived to the specific host.
The data is reassembled at the destination.
The data packet is continuously being switched
from the source to destination.
The Internet is said to be Packet Switching
Network.
CSC1720 – Introduction to Internet
24
All copyrights reserved by C.C. Cheung 2003.
Packet Switching Network
CSC1720 – Introduction to Internet
25
All copyrights reserved by C.C. Cheung 2003.
Packet switching example
Figure 16.1 An example
internet with four networks
connected by routers.
Figure 16.2 Cars from two roads merging
onto another road are analogous to packets
from two networks merging onto a third
network.
CSC1720 – Introduction to Internet
26
All copyrights reserved by C.C. Cheung 2003.
IP address




Each host in the Internet is assigned
to a specific and unique number for
identification.
This number is called the IP address
of the specific host.
This number is divided into 4 parts for
improving the readability.
The range of each number is between
0 and 255.
– E.g. 0.0.0.0
– 255.255.255.255

CSC1720 – Introduction to Internet
For example, the host
“orchid.cse.cuhk.edu.hk” has its IP
address of “137.189.91.60”
27
All copyrights reserved by C.C. Cheung 2003.
Network Number /
Host Number

IP addresses are split into 2 parts
– A network number + a host number


For example, 137.189 is the network
number of CUHK, 91.60 is the host number
of the host “orchid.cse.cuhk.edu.hk”
Network numbers are assigned by a central
authority, the Internet Corporation for
Assigned Names and Numbers (ICANN).
CSC1720 – Introduction to Internet
28
All copyrights reserved by C.C. Cheung 2003.
Network Classes



There are 5 classes of IP address
Class A comprises networks 1.0.0.0 to
127.255.255.255, the network address is in
first quad. It allows roughly 16 million hosts
per network.
Class B comprises network 128.0.0.0 to
191.255.255.255, the network address is in
the first two quads. It allows for 16,382
networks with up to 64K hosts.
CSC1720 – Introduction to Internet
29
All copyrights reserved by C.C. Cheung 2003.
Network Classes


Class C comprises networks 192.0.0.0
to 223.255.255.255, with the network
number contained in the first three
quads. It allows about 2 million
networks with up to 254 hosts in each
network.
Class D and E are falling into the
range of 224.0.0.0 to 254.0.0.0 which
are reserved for multicast address and
for special purpose use.
CSC1720 – Introduction to Internet
30
All copyrights reserved by C.C. Cheung 2003.
Subnet




The Internet is structured hierarchically. CUHK
consists of many academic departments and
administrative bodies.
IP allows you to subdivide a network into several
subnets. E.g. CSE and CSC are two subnets inside
CUHK.
Each subnet is identified by a subnet number.
E.g. we have a different way to interpret the IP
address 137.189.91.60
– 137.189 refers to the network number of CUHK,
– 91 refers to the subnet number of CSE,
– 60 refers to the host number of “orchid”.
CSC1720 – Introduction to Internet
31
All copyrights reserved by C.C. Cheung 2003.
Subnet example in CUHK
CSC1720 – Introduction to Internet
32
All copyrights reserved by C.C. Cheung 2003.
Subnet Mask

252  254 = 1111 1100  1111 1110
CSC1720 – Introduction to Internet
33
All copyrights reserved by C.C. Cheung 2003.
Dynamic Host Configuration
Protocol (DHCP)


A Protocol for assigning dynamic IP address
to devices on a network.
It is built on client and server models.
– Server is the machine running DHCPD.
– Client can be any network devices.

Advantage?
Eliminates manual
configuration of network
parameters and utilizes the use
of IP address
CSC1720 – Introduction to Internet
34
All copyrights reserved by C.C. Cheung 2003.
IP Routing


The process of transmitting a data
packet from the source to the
destination via a series of intermediate
stations is called “Routing”.
IP routing works as follow:
– Each data packet is labeled with IP
address of the destination host
137.189.90.184 1500 bytes Data here
CSC1720 – Introduction to Internet
35
All copyrights reserved by C.C. Cheung 2003.
IP Packet

Includes Header, payload, data
CSC1720 – Introduction to Internet
36
All copyrights reserved by C.C. Cheung 2003.
Packets Are Not The Same Size

Packets may be any size up to the
maximum.
– Can be as small as a single keystroke
– Can be larger, depending on application
CSC1720 – Introduction to Internet
37
All copyrights reserved by C.C. Cheung 2003.
IP Routing



For example, when a packet is routing to
“orchid.cse.cuhk.edu.hk” (137.189.91.60),
the network number is extracted as 137.189
which is the network number of CUHK. The
packet is then sent to HK and then to CUHK.
Inside CUHK, the subnet number is
examined and it is 91 which is the subnet
number of CSE. Then it is sent to CSE.
Inside CSE, the host number is examined
and it is 60 which is the host number of
orchid. Finally, it is routed to the destination.
CSC1720 – Introduction to Internet
38
All copyrights reserved by C.C. Cheung 2003.
IP enough for routing?




A single packet is limited in length,
usually 1-1500 bytes.
Network may lose packets, or damage
the data in transit.
Packets may arrive out of sequence
(different routing path).
TCP is used to solve the problems.
CSC1720 – Introduction to Internet
39
All copyrights reserved by C.C. Cheung 2003.
Protocol and Addressing

To communicate over the Internet, the
computers must:
– use a common language or a protocol to govern
the exchange of messages.
– have a way to address one another.

Protocol:
– specifies exact format, order of messages sent
and received among network entities, and
actions taken on message transmission and
receipt.

Addressing:
– defines where to deliver the messages.
CSC1720 – Introduction to Internet
40
All copyrights reserved by C.C. Cheung 2003.
Protocol and Addressing
TCP/IP model
CSC1720 – Introduction to Internet
41
All copyrights reserved by C.C. Cheung 2003.
Protocol and Addressing

Internet has a large collections of protocols
organized in a layering model.
– Application: enables the user, whether human or
software, to access the network.
– Transport: responsible for source-to-destination
(end-to-end) data transfer.
– Network: responsible for routing packets from
source-to-dest across multiple networks.
– Data link: responsible for data transfer between
neighboring network elements.
– Physical: coordinates the functions required to
transmit a bit stream over a physical medium.
CSC1720 – Introduction to Internet
42
All copyrights reserved by C.C. Cheung 2003.
Protocol and Addressing

Lower layer adds header to the data from upper layer.
Header includes addressing and other fields.
L5 data
CSC1720 – Introduction to Internet
L5 data
43
All copyrights reserved by C.C. Cheung 2003.
Protocol Stack - Open Systems
Interconnection (OSI) model
CSC1720 – Introduction to Internet
44
All copyrights reserved by C.C. Cheung 2003.
Protocol and Addressing

TCP/IP Protocol Suite.
CSC1720 – Introduction to Internet
45
All copyrights reserved by C.C. Cheung 2003.
What is TCP/IP?


“TCP would be in charge of the breaking up
the packets and messages then
reassembling them at the destination, and
the IP would be responsible for transmitting
the individual packets. For example: the TCP
protocol would split up the letter and place
it into multiple envelops, while the IP
protocol would be in charge of addressing
the envelop and making sure it arrived at its
proper destination.”
– from “Where Wizards Stay Up Late”
CSC1720 – Introduction to Internet
46
All copyrights reserved by C.C. Cheung 2003.
TCP/IP




A protocol is a collection of rules for formatting,
ordering, and error-checking data sent across a
network.
In 1974, Vincent Cerf and Robert Kahn developed
the Transmission Control Protocol (TCP) which was
further split into the Internet Protocol (IP) and TCP
in 1978.
In 1982, DoD adopted TCP/IP as the standard
protocol in the Internet.
Because the significance of TCP/IP in the history of
the Internet, Cerf and Kahn are considered to be
the Father of the Internet.
CSC1720 – Introduction to Internet
47
All copyrights reserved by C.C. Cheung 2003.
Transmission Control
Protocol - TCP

Basic functions
– Decompose a lengthy data into multiple
packets for transmission
– Error detection, ensure validity
– Packet loss?

No problem, packet retransmission
CSC1720 – Introduction to Internet
48
All copyrights reserved by C.C. Cheung 2003.
Sequence Numbers


TCP breaks the information into multiple
packets.
Each packet is associated with a sequence
number for identification.
137.189.90.184 Number 1 Data here
137.189.90.184 Number 2 Data here
137.189.90.184 Number 3 Data here


Each packet is individually routed in the
Internet, and arrive in random order.
The data is reassembled in the correct order
according to the sequence number.
CSC1720 – Introduction to Internet
49
All copyrights reserved by C.C. Cheung 2003.
Packet Retransmission



A packet may be lost during the
transmission across the Internet (host down,
link failure, … )
When the destination host has been waiting
for a particular packet for a certain time
(timeout), it will request the source host to
retransmit the packet.
There is no need to retransmit all data
packets. Instead, only the missing packet,
which is identified by the sequence number,
needs to be retransmitted.
CSC1720 – Introduction to Internet
50
All copyrights reserved by C.C. Cheung 2003.
Error detection Checksums


Transmission errors occur even if a data
packet is received by the destination
successfully.
How to ensure the data is correctly received?
– A method to detect possible transmission errors.
– At the destination, checksum is recalculated
based on the received data.
– The attached checksum and the newly
calculated checksum are compared. Mismatch
means there is transmission errors occurred.
CSC1720 – Introduction to Internet
51
All copyrights reserved by C.C. Cheung 2003.
IPv6 (IP version 6)

Major changes:
– More addresses

IP address size from
32 bits to 128 bits
– Simplified IP
headers

Reduction of header
fields in IP packet
– Added security
features
CSC1720 – Introduction to Internet
52
All copyrights reserved by C.C. Cheung 2003.
IPX/SPX Protocol



CSC1720 – Introduction to Internet
IPX/SPX makes up the protocol
suite that is used to transfer
information on networks
running the Novell NetWare
operating system.
Internetwork Packet Exchange
(IPX) - Transfer information
between devices.
Sequenced Packet Exchange
(SPX) - An extension of the IPX
protocol.
53
All copyrights reserved by C.C. Cheung 2003.
NetBEUI Protocol

NetBIOS Extended User Interface
– Is a network protocol used on small local
area networks.
– A very small and efficient protocol, use
little computer resources.

NetBIOS
– Network Basic Input/Output System
– Develop by IBM and allow computers to
communicate with each other on a
network.
CSC1720 – Introduction to Internet
54
All copyrights reserved by C.C. Cheung 2003.
Why DNS?

What is DNS?
– Domain Name System

IP address is difficult to remember.
– 137.189.92.1 is which machine?


Names are given to each computer on the
Internet for the convenience of human
users.
Besides IP addresses, all internet
applications allow users to use computer
names.
CSC1720 – Introduction to Internet
55
All copyrights reserved by C.C. Cheung 2003.
Computer names on the
NET

How does it look like?
– DNS administrators is responsible to
name computers/group in their own
subnet.
– Each level of responsibility is called a
domain.

Domains are separated by “dots”
– cse.cuhk.edu.hk
– www.intel.com
CSC1720 – Introduction to Internet
56
All copyrights reserved by C.C. Cheung 2003.
Domain name and Host
name

Each domain can create or change
whatever belongs to it.
– CUHK can create any new domain, cse
– CSE can buy a new computer and name it
as – robin, orchid, any other name.

Two computers may have the same
name if they are in different domains.
– orchid.cse.cuhk.edu.hk
– orchid.ie.cuhk.edu.hk
CSC1720 – Introduction to Internet
57
All copyrights reserved by C.C. Cheung 2003.
Domain Name System (DNS)

Each node in the
tree has
– a label - a string
with a maximum of
63 characters.
– a domain name - a
sequence of labels
separated by dots.
CSC1720 – Introduction to Internet
58
All copyrights reserved by C.C. Cheung 2003.
How does DNS work?

DNS server = DNS service?
CSC1720 – Introduction to Internet
59
All copyrights reserved by C.C. Cheung 2003.
Domain Example - CUHK
CSC1720 – Introduction to Internet
60
All copyrights reserved by C.C. Cheung 2003.
IP vs Domain Name
CSC1720 – Introduction to Internet
61
All copyrights reserved by C.C. Cheung 2003.
Most Common hostname
Figure 18.1 The fifty most common names assigned to computers on the Internet in 2000.
CSC1720 – Introduction to Internet
62
All copyrights reserved by C.C. Cheung 2003.
Top Level Domains

The Internet Corporation for Assigned Names and
Numbers (ICANN) define the Top Level Domains.
CSC1720 – Introduction to Internet
63
All copyrights reserved by C.C. Cheung 2003.
ISO 3166 Country Codes

Partial list
CSC1720 – Introduction to Internet
Full list
64
All copyrights reserved by C.C. Cheung 2003.
Windows Internet
Naming Service (WINS)

Like DNS, WINS
also resolves names
and IP addresses
except that the look
up by WINS is
specific for
Windows
computers.
– Dynamic
– Win2k use DNS to
replace WINS
CSC1720 – Introduction to Internet
65
All copyrights reserved by C.C. Cheung 2003.
HKIX

Hong Kong Internet eXchange
– http://www.hkix.net


Operated by Information Technology
Services Centre (ITSC) of CUHK
interconnect the Internet Access
Providers (IAPs) in Hong Kong
– No need to route via US for local
connections.
CSC1720 – Introduction to Internet
66
All copyrights reserved by C.C. Cheung 2003.
HARNET



Why?
Connect 7
Universities.
Manage by
the Joint
Universities
Computer
Centre (JUCC)
CSC1720 – Introduction to Internet
67
All copyrights reserved by C.C. Cheung 2003.
HARNET configuration

Try this link: http://www.cuhk.edu.hk/hkix/harnet/
CSC1720 – Introduction to Internet
68
All copyrights reserved by C.C. Cheung 2003.
HARNET in CUHK



HARNET connect to US is 12M and a connection of
5M to HKT as backup.
Our connection to HARNET is dual 12Mbps.
With the following additional connections:
– a secondary link to Hong Kong Telecom Netplus which is
2Mbps inbound and 10Mbps outbound shared with other
projects, Internet services for CUHK alumni and SchoolNet;
– a third link provided by UUNET (Worldcom) which is
2Mbps inbound & outbound; and
– a direct ATM/155Mbps connection to Hong Kong Internet
eXchange (HKIX), which was set up and is operated by
ITSC of CUHK
CSC1720 – Introduction to Internet
69
All copyrights reserved by C.C. Cheung 2003.
Summary

What should be considered if you
install or update a network?
– Plan: the size, the budget
– Determine: the network design
– Select: the transmission media
– Choose: the network hardware, devices
– Install: the network OS, drivers
– Configure: server & client computers
– Test: the final network
– Maintain: the network reliability, admin
CSC1720 – Introduction to Internet
70
All copyrights reserved by C.C. Cheung 2003.
References



Computer Networks – A. S.
Tanenbaum (Prentice Hall)
The End.
Thank you for your patience!
CSC1720 – Introduction to Internet
71
All copyrights reserved by C.C. Cheung 2003.