Vous êtes sur la page 1sur 106

Cours HCIA Routing & Switching

Part 1
Pr. Balboul Younes
Docteur en Télécommunications et Ingénieur Télécoms Radio Mobile
HUAWEI Certified Academy Instructor
Part 1 : Cours HCIA Routing & Switching
1) Basic Enterprise Network Architectures
2) Introduction to Transmission Media
3) Ethernet Framing
4) IP Addressing
5) Internet Control Message Protocol
6) Address Resolution Protocol
7) Data Forwarding Scenario
8) Questions HCIA R&S
Pr. Balboul Younes
Docteur en Télécommunications et Ingénieur Télécoms Radio Mobile
HUAWEI Certified Academy Instructor
Certifié : HCIA Switching & Routing (2019-2022)
1) Basic Enterprise Network Architectures
Branch A
Headquarters

Branch B

On-site employees
Branch C

.On trouve aujourd'hui des réseaux d'entreprise présents


dans divers secteurs allant des environnements de bureau L'évolution des solutions d'entreprise a
aux industries plus vastes de l'énergie, de la finance et des permis aux réseaux IP publics et tiers de
administrations, qui comprennent souvent des réseaux fournir cette connectivité partout, à tout
d'entreprise couvrant plusieurs emplacements physiques. moment, ainsi que le développement de
technologies établissant des connexions
réseau privées sur cette infrastructure de
réseau public
Part 1 : HCIA Routing & Switching 3
1) Basic Enterprise Network Architectures

Servers, and
printers are
connected to
each other using
Layer 2 switches

Not use subnets


for any design
purposes

same broadcast
domain

R<20 users
Deux types d’architectures
Part 1 : HCIA Routing & Switching 4
1) Basic Enterprise Network Architectures

Summary
⚫ What are some of the general differences found between small and medium-sized
enterprise networks?

⚫ What are some of the basic design considerations that need to be taken into
account for small and medium-sized enterprise networks?

Page 5
2) Introduction to Transmission Media

Simple Point-to-Point Ethernet Networks

End Station End Station

Physical Medium

⚫ Networks are comprised of at least two end stations, and a medium over which data can be carried.

Part 1 : HCIA Routing & Switching 6


2) Introduction to Transmission Media

Coaxial :
Thick coaxial

Thin coaxial BNC

Standard Cables Maximum Transmission Distance


10Base2 Thin coaxial 185m

10Base5 Thick coaxial 500m

⚫ Copper coaxial cabling commonly used to support users as part of a shared network.

Part 1 : HCIA Routing & Switching 7


2) Introduction to Transmission Media

Ethernet :

RJ 45

Standard Physical Medium Distance

10Base-T Two pairs of Category 3/4/5 twisted pair cables 100m

100Base-TX Two pairs of Category 5 twisted pair cables 100m

1000Base-T Four pairs of Category 5e twisted pair cables 100m

⚫ The primary physical medium used in enterprise networks.

Part 1 : HCIA Routing & Switching 8


2) Introduction to Transmission Media

Fiber Optic :
Supports a range of standards
of 10Mbps, 100Mbps, 1Gbps
and also 10Gbps (10GBASE)
transmission.

Standard Physical Medium Distance


10Base-F Two strand fiber 2000m

100Base-FX Two strand multi-mode fiber 2000m

1000Base-LX Single-mode fiber or multi-mode fiber 316 - 5000m

1000Base-SX Multi-mode fiber 275 - 550m

Part 1 : HCIA Routing & Switching 9


2) Introduction to Transmission Media

Serial : Mise au point il y a plus de 60 ans


des distances allant
Distance norme : 15 m jusqu'à 1 200 mètres
Jusqu’à 150 m (10kb/s) (4900 ft)

Connecteurs V.35

Connecteurs DB9 et DB25

Standard Speed
RS-232 Standards define up to 20000bps, but can reach 1Mbit/s

RS-422 100Kbit/s ~ 10Mbit/s+

⚫ Serial represents a legacy form of data transmission.

⚫ Standards continue to evolve as in forms such as USB.


Part 1 : HCIA Routing & Switching 10
2) Introduction to Transmission Media

Signal Data Encoding


1 0 1 0 1 0 1 0 1

0000 0001 0010 0011 0100


0 1 2 3 4

⚫ Signal patterns used for interpretation of communication.

⚫ Encoding is used to synchronize transmission.

Part 1 : HCIA Routing & Switching 11


2) Introduction to Transmission Media

Collision Domains :

Carrier Sense Multiple-


Access Collision
Detection (CSMA/CD).

⚫ Signals in a shared network are susceptible to collisions.

⚫ A collision detection mechanism is used to identify collisions. (CSMA/CD)


Part 1 : HCIA Routing & Switching 12
2) Introduction to Transmission Media

Duplex Modes
CSMA/CD is required

Half Duplex

Full Duplex
No requirement for CSMA/CD

⚫ Duplex modes support simultaneous and non-simultaneous bidirectional


communication.
Part 1 : HCIA Routing & Switching 13
2) Introduction to Transmission Media

Summary
⚫ Which forms of cabling can be used to support Gigabit Ethernet
transmissions within an enterprise network?
⚫ What is a collision domain?
⚫ What is the purpose of CSMA/CD?

Page 14
3) Ethernet Framing

Managing Network Communication


Upper layer protocols
standards responsible for logical TCP/IP ISO Novell IBM
forwarding and delivery of traffic

Lower layer protocols LANs WANs


Managing the physical
transmission of data across the IEEE 802 Standards Frame Relay PPP HDLC
physical network

⚫ Networks are primarily managed by upper and lower layer protocols.

Part 1 : HCIA Routing & Switching 15


3) Ethernet Framing
Layered Models - TCP/IP
Represents an interface through a variety of
protocols that enable services to be applied to end Application
user application processes

Manages the end-to-end


Transport
TCP/IP delivery of traffic

Network How traffic is logically


forwarded

Lower layer operation is


Network Interface not the concern of the
Ethernet TCP/IP protocol suite

Part 1 : HCIA Routing & Switching 16


