0% found this document useful (0 votes)
69 views50 pages

Network Services and Applications

hhht

Uploaded by

ollata kalano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views50 pages

Network Services and Applications

hhht

Uploaded by

ollata kalano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Network Services and Applications

Page 1 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Foreword
 The Internet has become an integral part of our lives, with a wide range of
applications such as file transfer, email sending, online video, web browsing, and
online gaming. Because of the layered network model, common users can use
various services provided by the application layer, without knowing technical details
such as communication technology implementations.
 In previous courses, we have learned technologies related to the data link layer,
network layer, and transport layer. This chapter will describe common network
services and applications such as FTP, DHCP, and HTTP.

Page 2 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
 On completion of this course, you will be able to:
 Understand FTP fundamentals.
 Understand TFTP fundamentals.
 Understand DHCP fundamentals.
 Understand Telnet fundamentals.
 Understand HTTP fundamentals.
 Understand DNS fundamentals.
 Understand NTP fundamentals.

Page 3 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. File Transfer
▪ FTP
▫ TFTP

2. Telnet

3. DHCP

4. HTTP

5. DNS

6. NTP

Page 4 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
File Transfer Protocols

 File transfer between hosts is an important function of IP networks. Nowadays, people can conveniently transfer
files using web pages and mailboxes.
 However, in the early Internet era when the World Wide Web (WWW) did not come into being and operating
systems used command-line interfaces, people transferred files via command-line tools. The most commonly used
protocols for transferring files at that time are File Transfer Protocol (FTP) and Trivial File Transfer Protocol (TFTP).

Page 5 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Basic Concepts of FTP

ASCII mode

Binary mode

FTP client FTP server


 FTP adopts the typical client/server (C/S) architecture. After an FTP client establishes a TCP connection with an
FTP server, files can be uploaded and downloaded.
 FTP uses different transfer modes based on the file type:
 ASCII mode: When a text file (in TXT, LOG, or CFG format) is transferred, the encoding mode of the text content is
converted to improve the transfer efficiency. This mode is recommended for transferring configuration files and log files of
network devices.
 Binary mode: Non-text files (in CC, BIN, EXE, or PNG format), such as images and executable programs, are transferred in
binary mode. This mode is recommended for transferring version files of network devices.

Page 6 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
FTP Transfer Process - Active Mode
• FTP works in two modes: active mode (PORT) and passive mode (PASV).

The FTP client initiates a TCP three-way


FTP client handshake with TCP port 21 on the FTP server FTP server
to set up a control connection.

User login authentication

The FTP client sends the PORT command to


the FTP server, instructing it to open port P
(random port; P > 1024).

The FTP server (port 20) initiates a TCP


three-way handshake with TCP port P on the
FTP client to set up a TCP connection.

File transfer

Page 7 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
FTP Transfer Process - Passive Mode

The FTP client initiates a TCP three-way


FTP client handshake with TCP port 21 on the FTP server FTP server
to set up a control connection.

User login authentication

The FTP client sends the PASV command.

The FTP server sends the Enter PASV


command to the FTP client, instructing
it to open port N (random port; N >
1024).

The FTP client initiates a TCP three-way


handshake with TCP port N on the FTP server
to set up a TCP connection.

File transfer

Page 8 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Commands (Device as FTP Server)
A user accesses a device through FTP.

1. Enable the FTP server function.

[Huawei]ftp [ ipv6 ] server enable

By default, the FTP server function is disabled.

2. Configure a local FTP user.

[Huawei]aaa
[Huawei]local-user user-name password irreversible-cipher password
[Huawei]local-user user-name privilege level level
[Huawei]local-user user-name service-type ftp
[Huawei]local-user user-name ftp-directory directory

The privilege level must be set to level 3 or higher. Otherwise, the FTP connection fails.

Page 9 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Commands (Device as FTP Client)
1. A VRP device that functions as an FTP client accesses an FTP server.
<FTP Client>ftp 10.1.1.1
Trying 10.1.1.1 ...
Press CTRL+K to abort
Connected to 10.1.1.1.
220 FTP service ready.
User(10.1.1.1:(none)):ftp
331 Password required for ftp.
Enter password:
230 User logged in.

2. Common commands used when the VRP device functions as an FTP client.
ascii Set the file transfer type to ASCII, and it is the default type
binary Set the file transfer type to support the binary image
ls List the contents of the current or remote directory
passive Set the toggle passive mode, the default is on
get Download the remote file to the local host
put Upload a local file to the remote host

