CSI104 Slot06

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

Week Slot Content Assessment Chapters

01 1+2 Computer Organisation Lab 1 (p1) Chapter 1, 5


3 Computer Organisation (cont.) Chapter 1, 5
02
4 Numbering Systems Lab 1 (p2) Chapter 2
5 Data Storage & Operations on Data Lab 1 (p3) Chapter 3, 4
03
6 Computer Networks & Internet Progress Test 01 Chapter 6
04 7+8 Operating Systems Lab 2 (p1) Chapter 7
05 9 + 10 Algorithms Presentation 01 Chapter 8
06 11 + 12 Programming Lab 2 (p2) – short preso Chapter 9
13 Software Engineering Chapter 10
07
14 Data Structures Lab 2 (p3) – short preso Chapter 11, 12
Presentation 02
08 15 + 16 Data Structures (cont.) Chapter 11, 12
Progress test 02
17 File Structure Chapter 13
09
18 Database Lab 2 (p4) Chapter 15
19 Database (cont.) Chapter 15
10
20 Security & Ethical issues Progress test 03 Chapter 20
1
CSI104 Week 03

COMPUTER
NETWORKS &
INTERNET
Tam Nguyen (FU HL- SE)
Jan 2023
CONTENT

1. Overview

• LAN & WAN

• TCP/IP protocol

2. Layers in networking

3
OBJECTIVES

After studying this chapter, the student should be able to:


• Describe local and wide area networks (LANs and WANs).
• Distinguish an Internet from the Internet.
• Describe the TCP/IP protocol suite as the network model on the Internet.
• Define the layers in the TCP/IP protocol suite and their relationship.
• Describe the applications on the Internet.
• Describe the different transmission media used in computer networking.

4
CONTENT

1. Overview

• LAN & WAN

• TCP/IP protocol

2. Layers in networking

5
Introduction

• A network is defined as the interconnection of a set


of devices capable of communication.
• A device can be a host (or an end system) such as a
large computer, desktop, laptop, workstation,
cellular phone, or security system.
• A device can be also be a connecting device such as
o a router which connects the network to other networks,
o a switch which connects devices together,
o a modem that changes the form of data, and so on.

• These devices in a network are connected using Figure 4.1. A simple network
wired or wireless transmission media such as cable
or air.
6
Local Area Network (LAN)

• A LAN is usually privately owned and connects some


hosts in a single office, building, or campus.
• A LAN can be as simple as two PCs and a printer in
someone’s home office; or it can extend throughout
a company and include audio and video devices.
• Each host in a LAN has an identifier, an address, that
uniquely defines the host in the LAN.
• A packet sent by a host to another host carries both
the source host’s and the destination host’s
addresses. Figure 4.2. A LAN architecture

7
Wide Area Network (WAN)

LAN WAN
limited in size, spanning has a wider geographical span,
an office, a building, or a spanning a town, a state, a
campus country, or even the world
interconnects hosts interconnects connecting devices
such as switches, routers, or
modems
is normally privately is normally created and run by
owned by the organization communication companies and Figure 4.3. A WAN architecture
that uses it leased by an organization that
uses it

8
The Internet

• An Internet is composed of thousands of


interconnected networks (two or more networks
are connected).
• The Internet involves several backbones,
provider networks, and customer networks.
o Backbones: large networks owned by some
communication companies.
o Provider networks: use the services of the
backbones for a fee.
o Customer networks: use the services provided by
the Internet. They pay fees to provider networks
for receiving services. Figure 4.4 The internet today
• Backbones and provider networks are also called
Internet Service Providers (ISPs). The backbones
are often referred to as international ISPs. 9
Setting the Scene
Application Software

Network Protocol Application Software

Network Protocol

Driver for the NIC

Driver for the NIC

10
Protocol Layering

• A protocol defines the rules that both the sender & receiver & all intermediate devices need
to follow to be able to communicate effectively in Internet.
• A protocol is needed at each layer, or protocol layering.

• Protocol layering enables modularity

• Protocol layering allows separation of


services from the implementation

Figure 4.5. A three-layer protocol 11


TCP/IP Protocol Suite

