46
How the Internet Works? ( TCP/IP, DNS, HKIX … )

How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Embed Size (px)

Citation preview

Page 1: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

How the Internet Works?( TCP/IP, DNS, HKIX … )

Page 2: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

How computers send data?

2

Channel

ProtocolConnection

method

Address

Page 3: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

3

Page 4: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Communication Channel

• Telephone line (Twist pair, Optical fiber)– Modulator-Demodulator (Modem)– Digital Subscriber Line (DSL)

• Cable modem• Satellite, Microwave• Wireless connection (IR, RF)

4

what kind of media?

Page 5: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Different medium

• Twisted pair• RJ45 connector• Coaxial cable• BNC connector• Fiber optic cable• Different cabling length

– Optic > coaxial > Twisted pair

5

Page 6: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Use Modem

• Modulation / De-modulation• E.g. CU Dialup Pool (56kbps max.)

6

Telephone lineAnalog data

Digital data - 10101010101

Page 7: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Use Digital Subscriber Line (DSL)

7

Traditional phone line

ADSL modem

Why ADSL?

Page 8: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

8

Page 9: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Use Cable Modems

• Use coaxial cable to carry TV signal and High speed Internet access

9

Page 10: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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.

10

Page 11: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Use Cellular Phone

• Mobile computing

• Latest technology – Bluetooth– A wireless technology

11

Page 12: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

12

Page 13: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Network Interface CardNIC

• 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?

13

Page 14: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Routers

• Interconnecting computers are called routers by using the same protocol.– Determining where to send packets

14

Router

Page 15: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Hubs

• A network cable connects a computer via a network card to a hub.

• Provides a central location.

15

Page 16: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Ports

• A hub contains sockets or ports.

• Some LED indicates information transferred through the port.

16

Page 17: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Ethernet Repeater

• A repeater is a device that strengthens and retransmits signals on a network.

17

Page 18: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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, …18

Page 19: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Ethernet & Token Ring

• Ethernet, Fast Ethernet, Gigabit Ethernet (transmit data at 1Gbps).

19

Page 20: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Packet switching example

20

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.

Page 21: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

• For example, the host “orchid.cse.cuhk.edu.hk” has its IP address of “137.189.91.60”

21

Page 22: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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).

22

Page 23: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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.

23

Page 24: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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.

24

Page 25: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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”.

25

Page 26: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Subnet Mask

• 252 254 = 1111 1100 1111 1110

26

Page 27: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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.

27

Advantage?Eliminates manual configuration of network parameters and utilizes the use of IP address

Page 28: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

28

Page 29: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

IP Packet

• Includes Header, payload, data

29

Page 30: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

30

Page 31: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Protocol and AddressingTCP/IP model

31

Page 32: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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.

32

Page 33: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Protocol and Addressing

33

L5 data L5 data

Lower layer adds header to the data from upper layer. Header includes addressing and other fields.

Page 34: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Protocol Stack - Open Systems Interconnection (OSI) model

34

Page 35: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

35

Page 36: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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.

36

Page 37: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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.

37

Page 38: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

38

Page 39: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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.

39

Page 40: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

40

Page 41: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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

41

Page 42: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

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.

42

Page 43: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

How does DNS work?• DNS server = DNS service?

43

Page 44: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

IP vs Domain Name

44

Page 45: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

Most Common hostnameFigure 18.1 The fifty most common names assigned to computers on the Internet in 2000.

45

Page 46: How the Internet Works? ( TCP/IP, DNS, HKIX … ). How computers send data? 2 Channel Protocol Connection method Address

References

• Computer Networks – A. S. Tanenbaum (Prentice Hall)

46