Page 10 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Example
Configurations on the FTP server:
<Huawei> system-view
[Huawei] sysname FTP_Server
[FTP_Server] ftp server enable
[FTP_Server] aaa
[FTP_Server-aaa] local-user admin1234 password irreversible-cipher

FTP client FTP server Helloworld@6789


10.1.1.2 10.1.1.1 [FTP_Server-aaa] local-user admin1234 privilege level 15
[FTP_Server-aaa] local-user admin1234 service-type ftp
[FTP_Server-aaa] local-user admin1234 ftp-directory flash:

Operations on the FTP client:


• One router functions as the FTP server, and the other as the
FTP client. <FTP Client>ftp 10.1.1.1
[FTP Client-ftp]get sslvpn.zip
• Enable the FTP service on the FTP server and create an FTP 200 Port command okay.
login account. Then, the FTP client logs in to the FTP server and FTP: 828482 byte(s) received in 2.990 second(s) 277.08Kbyte(s)/sec.
runs the get command to download a file.

Page 11 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. File Transfer
▫ FTP

▪ TFTP

2. Telnet

3. DHCP

4. HTTP

5. DNS

6. NTP

Page 12 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Basic Concepts of TFTP
 Compared with FTP, TFTP is designed to transfer small files and is easier to implement.
 Using UDP (port 69) for transmission
 Authentication not required
 You can only request a file from or upload a file to the server, but cannot view the file directory on
the server.
TFTP
UDP
IP

TFTP client TFTP server

Page 13 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
TFTP Transfer Example
Upload a File Download a File

Request for writing a file Request for reading a file


TFTP client TFTP server TFTP client TFTP server

File write confirmation File read confirmation

DATA 1 Client confirmation

DATA 1 ACK DATA 1


.
. DATA 1 ACK
.
DATA n .
.
.
DATA n ACK

Page 14 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Commands (Device as TFTP Client)
1. Download a file (VRP device functioning as a TFTP client).

<HUAWEI> tftp tftp_server get filename

You do not need to log in to the TFTP server, and only need to enter the IP address of the TFTP server and the
corresponding command.

2. Upload a file (VRP device functioning as a TFTP client).

<HUAWEI> tftp tftp_server put filename

You do not need to log in to the TFTP server, and only need to enter the IP address of the TFTP server and the
corresponding command.

Currently, VRP devices can function only as TFTP clients.

Page 15 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. File Transfer

2. Telnet

3. DHCP

4. HTTP

5. DNS

6. NTP

Page 16 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Application Scenario of Telnet
 To facilitate device management using commands, you can use Telnet to manage devices.
 Device management through Telnet is different from that using the console port. In Telnet-based device
management mode, no dedicated cable is required to directly connect to the console port of the Telnet server, as
long as the Telnet server’s IP address is reachable and Telnet clients can communicate with the Telnet server’s TCP
port 23.
 The device that can be managed through Telnet is called the Telnet server, and the device connecting to the Telnet
server is called the Telnet client. Many network devices can act as both the Telnet server and Telnet client.
Telnet server

TCP connection
AP Router

IP network
Switch Firewall
Telnet client
...
Server

Page 17 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
VTY User Interface
 When a user logs in to a device using the console port or Telnet, the system allocates a user interface to manage
and monitor the current session between the device and the user. A series of parameters can be set in each user
interface view to specify the authentication mode and user privilege level after login. After a user logs in to a device,
user operations that can be performed depend on the configured parameters.
 The user interface type of Telnet is virtual type terminal (VTY) user interface.
User interface
Authentication mode: local
VTY 0 User privilege: Level 15
1 Establish a Telnet connection VTY 1
VTY 2 3 Authenticate the Telnet
connection using the VTY
VTY 3
IP network configuration.

Telnet client Telnet server 2 Allocate an idle user interface with


the smallest number from the VTY
user interfaces.

Page 18 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Commands (1)
1. Enable the Telnet server function.

[Huawei] telnet server enable

The Telnet server function is enabled on the device (disabled by default). To disable this function, run
the undo telnet server enable command.
2. Enter the user view.

[Huawei] user-interface vty first-ui-number [ last-ui-number ]

The VTY user interface view is displayed. VTY user interfaces may vary according to device models.