3) Ethernet Framing
Layered Models - OSI

Provision of communications
7 Application between applications

Data formatting &


6 Presentation layer encryption/decryption

Establish, maintain and


5 Session layer manage sessions

Establish, maintain and


4
Transport layer manage end-to-end connection

3
Network layer Addressing and routing

2 Provision of link medium


Data link layer access & link management

1
Physical layer Bit flow transmission

Part 1 : HCIA Routing & Switching 17


3) Ethernet Framing
Encapsulation

7 Application Data

6 Presentation layer Data

5 Session layer Data

4
Transport layer Data

3
Network layer Data

2
Data link layer Data

1
Physical layer

Part 1 : HCIA Routing & Switching 18


3) Ethernet Framing
Communication Between Two End Stations
Host A Host B

Frame Header Data Traile


r

⚫ Data link layer frames are used to govern transmission over the communications medium.

Part 1 : HCIA Routing & Switching 19


3) Ethernet Framing
Frame Formats

Host A Host B

Ethernet II D.MAC S.MAC Type Data FCS

IEEE802.3 D.MAC S.MAC Length LLC SNAP Data FCS

Field Value >= 1536 (0x0600) Ethernet II

Field Value <= 1500 (0x05DC) IEEE802.3

Part 1 : HCIA Routing & Switching 20


3) Ethernet Framing

Ethernet II Frame : (la plus utilisée)

6 bytes 6 bytes 2 bytes 46-1500 bytes 4 bytes

D.MAC S.MAC Type Data FCS

0x0800 IP 2048 (0x0800)

0x0806 ARP 2054 (0x0806)

⚫ The Ethernet II frame type is associated with protocols with a type value greater than
1536 (0x600).
Part 1 : HCIA Routing & Switching 21
3) Ethernet Framing
IEEE802.3 Frame Max 1500 byte

6 bytes 6 bytes 2 bytes 38-1492 bytes 4 bytes

D.MAC S.MAC Length LLC SNAP Data FCS

1 byte 1 byte 1 byte 3 bytes 2 bytes

D.SAP S.SAP Control Org Code Type

STP 0x03 3 (0x03)

⚫ The IEEE 802.3 frame type is associated with protocols with a type value less than 1500 (0x05DC).

Part 1 : HCIA Routing & Switching 22


3) Ethernet Framing
Frame Forwarding
Host A Host B

MAC:10-0B-A9-23-38-10 MAC:10-0B-A9-9D-C9-B8

D.MAC

MAC:10-0B-A9-9D-B9-C8

⚫ Media Access Control (MAC) addressing facilitates data link layer communication.

Part 1 : HCIA Routing & Switching 23


3) Ethernet Framing
The Ethernet MAC Address

48 bits

24 bits 24 bits

OUI Assigned by each organization

⚫ MAC addresses are comprised of an organizationally unique identifier and a vendor assigned
address value.

Part 1 : HCIA Routing & Switching 24


3) Ethernet Framing

Unicast Frame Forwarding


48 bits

7 bits 0

Host A Host B

unicast

Host C Host D

Part 1 : HCIA Routing & Switching 25


3) Ethernet Framing
Broadcast Frame Forwarding
48 bits

FF FF FF FF FF FF

Host A Host B

broadcast

Host C Host D

Part 1 : HCIA Routing & Switching 26


3) Ethernet Framing
Multicast Frame Forwarding
48 bits

7 bits 1

Host A Host B

multicast

Host C Host D

Part 1 : HCIA Routing & Switching 27


3) Ethernet Framing

Carrier Sense
Host A Host B Host C

Carrier Sense (Network Occupied)

Host A Host B Host C

Data

Part 1 : HCIA Routing & Switching 28


3) Ethernet Framing
Frame Processing
Host A Host B

MAC B MAC A 0x0800 Data FCS IP Data

Data

⚫ Data link (frame) instructions are received, processed and discarded.

Part 1 : HCIA Routing & Switching 29


4) IP Addressing
Next Header Processing
6 Bytes 6 Bytes 2 Bytes 46-1500 Bytes 4 Bytes

DMAC SMAC Type Data FCS

IP 0x0800

⚫ The next set of instructions for processing are referenced in the type field of the
frame header.

Part 1 : HCIA Routing & Switching 30


4) IP Addressing

IP Packet Header
20-60 Bytes

IP Data

0 16 31
Header DS Field Total Length
Version
Length

Identification Flags Fragment Offset


Fixed
Message Time to Live Protocol Header Checksum 20
Header Bytes
Source IP Address

Destination IP Address

IP Options

Part 1 : HCIA Routing & Switching 31


4) IP Addressing
IP Addressing

Network Host

192.168.1 .1

11000000.10101000.00000001 .00000001

⚫ The IP address identifies networks, and network hosts.

⚫ Binary is the base numbering system used for IP addressing.

Part 1 : HCIA Routing & Switching 32


4) IP Addressing
IP Addressing

Network Address

192.168.1 .0

11000000.10101000.00000001 .00000000

Broadcast Address

192.168.1 .255

11000000.10101000.00000001 11111111

⚫ The upper and lower most host address values are reserved.
Part 1 : HCIA Routing & Switching 33
4) IP Addressing
Decimal, Binary and Hexadecimal

Format Value Range Base Value

Binary 0—1 2

Decimal 0—9 10

Hexadecimal 0—F 16

⚫ Binary and Hexadecimal are common numbering systems used within IP networks.

Part 1 : HCIA Routing & Switching 34


4) IP Addressing

Binary vs. Decimal Conversion

Bit Order 1 1 1 1 1 1 1 1
Binary
Power 27 26 25 24 23 22 21 20

Binary 128 64 32 16 8 4 2 1

Decimal Binary Hexadecimal Decimal Binary Hexadecimal

0 00000000 00 9 00001001 09

1 00000001 01 10 00001010 0A

2 00000010 02 11 00001011 0B

3 00000011 03 12 00001100 0C

4 00000100 04 13 00001101 0D

5 00000101 05 14 00001110 0E

6 00000110 06 15 00001111 0F