• The TCP/IP (Transmission Control Protocol / Internet Protocol) is a protocol suite (a set of
protocols organized in different layers) used on the Internet today.
• It is a hierarchical protocol made up of interactive modules, each of which provides a specific
functionality.

Figure 4.6 Network Reference Models 12


TCP/IP Protocol Suite

• TCP: ensure the integrity of the data


o Breaks data into packets before sending

o Adds error checking information to packets

o Reassembles packets when received

o Requests retransmission of failed packets

• IP: add addressing info to each packet


o Identifies devices on the network

o Routes packets from source to destination via routers

13
Addressing and Packet Names

• Any communication that involves two parties needs source and destination addresses. There are
normally only four because the physical layer (data exchange is a bit) does not need addresses.
• There is a relationship between the layer, the address used in that layer, and the packet name
at that layer.

Figure 4.7 Addressing and packet names in the TCP/IP protocol suite 14
CONTENT

1. Overview

• LAN & WAN

• TCP/IP protocol

2. Layers in networking

15
# Layer name Protocols Protocol Data Unit Addressing

5 Application HTTP, SMTP, etc. Messages N/A


Segment/ User
4 Transport TCP/UDP Port #’s
datagram
3 Network IP Datagram IP address

2 Data Link Ethernet, Wi-fi Frames MAC address

1 Physical Bits N/A

16
APPLICATION
layer
5th layer of the TCP/IP protocol

17
2.1 Application layer

• The fifth layer of the TCP/IP protocol


is called the application layer.
• The application layer provides
services to the user. Communication
is provided using a logical
connection.
• The protocols in this layer do not
provide services to any other
protocol in the suite; they only
receive services from the protocols
in the transport layer
Figure 4.7. Logical Connection at Application Layer
18
Application-Layer Paradigms

• Using the Internet, we need two application programs to interact with each other: one running
on a computer and the other running on another. Should both application programs be able to
request services and/or provide services?
• Two paradigms have been developed during the lifetime of the Internet to answer this question:
the client-server paradigm and the peer-to-peer paradigm

Figure 4.8 Client-server paradigm and Peer-to-peer paradigm 19


Standard Client-Server Applications

Several traditional services are still using this paradigm, including the World Wide Web
(WWW) and its vehicle HyperText Transfer Protocol (HTTP, HTTPS), file transfer protocol
(FTP), secure shell (SSH), email, and so on.

Figure 4.9 Several traditional services at Application Layer

20
Uniform Resource Locator (URL)

host name domain TLD directory filename query parameters

http://www.somename.com/kidshoes/running.php?sku=123&lang=vi
protocol fully qualified domain name

192.168.1.20
5ffe:1800:4545:0005:0300:f7ff:fe20:67cf

DNS looks up a host name to find the matching IP address in a process called Name Resolution

21
DNS on the Internet

• DNS is a protocol that can be used in different platforms. The domain name space (tree) was
originally divided into three different sections: generic domains, country domains, and the
inverse domain. However, the inverse domains are now deprecated.
• Generic Domains : define registered hosts

22
TRANSPORT
layer
4th layer of the TCP/IP protocol

23
2.2 TRANSPORT LAYER

• Sits between the application layer &


the network layer. It provides services
to the application layer and receives
services from the network layer.
• The transport layer acts as a liaison
between a client program and a server
program.

Figure 4.10. Logical Connection at Transport Layer 24


Process-to-Process Communication

• The Transport layer protocol provides process-to-process communication.


o A process is an application-layer entity (running program) that uses the services of the
transport layer.
• The network layer is responsible for communication at the computer level and can deliver
the message only to the destination computer. A transport-layer protocol is responsible
for delivery of the message to the appropriate process.

Figure 4.11. Network Layer vs. Transport Layer


25
Addressing: Port Numbers

• For communication, we must define the local host (IP), local process, remote host (IP), and
remote process. To define the processes, we need second identifiers called port numbers. In
the TCP/IP protocol suite, the port numbers are integers between 0 and 65,535 (16 bits).
• The client program defines itself with an ephemeral port number that is recommended to
be greater than 1023 for some client/server programs to work properly. The server process
must also define itself with a well-known port number.