3. Configure protocols supported by the VTY user interface.

[Huawei-ui-vty0-4]] protocol inbound { all | telnet | ssh}

By default, the VTY user interface supports Secure Shell (SSH) and Telnet.

Page 19 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Commands (2)
4. Configure the authentication mode and the authentication password in password authentication mode.

[Huawei-ui-vty0-4] authentication-mode {aaa | none | password}


[Huawei-ui-vty0-4] set authentication password cipher

By default, no default authentication mode is available. You need to manually configure an authentication
mode.
The set authentication password cipher command implementation varies according to VRP versions. In
some versions, you need to press Enter and then enter the password. In other versions, you can directly enter
the password after the command.

Page 20 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Example (1)

Telnet connection Configurations on the Telnet server:


<Huawei> system-view
IP network
[Huawei] telnet server enable
Telnet client Telnet server
10.1.1.1 10.1.1.2 [Huawei] aaa
[Huawei-aaa] local-user huawei password irreversible-cipher
Huawei@123
• Configure the router at 10.1.1.2 as the Telnet server and set
[Huawei-aaa] local-user huawei privilege level 15
the authentication mode to AAA local authentication. Create
[Huawei-aaa] local-user huawei service-type telnet
an account named huawei, set the password to
[Huawei-aaa] quit
Huawei@123, and set the privilege level to 15.
[Huawei] user-interface vty 0 4
• Log in to and manage the Telnet server through the Telnet [Huawei-ui-vty0-4] authentication-mode aaa
client.

Page 21 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Example (2)

Telnet connection Operations on the Telnet client:


<Host>telnet 10.1.1.2
IP network
Login authentication
Telnet client Telnet server
10.1.1.1 10.1.1.2
Username:huawei
Password:
• Configure the router at 10.1.1.2 as the Telnet server and set
Info: The max number of VTY users is 5, and the number
the authentication mode to AAA local authentication. Create
of current VTY users on line is 1.
an account named huawei, set the password to
The current login time is 2020-01-08 15:37:25.
Huawei@123, and set the privilege level to 15.
<Huawei>
• Log in to and manage the Telnet server through the Telnet
client.

Page 22 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. File Transfer

2. Telnet

3. DHCP

4. HTTP

5. DNS

6. NTP

Page 23 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Issues Faced by Manual Network Parameter
Configuration (1)
Too Many Hard-to-Understand Parameters Huge Workload

IPv4 address configuration:


Work Plan of
This Week
IP address . . . Address allocation

Mask Address allocation

Address configuration
Mask . . . Address configuration Network
administrator

Gateway . . .

• Common users are not familiar with network parameters and • Network administrators centrally configure network
misconfiguration often occurs, resulting in network access parameters, with heavy workloads and repetitive tasks.
failure. Random IP address configuration may cause IP address • Network administrators need to plan and allocate IP
conflicts. addresses to users in advance.

Page 24 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Issues Faced by Manual Network Parameter
Configuration (2)
Low Utilization Poor Flexibility

Offline user

Online user Moving


between
offices

Office A Office B

• On an enterprise network, each user uses a fixed IP address. As a • Wireless local area networks (WLANs) allow for flexible station
result, the IP address utilization is low, and some IP addresses (STA) access locations. When a STA moves from one wireless
may remain unused for a long time. coverage area to another, the IP address of the STA may need
to be reconfigured.

Page 25 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Basic Concepts of DHCP
DHCP Working Principle

• To overcome the disadvantages of the traditional static


IP configuration mode, the Dynamic Host Configuration
Request IP addresses
Protocol (DHCP) is developed to dynamically assign
suitable IP addresses to hosts.

DHCP server • DHCP adopts the client/server (C/S) architecture. Hosts


Assign IP addresses
do not need to be configured and can automatically
obtain IP addresses from a DHCP server. DHCP enables
DHCP client host plug-and-play after they are connected to the
network.

Page 26 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
DHCP Advantages
Unified Management IP Address Lease

DHCP address request DHCP address request

DHCP address response

DHCP client

DHCP server DHCP client DHCP server

DHCP client

Pool-No 1 IP:192.168.1.10
DNS-server 10.1.1.2 | Gateway 10.1.2.1 Network mask:24
Network 10.1.2.0 | Mask 255.255.255.0 Gateway:192.168.1.1
Total Used DNS: 114.114.114.114
252 2 Lease: 8 hour