7 00000111 07 … … …

8 00001000 08 255 11111111 FF

Part 1 : HCIA Routing & Switching 35


4) IP Addressing
Binary Conversion

Network Host

Binary 11000000 10101000 00000001 00000001

27+26 27+25+23 20 20

Decimal 192 168 1 1

Part 1 : HCIA Routing & Switching 36


4) IP Addressing
IP Address Classes

1.0.0.0~126.255.255.255

Class A 0 Network(8bit) Host (24bit)


Host (24bit)

128.1.0.0~191.254.255.255

Class B 10 Network (16bit) Host (16bit)

192.0.1.0~223.255.254.255
Class C 110 Network (24bit) Host (8bit)

224.0.0.0~239.255.255.255
Class D 1110 Multicast

240.0.0.0~255.255.255.254

Class E 1111 Experimental

Part 1 : HCIA Routing & Switching 37


4) IP Addressing

IP Address Types

Private Address Ranges


Class A 10.0.0.0~10.255.255.255
Class B 172.16.0.0~172.31.255.255
Class C 192.168.0.0~192.168.255.255

Special Addresses
Diagnostic 127.0.0.0 ~ 127.255.255.255
Any Network 0.0.0.0
Network Broadcast 255.255.255.255

⚫ The IP network address range has been divided, and certain addresses and ranges assigned
special functions in the network.
Part 1 : HCIA Routing & Switching 38
4) IP Addressing
IP Communication

Host A Host B

192.168.1.1 192.168.2.1

192.168.1.2 192.168.2.2

Host C Host D

Network Host
192 168 1 0

192 168 2 0

Part 1 : HCIA Routing & Switching 39


4) IP Addressing
Subnet Mask
Network Host
192.168.1 0

11000000.10101000.000000001 00000000

Subnet
255.255.255 0

11111111.11111111.11111111 00000000

⚫ Subnet masks distinguish between the binary values that represent each (sub)network and
those that represent each host.

Part 1 : HCIA Routing & Switching 40


4) IP Addressing
Default Subnet Mask

Class A 255 0 0 0

Class B 255 255 0 0

Class C 255 255 255 0

⚫ Certain subnet masks are applied to address ranges by default to denote the fixed range that is
used for each network class.

Part 1 : HCIA Routing & Switching 41


4) IP Addressing
Address Planning

IP Address 192 168 1 7

Subnet Mask 255 255 255 0

11000000 10101000 00000001 00000111


11111111 11111111 11111111 00000000

Network Address
(Binary) 11000000 10101000 00000001 00000000

Network Address 192 168 1 0

Host Addresses: 2n 256

Valid Hosts: 2n - 2 254

Part 1 : HCIA Routing & Switching 42


4) IP Addressing
Case Scenario

IP Address 172 16 1 7

Subnet Mask 255 255 0 0

Network Address ? ? ? ?

Host Addresses: 2n ?

Valid Hosts: 2n - 2 ?

⚫ Determine the network for the given IP address, and the


number of actual, and valid host addresses in the network.
Part 1 : HCIA Routing & Switching 43
4) IP Addressing
Addressing Limitations

192.168.2.0/24

192.168.1.0/24 20 Hosts

30 Hosts 192.168.3.0/24
10 Hosts

⚫ Network design using the default subnet mask results in address wastage.

Part 1 : HCIA Routing & Switching 44


4) IP Addressing
VLSM Calculation

IP Address 192 168 1 7

Subnet Mask 255 255 255 128

11000000 10101000 00000001 00000111


11111111 11111111 11111111 10000000

11000000 10101000 00000001 00000000

Network Address 192 168 1 0


Host Addresses: 2n 128

Valid Hosts: 2n - 2 126

Part 1 : HCIA Routing & Switching 45


4) IP Addressing
VLSM Case Scenario

20 Hosts

30 Hosts
10 Hosts

⚫ Using only the network 192.168.1.0/24, implement VLSM for the given number of
hosts in each network segment.
Part 1 : HCIA Routing & Switching 46
4) IP Addressing
Classless Inter-Domain Routing
10.24.0.0/24

10.24.1.0/24
Announce route
10.24.0.0/22

10.24.2.0/24

10.24.3.0/24

Part 1 : HCIA Routing & Switching 47


4) IP Addressing
IP Gateways
Host A L3 Host B
L2 L2

192.168.1.1 192.168.1.253 192.168.2.253 192.168.2.1

Host A Host B

L3 L3

192.168.1.1 L2 192.168.2.1

⚫ Gateways use IP to forward packets between networks.

⚫ Hosts may act as gateways between networks in a LAN.

Part 1 : HCIA Routing & Switching 48


4) IP Addressing
IP Fragmentation

Host A Host B
L3

L2 L2

Header DS Field Total Length


Version
Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source IP Address

Destination IP Address

IP Options

Part 1 : HCIA Routing & Switching 49


4) IP Addressing
Time To Live

Host A Host B

TTL=255 TTL=254 TTL=253

Header DS Field Total Length


Version
Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source IP Address

Destination IP Address

IP Options

Part 1 : HCIA Routing & Switching 50


4) IP Addressing
Protocol Field

IP Data

0x06/0x11 TCP/UDP

0x01 ICMP

Header DS Field Total Length


Version
Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source IP Address

Destination IP Address

IP Options

Part 1 : HCIA Routing & Switching 51


5) Internet Control Message Protocol
ICMP : Internet Control Message Protocol

Message

Return Message

⚫ Le but des messages de contrôle est de fournir des informations en retour sur
les problèmes rencontrés dans l'environnement de communication.

Part 1 : HCIA Routing & Switching 52


5) Internet Control Message Protocol
ICMP (Routing)
Server A

Public Network

20.0.0.1/24

20.0.0.2/24

10.0.0.200/24
③ ① 10.0.0.100/24

② ICMP Redirect

IP: 10.0.0.1/24
Gateway: 10.0.0.100/24

Host A
Part 1 : HCIA Routing & Switching 53
5) Internet Control Message Protocol
ICMP (Diagnostics)

ICMP Echo Request ICMP Echo Reply