Figure 4.12 Addressing: Port Numbers 26


Transport-Layer Protocols

• The User Datagram Protocol (UDP) is a • Transmission Control Protocol (TCP) is a connection-
connectionless, unreliable transport protocol. oriented, reliable protocol. TCP explicitly defines
UDP is a very simple protocol using a minimum of
connection establishment, data transfer, and connection
overhead. If a process wants to send a small
message and does not care much about teardown phases to provide a connection-oriented
reliability, it can use UDP. Sending a small service. At the transport layer, TCP groups a number of
message using UDP takes much less interaction bytes together into a packet called a segment.
between the sender and receiver than using TCP.
• TCP adds a header to each segment (for control
• UDP packets, called user datagrams (format as
purposes) and delivers the segment (format as below) to
below), have a fixed-size header of 8 byte and the
total length needs to be less 65 535 bytes. the network layer for transmission. The segments are
encapsulated in an IP datagram and transmitted.
8 to 65,535 bytes
20 to 60 bytes
8 bytes
Direction of Direction of Header Data
Header Data
bit transmission bit transmission
27
NETWORK
layer
3rd layer of the TCP/IP protocol

28
2.3 NETWORK LAYER

• The network layer is responsible for the


host-to-host delivery of messages.
• The network layer accepts a packet from a
transport layer, encapsulates the packet in
a datagram, and delivers the packet to the
data-link layer.
• At the destination host , the datagram is
de-capsulated, the packet is extracted and
delivered to the corresponding transport
layer.

Figure 4.13. Communication at Network


Layer 29
Packetizing at Network Layer

Packetizing: encapsulating the payload (data received from upper layer) in a network-layer packet
at the source and decapsulating the payload from the network-layer packet at the destination.
1. The source network layer receives a packet from transport layer, adds a header that contains
source & destination addresses, and some other information.
2. The network layer then logically delivers the packet to the network layer protocol at the
destination.
3. The destination host receives the network-layer packet, decapsulate the payload and deliver
to the upper-layer protocol.

Figure 4.14. Packetizing at the network layer 30


Network Layer Protocols

• The main protocol is called the Internet Protocol (IP) . IPv4 and IPv6 are in use today.
• There are three common notations to show an IP address: binary notation (base 2),
dotted-decimal notation (base 256), and hexadecimal notation (base 16).

Figure 4.15. Address notations 31


Basic Routing

2 3
Examine Look up IP destination
destination IP network in routing table

1 4
Receive Forward traffic to
data packet Router destination

32
DATA LINK
layer
2nd layer of the TCP/IP protocol

33
2.4 DATA-LINK LAYER

The TCP/IP suite does not define any


protocol in the data link layer. This
layer is the territories of networks that
when connected make up the
Internet.
These networks, wired or wireless,
receive services and provide services
to the network layer.

Figure 4.16. Communication at Data-Link Layer


34
Nodes and Links

• Communication at the data-link layer is node-to-node. Data unit from one point on the
Internet needs to pass through many networks (LANs and WANs) to reach another point.
Theses LANs and WANs are connected by routers.
• It is customary to refer to the two end hosts and the routers as nodes and the networks in
between as links .

LAN
⇢ Wired LANs: Ethernet
⇢ Wireless LANs (Wi-Fi, Bluetooth)

WAN
⇢ Wired WANs (dial-up, DSL, Cable network)
⇢ Wireless WANs (WiMax, satellite network)
Figure 4.17. Nodes & Links
35
Wired LANs: Ethernet

• Ethernet LAN was developed in 1970s by Robert Metcalfe & David Boggs. Standard
Ethernet (10 Mbps), Fast Ethernet (100 Mbps), Gigabit Ethernet (1 Gbps), and 10
Gigabit Ethernet (10 Gbps).
• A frame carries some information such as the source address (48 bits), the destination
address (48 bits), the type of data, the actual data, and some other control bits as a
guard to help checking the integrity of data during transition.

Figure 4.18. Ethernet LAN and the Frame Format 36