• IP addresses are obtained from the address pool on the DHCP server. The • DHCP defines the lease time to improve IP address utilization.
DHCP server records and maintain the usage status of IP addresses for
unified IP address assignment and management.

Page 27 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
DHCP Working Principle

Layer 2
broadcast
domain

DHCP client DHCP Discover (broadcast): used to discover the DHCP server
DHCP server on the current network.

Sent by the DHCP client DHCP Offer (unicast): carries the IP address
Pool-No 1
assigned to the client.
Total Address 255

Sent by the DHCP server Used Address 2


DHCP Request (broadcast): informs the server
that it will use this IP address.

DHCP ACK (unicast): acknowledges the client’s use of


this IP address.

 Question: Why does a DHCP client need to send a DHCP Request packet to the DHCP server to notify its
use of a particular IP address after receiving a DHCP Offer packet?

Page 28 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
DHCP Lease Renewal

Layer 2
broadcast
domain

DHCP client DHCP server


DHCP Request (unicast): requests the server
for an IP address lease renewal.
50% of the
Sent by the DHCP client Pool-No 1
lease
DHCP ACK (unicast): notifies the client that the Total Address 255
IP address can be renewed and the lease is
Sent by the DHCP server updated. Used Address 2
Lease 8 Hours

 If the DHCP client fails to receive a response from the original DHCP server at 50% of the lease (known
as T1), the DHCP client waits until 87.5% of the lease (known as T2) has passed. At T2, the client enters
the rebinding state, and broadcasts a DHCP Request packet, to which any DHCP server can respond.

Page 29 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Commands (1)
1. Enable DHCP.

[Huawei] dhcp enable

2. Enable the interface to use the interface address pool to provide the DHCP server function.

[Huawei-Gigabitthernet0/0/0]dhcp select interface

3. Specify a DNS server IP address for the interface address pool.

[Huawei-Gigabitthernet0/0/0]dhcp server dns-list ip-address

4. Configure the range of IP addresses that cannot be automatically assigned to clients from the interface
address pool.

[Huawei-Gigabitthernet0/0/0]dhcp server excluded-ip-address start-ip-address [ end-ip-address ]

5. Configure the lease of IP addresses in the interface address pool of the DHCP server.

[Huawei-Gigabitthernet0/0/0]dhcp server lease { day day [ hour hour [ minute minute ] ] | unlimited }

By default, the IP address lease is one day.

Page 30 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Commands (2)
6. Create a global address pool.

[Huawei]ip pool ip-pool-name

7. Specify the range of IP addresses that can be assigned dynamically in the global address pool.

[Huawei-ip-pool-2]network ip-address [ mask { mask | mask-length } ]

8. Configure the gateway address for DHCP clients.

[Huawei-ip-pool-2]gateway-list ip-address

9. Specify the DNS server IP address that the DHCP server delivers to DHCP clients.
[Huawei-ip-pool-2]dns-list ip-address

10. Set the IP address lease.

[Huawei-ip-pool-2] lease { day day [ hour hour [ minute minute ] ] | unlimited }


11. Enable the DHCP server function on the interface.
[Huawei-Gigabitthernet0/0/0]dhcp select global

Page 31 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
DHCP Interface Address Pool Configuration

Requirement:
Layer 2
GE0/0/0
broadcast • Configure a router as the DHCP server, configure the subnet
domain 10.1.1.1/24
to which GE0/0/0 belongs as the address pool of DHCP
DHCP client DHCP server
clients, set the IP address of GE0/0/0 to that of the DNS
server, and set the lease to three days.

Configuration on the DHCP server:


[Huawei]dhcp enable Enable the DHCP service globally, enter the
[Huawei]interface GigabitEthernet0/0/0 interface view, associate the current
interface with the DHCP address pool,
[Huawei-GigabitEthernet0/0/0]dhcp select interface
configure the DNS address and excluded IP
[Huawei-GigabitEthernet0/0/0]dhcp server dns-list 10.1.1.2 address (excluding the interface IP address)
[Huawei-GigabitEthernet0/0/0]dhcp server excluded-ip-address 10.1.1.2 in the interface view, and configure the lease
[Huawei-GigabitEthernet0/0/0]dhcp server lease day 3 of the IP addresses assigned to clients.

Page 32 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
DHCP Global Address Pool Configuration

Requirement:

Layer 2 • Configure a router as the DHCP server and configure the