Host A Server

⚫ Two separate messages are used for the request and reply.

⚫ Commonly associated with the Ping application.

Part 1 : HCIA Routing & Switching 54


5) Internet Control Message Protocol
ICMP (Errors)

.2 10.0.0.0/24 .1 .2 20.0.0.0/24 .1

Host A Server

Packet Forwarding

ICMP Destination Unreachable

⚫ Notifies the packet source of problems with packet forwarding.

⚫ Uses the source IP address in the IP header for notification.

Part 1 : HCIA Routing & Switching 55


5) Internet Control Message Protocol
ICMP Format

Ethernet_II IP ICMP FCS

0 8 15 31

Type Code Checksum

Variable Parameters – Dependant on ICMP Type Field

Internet Header + 64 bits of Original Data Datagram – Dependant on ICMP Type Field

⚫ ICMP parameters are represented in a type/code format.

⚫ Additional data often carried to identify the undelivered packet.

Part 1 : HCIA Routing & Switching 56


5) Internet Control Message Protocol
ICMP Type & Code Fields
Type Code Description
0 0 Echo Reply

3 0 Network Unreachable

3 1 Host Unreachable

3 2 Protocol Unreachable

3 3 Port Unreachable

5 0 Redirect Datagram for the Network

8 0 Echo Request

⚫ The Type value represents the format of a message.

⚫ The Code value provides a more specific message description.

Part 1 : HCIA Routing & Switching 57


5) Internet Control Message Protocol
ICMP Applications - Ping

.1 10.0.0.0/24 .2

RTA RTB

<RTA>ping ?
-a Select source IP address, the default is the IP address of
the output interface
-c Specify the number of echo requests to be sent, the
default is 5
-n Numeric output only. No attempt will be made to lookup
host addresses for symbolic names
-t Timeout in milliseconds to wait for each reply, the
default is 2000ms
STRING<1-255> IP address or hostname of a remote system
……
<RTA>ping 10.0.0.2

Part 1 : HCIA Routing & Switching 58


5) Internet Control Message Protocol
Ping Results

<RTA>ping 10.0.0.2
PING 10.0.0.2 : 56 data bytes, press CTRL_C to break
Reply from 10.0.0.2 : bytes=56 Sequence=1 ttl=255 time=340 ms
Reply from 10.0.0.2 : bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.0.0.2 : bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 10.0.0.2 : bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 10.0.0.2 : bytes=56 Sequence=5 ttl=255 time=30 ms

--- 10.0.0.2 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/88/340 ms

Part 1 : HCIA Routing & Switching 59


5) Internet Control Message Protocol
ICMP Application – Traceroute

30.0.0.0/24
Host A RTA RTB Host B
10.0.0.0/24 20.0.0.0/24

<RTA>tracert ?
-a Set source IP address, the default is the IP
address of the output interface
-f First time to live, the default is 1
-m Max time to live, the default is 30
-name Display the host name of the router on each hop
-p Destination UDP port number, the default is 33434
STRING<1-255> IP address or hostname of a remote system
……
<RTA>tracert 30.0.0.2

Part 1 : HCIA Routing & Switching 60


5) Internet Control Message Protocol
Traceroute Results

<RTA>tracert 30.0.0.2

traceroute to 30.0.0.2(30.0.0.2), max hops:30, packet length:40,


press CTRL_C to break

1 10.0.0.2 130 ms 50 ms 40 ms

2 20.0.0.2 80 ms 60 ms 80 ms

3 30.0.0.2 80 ms 60 ms 70 ms

⚫ Traceroute displays hop-by-hop transmission results.

⚫ TTL value is used to define a hop limit for each set of results.

Part 1 : HCIA Routing & Switching 61


6) Address Resolution Protocol
ARP
IP: 10.1.1.1/24 IP : 10.1.1.2/24
MAC: 00-01-02-03-04-AA MAC: 00-01-02-03-04-BB

Host A Host B

ETH_II IP DATA FCS

Dest IP : 10.1.1.2
Source IP : 10.1.1.1

Dest MAC : UNKNOWN


Source MAC : 00-01-02-03-04-AA

Rôle du protocole ARP :


Le rôle du protocole ARP est de fournir un moyen de connaître l’adresse physique (adresse MAC: numéro de la carte Ethernet)
d’une machine alors qu’on ne connaît que son adresse logique (adresse IP): Résoudre une adresse physique.
En effet la connaissance de l’adresse physique (MAC) du destinataire est le seul moyen de pouvoir communiquer sur un réseau
local.
Part 1 : HCIA Routing & Switching 62
6) Address Resolution Protocol
ARP Format

Ethernet_II ARP FCS

0 15 31

Hardware Type Protocol Type

Hardware Protocol Length Operation Code


Length

Source Hardware Address

Source Protocol Address

Destination Hardware Address

Destination Protocol Address

Part 1 : HCIA Routing & Switching 63


6) Address Resolution Protocol

ARP Process

Host B

10.0.0.2
00-01-02-03-04-BB
Host A Host C

10.0.0.1 10.0.0.3
00-01-02-03-04-AA 00-01-02-03-04-CC

⚫ Host A wishes to forward data to Host C, but must identify whether it is able to
reach the destination at the data link layer.
Part 1 : HCIA Routing & Switching 64
6) Address Resolution Protocol
ARP Cache Lookup

Host B

10.0.0.2
00-01-02-03-04-BB
Host A Host C

10.0.0.1 10.0.0.3
00-01-02-03-04-AA 00-01-02-03-04-CC

Host A>arp -a

Internet Address Physical Address Type

Part 1 : HCIA Routing & Switching 65


6) Address Resolution Protocol
ARP Request Process
Host B

10.0.0.2
00-01-02-03-04-BB
Host A Host C

10.0.0.1 10.0.0.3
00-01-02-03-04-AA 00-01-02-03-04-CC

D.MAC S.MAC ARP


Dest IP: 10.0.0.3
FF-FF-FF-FF-FF-FF Source IP: 10.0.0.1
Dest MAC: 00-00-00-00-00-00
00-01-02-03-04-AA Source MAC: 00-01-02-03-04-AA
Operation Code: Request