Wireless LANs: Wireless Ethernet (Wi-Fi)

• Wireless Ethernet or Wi-Fi is a wireless LAN.


• Two kinds of services: the basic service set (BSS) and the extended service set (ESS).
The second service uses an extra device (access point / AP) that serves as a switch
for connection to other LANs or WANs.

Figure 4.19. the basic service set (BSS) and the extended service set (ESS). 37
Wired WANs: Cable Network

• Cable networks were originally created to provide access to TV programs.


• Cable TV network can solve DSL’s drawback, which is susceptibility to interference
(due to the use of unshielded twisted-pair cable)

Figure 4.20. Cable service


38
Wireless WAN: WiMax

The Wireless Inter-operability for Microwave Access (WiMax) is the wireless version of DSL or
cable connection to the Internet. It provide two types of services (fixed WiMax) to connect the
main station to fixed station, or to mobile stations such as cellular phones.

Figure 4.21. The worldwide Interoperability Access (WiMax)


39
PHYSICAL
layer
1st layer of the TCP/IP protocol

40
2.5 PHYSICAL LAYER

• The role of the physical layer is to


transfer the bits received from the data-
link layer and convert them to
electromagnetic signals for transmission.
• After the bits are converted to signals,
the signals are delivered to the
transmission media.

Figure 4.19. Communication at Physical Layer

41
Analog and Digital Transmission

Analog Transmission Digital Transmission

Figure 4.19 Analog and Digital Transmission


42
Summary of TCP/IP Protocol Layers

Figure 4.20 TCP/IP Protocol Layers


43
Take pride in
who you are!

Collect data from the application software,


and format it for further processing Take pride in who you are!
HTTP FTP SMTP POP3

Encapsulate the data. Add sequence number 1 of 3 Checksum 51 2 of 3 Checksum 598 3 of 3 Checksum 232
& error correction information to each Take pride in who you are!
packet Port 80 Port 80 Port 80
HTTP FTP SMTP POP3

10.61.210.88 192.168.1.38 10.61.210.88 192.168.1.38 10.61.210.88 192.168.1.38


Add source & destination IP address to each 1 of 3 Checksum 51 2 of 3 Checksum 598 3 of 3 Checksum 232
packet Take pride in who you are!
IP ICMP Port 80 Port 80 Port 80

38:11:f2:d1:35:cf 8d:22:f2:e7:46:cf 38:11:f2:d1:35:cf 8d:22:f2:e7:46:cf 38:11:f2:d1:35:cf 8d:22:f2:e7:46:cf


Add source & destination MAC address to 10.61.210.88 192.168.1.38 10.61.210.88 192.168.1.38 10.61.210.88 192.168.1.38
each packet and pass to NIC driver 1 of 3 Checksum 51 2 of 3 Checksum 598 3 of 3 Checksum 232
ARP RARP NDP Take pride in who you are!
Port 80 Port 80 Port 80 44
TCP/IP Suite of Network Protocols

• HyperText Transfer Protocol (HTTP): used to deliver multimedia rich webpages to browsers over the www

• File Transfer Protocol (FTP): used to deliver files quickly from one computer to another

• Simple Mail Transfer Protocol (SMTP): used when emails are sent between mail services

• Post Office Protocol (POP): used when we retrieve mail messages from a mail server so we can work with them locally on a pc-based
application such as outlook

• Internet Message Access Protocol (IMAP): allows us to work with mails live on the server using web mail systems (Hotmail, Gmail, etc.)

• Voice over Internet Protocol (VOIP): used to transfer voice and video data over the Internet

• TCP (Transmission Control Protocol): as shown

• User Datagram Protocol (UDP): lightweight alternative to TCP; less reliable than TCP because it doesn’t perform any of the error checking, but
it’s much faster à suitable for live video streaming, online games

• IP (Internet Protocol): as shown

• Internet Control Message Protocol (ICMP): used by routers to exchange status info & error messages (e.g. to report that a particular route that
can’t be reached)

• Address Resolution Protocol (ARP): allows one device to discover another’s MAC address if its IP address is known. Once the target network
segment has been reached, the MAC address comes into play
45

You might also like