GE0/0/0
broadcast global address pool pool2 to assign IP addresses (on the
domain 10.1.1.1/24
DHCP server subnet 1.1.1.0/24) to DHCP clients. Set both the gateway
DHCP client
address and DNS address to 1.1.1.1, set the lease to 10
days, and enable GE0/0/0 to use the global address pool.
Configuration on the DHCP server:
[Huawei]dhcp enable • Enable the DHCP service globally and
[Huawei]ip pool pool2 configure the global address pool pool2.
Info: It's successful to create an IP address pool.
Configure the address range, gateway
[Huawei-ip-pool-pool2]network 1.1.1.0 mask 24
[Huawei-ip-pool-pool2]gateway-list 1.1.1.1 address, DNS address, and lease for pool2.
[Huawei-ip-pool-pool2]dns-list 1.1.1.1 • Select the global address pool on a specific
[Huawei-ip-pool-pool2]lease day 10
interface (GE0/0/0). When GE0/0/0 receives
[Huawei-ip-pool-pool2]quit
[Huawei]interface GigabitEthernet0/0/0 a DHCP request, it assigns an IP address
[Huawei-GigabitEthernet0/0/1]dhcp select global from the global address pool.

Page 33 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. File Transfer

2. Telnet

3. DHCP

4. HTTP

5. DNS

6. NTP

Page 34 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Web Page Access Using a Browser
The browser sends an HTTP request to the server
to obtain page resources.
www.huawei.com

The server returns the corresponding page content


through an HTTP response. Web server

HTTP request HTTP response

• When you enter a uniform resource locator (URL) in a browser, the browser can obtain data from a web server
and display the content on the page.

• Hypertext Transfer Protocol (HTTP): an application layer protocol for communication between a client browser
or another program and a web server

• HTTP adopts the typical C/S architecture, and uses TCP for transmission.

Page 35 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Background

WWW

The WWW is comprised of the web servers and clients all over the world.

• In the early days of the Internet, World Wide Web (WWW) was proposed to share documents.
• The WWW consists of three parts: Hypertext Markup Language (HTML) for displaying document content in a browser, HTTP for
transmitting documents on the network, and URLs for specifying document locations on the network.
• WWW was actually the name of a client application for browsing HTML documents, and now represents a collection of technologies
(HTML + HTTP + URL) and is commonly known as the Web.

Page 36 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Transfer Example (1)
HTTP request
HTTP response
Internet
Web client Web server

The URL www.servs_app.com/web/index.html is


entered in the address box of a browser. After
obtaining the IP address corresponding to the domain
name through DNS resolution, the client sends an
HTTP request to the server to request the page. GET /web/index.html HTTP /1.0
HOST:www.servs_app.com

www.servs_app.com/web/index.html

Page 37 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Transfer Example (2)
HTTP request
HTTP response
Internet
Web client Web server
Web Server
Host:www.servs_app.com

GET /web/index.html HTTP /1.0 File System


HOST:www.servs_app.com
├── bin
www.servs_app.com/web/index.html ├── etc
├── sbin
├── share
└── web
Welcome to servs_app.com └── index.html

This is an HTML Example Page


HTTP /1.1 200 ok The server finds the locally
Index.html stored page file based on the
URL and sends the page file
to the client.

After receiving the HTTP response, the


browser parses and renders the received
HTML file, and then displays the page to the
user.

Page 38 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. File Transfer

2. Telnet

3. DHCP

4. HTTP

5. DNS

6. NTP

Page 39 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Birth of DNS
 When you enter a domain name in your browser to access a website, the domain name is resolved to an IP address.
The browser actually communicates with this IP address.
 The protocol used for resolving domain names to IP addresses is Domain Name System (DNS).
 Each node on the network has a unique IP address, and nodes can communicate with one another through IP
addresses. However, if all nodes communicate through IP addresses, it is difficult to remember so many IP addresses.
Therefore, DNS is proposed to map IP addresses to alphanumeric character strings (domain names).

Internet

Web client Web server


192.168.1.1 1.2.3.4

www.huawei.com 1.2.3.4
1 Domain name
resolution HTTP
Source IP: 192.168.1.1
Destination IP: 1.2.3.4

2 HTTP access request

Page 40 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
DNS Components
 Domain name: a sequence of characters to identify hosts. In most cases, the URL entered in the