Part 1 : HCIA Routing & Switching 66


6) Address Resolution Protocol
ARP Reply Process
Host B

10.0.0.2
00-01-02-03-04-BB
Host A Host C

10.0.0.1 10.0.0.3
00-01-02-03-04-AA 00-01-02-03-04-CC

Host C>arp -a
Internet address Physical address Type
10.0.0.1 00-01-02-03-04-AA Dynamic

Part 1 : HCIA Routing & Switching 67


6) Address Resolution Protocol
ARP Cache

Host B

10.0.0.2
00-01-02-03-04-BB
Host A Host C

10.0.0.1 10.0.0.3
00-01-02-03-04-AA 00-01-02-03-04-CC

Host A>arp -a
Internet address Physical address Type
10.0.0.3 00-01-02-03-04-CC Dynamic

Part 1 : HCIA Routing & Switching 68


6) Address Resolution Protocol
Proxy ARP
Proxy
G0/0/0 G0/0/1
10.1.0.2/16 10.2.0.2/16

Host A Host B
10.1.0.1/8 10.2.0.1/8
① ARP Request to 10.2.0.1

② ARP Request to 10.2.0.1

③ ARP Reply with MAC of Host B


④ ARP Reply with MAC of G0/0/0

⚫ Proxy ARP enables data link discovery between networks.

⚫ Proxy replies with own (G0/0/0) address on behalf of Host B.

Part 1 : HCIA Routing & Switching 69


6) Address Resolution Protocol
Gratuitous ARP
IP: 10.0.0.1/24
MAC: 00-01-02-03-04-AA

Host A

D.MAC S.MAC ARP


Dest IP : 10.0.0.1
Source IP : 0.0.0.0
FF-FF-FF-FF-FF-FF
Dest MAC : 00-00-00-00-00-00
00-01-02-03-04-AA Source MAC : 00-01-02-03-04-AA

⚫ Duplicate IP addresses may be assigned in a single IP network.

⚫ ARP can be used to discover IP address conflicts.

Part 1 : HCIA Routing & Switching 70


7) Data Forwarding Scenario
Scenario Introduction

Host A Server A

RTA RTB

10.1.1.1/24 Internet 172.16.10.1/24

Host B Server B

10.1.1.2/24 172.16.10.2/24

⚫ Data forwarding may be local or remote, however the general forwarding process is the same.

Part 1 : HCIA Routing & Switching 71


7) Data Forwarding Scenario
Path Discovery

Network/Mask Gateway Interface


0.0.0.0/0 10.1.1.254 10.1.1.1
10.1.1.0/24 - 10.1.1.1
Host A Server A

RTA RTB
10.1.1.1/24 G0/0/0 Internet 172.16.10.1/24

10.1.1.254/24
Host B Server B

10.1.1.2/24 172.16.10.2/24

⚫ Host A must have knowledge of a path to the destination.


Part 1 : HCIA Routing & Switching 72
7) Data Forwarding Scenario
ARP
Host A Host A> arp -a
Internet address Physical address Type
10.1.1.254 00-01-02-03-04-08 Dynamic
10.1.1.2 00-01-02-03-04-06 Dynamic

10.1.1.1/24 RTA
00-01-02-03-04-05
G0/0/0
Host B 10.1.1.254/24 Internet
00-01-02-03-04-08

10.1.1.2/24
00-01-02-03-04-06

⚫ The ARP cache table is used to discover the data link next-hop.

⚫ An unknown next-hop will generate an ARP request.

Part 1 : HCIA Routing & Switching 73


7) Data Forwarding Scenario
TCP Encapsulation

Host A
Segment

TCP Data (If Applicable) Transport

Network
Source Port Destination Port

Sequence Number
Data Link
Acknowledgement Number

Header N C E UA P RS F
Resv.S W C R C S S Y I Window
Length R E GK H T N N Physical
Checksum Urgent Pointer

Options Padding

⚫ Encapsulation is performed once path is confirmed.


Part 1 : HCIA Routing & Switching 74
7) Data Forwarding Scenario
IP Encapsulation
Host A
Packet (Datagram)

IP TCP Data (If Applicable) Transport

Network
Version Header DS Field Total Length
Length

Identification Flags Fragment Offset Data Link

Time to Live Protocol Header Checksum


Physical
Source IP Address

Destination IP Address

IP Options

Part 1 : HCIA Routing & Switching 75


7) Data Forwarding Scenario
Ethernet Framing

Host A
Frame

Transport

Ethernet IP TCP Data FCS


Network

D.MAC S.MAC Type Data Link

D.MAC S.MAC Length LLC SNAP Physical

⚫ Frame type is dependant on the encapsulated protocols.

⚫ IP is the upper layer protocol, so the Ethernet II frame is used.


Part 1 : HCIA Routing & Switching 76
7) Data Forwarding Scenario

Frame Forwarding

Host A

D.MAC(48bits) SFD(8 bits) Preamble(56 bits)

1…0100 11010101 010101010101010101…

⚫ Data link layer uses carrier sense to detect for existing traffic.

⚫ Preamble and SFD used to synchronize with forwarded frame.

Part 1 : HCIA Routing & Switching 77


7) Data Forwarding Scenario
Frame Processing

Host A
Error Check

FCS Data Ethernet II SFD Preamble

RTA

DESTINATION MAC
G0/0/0
Host B 00-01-02-03-04-08
TYPE
0x0800

⚫ Frame will be received by all in the same collision domain.

⚫ Only the gateway (RTA) will process the frame.


Part 1 : HCIA Routing & Switching 78
7) Data Forwarding Scenario
Packet Processing

Ver HL DS Total Length


Identification Flag Offset
TTL Protocol Checksum
Source IP: 10.1.1.1
Dest IP: 172.16.10.1 Destination/Mask Interface
IP Options 172.16.10.0/24 G0/0/1
RTA
Data IP

10.1.1.254/24 G0/0/0 G0/0/1

FCS Data Ethernet II SFD Preamble