browser when you visit a website is the domain name of the website.
 DNS server: maintains the mappings between domain names and IP addresses and responds to
requests from the DNS resolver. Domain name
info

Row 1
Internet
Row 2
DNS client DNS server
DNS request Row 3
DNS query: domain name A
DNS response
UDP

DNS reply: IP of domain name A is 1.1.1.1


UDP

Page 41 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Domain Name Format
 The domain name is in the format of hostname.second-level domain.top-level domain.root domain.
The root domain is represented by a dot (.). Generally, the root domain is denoted by an empty name
(that is, containing no characters).
Root domain .

Top-level .com .net .cn .edu .org .gov


domain

Second-level
domain huawei

Hostname www The domain name of the host is www.huawei.com.

Page 42 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
DNS Query Modes
 The DNS is a distributed system. The database of most DNS servers does not have all domain name records. When a
client queries a domain name from a DNS server but the DNS server does not have the record of the domain name,
the client can continue the query in either of the following ways:
 Recursive query: The DNS server queries other DNS servers and returns the query result to the DNS client.
 Iterative query: The DNS server informs the DNS client of the IP address of another DNS server, from which the DNS client
queries the domain name.

Recursive Query Iterative Query


DNS request DNS request
DNS response 1 DNS response 1
DNS server 1 DNS server 1

4 2
2 3

3
DNS client DNS client

4
DNS server 2 DNS server 2

Page 43 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. File Transfer

2. Telnet

3. DHCP

4. HTTP

5. DNS

6. NTP

Page 44 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Time Synchronization Requirements
 Consistent clock of all devices is required in many scenarios on enterprise campus networks:
 Network management: Analysis of logs or debugging messages collected from different routers needs time for
reference.
 Charging system: The clocks of all devices must be consistent.
 Several systems working together on the same complicate event: Systems have to take the same clock for
reference to ensure a proper sequence of implementation.
 Incremental backup between a backup server and clients: Clocks on the backup server and clients should be
synchronized.
 System time: Some applications need to know the time when users log in to the system and the time when files
are modified.

Page 45 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
NTP Overview
 If the administrator manually enters commands to change the system time for time synchronization,
the workload is heavy and the accuracy cannot be ensured. Therefore, the Network Time Protocol
(NTP) is designed to synchronize the clocks of devices.
 NTP is an application layer protocol belonging to the TCP/IP suite and synchronizes time between a
group of distributed time servers and clients. NTP is based on IP and UDP, and NTP packets are
transmitted using UDP on port number 123.
NTP server

Time synchronization

... NTP client

AP Router Switch Firewall Server PC

Page 46 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
NTP Network Structure
 Primary time server: directly synchronizes its clock with a standard reference clock through a cable or radio.
Typically, the standard reference clock is either a radio clock or the Global Positioning System (GPS).
 Stratum-2 time server: synchronizes its clock with either the primary time server or other stratum-2 time servers
within the network. Stratum-2 time servers use NTP to send time information to other hosts in a Local Area
Network (LAN).
 Stratum: is a hierarchical standard for clock synchronization. It represents the precision of a clock. The value of a
stratum ranges from 1 to 15. A smaller value indicates higher precision. The value 1 indicates the highest clock
precision, and the value 15 indicates that the clock is not synchronized.

... AP Router Switch


Primary time server 1 Stratum-2 time server Stratum-2 time server

Stratum 1 Stratum 2 Stratum 3


Firewall Server PC

NTP client

Page 47 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Quiz
1. Which FTP mode is recommended for transferring log and configuration files on network
devices? Why?

2. Why does a DHCP client need to send a DHCP Request packet to the DHCP server to notify
its use of a particular IP address after receiving a DHCP Offer packet?

3. What are the functions of HTML, URL, and HTTP?

Page 48 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Summary
 FTP is used to transfer files. You are advised to use different transfer modes for
different files. FTP is based on TCP and therefore can ensure the reliability and
efficiency of file transfer.

 Dynamically assigning IP addresses through DHCP reduces the workload of the


administrator and avoids IP address conflicts caused by manual configuration of
network parameters.

 As the document transfer protocol of WWW, HTTP is widely used in today's network
for encoding and transporting information between a client (such as a web browser)
and a web server.

Page 49 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.
Thank You
www.huawei.com

Page 50 Copyright © 2021 Huawei Technologies Co., Ltd. All rights reserved.

You might also like