⚫ Destination IP is checked against the address of the gateway.

⚫ A new frame header is constructed following discovery process.


Part 1 : HCIA Routing & Switching 79
7) Data Forwarding Scenario
Frame Decapsulation
Server A

RTB
172.16.10.1/24
08-07-06-05-04-AA

G0/0/1 Server B

FCS Data Ethernet II SFD Preamble

172.16.10.2/24
08-07-06-05-04-BB
D.MAC S.MAC Type(0x0800)

⚫ Frame is forwarded with destination MAC address of Server A.

⚫ Server A compares interface MAC to frame destination MAC.


Part 1 : HCIA Routing & Switching 80
7) Data Forwarding Scenario
Packet Decapsulation
Server A

Data (If Applicable) IP

RTB 172.16.10.1/24 Header


08-07-06-05-04-AA Ver. Length DS Field. Total Length

Identification Flags Fragment Offset


G0/0/1
Server B Header
TTL Protocol: 0x06
Checksum
Source IP: 10.1.1.1
Destination IP: 172.16.10.1

172.16.10.2/24 IP Options
08-07-06-05-04-BB

⚫ Server A compares own IP to destination address of IP header.

⚫ IP header is processed and discarded, data is directed to TCP.

Part 1 : HCIA Routing & Switching 81


7) Data Forwarding Scenario
Segment Decapsulation
Server A

Data (If APL) TCP

RTB 172.16.10.1/24
02-03-04-05-06-AA Source Port: 1027 Destination Port: 80

Sequence Number
G0/0/1
Server B Acknowledgement Number

Header NC E UAPR S F
Length Resv.S W C R C S S Y I Window
R E GK H T N N
Checksum Urgent Pointer
172.16.10.2/24
02-03-04-05-06-BB Options Padding

⚫ TCP header builds connection with the service at port 80.

⚫ Parameters within the TCP header used to manage connection.

Part 1 : HCIA Routing & Switching 82


7) Data Forwarding Scenario
Application of Switching Devices
Switch A Switch B
Tx

Rx

Host A Host B Host C Host D

⚫ Switches generate multiple collision domains.

Part 1 : HCIA Routing & Switching 83


7) Data Forwarding Scenario
Application of Routing Devices

Switch A Switch B

RTA

Host A Host B Host C Host D

⚫ Gateway devices such as routers generate broadcast domains.

Part 1 : HCIA Routing & Switching 84


8) Questions HCIA R&S : (20% des questions HCIA)
Q 1 : REP : A
A layer 2 LAN switch generates CAM table entries according to the ( ) of the received frame.

A. Source MAC address


B. Destination MAC address
C. Source IP address
D. Destination IP address

Q 2 : REP : A,B,D
Which of the following statements about collision domains and broadcast domains are correct? (Choose three)

A. Devices connected to the same hub form a collision domain


B. Devices connected to the same hub form a broadcast domain
C. Devices connected to the same bridge form a collision domain
D. Devices connected to the same bridge form a broadcast domain
E. Devices connected to the same router form a broadcast domain

Part 1 : HCIA Routing & Switching 85


8) Questions HCIA R&S
Q3:B
Which of the following statements regarding layer-2 switch is incorrect?

A. The switch learns MAC addresses automatically


B. The layer-3 header is modified before the received packet is transmitted
C. The layer-2 header is modified before the received packet is transmitted.
D. The layer-2 LAN switch operates at data link layer

Q4:D
[R1]display interface GigabitEthernet0/0/0
GigabitEthernet0/0/0 current state : Administratively DOWN
Line protocol current state : DOWN
Refer to the display output. What can be determined based on the output of the display command?

A. Interface Gigabit Ethernet 0/0/0 is connected to a wrong cable


B. Interface Gigabit Ethernet 0/0/0 is not associated with an IP address
C. Interface Gigabit Ethernet 0/0/0 is not associated with a dynamically defined route.
D. Interface Gigabit Ethernet 0/0/0 has been manually shut down by an administrator.
Part 1 : HCIA Routing & Switching 86
8) Questions HCIA R&S
Q 5 : REP C
An end system is unable to communicate with a DHCP server following the startup process. Which IP address
may be used by the client?
A. 0.0.0.0
B. 127.0.0.1
C. 169.254.2.33
D. 255.255.255.255
Q 6 : REP A
An Ethernet port can work one of three duplex modes, whereas an Optical Ethernet port only supports one
single mode. Which of the following represents this mode?
A. Full-duplex
B. Half-duplex
C. Auto-negotiation
D. Simplex

Part 1 : HCIA Routing & Switching 87


8) Questions HCIA R&S
Q 7 : REP C
While inspecting packets in the network, a network administrator discovers a frame with the destination MAC
address of 01-00-5E-A0-B1-C3. What can the administrator determine from this?

A. The MAC address is a unicast address.


B. The MAC address is a broadcast address
C. The MAC address is a multicast address.
D. The MAC address is incorrect

Q 8 : REP D
According to OSI reference model, which layer is responsible for end to end error checking and flow control?

A. Physical layer
B. Data link layer
C. Network layer
D. Transport layer

Part 1 : HCIA Routing & Switching 88


8) Questions HCIA R&S
Q 9 : REP B,C,D
Which of the following mechanisms are used for flow control? (Choose three)

A. Acknowledgement
B. Buffering
C. Source quench messages
D. Windowing

Q 10 : REP A,C
An Ethernet frame is captured by network protocol analyzer tool and the value of Type/Length field is 0x0800.
Which of the following statements about the frame are correct? (Choose two)

A. The frame structure of the frame is Ethernet_II


B. The frame structure of the frame is 802.3
C. Its upper layer protocol is IP
D. Its upper layer protocol is IPX

Part 1 : HCIA Routing & Switching 89


8) Questions HCIA R&S
Q 11 : REP C
Which of the following descriptions regarding the TTL field of the IP packet is correct?

A. The TTL defines how many packets the source can send.
B. The TTL defines the duration during which the source can send packets.
C. The TTL value will decrement by 1 each time the packet is routed.
D. The TTL value will increment by 1 each time the packet is routed.

Q 12 : REP B,C
Which of the following statements are correct about TTL field in IP packet? (Choose two)

A. The maximum value of TTL is 65535


B. Normally, it's impossible for a router to receive a packet whose TTL is zero.
C. The main purpose of TTL is to prevent IP packets from circulating endlessly in a network which can consume
a lot of bandwidth
D. TTL value will be decremented as a packet is passed through the network devices such as hub, LAN switch
and router.
Part 1 : HCIA Routing & Switching 90
8) Questions HCIA R&S
Q 13 : REP A
In the case of Huawei router, what is the "-i" parameter in a Ping command issued on a VRP operating system
used to set?

A. Interface for sending an Echo Request packet


B. Source IP address for sending an Echo Request packet
C. Interface for receiving an Echo Reply packet
D. Destination IP address for receiving an Echo Reply packet

Q 14 : REP D
To provide the information about the IP addresses that a user packet traverses along the path to the
destination, which of the following does Tracert record in each expired ICMP TTL packet?
A. Destination port
B. Source port
C. Destination address
D. Source address

Part 1 : HCIA Routing & Switching 91


8) Questions HCIA R&S
Q 15 : REP A,B,D
Which of the following statements regarding the verification of IP connectivity are false? (Choose three)

A. The ping 127.0.0.1 command can be used to check whether the network cable is correctly inserted into the
host’s Ethernet port.
B. The ping command with the host IP address as the destination can be used to verify that the TCP/IP protocol
suite is functioning correctly.
C. The ping command can be used to verify connectivity between the host and the local gateway.
D. The command “ipconfig /release” can be used to check connectivity problems between the host and the local
gateway.

Q 16 : A,C
A network administrator uses the ping command to check for points of failure in the network. Which protocols
will be used during this process? (Choose two)
A. ICMP
B. TCP
C. ARP
D. UDP Part 1 : HCIA Routing & Switching 92
8) Questions HCIA R&S
Q 17 : B,C
A network administrator recently used tracert to trace the path to the destination IP address of an external
website, however the trace path displayed only a timeout result. Which of the following statements correctly
explains the reason for this? (Choose two)

A. The source router had shutdown the ICMP function.


B. This destination IP address does not exist.
C. The gateway canot find a route to the destination.
D. This is a normal phenomenon.

Part 1 : HCIA Routing & Switching 93


8) Questions HCIA R&S
Q 18 : A
Ping 10.0.0.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.2: bytes=800 Sequence=1 ttl=255 time=2 ms
Reply from 10.0.0.2: bytes=800 Sequence=2 ttl=255 time=10 ms
--- 10.0.0.2 ping statistics ---
2 packet(s) transmitted
2 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/6/10 ms
A network administrator uses the ping command to test connectivity to the destination 10.0.0.2 on a Huawei AR
series router. Which statement regarding the output is correct?

A. The network administrator used the command ping -c 2 -s 800 10.0.0.2


B. The network administrator used the command ping -a 2 -v 800 10.0.0.2
C. The path between the source and destination is not OK.
D. The network administrator changed the default TTL value.

Part 1 : HCIA Routing & Switching 94


8) Questions HCIA R&S
Q 19 : A, D

Which of the following statements explains the behavior of the ICMP redirect function? (Choose two)

A. When a router receives data on the interface via which the same data needs to be forwarded, and the source is
on the same segment as the next hop, an ICMP redirect message will be sent by the router to the source.

B. When a router receives data on an interface, and the router’s IP address matches the destination IP of the data,
an ICMP redirect message will be sent by the router to the source.

C. When a router receives data on the interface via which the same data needs to be forwarded, and the source is
on the same segment as the next hop, an ICMP Redirect message will be sent by the source to the router.

D. When a router receives data on the interface via which the same data needs to be forwarded, and the source is
on a different segment from the next hop, an ICMP redirect message will be sent by the router to the source

Part 1 : HCIA Routing & Switching 95


8) Questions HCIA R&S
Q 20 : A
Host A wishes to send data to host C, and generates an ARP request to obtain the destination MAC address.
Which statement is true?

A. The destination IP address of the ARP request is Host C


B. The destination MAC address of this ARP request is Host C
C. The destination IP address for the ARP request is a broadcast IP address.
D. The destination MAC address of this frame is the MAC address of G0/0/0 on RTA

Q 21 : C
An ARP request is sent by host A to obtain the destination MAC address of host D, Which statement is true
about regarding the ARP reply?
A. The destination MAC address of this frame is the MAC address of Switch A
B. The destination IP address of this packet is the VLANIF1 IP address of Switch A
C. The destination MAC address of this frame is the MAC address of Host A
D. The destination IP address of this packet is a broadcast IP address.

Part 1 : HCIA Routing & Switching 96


8) Questions HCIA R&S
Q 22 : A
How many probe packets are sent for each TTL value by default when "tracert" is used to detect the path along
which packet is sent from source to destination?

A. 3
B. 4
C. 6
D. 8

Q 23 : C
Which of the following applications can be used to detect the path along which the data packets are transmitted
from the source to the destination?

A. Route
B. Netstat
C. Tracert
D. Send
Part 1 : HCIA Routing & Switching 97
8) Questions HCIA R&S
Q 24 : B,C
Which of the following types can ICMP packets be classified into? (Choose two)

A. ICMP transport packet


B. ICMP error reporting packet
C. ICMP query packet
D. ICMP application packet

Q 25 : B,C
A router functioning as a Proxy receives an ARP request packet, but finds that the destination address in the
packet is not intended for itself. In this case, what will the router do? (Choose two)

A. Discard the packet.


B. Check for a route that matches the destination address.
C. Forward its MAC address to the ARP request sender after finding that a route to the destination address is
available.
D. Broadcast the ARP request packet.
Part 1 : HCIA Routing & Switching 98
8) Questions HCIA R&S
Q 26 : C
Two end stations in a point-to-point network perform address resolution. Which of the following statements is
correct?

A. The destination address of an ARP request from each station will be a unicast MAC address.
B. The destination address of an ARP request from each station will be a broadcast IP address.
C. The destination address of an ARP reply from each station will be a unicast MAC address
D. The destination address of an ARP reply from each station will be a broadcast MAC address.

Q 27 : B
What will the destination MAC address be at the moment a frame is transmitted by the host, when the router is
the IP destination?

A. The MAC address of the switch.


B. The MAC address of the router interface G0/0/0.
C. The MAC address of the host.
D. The destination MAC address will be a broadcast MAC address.
Part 1 : HCIA Routing & Switching 99
8) Questions HCIA R&S
Q 28 : A,B
Which of the following statements about gratuitous ARP packets are true? (Choose two)

A. A system can determine whether conflicting IP addresses are used by sending a gratuitous ARP packet
B. A gratuitous ARP packet uses the same format as an ARP request packet.
C. A gratuitous ARP packet can help to update an IP address.
D. A gratuitous ARP packet uses the same format as an ARP reply packet.

Q 29 : A
The administrator has configured an IP address for Host A and Host B, but had forgotten to configure a
default gateway. What effect will this have on the hosts?

A. Neither host will be affected, and therefore will be able to communicate with the peer.
B. Host A will be unable to connect to the router’s G0/0/0 interface.
C. Hosts will be unable to comminicate unless arp-proxy is enabled on the router.
D. The host will be unable to reach neither the local nor remote network destinations .

Part 1 : HCIA Routing & Switching 100


8) Questions HCIA R&S
Q 30 : C
The administrator has configured an IP address for Host A and Host B, but had forgotten to configure a default
gateway. What effect will this have on the hosts?

A. Neither host will be affected, and therefore will be able to communicate with the peer.
B. Host A will be unable to connect to the router’s G0/0/0 interface.
C. Hosts will be unable to comminicate unless arp-proxy is enabled on the router.
D. The host will be unable to reach neither the local nor remote network destinations .
Q 31 : D
The administrator uses the ping command on the host to test connectivity to the website www.huawei.com.
The command line shows a request time out. The administrator displays the ARP entries for the host.
Which entry will be found in the ARP cache table of the host?

A. The MAC address of the destination www.huawei.com will exist in the ARP cache.
B. The MAC address of the switch will exist in the ARP cache.
C. The IP address of the destination www.huawei.com will exist in the ARP cache.
D. The MAC address of router interface G0/0/0, will exist in the ARP cache.
Part 1 : HCIA Routing & Switching 101
8) Questions HCIA R&S
Q 32 : A,B
When R2 forwards data to R3 from R1, which of the following items will change? (Choose two)

A. The source MAC address


B. The destination MAC address
C. The source IP address
D. The destination IP address
Q 33 : C
If Host B also configured the IP address as “192.168.1.1/24”, an IP address confict will occur. What will happen
as a result?

A. Host B will send an ICMP request to the destination with the configured IP address. If a reply is received, the
host will notify of an address conflict.
B. Host A will send a gratuitous ARP request to resolve the MAC address of the destination 192.168.1.1, for
which Host B will reply.
C. Host B will send a gratuitous ARP request to resolve the MAC address of the destination 192.168.1.1, for
which Host A will reply.
D. Host A will ignore any received ARP request intended for destination 192.168.1.1.
Part 1 : HCIA Routing & Switching 102
8) Questions HCIA R&S
Q 34 : C
<Quidway>display mac-address
-------------------------------------------------------------------------------
MAC Address VLAN/VSI Learned-From Type
-------------------------------------------------------------------------------
5489-98ec-f018 1/- GE0/0/13 dynamic
-------------------------------------------------------------------------------
Total items displayed = 1
Refer to the graphic. A switch attempts to forward a frame to the MAC destination 5489-98ec-f01. What
operation will occur on the switch?

A. The switch will send a request to obtain the MAC address of 5489-98ec-f011.
B. The switch will report that the destination is unreachable and report this to the source.
C. The switch will flood the frame via all ports, with exception of the port on which the frame was received.
D. The switch will drop the frame because it does not have an entry in its MAC address table.

Part 1 : HCIA Routing & Switching 103


8) Questions HCIA R&S
Q 35 : B
Host A has been connected to switch A and configured with an IP address. When Host A initially forwards a
frame, what action will be taken by Switch A?

A. Switch A will drop this frame.


B. Switch A will attempt to flood the frame to all ports except for the G0/0/1 interface.
C. Switch A will forward the frame via ports G0/0/1, G0/0/2 and G0/0/3.
D. Switch will receive this frame before returning the frame to G0/0/1.

Q 36 : B
A server is linked to port interface G0/0/1 of a switch. The administrator wishes to allow only this server to be
linked to this interface on the switch. Which method can be used to achieve this?

A. Configure a static ARP entry using the server’s IP address and MAC address in the switch.
B. Configure a static MAC address binding entry of the server’s MAC address and the interface in the switch.
C. Configure the default gateway of the switch to be the same as the server’s IP address.
D. It is not possible to enable a single device to be associated with an interface.
Part 1 : HCIA Routing & Switching 104
8) Questions HCIA R&S
Q 37 : A
An administrator connects two switches together in a local enterprise network. The ports of one switch support
Fast Ethernet, while the ports of the other switch support Gigabit Ethernet. Hosts connected to one switch are
able to communicate, however communication between the two switches fails. What is the possible reason for
this?

A. The ports have disabled auto-negotiation.


B. One port is supporting auto-negotiation, while auto-negotiation is disabled on the port of the other switch.
C. The port of one switch is operating using half duplex mode, while the port of the other switch is using full
duplex mode.
D. A Fast Ethernet port cannot communicate directly with a Gigabit Ethernet port.

Part 1 : HCIA Routing & Switching 105


8) Questions HCIA R&S
Q 38 : D
A Network administrator has been assigned the ip address segment 192.168.176.0/25, from
which he support 20 users in the marketing departement, which ip subnet best support this
requirement ?

A. 192.168.176.0/25
B. 192.168.176.0/30
C. 192.168.176.48/29
D. 192.168.176.96/27

Part 1 : HCIA Routing & Switching 106