Huawei Certification
HCIE-R&S
Huawei Certified Internetwork Expert-Routing and Switching
HUAWEI TECHNOLOGIES
HCIE
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of
their respective holders.
Notice
The information in this document is subject to change without notice. Every effort
has been made in the preparation of this document to ensure accuracy of the contents,
but all statements, information, and recommendations in this document do not
constitute the warranty of any kind, expressed or implied.
Huawei Certification
HCIE-R&S
HUAWEI TECHNOLOGIES
HCIE-R&S
HUAWEI TECHNOLOGIES
HCIE
HUAWEI TECHNOLOGIES
HCIE-R&S
Referenced icon
Router
L3 Switch
L2 Switch
Firewall
Serial line
Ethernet line
HUAWEI TECHNOLOGIES
Net cloud
HCIE
CONTENTS
RIP ..................................................................................................................................................... 7
IS-IS.................................................................................................................................................. 59
OSPF .............................................................................................................................................. 123
BGP BASICS .................................................................................................................................... 196
BGP ADVANCED AND INTERNET DESIGN ........................................................................................ 266
ROUTE IMPORT AND CONTROL ...................................................................................................... 334
VLAN .............................................................................................................................................. 393
LAN LAYER 2 TECHNOLOGIES ......................................................................................................... 448
WAN LAYER 2 TECHNOLOGIES........................................................................................................ 496
STP ................................................................................................................................................. 548
MULTICAST .................................................................................................................................... 636
IPv6 ................................................................................................................................................ 719
MPLS VPN ...................................................................................................................................... 805
OTHER TECHNOLOGIES .................................................................................................................. 841
HUAWEI TECHNOLOGIES
RIPv1 characteristics
RIP is a UDP-based routing protocol. A RIP packet excluding
an IP header has at most 512 bytes, which includes a 4-byte
RIP header, and each route includes a 20-byte, the maxium
message of RIP is 4+(25*20)=504-byte routing entries, and an
8-byte UDP header. A RIPv1 packet does not carry mask
information. RIPv1 send and receive routes based on the main
class network segment mask and interface address mask.
Therefore, RIPv1 does not support route summarization or
discontinuous subnets. RIPv1 packets do not carry the
authentication field, and so RIPv1 does not support
authentication.
Precautions
If a RIP device does not have the triggered update function, it
deletes an unreachable route from the routing table after a
maximum of 300 seconds (aging time plus garbage-collect
time).
If a RIP device has the triggered update function, it deletes an
unreachable route from the routing table after a maximum of
120 seconds (the garbage-collect time).
Split horizon
RIP uses split horizon to reduce bandwidth consumption and
prevent routing loops.
Implementation
R1 sends R2 a route to network 10.0.0.0/8. If split horizon is
not configured, R2 sends the route learned from R1 back to R1.
In this manner, R1 can learn two routes to network 10.0.0.0/8:
one direct route with zero hops and the other route with two
hops and R2 as the next hop.
However, only the direct route is active in the RIP routing table
of R1. When the route from R1 to network 10.0.0.0/8 becomes
unreachable and R2 does not receive route unreachable
information, R2 continues sending route information indicating
that network 10.0.0.0/8 is reachable to R1. Subsequently, R1
receives incorrect route information and considers that it can
reach network 10.0.0.0/8 through R2; R2 still considers that it
can reach network 10.0.0.0/8 through R1. As a result, a routing
loop occurs. After split horizon is configured, R2 does not send
the route to network 10.0.0.0/8 back to R1, preventing a
routing loop.
Precautions
Split horizon is disabled on NBMA networks by default.
Triggered update
Triggered update can shorten the network convergence time.
When a routing entry changes, a RIP device broadcasts the
change to other devices immediately without waiting for
periodic update. If triggered update is not configured, by
default, invalid routes are retained in the routing table for a
maximum of 300 seconds (aging time plus garbage-collect
time).
Update is not triggered when the next-hop address becomes
unreachable.
Implementation
After R1 detects a network fault, it sends a route update to R2
immediately without waiting for the expiry of the update timer.
Subsequently, the routing table of R2 is updated in a timely
manner.
Route summarization
RIPv2 supports route summarization. Because RIPv2 packets
carry the mask, RIPv2 supports subnetting. Route
summarization can improve scalability and efficiency of large
networks and reduce the routing table size.
RIPv2 process-based classful summarization can implement
automatic summarization.
Interface-based summarization can implement manual
summarization.
If the routes to be summarized carry tags, the tags are deleted
after these routes are summarized into one summary route.
Case
Two routes: route 10.1.0.0/16 (metric=10) and route
10.2.0.0/16 (metric=2) are summarized into one natural
network segment route 10.0.0.0/8 (metric=3).
Case description
In this case, R1, R2, and R3 reside on network 192.168.1.0/24;
R3, R4, and R5 reside on network 192.168.2.0/24. All the
routers run RIPv2 and advertise IP addresses of connected
interfaces. To control route selection on R3, modify the metric
of routes.
Remarks
In the IP routing table, only some related routing entries are
displayed. In the Flags field of the route, R indicates an
iterated route, and D indicates that the route is delivered to the
FIB table.
The route iteration process is as follows: Iteration process is
finding routing for iteration. On a device, when the next hop of
a route to the destination address does not match the
outbound interface of the device, routes can match again the
destination address in the table of the next hop so routes be
iterated to find the correct outbound interface for forwarding.
The FIB table is the route forwarding table that is generated by
the routing table. You can run the display fib command to
view the forwarding table.
Command usage
The rip metricin command increases the metric of a received
route. After the route is added to the routing table, the metric of
the route is changed. Running this command affects route
selection of the local device and other devices.
The rip metricout command increases the metric of an
advertised route. The metric of the route remains unchanged
in the routing table. Running this command does not affect
route selection of the local device but affects route selection of
other devices.
View
Interface view
Parameters
rip metricout { value | { acl-number | acl-name acl-name | ipprefix ip-prefix-name } value1 }: sets the additional metric to
be added to an advertised route.
value: increases the metric of an advertised route. The
value ranges from 1 to 15 and defaults to 1.
acl-number: specifies a basic ACL number. The value
ranges from 2000 to 2999.
acl-name acl-name: specifies an ACL name. The value
is case-sensitive.
ip-prefix ip-prefix-name: specifies an IP prefix list name,
which must be unique.
Case description
The topology in this case is the same as that in the previous
case. To prevent interfaces from sending or receiving route
updates, suppress the interfaces or run the undo rip
input/output commands.
Command usage
The silent-interface command suppresses an interface to
allow it to receive but not send RIP packets. If an interface is
suppressed, direct routes of the network segment where the
interface resides can still be advertised to other interfaces.
This command can be used together with the peer (RIP)
command to advertise routes to a specified device.
The undo rip output/input command prohibits an interface
from sending/receiving RIP packets.
View
silent-interface: RIP view
undo rip output/input: interface view
Parameters
silent-interface { all | interface-type interface-number }
all: suppresses all the interfaces.
Precautions
After all the interfaces are suppressed, one of the interfaces
cannot be activated. That is, the silent-interface all command
has the highest priority. In this case, all the interfaces of R4
are suppressed, and so any interface of R4 cannot be
activated.
Configuration verification
The display ip routing-table command output shows that: R3
can receive the update of route 172.16.0.0/24 from R5 but not
R4 and can receive the update of route 10.0.0.0/24 from R1
but not R2.
Case description
The topology in this case is the same as that in the previous
case. To prevent a device from receiving routes from a
specified neighbor, run the filter-policy gateway command.
Command usage
The filter-policy { acl-number | acl-name acl-name } import
command filters received routes based on an ACL.
The filter-policy gateway ip-prefix-name import command
filters routes based on the advertising gateway.
View
filter-policy { acl-number | acl-name acl-name | ip-prefix ipprefix-name } import: RIP view
filter-policy gateway ip-prefix-name import: RIP view
Parameters
filter-policy { acl-number | acl-name acl-name } import
acl-number: specifies the number of a basic ACL used to
filter the destination address of routes.
acl-name acl-name: specifies the name of an ACL. The
name is case-sensitive and must start with a letter.
ip-prefix: filters routes based on an IP prefix list.
ip-prefix-name: specifies the name of an IP prefix list
used to filter the destination address of routes.
filter-policy gateway ip-prefix-name import
gateway: filters routes based on the advertising gateway.
ip-prefix-name: specifies the IP prefix list name of the
advertising gateway.
Configuration verification
Run the filter-policy gateway command to filter routes from a
specified neighbor. In this case, routes from R4 are filtered on
R3.
Case description
To reduce routing entries, Company A decides to summarize
routes. RIPv2 summarization includes automatic
summarization based on the main class network and manual
summarization. You can perform automatic summarization on
R1 and manual summarization on R3 and R4.
Command usage
summary [ always ]: When the class summarization is enable,
summary routes are advertised to the natural network
boundary. In default the RIPv2 is enable. But If split horizon or
poison reverse is configured, summarization will become
invalid. And when the always parameter is configured, no
matter how the split horizon or poison reverse situation is,
RIPv2 automatic summarization is enable.
rip summary-address ip-address mask [ avoid-feedback ]:
configures a RIP router to advertise a local summary IP
address. If the avoid-feedback keyword is configured, the
local interface does not learn the summary route to the
advertised summary IP address. This configuration prevents
routing loops.
View
summary [ always ]: RIP view
rip summary-address ip-address mask [ avoid-feedback ]:
interface view
Parameters
summary [ always ]
always: If the always parameter is not configured,
classful summarization becomes ineffective when split
horizonor poison reverse is configured.
Case description
In this case, R1 and R2 connect over network 192.168.1.0/24.
R1 connects to network 10.0.0.0/24, and R2 connects to
network 172.16.0.0/24. Devices on the network run RIPv2 and
import the routes to networks where the devices reside. Only
the display command output of R1 is provided and only
information about this case is displayed.
Command usage
timers rip update age garbage-collect: adjusts a timer.
rip authentication-mode md5 nonstandard passwordkey key-id: configures the MD5 authentication mode.
Authentication packets use the nonstandard packet format.
nonstandard indicates that MD5 authentication packets use
the nonstandard packet format (IETF standards).
rip replay-protect [ window-range ]: enables the replayprotect function. window-range specifies the receive or
transmit buffer size for connections. The default value is 50.
View
timers rip update age garbage-collect: RIP view
rip authentication-mode md5 nonstandard passwordkey key-id: interface view
rip replay-protect [ window-range ]: interface view
Parameters
timers rip update age garbage-collect
update: specifies the interval for transmitting route
updates.
age: specifies the route aging time.
garbage-collect: specifies the interval at which an
unreachable route is deleted from the routing table, namely,
garbage-collect time defined in standards.
Precautions
If the three timers are configured incorrectly, routes become
unstable. The update time must be shorter than the aging time.
For example, if the update time is longer than the aging time, a
RIP router cannot notify route updates to neighbors within the
update time. In applications, the timeout period of the garbagecollect timer is not fixed. When the update timer is set to 30
seconds, the garbage-collect timer may range from 90 to 120
seconds. The reason is as follows: Before the RIP router
deletes an unreachable route from the routing table, it sends
Update packets four times to advertise the route and sets the
metric of the route is set to 16. Subsequently, all the neighbors
learn that the route is unreachable. Because a route may
become unreachable anytime within an update period, the
garbage-collect timer is 3 to 4 times the update timer.
Assume that the Identification field (a field in an IP header) of
the last RIP packet sent before a RIP interface goes Down is X.
After the interface becomes Up, the Identification file of the
RIP packet sent again becomes 0, and subsequent RIP
packets are discarded until a RIP packet with the Identification
field as X+1 is received. This, however, causes asynchronous
and lost RIP routing information between two ends. To
address this issue, configure the rip replay-protect command
to enable the RIP interface to obtain the Identification field of
the last RIP packet sent before the RIP interface goes Down
and increase the Identification field in the subsequent RIP
packet by 1.
Case description
In this case, R1 connects to R2 through a frame relay network.
R1 connects to network 10.X.X.0/24, and R2 connects to
network 172.16.X.0/24.
Analysis process
In the pre-configurations of R1 and R2, the frame relay
configuration supports multicast.
R1 sends version 2 Update packets to R2 in multicast.
R1 and R2 can learn routes to each other.
Results
Generally, the peer command makes the routers send the
packets in unicast, but not surpress to sent packets in
multicast by default. Therefore, suggest configure the related
interfaces are silent mode when configure this command. So,
the multicast packets is supress and only unicast packets can
be sent.
Results
The display rip route command displays the RIP routes
learned from other routers and values of timers for routes. The
Tag field indicates whether a RIP route is an internal or
external route. The default value is 0. The Flags field indicates
whether a RIP route is active or inactive. The value RA
indicates an active RIP route, and the value RG indicates an
inactive RIP route and that the garbage-collect timer has been
started.
Results
After the avoid-feedback keyword is specified, the local
interface does not learn the summary route to the advertised
summary IP address, preventing routing loops.
The filter-policy export command configures a filtering policy
to filter the routes to be advertised. Only the filtered routes can
be added to the routing table and advertised through Update
packets.
Case description
In this topology, R1, R2, and R3 connect to the same
broadcast domain. R3 connects to network 172.16.X.0/24 and
advertises routes to RIP.
Analysis process
In requirements 1 and 3, R1 is taken as an example. The
command output shows that R1 sends multicast packets and
does not start authentication.
Before meeting requirement 2, R1 can receive all routes to
172.16.X.0/24.
Results
RIP authentication command can only be configured on an
interface. Huawei devices support standard MD5
authentication and Huawei proprietary authentication mode.
You can run the display rip process-id interface interfacetype verbose command to view the authentication mode.
Parameters
rip authenticationmode { simple password | md5 { nonstandard { passwordkey1 key-id | keychain keychain-name } | usual passwordkey2 } }
simple: indicates plain-text authentication.
password: Specifies the plain-text authentication password.
md5: indicates MD5 cipher-text authentication.
nonstandard: indicates that MD5 cipher-text
authentication packets use the nonstandard packet
format (IETF standards)
password-key1: specifies the authentication password in
cipher text.
key-id: specifies the key in MD5 cipher-text authentication.
keychain keychain-name: specifies a keychain name.
usual: indicates that MD5 cipher-text authentication
packets use the universal packet format (namely,
private standards).
Results
Only an ACL can be used but an IP prefix list cannot be used,
When defined ACLs make sure use the wild-mask. In this case,
need focus on the bits of wild-mask is 0, and the other bits is 1.
Results
RIPv2 multicasts Update packets by default. You can run the
rip version 2 broadcast command in the interface view to
configure RIPv2 to broadcast Update packets.
IS-IS Overview
IS-IS is a dynamic routing protocol designed by the
International Organization for Standardization (ISO) for its
Connectionless Network Protocol (CLNP).
The Internet Engineering Task Force (IETF) extended and
modified IS-IS so that IS-IS can be applied to TCP/IP and
OSI environments. This version of IS-IS is called Integrated
IS-IS.
IS-IS Terms
Connectionless network service (CLNS)
CLNS consists of the following three protocols:
Level-1 Router
A Level-1 router manages intra-area routing. It establishes
neighbor relationships with only Level-1 and Level-1-2
routers in the same area. A Level-1 router maintains a
Level-1 link state database (LSDB), which contains routes
in the local area.
A Level-1 router forwards packets destined for other areas
to the nearest Level-1-2 router.
A Level-1 router connects to other areas through a Level-12 router.
Level-2 Router
A Level-2 router manages inter-area routing. It can
establish neighbor relationships with Level-2 routers in the
same area or in other areas, as well as Level-1-2 routers.
A Level-2 router maintains a Level-2 LSDB, which contains
all routes in the IS-IS network.
All Level-2 routers form the backbone network of the
routing domain,They establish Level-2 neighbor
relationships and are responsible for inter-area
communication. Level-2 routers in the routing domain must
be physically contiguous to ensure the continuity of the
backbone network.
Level-1-2 Router
A router that belongs to both a Level-1 area and a Level-2
area is called a Level-1-2 router. It can establish Level-1
neighbor relationships with Level-1 and Level-1-2 routers in
the same area.
Pseudonode
A pseudonode is used to simulate a virtual node in the
broadcast network. It is not a real router. In IS-IS, a
pseudonode is identified by the system ID of the DIS and
the 1-byte Circuit ID (its value is not 0). The use of
pseudonodes simplifies the network topology.
When the network changes, the number of generated LSPs
is reduced, and the SPF calculation consumes fewer
resources.
Differences Between DIS in IS-IS and designated router (DR)/backup
designated router (BDR) in OSPF
In an IS-IS broadcast network, a router whose priority is 0
also takes part in DIS election. In an OSPF network, a
router whose priority is 0 does not take part in DR election.
In an IS-IS broadcast network, when a new router that
meets the requirements of being a DIS connects to the
network, the router is elected as the new DIS, and the
previous pseudonode is deleted. This causes a new
flooding of LSPs. In an OSPF network, when a new router
connects to the network, it is not immediately elected as the
DR even if it has the highest DR priority.
In an IS-IS broadcast network, all routers (including nonDIS routers) of the same level and on the same network
segment establish adjacencies.
NSAP
The area address (area ID) consists of the IDP and the HODSP of
the DSP. It identifies a routing domain and areas in a routing
domain. An area address is similar to an area number in OSPF.
Routers in the same Level-1 area must have the same area
address, while routers belong to the Level-2 area can have
different area addresses.
NET
An NET indicates network layer information about a device. An
NET can be regarded as a special NSAP (SEL is 00). The NET
length is the same as the NSAP length. Its maximum length is 20
bytes and minimum length is 8 bytes. When configuring IS-IS on a
router, you only need to consider an NET but not an NSAP.
Compared to a LAN IIH, a P2P IIH does not have the Priority and
LAN ID fields, but has a Local Circuit ID field. The Priority field
indicates the DIS priority in a broadcast network, the LAN ID field
indicates the system ID of the DIS and pseudonode, and the
Local Circuit ID field indicates the local link ID.
IIHs are used for two neighbors to negotiate MTU by padding the
packets to the maximum size.
LSP LSPs are similar to link-state advertisements (LSAs) in OSPF.
The ATT, OL, and IS-Type fields are major fields in an LSP. The
ATT field identifies that the LSP is sent by a Level-1 or Level-2
router. The OL field identifies the overload state. The IS-Type field
indicates whether the router that generates the LSP is a Level-1
router or Level-2 router (the value 01 indicates Level-1 and the
value 11 indicates Level-2).
Version/protocol ID extension
It has a fixed value of 1.
System ID length
It indicates the system ID length and has a fixed
value of 6 bytes.
PDU type
It identifies the PDU type.
Version
It has a fixed value of 1.
Reserve
It is set to all zeros.
Max areas
It indicates the maximum number of areas supported
by the intermediate system (IS). If the value is 3, the
IS supports a maximum of three areas.
IIHs on a P2P link
Circuit type
It indicates the level of the router that sends the PDU.
If this field is set to 0, the PDU will be ignored.
System ID
It indicates the system ID of the originating router
that sends the IIH.
Holding time
It indicates the interval for the peer router to wait for
the originating router to send the next IIH.
PDU length
It indicates the PDU length.
Local circuit ID
It is allocated to the local circuit by the originating
router when the router sends IIHs. This ID is unique
on the router interface. On the other end of the P2P
link, thecircuit ID contained in IIHs may be the same
as or different from the local circuit ID.
LSP
PDU length
It indicates the PDU length.
Remaining lifetime
It indicates the time before an LSP expires
LSP ID
It can be the system ID, pseudonode ID, or LSP
number.
The value 0000.0000.0001.00-00 indicates a
common LSP.
The value 0000.0000.0001.01-00 indicates a
pseudonode LSP.
The value 0000.0000.0001.00-01 indicates a
fragment of a common LSP.
Sequence number
It indicates the sequence number of the LSP. The
value starts from 0 and increases by 1. The
maximum value is 2^32-1.
Checksum
It indicates the checksum. The checksum start after
from the LSP Remaining Time till the end.
P bit
It is used to repair segmented areas and is similar to
the OSPF virtual link. Most vendors do not support
this feature.
ATT bit
It indicates that the originating router is connected to
one or multiple areas.
OL bit
It identifies the overload state.
IS type
It indicates the router type.
Two-Way Mode
The DIS on the network segment adds the received LSP to its
LSDB. After the CSNP timer expires, the DIS sends CSNPs at an
interval of 10 seconds to synchronize the LSDBs on the network.
R3 receives the CSNPs from the DIS, checks its LSDB, and
sends a PSNP to the DIS to request the LSPs it does not have.
The DIS receives the PSNP and sends the required LSPs to R3
for LSDB synchronization.
The process of updating the LSDB of the DIS is as follows:
Principles
LSPs with the overload bit are still flooded on the network,
but the LSPs are not used when routes that pass through a
router configured with the overload bit are calculated. That is,
after the overload bit is set on a router, other routers ignore this
router when performing SPF calculation and calculate only the
direct routes of the router.
Topology
Fast Convergence
Intelligent Timer
LSP generation intelligent timer: There is a minimum
interval restriction on LSP generation to prevent frequent
flapping of LSPs from affecting the network. The same LSP
cannot be generated repeatedly within the minimum
interval, which is 5 seconds by default. This restriction
significantly affects route convergence speed.
In IS-IS, if local routing information changes,
a router generates a new LSP to advertise this change.
When local routing information changes frequently, the
newly generated LSPs consume a lot of system resources.
If the delay in generating an LSP is too long, the router
cannot advertise changed routing information to neighbors
in time, reducing the network convergence speed. The
delay in generating an LSP for the first time is determined
by init-interval, and the delay in generating an LSP for the
second time is determined by incr-interval. From the third
time on, the delay in generating an LSP increases twice
every time until the delay reaches the value specified by
max-interval. After the delay remains at the value specified
by max-interval for three times or the IS-IS process is
restarted, the delay decreases to the value specified by initinterval. When only max-interval is specified, the intelligent
timer functions as an ordinary one-time triggering timer.
SPF calculation intelligent timer: In IS-IS, routes are
calculated when the LSDB changes. However, frequent
route calculations consume a lot of system resources and
decrease the system performance. Delaying SPF
calculation can improve route calculation efficiency. If the
delay in route calculation is too long, the route convergence
speed is reduced. The delay in SPF calculation for the first
time is determined by init-interval and the delay in SPF
calculation for the second time is determined by incrinterval. From the third time on, the delay in SPF
calculation increases twice every time until the delay
reaches the value specified by max-interval. After the delay
remains at the value specified by max-interval for three
times or the IS-IS process is restarted, the delay decreases
to the value specified by init-interval. If incr-interval is not
specified, the delay in SPF calculation for the first time is
determined by init-interval. From the second time on, the
delay in SPF calculation is determined by max-interval.
After the delay remains at the value specified by maxinterval for three times or the IS-IS process is restarted, the
delay decreases to the value specified by init-interval.
When only max-interval is specified, the intelligent timer
functions as an ordinary one-time triggering timer.
You can use the IP prefix list to filter routes and configure different
convergence priorities for different routes so that important routes
are converged first, improving the network reliability.
The router sends LSPs and SNPs carrying the authentication TLV
and verifies the authentication information of the received LSPs
and SNPs.
The router sends LSPs and SNPs carrying the authentication TLV
but does not verify the authentication information of the received
LSPs and SNPs.
Concepts
Mode-1
Mode-2
To use administrative tags, you must enable the IS-IS wide metric
attribute.
Case Description
Command Usage
Case Description
The topology in this case is the same as that in the previous case.
It is required that no DIS can be elected between R4 and R6 or
between R5 and R6. That is, the links between R4 and R6 and
between R5 and R6 cannot be broadcast links.
Command Usage
Case Description
The topology in this case is the same as that in the previous case.
Company A requires route control. When configuring tags, you
should also enable IS-IS wide metric on all devices in the network
so that the tags can be transmitted in the entire network. In
addition, Level-2 routes cannot be directly leaked to Level-1 areas
and need to be configured manually.
Command Usage
The cost-style command sets the cost style of routes sent and
received by an IS-IS router.
View
import-route isis level-2 into level-1 [ filter-policy { aclnumber | acl-name acl-name | ip-prefix ip-prefix-name | routepolicyroute-policy-name } | tag tag ]
filter-policy: indicates the route filtering policy.
acl-name: specifies the number of a basic ACL.
acl-name acl-name: specifies the name of a named ACL.
ip-prefix ip-prefix-name: specifies the name of an IP prefix.
Only the routes that match the IP prefix can be imported.
route-policy route-policy-name: specifies the name of a
routing policy.
tag tag: assigns administrative tags to the imported
routes.
Case Description
The topology in this case is the same as that in the previous case.
Company A reconstructs its network. IS-IS uses ACLs, IP prefix
lists, and tags to control routes.
Command Usage
Case Description
Command Usage
isis authentication-mode { simple password | md5 passwordkey } [ level-1 | level-2 ] [ ip | osi ] [ send-only ]
simple password: indicates that the password is
transmitted in plain text.
md5 password-key: indicates that the password to be
transmitted is encrypted using MD5.
keychain keychain-name: specifies a keychain that
changes with time.
level-1: sets Level-1 authentication.
level-2: sets Level-2 authentication.
ip: indicates the IP authentication password. This
parameter cannot be configured in the keychain authentication
mode.
osi: indicates the OSI authentication password. This
parameter cannot be configured in the keychain authentication
mode.
Case Description
Results
You can run the display isis peer command to check whether
neighbor relationships are established successfully.
Results
You can run the display isis interface command to view the
interface relationship.
Results
Case Description
Results
Results
OSPF topology:
OSPF divides an Autonomous System (AS) into one or
multiple logical areas. All areas are connected to Area 0.Area
0 is backbone Area.
Router type:
Internal router: All interfaces on an internal router belong to the
same OSPF area.
Area Border Router (ABR): An ABR belongs to two or more
areas, one of which must be the backbone area. An ABR is
used to connect the backbone area and non-backbone areas.
It can be physically or logically connected to the backbone
area.
Backbone router: At least one interface on a backbone router
belongs to the backbone area. Internal routers in Area 0 and
all ABRs are backbone routers.
AS Boundary Router (ASBR): An ASBR exchanges routing
information with other ASs. An ASBR does not necessarily
reside on the border of an AS. It can be an internal router or an
ABR. An OSPF device that has imported external routing
information will become an ASBR.
Differences between OSPF and IS-IS in the topology:
In OSPF, a link can belongs to only one area.In IS-IS, a link
can belong to different areas.
DR/BDR functions
Reduces the number of neighbors and further reduces the
number of times that link-state information and routing
information are updated. The DRother sets up full adjacency
only with the DR/BDR. The DR and BDR set up full adjacency
with each other.
The DR generates Network-LSAs to describe information about
the NBMA or broadcast network segment.
DD packet
Interface MTU: specifies the maximum IP data packet size that
an interface on the originating router can send without
fragmentation. The value of this field is 0x0000 on a virtual link.
Options: is the same as that of the Hello packet.
I-bit: is set to 1 for the first DD packet in a series of sent DD
packets. The I-bit fields of subsequent DD packets are 0.
M-bit: is set to 1 when the sent DD packet is not the last one.
The M-bit field of the last DD packet is set to 0.
MS-bit: advertises the router as the master router.
DD Sequence Number: specifies the sequence number of the
DD packet.
LSA header information
LSR packet
Link State Advertisement Type: specifies the LSA type, which
can be router-LSA, network-LSA, or other LSA types.
Link State ID: varies depending on LSA types.
Advertising Router: specifies the router ID of the originating
router that advertises LSAs.
LSU packet
Number of LSAs: specifies the number of LSAs in an LSU
packet.
LSA: specifies detailed LSA information.
LSU packet
Header of LSA: specifies LSA header information.
Link Type: indicates the link type. The value of this field can be:
1: P2P link to a device, point-to-point connection to another router
Network-LSA
Attached router: lists router IDs of the DR and all routers that have
set up adjacency relationships with the DR on an NBMA network.
Network-summary-LSA and ASBR-summary-LSA
address.
NSSA LSA
Options field:
EA: indicates that the originating router can receive and forward
External-Attributes-LSA(type8 LSA).
N-bit: exists only in Hello packets. The value 1 indicates that the
router supports Type 7 LSAs. The value 0 indicates the router
does not receive or send NSSA LSAs.
Neighbor status:
Init: A router has received Hello packets from its neighbor but is
not in the neighbor list of the received Hello packets. The router
has not established bidirectional communication with its neighbor.
In this state, the neighbor is in the neighbor list of Hello packets.
OSPF can define areas as stub and totally stub areas. A stub area is a
special area where ABRs do not flood the received AS external routes.
The ABR in a stub area maintains fewer routing entries and transmits
less routing information. The stub area is an optional configuration, but
not all areas can be configured as stub areas. Generally, a stub area is
a non-backbone area with only one ABR and is located at the AS
boundary. To ensure the reachability of AS external routes, the ABR in
a stub area generates a Type 3 LSA carrying a default route and
advertises it within the entire stub area.
Stub area
A router in the stub area must learn AS external routes from the
ABR. The ABR automatically generates a Type 3 LSA carrying a
default route and advertises it within the entire stub area. The
router can then learn the AS external network from the ABR.
Totally stub area
A router in the totally stub area must learn AS external and interarea network from an ABR.
The ABR automatically generates a Type 3 LSA and advertises it
within the entire totally stub area.
Precautions
Fast convergence
Priority-based convergence
Filter routes based on the IP prefix list. Set different priorities for
the routes so that routes with the highest priority are preferentially
converged, improving network reliability.
When staying in the overflow state, the router does not generate
non-default external routes, discards newly received, non-default
routes, and does not reply with an LSAck packet. When the
overflow timer expires, the router checks whether the number of
external routes still exceeds the maximum value. If so, restart the
timer; if not, the router leaves the overflow state.
When leaving the overflow state, the router deletes the overflow
timer, generates non-default external routes, receives new nondefault external routes, replies with LSAck packets, and gets
ready to enter the overflow state again.
Two ABRs use a virtual link to directly transmit OSPF packets. The
routers between the two ABRs only forward packets. Because the
destination of OSPF packets is not these routers, the routers
transparently forward the OSPF packets as common IP packets.
If a virtual link is not properly deployed, a loop may occur.
Common area
Route filtering
LSAs are not filtered during route learning. Route filtering can
only determine whether calculated routes are added to the
routing table. The learned LSAs are complete.
Precautions
Stub areas and database overflow can also implement the
LSA filtering function.
Init: A router has received Hello packets from its neighbor but is
not in the neighbor list of the received Hello packets. The router
has not established bidirectional communication with its neighbor.
In this state, the neighbor is in the neighbor list of Hello packets.
Loading: The router exchanges LSR packets with the neighbor for
requesting LSAs and exchanges LSU packets for advertising
LSAs.
Full: The local LSDBs on the two routers have been synchronized.
Case Description
The NBMA network topology is displayed in this case. Other
devices are connected based on the following rules:
If RX is interconnected with RY, their interconnection
addresses are XY.1.1.X and XY.1.1.Y respectively
network mask is 24.
Command Usage
OSPF view
Parameters
Precautions
Case Description
The network topology in this case is the same as the previous
topology. Area 3 is not directly connected to Area 0, and
therefore cannot communicate with other areas.
Command Usage
Parameters
vlink-peer router-id
router-id: specifies the router ID of the virtual link
neighbor.
Configuration Verification
Case Description
The network topology in this case is the same as the previous
topology. Company A requires control on the DR. To meet this
requirement, change the DR priorities of routers. The DR/BDR
cannot be preempted.
Command Usage
Interface view
Parameters
Configuration Verification
Case Description
The network topology in this case is the same as the previous
topology. This is the network extension requirement. On an
OSPF FR network, the default interval for sending Hello
packets is 30 seconds, and the default interval for sending is
120 seconds. When the neighbor relationship is invalid, the
interval for sending Hello packets is 120 seconds.
Command Usage
The ospf timer hello command sets the interval for sending Hello
packets on an interface.
The ospf timer poll command sets the poll interval for sending
Hello packets on an NBMA network.
View
Remarks
Case Description
This case is an extension to the original case. Perform
configurations on the basis of the original case. Imported
routes are advertised in E2 mode by default, and the default
cost value is 1.
Command Usage
The ospf cost command sets the cost of a route on an OSPFenabled interface.
View
Case Description
This case is an extension to the original case. Perform
configuration on the basis of the original case. If R6 does not
want to receive routes from network 172.16.X.0/24, filter Type
3 LSAs on R5.
Command Usage
The filter-policy export command configures a filtering policy
to filter the imported routes when these routes are advertised
in Type 5 LSAs within the AS. This command can be
configured only on an ASBR to filter Type 5 LSAs.
The filter-policy import command configures a filtering policy
to filter intra-area, inter-area, and AS external routes received
by OSPF. On routers within an area, this command can be
used to filter only routes; on an ABR, this command can be
used to filter Type 3 LSAs.
View
filter-policy export: OSPF view
filter-policy import: OSPF view
Parameters
filter-policy { acl-number | acl-name acl-name | ip-prefix ipprefix-name } export [ protocol [ process-id ] ]
acl-number: specifies the basic ACL number.
acl-name acl-name: specifies the ACL name.
ip-prefix ip-prefix-name: specifies the name of an IP
prefix list.
protocol: specifies the protocol for advertising routing
information.
process-id: specifies the process ID when RIP, IS-IS, or
OSPF is used for advertising routing information.
Case Description
This case is an extension to the original case. Perform
configuration on the basis of the original case. Configure Area
1 as an NSSA area.
Command Usage
nssa [ default-route-advertise | flush-waiting-timer intervalvalue | no-import-route | no-summary | set-n-bit |suppressforwarding-address | translator-always | translatorinterval interval-value | zero-address-forwarding ] *
default-route-advertise: generates default Type 7 LSAs
on an ABR or ASBR and then advertises them to the
NSSA area.
flush-waiting-timer interval-value: specifies the interval
for an ASBR to send aged Type 5 LSAs. This parameter
takes effect for once only.
no-import-route: indicates that no external route is
imported to the NSSA area.
no-summary: indicates that an ABR is prohibited from
sending Type 3 LSAs to the NSSA area.
set-n-bit: sets the N-bit in DD packets.
suppress-forwarding-address: sets the FA of the Type
5 LSAs translated from Type 7 LSAs by the NSSA ABR
to 0.0.0.0.
Precautions
Case Description
This case is an extension to the original case. Perform
configuration on the basis of the original case. Note that the
virtual link belongs to Area 0.
Command Usage
OSPF view
Parameters
Case Description
If RX is interconnected with RY, their interconnection
addresses are XY.1.1.X/24 and XY.1.1.Y/24 respectively.
Configuration Verification
Run the display ospf peer brief command to check whether
the neighbor relationship is established.
Configuration Verification
Run the tracert command to trace traffic on R3. The command
output shows that traffic on R3 reaches S0/0/0 on R1 through
the Ethernet link.
Configuration Verification
Run the display ip routing-table command to view the routing
table. During the route summarization, original tags are
removed. Therefore, tags need to be added in the next route
summarization.
Case Description
The network runs OSPF.
Analysis
To make R1 select the path through area 2 to reach the
networks in area 1,we must make the path through area2 work
as it is passing through area 0.virtual link meet the
needs.when virtual link is established,R1 will compare the cost
of the two path and choose the path with lower cost as the
best.
Configuration Verification
Only the external LSA (10.0.0.0) exists in the LSDB on R2.
Configuration Verification
All neighbor relationships on R3 are correct, indicating
successful authentication.
A BGP finite state machine (FSM) has six states: Idle, Connect, Active,
OpenSent, OpenConfirm, and Established.
The Idle state is the initial BGP state. In Idle state, a BGP
device refuses all the connection requests from neighbors.
The BGP device initiates a TCP connection with its BGP peer
and changes its state to connect only after receiving a start
event from the system.
A start event occurs when an operator configures a
BGP process, resets an existing BGP process or when
the router software resets a BGP process.
If an error occurs in any FSM state, for example, the
BGP device receives a notification message or TCP
connection termination notification, the BGP device
returns to the Idle state.
In the connect state, the BGP device starts the ConnectRetry
timer and waits to establish a TCP connection. The
ConnectRetry timer defaults to 32 seconds.
If a TCP connection is established, the BGP device
sends an open message to the peer and changes to
the OpenSent state.
If a TCP connection fails to be established, the BGP
device moves to the Active state.
If the BGP device does not receive a response from the
peer before the ConnectRetry timer expires, the BGP
device attempts to establish a TCP connection with
another peer and stays in the connect state.
A BGP device adds optimal routes to the BGP routing table to generate
BGP routes. After establishing a BGP peer relationship with a neighbor,
the BGP device follows the following rules to exchange routes with the
peer:
BGP route attributes are a set of parameters that further describe BGP
routes. Using BGP route attributes, BGP can filter and select routes.
Common attributes are as follows:
Origin: A well-known mandatory attribute.
AS_Path: A well-known mandatory attribute.
Next_Hop: A well-known mandatory attribute.
Local_Pref: A well-known discretionary attribute.
Community: An optional transitive attribute.
MED: An optional non-transitive attribute.
Originator_ID: An optional non-transitive attribute.
Cluster_List: An optional non-transitive attribute.
The Origin attribute defines the origin of a route and marks the path of a
BGP route. The Origin attribute is classified into the following types:
IGP: A route with the Origin attribute IGP is an IGP route and
has the highest priority. For example, the Origin attribute of the
routes injected to the BGP routing table using the network
command is IGP.
EGP: A route with the Origin attribute EGP is an EGP route
and has the secondary highest priority.
Incomplete: A route with the Origin attribute Incomplete is
learned by other means and has the lowest priority. For
example, the Origin attribute of the routes imported by BGP
using the import-route command is Incomplete.
The AS_Path attribute records all the ASs that a route passes through
from a source to a destination in the distance-vector order. To prevent
inter-AS routing loops, a BGP device does not accept the EBGP routes
of which the AS_Path list contains the local AS number.
Assume that a BGP speaker advertises a local route:
When advertising the route to other ASs, the BGP speaker
adds the local AS number to the AS_Path list, and then
advertises it to neighboring routers in Update messages.
When advertising the route to the local AS, the BGP speaker
creates an empty AS_Path list in an Update message.
Assume that a BGP speaker advertises a route learned in the Update
message sent by another BGP speaker:
When advertising the route to other ASs, the BGP speaker
adds the local AS number to the leftmost of the AS_Path list.
According to the AS_Path attribute, the BGP router that
receives the route can determine the ASs through which the
route has passed to the destination. The number of the AS that
is nearest to the local AS is placed on the leftmost of the list,
and the other AS numbers are listed according to the
sequence in which the route passes through ASs.
When advertising the route to the local AS, the BGP speaker
does not change the AS_Path attribute of the route.
Topology description
When R4 advertises route 10.0.0.0/24 to AS 400 and AS 100,
it adds the local AS number to the AS_Path list. When R5
advertises the route to AS 100, it also adds the local AS
number to the AS_Path list. When R1 and R3 in AS 100
advertise the route to R2 in the same AS, they keep the
AS_Path attribute of the route unchanged. R2 selects the route
with the shortest AS_Path when other BGP routing rules are
the same. That is, R2 reaches 10.0.0.0/24 through R3.
The Next_Hop attribute records the next hop that a route passes
through. The Next_Hop attribute of BGP is different from that of an IGP
because it may not be the neighbor IP address. A BGP speaker
processes the Next_Hop attribute based on the following rules:
When advertising a locally originated route to an IBGP peer,
the BGP speaker sets the Next_Hop attribute of the route to be
the IP address of the local interface through which the BGP
peer relationship is established.
When advertising a route to an EBGP peer, the BGP speaker
sets the Next_Hop attribute of the route to be the IP address of
the local interface through which the BGP peer relationship is
established.
When advertising a route learned from an EBGP peer to an
IBGP peer, the BGP speaker does not change the Next_Hop
attribute of the route.
Local_Pref attribute
This attribute indicates the BGP preference of a router. It is
exchanged only between IBGP peers and not advertised to
other ASs.
This attribute helps determine the optimal route when traffic
leaves an AS. When a BGP router obtains multiple routes to
the same destination address but with different next hops from
IBGP peers, the router prefers the route with the highest
Local_Pref.
Topology description
R1,R2,R3 are IBGP Peers of each other in AS 100, R2 establish EBGP
Peer with AS 200 and R3 establish EBGP Peer with AS 300. So R2
and R3 will learn route 10.0.0.0/24 from EBGP, R1 learns two routes to
10.0.0.0/24 from two IBGP peers (R2 and R3) in the local AS. Prefers
R2 routing 10.0.0.0/24 to other ASs in AS100, it need configure the
Local_Pref with R2 and R3: one with Local_Pref value 300 from R2 and
the other with Local_Pref value 200 from R3. R1 prefers the route
learned from R2.
The MED attribute helps determine the optimal route when traffic enters
an AS. When a BGP router obtains multiple routes to the same
destination address but with different next hops from EBGP peers, the
router selects the route with the smallest MED value as the optimal
route if the other attributes of the routes are the same.
The MED attribute is exchanged only between two neighboring ASs.
The AS that receives this attribute does not advertise the attribute to
any other AS. This attribute can be manually configured. If the MED
attribute is not configured for a route, the MED attribute of the route
uses the default value 0.
Topology description
R1 and R2 advertise routes 10.0.0.0/24 to their respective
EBGP peers R3 and R4. When other routing rules are the
same, R3 and R4 prefer the route with a smaller MED value.
That is, R3 and R4 access network 10.0.0.0/24 through R1.
Load Balancing
When there are multiple equal-cost routes to the same
destination, you can perform load balancing among these
routes to load balance traffic.
Equal-cost BGP routes can be generated for traffic load
balancing only when the rules before the attibutes "Prefers the
route with the lowest IGP metric are the same.
BGP security
MD5: BGP uses TCP as the transport layer protocol. To
ensure BGP security, you can perform MD5 authentication
during the TCP connection setup. MD5 authentication,
however, does not authenticate BGP messages. Instead, it
sets the MD5 authentication password for a TCP connection,
and the authentication is performed by TCP. If the
authentication fails, no TCP connection is set up.
After GTSM is enabled for BGP, an interface board checks the
TTL values in all BGP messages. In actual networking,
packets whose TTL values are not within the specified range
are either allowed to pass through or discarded by GTSM. To
configure GTSM to discard packets by default, you can set a
correct TTL value range according the network topology.
Subsequently, messages whose TTL values are not within the
specified range are discarded. This function avoids attacks
from bogus BGP messages. This function is mutually
exclusive to multi-hop EBGP.
The number of routes received from peers is limited to prevent
resource exhaustion attacks.
The AS_Path lengths on the inbound and outbound interfaces
are limited. Packets that exceed the limit of the AS_Path
length are discarded.
Route dampening applies only to EBGP routes but not IBGP routes.
IBGP routes often include the routes from the local AS, which requires
that the forwarding tables of devices within an AS be the same. In
addition, IGP fast convergence aims to achieve information
synchronization.
Case description
IP addresses used to interconnect devices are designed as
follows:
If RTX connects to RTY, interconnected addresses are
XY.1.1.X and XY.1.1.Y.Network mask is 24.
Loopback interface addresses of R1, R2, R3, R6, and
R7 are shown in the figure.
Case analysis
To establish stable IBGP peer relationships, use loopback
interface addresses and static routes within an AS.
To establish EBGP peer relationships, use physical interface
addresses.
Command usage
The peer as-number command sets the AS number of a
specified peer (or peer group).
The peer connect-interface command specifies a source
interface that sends BGP messages and a source address
used to initiate a connection.
The peer next-hop-local command configures a BGP device
to set its IP address as the next hop of routes when it
advertises the routes to an IBGP peer or peer group.
View
BGP process view
Parameters
peer ipv4-address as-number as-number
ip-address: specifies the IPv4 address of a peer.
as-number: specifies the AS number of the peer.
peer ipv4-address connect-interface interface-type interfacenumber [ ipv4-source-address ]
ip-address: specifies the IPv4 address of a peer.
interface-type interface-number: specifies the interface
type and number.
ipv4-source-address: specifies the IPv4 source address
used to set up a connection.
peer ipv4-address next-hop-local
Case description
The topology in this case is the same as that in the previous
case. Perform the configuration based on the configuration in
the previous case.
R1 prefers routes to 10.0.X.0/24 with next hop R2 because
BGP prefers the route advertised by the router with the
smallest router ID.
Command usage
The peer route-policy command specifies a route-policy to
control routes received from, or to be advertised to a peer or
peer group.
View
BGP view
Parameters
peer ipv4-address route-policy route-policyname { import | export }
ipv4-address: specifies an IPv4 address of a peer.
route-policy-name: specifies a route-policy name.
import: applies a route-policy to routes to be imported
from a peer or peer group.
export: applies a route-policy to routes to be advertised
to a peer or peer group.
Configuration verification
Run the display bgp routing-table command to view the BGP
routing table.
Case description
The topology in this case is the same as that in the previous
case. Company A requires that R1 access network 10.0.1.0/24
through R7. To meet this requirement, you can enable R4 to
access network 10.0.1.0/24 through R7 using the MED
attribute.
Command usage
The peer route-policy command specifies a route-policy to
control routes received from, or to be advertised to a peer or
peer group.
View
BGP view
Parameters
peer ipv4-address route-policy route-policyname { import | export }
ipv4-address: specifies an IPv4 address of a peer.
route-policy-name: specifies a route-policy name.
import: applies a route-policy to routes to be imported
from a peer or peer group.
export: applies a route-policy to routes to be advertised
to a peer or peer group.
Configuration verification
Run the display bgp routing-table command to view the BGP
routing table.
Case description
The topology in this case is the same as that in the previous
case. To meet the requirement, use the Community attribute.
Command usage
The peer route-policy command specifies a route-policy to
control routes received from, or to be advertised to a peer or
peer group.
View
BGP view
Parameters
peer ipv4-address route-policy route-policyname { import | export }
ipv4-address: specifies an IPv4 address of a peer.
route-policy-name: specifies a route-policy name.
import: applies a route-policy to routes to be imported
from a peer or peer group.
export: applies a route-policy to routes to be advertised
to a peer or peer group.
Configuration verification
Run the display bgp routing-table community command to
view the attributes in the BGP routing table.
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
Command usage
The peer route-policy command specifies a route-policy to
control routes received from, or to be advertised to a peer or
peer group.
The peer default-route-advertise command configures a
BGP device to advertise a default route to its peer or peer
group.
View
peer route-policy: BGP view
peer default-route-advertise: BGP view
Parameters
peer ipv4-address route-policy route-policyname { import | export }
ipv4-address: specifies an IPv4 address of a peer.
route-policy-name: specifies a route-policy name.
import: applies a route-policy to routes to be imported
from a peer or peer group.
export: applies a route-policy to routes to be advertised
to a peer or peer group.
peer { group-name | ipv4-address } default-routeadvertise [ route-policy route-policy-name ] [ conditionalroute-match-all{ ipv4-address1 { mask1 | mask-length1 } }
&<1-4> | conditional-route-match-any { ipv4address2 { mask2 | mask-length2 } } &<1-4> ]
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
Command usage
The maximum load-balancing command configures the
maximum number of equal-cost routes.
View
BGP view
Parameters
maximum load-balancing [ ebgp | ibgp ] number
ebgp: implements load balancing among EBGP routes.
ibgp: implements load balancing among IBGP routes.
number: specifies the maximum number of equal-cost
routes in the BGP routing table.
Precautions
The maximum load-balancing number command cannot be
used together with the maximum load-balancing ebgp
number or maximum load-balancing ibgp number command.
If the maximum load-balancing ebgp number or maximum
load-balancing ibgp number command is executed, the
maximum load-balancing number command does not take
effect.
Configuration verification
Run the display ip routing-table protocol bgp command to
view the load-balanced routes learned by BGP.
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
After GTSM is enabled between R6 and R8, the hop count
should be 1.
Command usage
The peer valid-ttl-hops command applies the GTSM function
on the peer or peer group.
The gtsm default-action command configures the default
action to be taken on the packets that do not match the GTSM
policy.
The gtsm log drop-packet command enables the log function
on a board to log information about the packets discarded by
GTSM on the board.
View
peer valid-ttl-hops: BGP view
gtsm default-action: system view
gtsm log drop-packet: system view
Parameters
peer ipv4-address valid-ttl-hops [ hops ]
ipv4-address: specifies the IPv4 address of a peer.
hops: specifies the number of TTL hops to be checked.
The value is an integer that ranges from 1 to 255. The default
value is 255. If the value is configured as hops, the valid TTL
range of the detected packet is [255 - hops + 1, 255].
gtsm default-action { drop | pass }
Precautions
GTSM and EBGP-MAX-HOP affect the TTL values of sent
BGP packets. The two functions are mutually exclusive.
If the default action is configured but the GTSM policy is not
configured, GTSM does not take effect.
Case description
In the topology, among the IP addresses that are not marked,
Rx and Ry connect using IP addresses XY.1.1.X/24 and
XY.1.1.Y/24.
Results
Run the displayvlan command to view the results.
Results
Run the display bgp peer command to view the BGP peer
relationship.
Results
Run the display bgp routing-table command to view the BGP
routing table. The command output shows that 2.2.2.2/32 and
3.3.3.3/32 have been advertised.
Results
The loop is the result of inconsistency between IGP route
selection and BGP route selection.
Case description
In the topology, among the IP addresses that are not marked,
Rx and Ry connect using IP addresses XY.1.1.X/24 and
XY.1.1.Y/24.
Analysis process
Run the display bgp routing-table community command to
view the attributes.
Results
You will notice that the Community attribute of route
10.0.0.0/24 is labeled as <400:1>, no-export on R2.
Results
You can add the AS_Path Attribute to change the route
selection of R3.
To ensure connectivity between IBGP peers, you need to establish fullmesh connections between IBGP peers. If there are n routers in an AS,
you need to establish n(n-1)/2 IBGP connections. When there are a
large number of IBGP peers, many network resources and CPU
resources are consumed. A route reflector (RR) can be used between
IBGP peers to solve this problem.
In an AS, a router functions as an RR, and other routers function as
clients. The RR and its clients establish IBGP connections and form a
cluster. The RR reflects routes to clients, removing the need to
establish BGP connections between clients.
RR concepts
RR: a BGP device that can reflect the routes learned from an
IBGP peer to other IBGP peers.
Client: an IBGP device of which routes are reflected by an RR
to other IBGP devices. In an AS, clients only need to directly
connect to the RR.
Non-client: an IBGP device that is neither an RR nor a client.
In an AS, a non-client must establish full-mesh connections
with the RR and all the other non-clients.
Originator: a device that originates routes in an AS. The
Originator_ID attribute helps eliminate routing loops in a
cluster.
Cluster: a set of an RR and clients. The Cluster_List attribute
helps eliminate routing loops between clusters.
Confederation
A confederation divides an AS into sub-ASs. Full-mesh IBGP
connections are established in each sub-AS, while EBGP
connections are established between sub-ASs. ASs outside a
confederation still consider the confederation as an AS.
After a confederation divides an AS into sub-ASs, it assigns a
confederation ID (the AS number) to each router within the AS.
The original IBGP attributes are retained, including the
Local_Pref attribute, MED attribute, and Next_Hop attribute.
Confederation-related attributes are automatically deleted
when being advertised outside a confederation. The
administrator therefore does not need to configure the rules for
filtering information such as sub-AS numbers at the egress of
a confederation.
The BGP routing table of each device on a large network is large. This
burdens devices, increases the route flapping probability, and affects
network stability.
Route summarization is a mechanism that combines multiple routes
into one route. This mechanism allows a BGP device to advertise only
the summarized route but not all the specific routes to peers. It reduces
the BGP routing table size. If the specific routes flap, the network is not
affected, therefore improving network stability.
Route summarization uses the Aggregator attribute. This attribute is an
optional transitive attribute and identifies the node where route
summarization occurs and carries the router ID and AS number of the
node.
Precautions
The summary automatic command summarizes the routes
imported by BGP, including direct routes, static routes, RIP
routes, OSPF routes, and IS-IS routes. After summarization is
configured, BGP summarizes routes according to the natural
network segment and suppresses specific routes in the BGP
routing table. This command is only valid for the routes
imported using the network command.
BGP advertises only summarized routes to peers.
BGP does not start automatic summarization by default.
Manual summarization
Summarized routes do not carry the AS_Path attribute of detail
routes.
Using the AS_SET attribute to carry the AS number can
prevent routing loops. Differences between AS_SET and
AS_SEQUENCE are as follows: In AS_SET, the AS list is
often used to perform route summarization, and AS numbers
are added to the AS list in a disorderly manner. In
AS_SEQUENCE, AS numbers are added to the AS list in the
sequence in which a route passes through.
Adding the AS_SET attribute to summarized routes may cause
routing flapping.
RFC 5291 and RFC 5292 define the prefix-based BGP outbound route
filtering (ORF) capability to advertise required BGP routes. BGP ORF
allows a device to send prefix-based inbound policies in a RouteRefresh message to BGP peers. BGP peers then construct outbound
policies based on these inbound policies to filter routes before sending
these routes. This capability has the following advantages:
Prevents the local device from receiving a large number of
unnecessary routes.
Reduces CPU usage of the local device.
Simplifies the configuration of BGP peers.
Improves link bandwidth efficiency.
Case description
Among directly-connected EBGP peers, after negotiating the
prefix-based ORF capability with R1, Client2 adds local prefixbased inbound policies to a Route-Refresh message and
sends the message to R1. R1 then constructs outbound
policies based on the received Route-Refresh message and
sends required routes to Client1 using a Route-Refresh
message. Client1 receives only the required routes, and R1
does not need to maintain routing policies. In this manner, the
configuration workload is reduced.
Client1 and Client2 are clients of the RR. Client1, Client2, and
the RR negotiate the prefix-based ORF capability. Client1 and
Client2 then add local prefix-based inbound policies to RouteRefresh messages and send the messages to the RR.
Active-Route-Advertise
Once a route is preferred by BGP, the route can be advertised
to peers by default. When Active-Route-Advertise is configured,
only the route preferred by BGP and also active at the routing
management layer is advertised to peers.
Active-Route-Advertise and the bgp-rib-only command are
mutually exclusive. The bgp-rib-only command prohibits BGP
routes from being advertised to the IP routing table.
With the next-hop iteration policy, you can control the mask
length of the route through which the original next hop can be
iterated. After the next-hop iteration policy is configured, the
route with the original next hop 2.2.2.2 depends on only the
IGP route 2.2.2.2/32.
Redundancy
Path redundancy ensures that a backup path is available when
a network fault occurs.
Traffic symmetry
Scientific network design and policy application can ensure
consistent paths for incoming and outgoing traffic.
Load balancing
When multiple paths to the same destination exist, traffic can
be load balanced through policies to fully utilize bandwidth.
Case description
IP addresses used to interconnect devices are as follows:
If RTX connects to RTY, interconnected addresses are
XY.1.1.X and XY.1.1.Y. Network mask is 24.
If OSPF runs normally and the interconnected addresses and
loopback interface addresses have been advertised into OSPF.
However 10.0.X.0/24, 172.15.X.0/24, and 172.16.X.0/24 are
not advertised into OSPF.
Case analysis
EBGP peer relationships are established using loopback
interfaces.
Command usage
The peer as-number command sets an AS number for a
specified peer or peer group.
The peer connect-interface command specifies a source
interface that sends BGP messages and a source address
used to initiate a connection.
The peer next-hop-local command configures a BGP device
to set its IP address as the next hop of routes when it
advertises routes to an IBGP peer or peer group.
The group command creates a peer group.
View
BGP process view
Parameters
peer ipv4-address as-number as-number
ip-address: specifies the IPv4 address of a peer.
as-number: specifies the AS number of the peer.
peer ipv4-address connect-interface interface-type interfacenumber [ ipv4-source-address ]
ip-address: specifies the IPv4 address of a peer.
interface-type interface-number: specifies the interface
type and number.
ipv4-source-address: specifies the IPv4 source address
used to set up a connection.
Case description
The topology in this case is the same as that in the previous
case. Perform the configurations based on the configuration in
the previous case.
If all the clients of the RR have established logically full-mesh
connections, the clients can transmit routes to each other
without requiring the RR to reflect routes to them. In this
situation, prohibit the RR from reflecting routes to clients so as
to reduce the RR load.
Command usage
The undo reflect between-clients command prohibits an RR
from reflecting routes to clients. This command is executed on
an RR. After this command is executed, clients can directly
exchange BGP messages, while R2 does not need to reflect
routes to these clients. However, R2 still reflects the routes
that are advertised by non-clients.
View
BGP view
Configuration verification
Run the display bgp peer command to view detailed BGP
peer information.
To reduce the RR load, prohibit BGP routes from being added
to the IP routing table and prevent the RR from forwarding
packets. Disabling route reflection between clients however
can better meet the full-mesh scenario requirement.
Case description
The topology in this case is the same as that in the previous
case. To meet the first requirement, use a route-policy to
advertise interface routing information.
To meet the second requirement, use an IP prefix list to filter
routes.
Command usage
The peer ip-prefix command configures a route filtering policy
based on an IP prefix list for a peer or peer group.
View
BGP view
Parameters
peer { group-name | ipv4-address } ip-prefix ip-prefixname { import | export }
group-name: specifies the name of a peer group.
ipv4-address: specifies the IPv4 address of a peer.
ip-prefix-name: specifies the name of an IP prefix list.
import: applies a filtering policy to the routes received
from a peer or peer group.
export: applies a filtering policy to the routes sent to a
peer or peer group.
Configuration verification
Run the display bgp routing-table command to view the BGP
routing table.
For the same node in a route-policy, the relationship between
if-match clauses is AND. A route needs to meet all the
matching rules before the actions defined by apply clauses
are performed.
The relationship between the if-match clauses in the if-match routetype and if-match interface commands is "OR", but the relationship
between the if-match clauses in the two commands and other
commands is "AND".
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
In requirement 2, the delivery of a default route depends on
route 172.16.0.0/16. If route 172.16.0.0/16 disappears, the
default route also disappears.
Command usage
The peer route-policy command specifies a route-policy to
control routes received from or to be advertised to a peer or
peer group.
The peer default-route-advertise command configures a
BGP device to advertise a default route to its peer or peer
group.
View
peer route-policy: BGP view
peer default-route-advertise: BGP view
Parameters
peer ipv4-address route-policy route-policyname { import | export }
ipv4-address: specifies an IPv4 address of a peer.
route-policy-name: specifies a route-policy name.
import: applies a route-policy to routes to be imported
from a peer or peer group.
export: applies a route-policy to routes to be advertised
to a peer or peer group.
peer { group-name | ipv4-address } default-routeadvertise [ route-policy route-policy-name ] [ conditionalroute-match-all{ ipv4-address1 { mask1 | mask-length1 } }
&<1-4> | conditional-route-match-any { ipv4address2 { mask2 | mask-length2 } } &<1-4> ]
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
Command usage
The aggregate command creates an aggregated route in the
BGP routing table.
View
BGP view
Parameters
aggregate ipv4-address { mask | mask-length } [ asset | attribute-policy route-policy-name1 | detailsuppressed | origin-policy route-policy-name2 | suppresspolicyroute-policy-name3 ] *
ipv4-address: specifies the IPv4 address of an
aggregated route.
mask: specifies the network mask of an aggregated
route.
mask-length: specifies the network mask length of an
aggregated route.
as-set: generates a route with the AS-SET attribute.
attribute-policy route-policy-name1: specifies the name
of an attribute policy for aggregated routes.
detail-suppressed: advertises only the aggregated
route.
origin-policy route-policy-name2: specifies the name of
a policy that allows route aggregation.
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
BGP on-demand route advertisement requires ORF to be
enabled on R4, R5, and R6.
Command usage
The peer capability-advertise orf command enables prefixbased ORF for a peer or peer group.
View
BGP view
Parameters
peer { group-name | ipv4-address } capability-advertise
orf [ cisco-compatible ] ip-prefix { both | receive | send }
group-name: specifies the name of a peer group.
ipv4-address: specifies the IPv4 address of a peer.
cisco-compatible: is compatible with Cisco devices.
both: allows the device to send and receive ORF
packets.
receive: allows the device to receive only ORF packets.
send: allows the device to send only ORF packets.
Precautions
BGP ORF has three modes: send, receive, and both. In send
mode, a BGP device can send ORF information. In receive
mode, a BGP device can receive ORF information. In both
mode, a BGP device can send and receive ORF information.
Case description
IP addresses used to interconnect devices are as follows:
If RTX connects to RTY, interconnected addresses are
XY.1.1.X and XY.1.1.Y.Network mask is 24.
Results
The configuration is the basic OSPF configuration.
Results
Run the display bgp peer command to view the BGP peer
status.
Run the display bfd session all command to view the BFD
session. In the command output, D_IP_IF indicates that a BFD
session is dynamically created and bound to an interface.
Results
Run the display bgp routing-table command to view BGP
routing entries. The command output shows that R3 learns two
routes 10.0.0.0/24 from R2 and R4. According to BGP routing
rules, R3 prefers the route 10.0.0.0/24 learned from R2.
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
Analysis process
You can use commands peer groups to reduce the RR load.
Results
Run the display bgp routing-table community command to
view the Community attribute.
Results
Run the display bgp routing-table community command to
view the Community attribute. The Community attribute is noexport. That is, the route is not advertised to EBGP peers.
ACL
Community filter
Community filters are exclusively used in BGP. Each BGP
route contains a community domain to identify a
community.Community filters specify matching rules
regarding community domains.
Interface-based ACL
Match packets based on the rules defined on the inbound
interface of packets. You can run the traffic-filter command to
reference an interface-based ACL.
Basic ACL
Define rules based on the source IP address, VPN instance,
fragment flag, and time range of packets.
Advanced ACL
Define rules based on the source IP address, destination IP
address, IP preference, ToS, DSCP, IP protocol type, ICMP
type, TCP source port/destination port, and UDP source
port/destination port number of packets. An advanced ACL can
define more accurate, abundant, and flexible rules than a basic
ACL.
Layer 2 ACL
Define rules based on Ethernet frame header information in a
packet, including the source MAC address, destination MAC
address, and Ethernet frame protocol type.
IP prefix list
An IP prefix list can contain multiple indexes. Each index has a
node. The system matches a route against nodes by the index
in ascending order. If the route matches a node, the system
does not match the route against the other nodes. If the route
does not match any node, the system filters the route.
According the matching prefix, an IP prefix list can be used for
accurate matching, or matching within a specified mask length
range.
An IP prefix list can implement accurate matching, or matching
within a specified mask length range. You can configure
greater-equal and less-equal to specify the prefix mask
length range. If the two keywords are not configured, an IP
prefix is used to implement accurate matching. That is, only
routes with the same mask length as that specified in the IP
prefix list are matched. If only greater-equal is configured, the
mask length range is [greater-equal-value,32]. If only lessequal is configured, the mask length range is [specified mask
length, less-equal-value].
The mask length range can be specified as masklength<=greater-equal-value<=less-equal-value<=32.
Characteristics of an IP prefix list
When all IP prefix lists are not matched, the last matching
mode is deny by default.
When the referenced IP prefix list does not exist, the default
matching mode is permit.
A route policy is used to filter routes and set attributes for routes. By
changing route attributes (including reachability), a route policy
changes the path that network traffic passes through.
A route policy is often used in the following scenarios:
Control route importing.
Using a route policy, you can preventing sub-optimal
routes and routing loops during the import of routes.
Control route receiving and advertising.
Using a route policy, you can receive or advertise
specified routes according to network requirements.
Set attributes for routes.
Using a route policy, you can modify the attributes of
routes to optimize a network.
Route policy principles
A route policy consists of multiple nodes. The system checks
routes against the nodes of a route policy in ascending order
of the node IDs. A node contains multiple if-match and apply
clauses. The if-match clauses define matching conditions of a
node, while apply clauses define the actions to be performed
on the routes that match if-match clauses. The relationship
between the if-match clauses of a node is AND. That is, a
route matches a node only when the route matches all the ifmatch clauses of the node. The relationship between the
nodes of a route policy is OR.
Topology description
You can modify the Local_Pref attribute contained in a route
using a route policy to change the path of traffic. R2 learn the
route 10.0.0.0/24 from EBGP and modify the Local Pref value
300, R3 learn the route 10.0.0.0/24 from EBGP and modify the
Local Pref value 200. R1,R2,R3 have routes of each other
from IBGP, ultimate AS100 prefers R2 to reach the 10.0.0.0/24.
Matching process
If a device finds a matching local PBR node, the device
processes packets as follows:
Step 1 Checks whether the priority of packets has been set.
If so, the device applies the configured priority
to the packets and performs step 2.
If not, the device performs step 2.
Step 2 Checks whether an outbound interface has been
configured for the local PBR.
If so, the device sends packets from the
outbound interface.
If not, the device performs step 2.
Step 3 Checks whether next hops have been configured
for the local PBR. You can configure two next hops to
implement load balancing.
If so, the device sends packets to the next hops.
If not, the device searches the routing table for
a route based on the destination addresses of
packets. If no route is available, the devices
performs step 4.
Step 4 Checks whether the default outbound interface has
been configured for the local PBR.
If so, the device sends the packets from the
default outbound interface.
If not, the device performs step 5.
Case description
IP addresses used to interconnect devices are as follows:
If RTX connects to RTY, interconnected addresses are
XY.1.1.X and XY.1.1.Y. Network mask is 24.
Command usage
The route-policy command creates a route policy and
displays the route-policy view.
View
System view
Parameters
route-policy route-policy-name { permit | deny } node node
route-policy-name: specifies the name of a route policy.
permit: specifies the matching mode of the route policy
as permit. In permit mode, if a route matches all the ifmatch clauses of a node, the route matches the route
policy, and the actions defined by the apply clause of
the route are performed on the route, otherwise, the
route continues to match the next node.
deny: specifies the matching mode of the route policy as
deny. In deny mode, if a route matches all the if-match
clauses of a route, the route does not match the route
policy and cannot match the next node.
node node: specifies the index of a node in the route
policy.
Precautions
A route policy is used to filter routes and set attributes for the routes
that match the route policy. A route policy consists of multiple nodes.
Case description
The topology in this case is the same as that in the previous
case. Perform the configuration based on the configuration in
the previous case.
In requirement 2, use the least number of commands to
implement the optimal configuration.
Command usage
The filter-policy export command filters imported routes to be
advertised according to the policy.
View
System view
Parameters
filter-policy { acl-number | acl-name acl-name | ip-prefix ipprefix-name } export [ protocol [ process-id ] ]
acl-number: specifies the number of a basic ACL.
acl-name acl-name: specifies the name of an ACL.
ip-prefix ip-prefix-name: specifies the name of an IP
prefix list.
protocol: specifies the protocol that advertises routing
information.
process-id: specifies a process ID when the protocol that
advertises routing information is RIP, IS-IS, or OSPF.
Precautions
After external routes are imported into OSPF using the importroute command, you can run the filter-policy export
command to filter the imported routes to be advertised.
This configuration allows only the external routes that meet the
matching conditions to be translated into Type 5 LSAs (ASexternal-LSAs) and advertised. In this case, routing loops are
prevented.
You can specify protocol or process-id to filter the routes of a
specified protocol or process. If no protocol or process-id is
specified, OSPF filters all of the imported routes.
Case description
The topology in this case is the same as that in the previous
case. After meeting the requirements, check whether suboptimal routes and routing loops exist.
Results
After routing protocols import routes from each other, R4
reaches 172.16.X.0/24 through a sub-optimal route (OSPF
route 172.16.X.0/24). This is because R4 first learns OSPF
route 172.16.X.0/24 and then learns RIP route 172.16.X.0/24.
In fact, the optimal route is OSPF route 172.16.X.0/24.
However, the preference of OSPF external routes is 150,and
the preference of RIP is 100,so R4 reaches 172.16.X.0/24
through a sub-optimal route.
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
To meet requirement 1, ensure that R4 accesses
172.16.X.0/24 through RIP, to void reaches 172.16.X.0/24
through a sub-optimal route.
To meet requirement 2, use tags to control dual-node
bidirectional route importing so as to prevent routing loops.
Results
If we do not filter routes when bidirectional route importing,
routing loops occur when network environments change. In
order to avoid the loop should ensure that routing protocols
between imported only importing in the routing domain self
routing. Based on the configuration in the previous, the
advantage of using TAG is not required to specify the routing
entries specifically. When routing domain specific item or
routing, the routing entries and restrictions will change, does
not need manual intervention, and has a good scalability.
Though the configuration in the previous could avoid routing
loops, but the sub-optimal route is still exist.
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
Results
When only route summarization is performed, two problems
exist: R5 learns the summary route, and a routing loop occurs
between R3 and R4 when R2 pings a nonexistent IP address.
The reason why the first problem occurs is as follows: After R3
and R4 learn the summary routes generated by themselves,
they import the summary routes into the RIP area again.
The reason why the second problem occurs is as follows: After
R3 and R4 learn the summary routes generated by themselves,
they add the summary routes to their routing tables.
To address the two problems, prevent R3 and R4 from
learning the summary routes generated by them and from
importing the routes into the OSPF area. That is, filter the
summary route learned from each other on R3 and R4.
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
Command usage
The policy-based-route command creates or modifies a PBR.
The ip local policy-based-route command enables local PBR.
View
Precautions
When deploying PBR, do not configure a broadcast interface
such as an Ethernet interface as the outbound interface of
packets.
Configuration verification
Run the display bgp peer 1.1.1.1 orf ip-prefix command to
view prefix-based BGP ORF information received from a
specified peer.
Case description
IP addresses used to interconnect devices are designed as
follows:
If RTX connects to RTY, interconnected addresses are
XY.1.1.X and XY.1.1.Y. Network mask is 24.
Results
When R5 imports routes, accurate matching must be
performed.
Results
When you tracert a nonexistent IP address that belongs to
10.0.0.0/16, a routing loop occurs. This is because no route
pointing to Null0 is generated when OSPF generates a
summary route.
Results
You can configure static routes pointing to Null0 on R5 using a
command to prevent routing loops.
Case description
This case is an extension to the previous case. Perform the
configuration based on the configuration in the previous case.
IP addresses used to interconnect devices are designed as
follows:
If RTX connects to RTY, interconnected addresses are
XY.1.1.X and XY.1.1.Y. Network mask is 24.
The IP address of R1 S0/0/0 is 12.1.1.1/24, and the IP
address of R2 S0/0/0 is 12.1.1.2/24. The IP address of
R1 S0/0/1 is 21.1.1.2/24, and the IP address of R2
S0/0/1 is 21.1.1.1/24.
Results
Use the ACL and route-policy commands to import two
network segment into IS-IS, usually use the filter-policy XXX
export command to import routes.
Results
After you use tags to prevent routing loops, If IS-IS support
Tags is necessary , the cost type must wide, otherwise the
routes of IS-IS can not be tagged.
To prevent the sub-optimal route, modify the preference of
OSPF external route 10.0.0.0/16 to be smaller than that of ISIS routes.
Results
Configuration on this case avoid sub-optimal routes of R3 and
R4. The difference of importing time cause one of R3 and R4
will learn 10.0.0.0/16 from ISIS or OSPF at the same time, If
R3 imported routes earlier, R4 will learn 10.0.0.0/16 from ISIS
and OSPF at the same time, and compare their preference,
the preference of OSPF external routes is 150, preference of
ISIS is 15, so R4 prefer ISIS to reach the network 10.0.0.0/16,
but this one is sub-optimal route. So mofidy the preference of
10.0.0.0/16 on R4 smaller than the preference value of ISIS
can eliminate sub-optimal routes. The preference value of
OSPF external routes smaller than the OSPF internal routes is
unreasonable.
Results
Use local PBR to meet this requirement.
IEEE 802.1Q
IEEE 802.1Q is an Ethernet networking standard for a
specified Ethernet frame format. It adds the 4-byte 802.1Q Tag
field between the Source address and the Length/Type fields
of the original frame.
Subfields in the 802.1q Tag field:
TPID: is short for Tag Protocol Identifier and indicates the
frame type, which has 2 bytes. The value 0x8100 indicates an
802.1Q-tagged frame. An 802.1Q-incapable device discards
the received 802.1Q frame.
PRI: is short for priority and indicates the frame priority, which
has 3 bits. The value ranges from 0 to 7. The greater the value,
the higher the priority. When QoS is deployed on a switch, the
switch first sends data frames with higher priority.
CFI: is short for Canonical Format Indicator and indicates
whether the MAC address is in canonical format. The value 0
indicates the MAC address in canonical format and the value 1
indicates the MAC address in non-canonical format. CFI is
used to differentiate Ethernet frames, Fiber Distributed Digital
Interface (FDDI) frames, and token ring network frames. The
value is 0 on the Ethernet.
VID: is short for VLAN ID and indicates the VLAN to which a
frame belongs, which has 12 bits.
Interface types
An access interface on a switch connects to an interface on a
host. It can only connect to access links.
The access interface allows only the VLAN whose ID is
the same as the Port Default VLAN ID (PVID).
If the access interface receives untagged frames from
the remote device, the switch adds the PVID to the
untagged frames.
Ethernet frames sent by the access interface are
always untagged frames.
A trunk interface on a switch connects to another switch. It can
only connect to trunk links.
The trunk interface allows frames from multiple VLANs
to pass through.
If the tag in the frame sent by the trunk interface is the
same as the PVID, the switch removes the tag from the
frame. The trunk interface sends untagged frames in
this situation only.
If the tag in the frame sent by the trunk interface is
different from the PVID, the switch directly sends the
frame.
A hybrid interface on a switch can connect to either a host or
another switch. It can connect to either access or trunk links.
The hybrid interface allows frames from multiple
VLANs to pass through and removes tags from frames
on the outbound interface.
Topology description
To implement intra-communication in VLAN 2 and VLAN 3
through the trunk link between S1 and S2, add Port 2 on S1
and Port 1 on S2 to VLAN 2 and VLAN 3.
PC1 sends a frame to PC2 as follows:
The frame is first sent to Port 4 on S1.
Port 4 adds a tag to the frame. The VID field of the tag
is 2, that is, the ID of the VLAN to which Port 4 belongs.
S1 sends the frame to all interfaces in VLAN 2 except
Port 4 (Suppose the table of MAC address is empty).
Port 2 forwards the frame to S2.
After receiving the frame, S2 determines that the frame
belongs to VLAN 2 based on the tag. S2 sends the
frame to all interfaces in VLAN 2 except for Port 1.
Port 3 sends the frame to PC2.
Topology description
R1 is a Layer 3 switch supporting sub-interfaces, and S1 is a
Layer 2 switching device. LANs are connected using the
switched Ethernet interface on S1 and the routed Ethernet
interface on R1. To implement inter-VLAN communication,
perform the following operations:
Create two sub-interfaces on the Ethernet interfaces
connecting R1 and S1, and configure 802.1Q
encapsulation on sub-interfaces corresponding to
VLAN 2 and VLAN 3.
Configure IP addresses for sub-interfaces to ensure the
two sub-interfaces have reachable routes.
Configure Ethernet interfaces connecting S1 and R1 as
trunk or hybrid interfaces and configure them to allow
frames from VLAN 2 and VLAN 3 to pass through.
Configure the default gateway address as the IP
address of the sub-interface mapping the VLAN to
which the host belongs.
PC1 communicates with PC2 as follows:
PC1 checks the IP address of PC2 and determines that
PC2 is in another VLAN.
PC1 sends an ARP Request packet to R1 to request
R1's MAC address.
Topology description
VLAN 2 and VLAN 3 are assigned. To implement interVLAN communication, perform the following operations:
Create two VLANIF interfaces on S1 and configure
IP addresses for them to ensure the two VLANIF
interfaces have reachable routes.
Configure the default gateway address as the IP
address of the VLANIF interface mapping the
VLAN to which the user host belongs.
PC1 communicates with PC2 as follows:
PC1 checks the IP address of PC2 and determines
that PC2 is in another VLAN.
PC1 sends an ARP Request packet to S1 to request
S1's MAC address.
After receiving the ARP Request packet, S1 returns
an ARP Reply packet in which the source MAC
address is the MAC address of VLANIF 2.
PC1 obtains S1's MAC address.
Topology description
The super-VLAN (VLAN 10) contains the sub-VLANs (VLAN 2
and VLAN 3).
Proxy ARP between sub-VLANs is enabled on S1. The
communication process is as follows:
After comparing PC2s IP address (1.1.1.20) with its IP
address, PC1 finds that both IP addresses are on the
same network segment. The ARP table of PC1
however has no corresponding entry for PC2.
PC1 broadcasts an ARP Request packet to request
PC2s MAC address.
PC2 is not in VLAN 2, and so PC2 cannot receive the
ARP Request packet.
The gateway is enabled with proxy ARP between subVLANs, therefore after receiving the ARP Request
packet from PC1, the gateway finds that PC2s IP
address (1.1.1.20) is the IP address of a directly
connected interface. The gateway then broadcasts an
ARP Request packet to all the other sub-VLAN
interfaces to request for PC2s MAC address.
After receiving the ARP Request packet, PC2 sends an
ARP Reply packet.
After receiving the ARP Reply packet from PC2, the
gateway replies its MAC address to PC1.
The ARP tables of both S1 and PC1 have
corresponding entries of PC2.
Topology description
The frame that enters S1 through Port 1 on PC1 is tagged with
the ID of VLAN 2. The VLAN ID, however, is not changed to
the ID of VLAN 10 on S1 even if VLAN 2 is the sub-VLAN of
VLAN 10. After passing through Port 3, which is a trunk
interface, this frame still carries the ID of VLAN 2. S1 discards
the frames of VLAN 10 that are sent to S1 by other devices
because S1 has no physical interface corresponding to VLAN
10.
A super-VLAN has no physical interface:
If you configure a super-VLAN and then a trunk interface, the
frames of a super-VLAN are filtered automatically according to
the VLAN range configured on the trunk interface.
If you first configure a trunk interface and configure the trunk
interface to allow all VLANs to pass through, you cannot
configure the super-VLAN on the device. The root cause is
that any VLAN with physical interfaces cannot be configured
as the super-VLAN. The trunk interface allows frames from all
VLANs to pass through, so no VLAN can be configured as a
super-VLAN.
On S1, only VLAN 2 and VLAN 3 are valid, and all frames are
forwarded in these VLANs.
Topology description
S2 is configured with super-VLAN 4, sub-VLAN 2, sub-VLAN 3,
and common VLAN 10. S1 is configured with two common
VLANs, namely, VLAN 10 and VLAN 20. S2 is configured with
the route to the network segment 1.1.3.0/24, and S1 is
configured with the route to the network segment 1.1.1.0/24.
PC1 in sub-VLAN 2 of super-VLAN 4 then needs to
communicate with PC3 on connected to S1.
After comparing PC3s IP address (1.1.3.2) with its IP
address, PC1 finds that two IP addresses are on
different network segments.
PC1 broadcasts an ARP Request packet to its gateway
(S2) to request S2s MAC address.
After receiving the ARP Request packet, S2 checks the
mapping between the sub-VLAN and the super-VLAN,
and sends an ARP Reply packet to PC1 through subVLAN 2. The source MAC address in the ARP Reply
packet is the MAC address of VLANIF 4 corresponding
to super-VLAN 4.
PC1 learns S2s MAC address.
PC1 sends the ARP Reply packet to S2. The ARP
Reply packet carries the destination MAC address as
the MAC address of VLANIF 4 corresponding to superVLAN 4 and the destination IP address of 1.1.3.2.
The MUX VLAN falls into the principal VLAN and subordinate VLAN.
The subordinate VLAN is classified into the separate VLAN and group
VLAN.
Principal VLAN: A principal interface can communicate with all
interfaces in a MUX VLAN.
Subordinate VLAN
Separate VLAN: A separate interface can communicate
only with a principal interface and is isolated from other
types of interfaces. A separate VLAN must be bound to
a principal VLAN.
Group VLAN: A group interface can communicate with
a principal interface and other interfaces in the same
group VLAN, but cannot communicate with interfaces
in other group VLANs or a separate interface. A group
VLAN must be bound to a principal VLAN.
Topology description
The principal interface connects to the enterprise server;
separate interfaces connect to enterprise customers; group
interfaces connect to enterprise employees. In this manner,
enterprise customers and enterprise employees can access
the enterprise server, enterprise employees can communicate
with each other, enterprise customers cannot communicate
with each other, and enterprise customers and enterprise
employees cannot communicate with each other.
Case description
To meet requirement 2, configure VLAN 2 and VLAN 3 to be
permitted by the trunk link.
Command usage
The port link-type command sets the link type of an interface.
The port trunk allow-pass vlan command adds a trunk
interface to VLANs.
The port hybrid untagged vlan command adds a hybrid
interface to VLANs. Frames of the VLANs then pass through
the hybrid interface in untagged mode.
View
Interface view
Parameters
port link-type { access | dot1q-tunnel | hybrid | trunk }
Access: configures the link type of an interface as
access.
dot1q-tunnel: configures the link type of an interface as
QinQ.
hybrid: configures the link type of an interface as hybrid.
trunk: configures the link type of an interface as trunk.
Precautions
Before changing the link type of an interface, you need to
delete the VLAN configuration of the interface. That is, the
interface can join only VLAN 1.
If a specified VLAN does not exist, the port trunk allow-pass
vlan command does not take effect. The port trunk allowpass vlan command cannot be used on a member interface of
an Eth-Trunk.
Case description
The topology is similar to that in slide 22. The difference is that
MAC addresses are identified. Assign VLANs based on MAC
addresses to meet the requirement.
Before configuring MAC address-based VLAN assignment,
ensure that the link type of the Layer 2 interface is hybrid.
Command usage
The mac-vlan mac-address command associates a MAC
address with a VLAN.
The mac-vlan enable command enables MAC addressbased VLAN assignment on an interface.
Precautions
After a MAC address is associated with a VLAN, it cannot
be associated with other VLANs.
If MAC address-based assignment is enabled on an
interface:
When receiving an untagged packet, the interface
searches for the VLAN entry matching the source MAC
address of the packet. If a matching entry is found, the
interface forwards the packet based on the VLAN ID. If no
matching entry is found, the interface uses other
matching rules to forward the packet.
When receiving a tagged packet, the interface forwards
the packet based on the interface-based VLAN
assignment configuration.
MAC address-based assignment can be configured only
on hybrid interfaces.
Case description
The topology is similar to that in slide 22.
Before configuring IP subnet-based VLAN assignment, ensure
that the link type of the Layer 2 interface is hybrid.
Command usage
The ip-subnet-vlan command associates an IP subnet
with a VLAN.
The ip-subnet-vlan enable command enables IP subnetbased VLAN assignment on an interface.
Precautions
The ip-subnet-vlan command associated with a VLAN
cannot be a multicast network segment or multicast
address.
IP subnet-based assignment can be configured only on
hybrid interfaces.
Case description
Protocol-based assignment can be configured only on
hybrid interfaces.
Command usage
The protocol-vlan command associates a protocol with a
VLAN.
The protocol-vlan vlan command associates an interface with
a protocol-based VLAN.
Precautions
Protocol-based assignment can be configured only on hybrid
interfaces.
When protocol-based assignment is used on an interface, the
switch needs to parse the protocol type in the received packet
and convert it.
Case description
You can use the VLANIF interface or sub-interface to
implement communication between VLANs.
Command usage
The interface vlanif command creates a VLANIF interface
and displays the VLANIF interface view.
The dot1q termination vid command configures the single
VLAN ID of dot1q encapsulation on a sub-interface.
The arp broadcast enable command enables ARP
broadcast on a sub-interface.
Precautions
Before running the interface vlanif command, you must run
the vlan command to create a VLAN specified by vlan-id.
Case description
Configure VLAN aggregation to meet the requirements.
Command usage
The aggregate-vlan command configures a VLAN as a
super-VLAN.
The access-vlan command adds one or more sub-VLANs
to a super-VLAN.
Precautions
VLAN 1 cannot be configured as a super-VLAN.
The super-VLAN must be different from all its sub-VLANs.
A VLAN can be added to only one super-VLAN.
Case description
Configure the MUX VLAN to meet the requirements.
Command usage
The mux-vlan command configures a VLAN as a principal
VLAN.
The subordinate group command configures subordinate
group VLANs for a principal VLAN.
The subordinate separate command configures a
subordinate separate VLAN for a principal VLAN.
Precautions for the principal VLAN
The super-VLAN, sub-VLAN, or subordinate VLAN cannot be
configured as a principal VLAN.
The VLAN where a VLANIF interface has been created cannot
be configured as a principal VLAN.
Precautions for the subordinate group VLAN
Before configuring a subordinate group VLAN, you must
configure a principal VLAN and enter the principal VLAN view.
The VLAN to be configured as a subordinate group VLAN
must have been created.
The VLAN to be configured as a subordinate group VLAN
cannot have a VLANIF interface configured or be configured
as a super-VLAN.
Before running the undo subordinate group command delete
a subordinate group VLAN to which interfaces have been
added, delete the interfaces from the subordinate group VLAN.
A subordinate group VLAN must be different from the principal
VLAN.
Case description
To implement communication between VLANs through RIPv2,
configure at least two VLANIF interfaces on the switch.
Result
Perform the ping operation. PC1 in VLAN 2 and VLAN 3 can
communicate with each other.
Result
To implement communication between VLANs through RIPv2,
configure at least two VLANIF interfaces on the switch.
Proxy ARP
Routed proxy ARP: Routed proxy ARP enables network
devices on the same network segment but on different
physical networks to communicate.
Intra-VLAN proxy ARP: If two hosts belong to the same VLAN
where user isolation is configured, enable intra-VLAN proxy
ARP on an interface associated with the VLAN to allow the
hosts to communicate.
Inter-VLAN proxy ARP: If two hosts belong to different VLANs,
enable inter-VLAN proxy ARP on interfaces associated with
the VLANs to implement Layer 3 communication between the
two hosts.
Topology Description
Routed proxy ARP
The IP addresses of PC1 and PC2 are on the same
network segment. When PC1 needs to communicate
with S1, PC1 broadcasts an ARP Request packet,
requesting the MAC address of PC2. However, PC1
and PC2 are on different physical networks (in different
broadcast domains). PC2 therefore cannot receive the
ARP Request packet sent from PC1 and does not
respond with an ARP Reply packet. To solve this
problem, enable proxy ARP on S1.
After the system is reset or the interface card is hot swapped or reset,
the dynamic entries will be lost but the static and the blackhole entries
are not lost.
Topology description
No loop prevention protocol is used on the switching network.
If S2 and S4 are incorrectly connected with a network cable, a
loop occurs between S2, S3, and S4. When a broadcast
packet is sent, the packet is forwarded to S3 and received by
Port1 on S1. When MAC address flapping detection is
configured on Port1, S1 detects that the source MAC address
of the broadcast packet flaps between interfaces. If the MAC
address flaps between interfaces frequently, S1 considers that
MAC address flapping occurs. The interface associated with
S1 can enter the error-down state or be removed from the
VLAN.
MAC address flapping detection
Other dynamic VLAN technologies cannot be used with the
removal of an interface from the VLAN where MAC address
flapping occurs.
Forwarding principle
An Eth-Trunk interface is assumed to be a physical interface at
the MAC sub-layer. Therefore, frames transmitted at the MAC
sub-layer only need to be delivered to the Eth-Trunk module.
Forwarding process
The Eth-Trunk module receives a frame from the MAC sublayer, and then extracts its source MAC address/IP address or
destination MAC address/IP address according to the load
balancing mode.
The Eth-Trunk module calculates the HASH-KEY value using
the hash algorithm.
Based on the HASH-KEY value, the Eth-Trunk module
searches the Eth-Trunk forwarding table for the interface
number, and then sends the frame from the corresponding
interface.
LACP concepts
LACP system priority: The LACP system priority (default value
of 32768) is used to differentiate priorities of devices at both
ends of an Eth-Trunk. In LACP mode, active interfaces
selected by both devices must be consistent; otherwise, the
LAG cannot be established. To keep active interfaces
consistent at both ends, set a higher priority for one end.
LACP implementation
After member interfaces are added to an Eth-Trunk in LACP
mode, each end sends LACPDUs to inform its peer of its
system priority, MAC address, interface priority, interface
number, and keys. After being informed, the peer compares
this information with that saved on itself, and selects which
interfaces to be aggregated. Both ends determine active
interfaces and links.
Negotiation process
Devices at both ends send LACPDUs to each other.
Create an Eth-Trunk in LACP mode on S1 and S2 and
add member interfaces to the Eth-Trunk. The member
interfaces are then enabled with LACP, and devices at
both ends send LACPDUs to each other.
Determine the Actor and active links.
When S2 receives LACPDUs from S1, S2 checks and
records information about S1 and compares system
priorities. If the system priority of S1 is higher than that
of S2, S1 acts as the Actor.
After devices at both ends select the Actor, they select
active interfaces according to the priorities of the
Actor's interfaces.
LACP preemption
E1 becomes faulty, and then recovers. When E1 fails,
E3 replaces E1 to transmit services. After E1 recovers,
if LACP preemption is not enabled on the Eth-Trunk,
E1 still retains a backup state. If LACP preemption is
enabled on the Eth-Trunk, E1 becomes the active
interface and E3 becomes the backup interface
because E1 has higher priority than E3.
LACP preemption delay
When LACP preemption occurs, the backup link waits
for a given period of time before switching to the active
state.
GVRP
GVRP is based on GARP and is used to maintain VLAN
attributes dynamically on devices. Through GVRP, VLAN
attributes of one device can be propagated throughout the
entire switching network. GVRP enables network devices to
dynamically deliver, register, and propagate VLAN attributes,
reducing the workload of network administrators and ensuring
correct configuration.
GVRP applies to only trunk links.
GVRP uses the multicast MAC address of 01-80-C2-00-00-21.
Participant
On a device running GVRP, each GVRP-enabled port is
considered as a GVRP participant.
VLAN registration and deregistration
GVRP implements automatic registration and deregistration of
VLAN attributes.
VLAN registration: adds an interface to a VLAN.
VLAN deregistration: removes an interface from a
VLAN.
GVRP registers and deregisters VLAN attributes through
attribute declarations and reclaim declarations:
When an interface receives a VLAN attribute
declaration, it registers the VLAN specified in the
declaration.
Join timer
To ensure that a Join message is reliably transmitted to
other GARP participants, a GARP participant may send the
Join message twice. When sending the first Join message,
the GARP participant starts the Join timer. If a Join
message is received before the Join timer expires, the
GARP participant does not send the second Join message.
If not, the GARP participant re-sends the Join message.
The Join timer is configured on a per-port basis.
Hold timer
When you configure an attribute on a participant or when
the participant receives a request message, the
participant does not propagate the message to the other
devices immediately. Instead, it sends the request
messages received within a period of time and sends
them in one GARP PDU. This period of time is specified by
the Hold timer. By making full use of the data portion of
GARP PDUs to send multiple messages in one packet, the
mechanism reduces the number of transmitted packets
and contributes to network stability.
The Hold timer value must be no greater than half of the
Join timer value.
Leave timer
Upon receiving a Leave or LeaveAll message, a GARP
participant starts its Leave timer. If it receives no Join message
containing the attribute carried in the Leave or LeaveAll
message when the Leave timer expires, it deregisters the
attribute.
The Leave timer value is twice that of the Join timer value.
LeaveAll timer
Upon startup, a GARP participant starts the LeaveAll timer.
When the LeaveAll timer expires, the GARP participant sends
out a LeaveAll message, and then restarts the LeaveAll timer
to start another cycle.
When receiving a LeaveAll message, a GARP participant restarts all timers, including the LeaveAll timer.
If LeaveAll timers of multiple devices expire at the same time,
multiple LeaveAll messages will be sent at the same time,
creating unnecessary traffic. To avoid this problem, the actual
LeaveAll timer value of a participant is a random value
between the LeaveAll timer value and the LeaveAll timer value
multiplied by 1.5. A LeaveAll event is equivalent to
deregistering all attributes network wide by sending Leave
messages.
The LeaveAll timer value must be at least larger than the
Leave timer value.
Case description
To enable PC1 and PC2 whose interfaces are isolated in
VLAN 2 to communicate with each other, enable intra-VLAN
proxy ARP on S1.
Command usage
The port-isolate enable command enables port isolation.
The arp-proxy inner-sub-vlan-proxy enable command
enables intra-VLAN proxy ARP.
View
Interface view
Parameters
port-isolate enable [ group group-id ]
group-id: specifies the ID of a port isolation group. The
default value is 1.
Precautions
You can use the display port-isolate command to view the
port isolation group configuration.
Case description
Preemption needs to be enabled to meet requirement 3.
Command usage
The mode command configures the working mode of an EthTrunk.
The eth-trunk command adds an interface to an Eth-Trunk.
The load-balance command sets a load balancing mode of an
Eth-Trunk.
The max active-linknumber command sets the upper
threshold for the number of active member links on an EthTrunk.
The lacp priority command sets the LACP system or interface
priority.
The lacp preempt enable command enables priority
preemption in static LACP mode.
Precautions
When adding an interface to an Eth-Trunk, pay attention to the
following points:
An Eth-Trunk contains a maximum of 8 member
interfaces.
A member interface cannot be configured with any
service or static MAC address.
The link type of the member interface added to the EthTrunk must be hybrid.
Case description
Deploy GVRP to meet requirement 2.
Command usage
The gvrp command enables GVRP globally or on an interface.
Precautions
Before enabling GVRP on an interface, you must set the link
type of the interface to trunk.
The display gvrp vlan-operation command displays the
dynamic VLANs to which an interface is added.
Control field
The Control field value defaults to 0x03, indicating
an unsequenced frame. By default, PPP does not
use sequence numbers or acknowledgement
mechanisms to ensure transmission reliability.
The Address and Control fields identify a PPP
packet, so the PPP packet header value is FF03.
Protocol field
The Protocol field identifies the datagram
encapsulated in the Information field of a PPP data
packet.
LCP packet format
Code field
The Code field is 1 byte in length and identifies the
LCP packet type.
Identifier field
The Identifier field is 1 byte long. It is used to match
request and response packets. If a device receives a
packet with an invalid Identifier field, the device
discards the packet.
The sequence number of a Configure-Request
packet usually begins with 0x01 and increases by 1
each time a Configure-Request packet is sent. After
a receiver receives a Configure-Request packet, it
must send a response packet with the same
sequence number as that of the received ConfigureRequest packet.
Length field
The Length field specifies the total number of bytes
in the LCP packet. It specifies the length of an LCP
packet, including the Code, Identifier, Length and
Data fields.
The Length field value cannot exceed the maximum
receive unit (MRU) of the link. Bytes outside the
range of the Length field are treated as padding and
are ignored after they are received.
Data field
The Type field specifies the negotiation option type.
The Length field specifies the total length of the Data
field, including Type, Length, and Data.
The Data field contains the contents of the
negotiation option.
Note: The working phases of PPP listed in this slide are not the status
of the PPP protocol because PPP is a protocol suite that does not have
a protocol status. Only specified protocols such as LCP and NCP can
have a protocol status that can change from one state to another.
Multilink PPP fragments a packet and sends the fragments to the same
destination over multiple PPP links.
PPPoE overview
PPPoE allows a large number of hosts on an Ethernet to
connect to the Internet using a remote access device and
controls each host using PPP. PPPoE features a large
application scale, high security, and convenient accounting.
Topology
Session stage:
PPP negotiation at the PPPoE Session stage is the same
as common PPP negotiation.
When PPP negotiation succeeds, PPP data packets can be
forwarded.
At the PPPoE Session stage, the PPPoE server and client
send all Ethernet data packets in unicast mode.
Terminate stage:
After a PPPoE session is established, the PPPoE client or
the PPPoE server can unicast a PADT packet to terminate
the PPPoE session at any time. When a PADT packet is
received, no further PPP traffic can be sent using this
session.
After the FR LMI negotiation succeeds and the PVC status changes to
Active, two devices on a PVC start the InARP negotiation process:
If a protocol address is configured on the local interface,
the local device (for example, R1) sends an Inverse ARP
Request packet to the peer device (for example, R2) over
the VC. The Inverse ARP Request packet carries the
protocol address of R1.
After receiving the Inverse ARP Request packet, R2
obtains the protocol address of R1, generates an address
mapping, and sends an Inverse ARP Response packet to
R1.
After receiving the Inverse ARP Response packet, R1
parses the address of R2 in the packet and generates an
address mapping.
R1 generates the address mapping 12.1.1.2 to 100, while
R2 generates the address mapping 12.1.1.1 to 100.
If a static mapping is configured manually or a dynamic mapping is
created, the local device does not send an InARP Request packet to
the remote device over the VC regardless of whether the remote
address in the address mapping is correct. The local device sends an
InARP Request packet to the remote device only when no mapping
exists.
Case description
The NCP protocol can be used to allocate an IP address to the peer.
You need to configure the ppp chap user Huawei command on R1's
interface to enable R1 to send a Challenge packet to R2 carrying the
user name Huawei.
Command usage
ppp authentication-mode: Configures the PPP authentication mode
in which the local device authenticates the remote device.
ppp chap user: Configures a user name for CHAP authentication.
ppp chap password: Configures a password for CHAP
authentication.
ip address ppp-negotiate: Configures IP address negotiation on an
interface to allow the interface to obtain an IP address from the remote
device.
remote address: Configures the local device to assign an IP address
or specify an IP address pool for the remote device.
Usage scenario
Interface view
Parameters
ppp authentication-mode { chap | pap }
chap: Indicates the CHAP authentication mode.
pap: Indicates the PAP authentication mode.
ppp chap user username
username: Specifies a user name for CHAP authentication.
ppp chap password { cipher | simple } password
cipher: Indicates a ciphertext password.
Simple: Indicates a plaintext password.
Password: Specifies the password for CHAP authentication.
remote address { ip-address | pool pool-name }
cipher: Indicates a ciphertext password.
Simple: Indicates a plaintext password.
Password: Specifies the password for CHAP authentication.
Precautions
In CHAP authentication, the authenticated party does not send the
password to the authenticating party.
The local device can use IPCP to learn the 32-bit host address from
the remote
Command usage
interface mp-group: Creates an MP-Group interface and enters the
MP-Group interface view.
ppp mp mp-group: Binds an interface to the MP-Group interface so
that the interface works in MP mode.
restart: Restarts the current interface.
Precautions
Data frames will be lost after you disable the interface. Exercise
caution when you use the restart command.
Case description
You need to get familiar with the configurations of the PPPoE
server and PPPoE client in this case.
Command usage
virtual-template: Creates a VT interface and enters the VT interface
view.
pppoe-server bind virtual-template: Binds a specified VT interface
to an Ethernet interface and enables PPPoE on the Ethernet interface.
remote address: Configures the local device to assign an IP address
or specifies an IP address pool for the remote device.
dialer-rule: Enters the dialer rule view.
dialer-rule: Specifies a dialer ACL for a dialer access group and
defines conditions to initiate calls.
interface dialer: Creates a dialer interface and enters the dialer
interface view.
dialer user: Enables the resource-shared DCC and specifies the
remote user name of the dialer interface.
dialer-group: Adds an interface to a dialer access group. That is, the
number of the dialer rule is specified.
dialer bundle: Specifies a dialer bundle for a dialer interface in the
resource-shared DCC.
pppoe-client dial-bundle-number: Specifies a dialer bundle for a
PPPoE session.
Parameters
remote address { ip-address | pool pool-name }
ip-address: Specifies an IP address to be allocated to the remote
device.
pool pool-name: Specifies the name of the IP address pool, from which
an IP address is allocated to the remote device.
Case description
In the case of FR network, you do not need to manually
configure the mapping relationship for a P2P sub-interface.
Precautions
You do not need to manually configure the mapping
relationship if the sub-interface is a P2P sub-interface no
matter that has InARP disabled or not.
Topology Description
Broadcast storm
Assume that STP is not enabled on the switching
devices. If PC1 broadcasts a request, the request is
received by port1 and forwarded by port2 on S1 and S2.
On S1 and S2, port 2 receives the request broadcast
by the other switch and port1 forwards the request. As
such transmission repeats and resources on the entire
network are exhausted, causing the network to break
down.
MAC address table flapping
Port2 on S1 can learn the MAC address of the PC2.
Since S2 forwards data frames sent by PC2 to its other
ports, S1 may learn the MAC address of PC2 on port1.
S1 continuously modifies its MAC address table,
causing flapping of the MAC address table.
STP
STP can eliminate network loops. STP is used to build a loopfree network (tree) to ensure the unique data transmission
path and prevent infinite looping of packets. STP works at the
data link layer of the OSI model.
STP-capable switches exchange BPDUs and perform
distributed calculation to determine which ports need to be
blocked to prevent loops.
Root bridge
The root bridge is the bridge with the smallest BID, which is
composed of the priority and MAC address.
Root Port
The root port is the port with the smallest root path to the root
bridge, and is responsible for forwarding data to the root bridge.
The root port is determined based on the path cost. Among all
STP-capable ports on a network bridge, the port with the
smallest root path cost is the root port. There is only one root
port on an STP-capable device, but there is no root port on the
root bridge.
Designated port and bridge
The bridge closest to the root bridge on each network segment
is used as the designated bridge. The port on the designated
bridge to the network segment is called designated port.
The designated port is responsible for forwarding traffic, and
the designated bridge is responsible for forwarding
configuration BPDUs.
After the root bridge, root port, and designated port are selected
successfully, the entire tree topology is set up. When the topology is
stable, only the root port and the designated port forward traffic. All the
other ports are in Blocking state, and receive only STP BPDUs but not
forward user traffic.
Hello Time
The Hello timer specifies the interval at which an STP-capable
device sends configuration BPDUs to detect link faults.
When the network topology becomes stable, the change of the
interval takes effect only after a new root bridge takes over.
After a topology changes, TCN BPDUs will be sent. This
interval is irrelevant to the transmission of TCN BPDUs.
The default value is 2 seconds.
Max Age
After a non-root bridge running STP receives a configuration
BPDU, the non-root bridge compares the Message Age value
with the Max Age value in the received configuration BPDU.
If the Message Age value is smaller than or equal to
the Max Age value, the non-root bridge forwards the
configuration BPDU.
If the Message Age value is larger than the Max Age
value, the configuration BPDU ages and the non-root
bridge directly discards it. In this case, the network size
is considered too large and the non-root bridge
disconnects from the root bridge.
In real world situations, each time a configuration BPDU
passes through a bridge, the value of Message Age increases
by 1.
The default value is 20.
Forward Delay
The Forward Delay timer specifies the delay for interface
status transition. The default value is 15 seconds.
Topology Description
Priorities of S1, S2, and S3 are 0, 1, and 2, and the path costs
between S1 and S2, between S1 and S3, and between S2 and
S3 are 5, 10, and 4 respectively.
Initial configuration BPDUs on ports of S1, S2, and S3:
S1: {0, 0, 0, PortA1} on PortA1 and {0, 0, 0, Port A2} on
Port A2
S2: {1, 0, 1, PortB1} on PortB1 and {1, 0, 1, Port B2} on
Port B2
S3: {2, 0, 2, PortC1} on PortC1 and {21, 0, 2, Port C2}
on Port C2
S2
S3
Topology description:
After S2 receives a BPDU with a lower priority from S4, S2
sends a configuration BPDU. This is because network bridges
save the optimal configuration BPDU.
Topology Description
The figure on the left side shows the initial topology. The path
costs are the same. S1, S2, and S3 are connected, S1 is the
root port, and interconnected ports are in forwarding state. In
the figure on the right side, a link between S1 and S2 is added.
After S2 receives BPDUs from S1 and S3, S2 considers that
the port connected to S1 is the new root port and the port
connected to S3 is the designated port. All ports are root ports
or designated ports in forwarding state. In this case, a loop
occurs. The loop can be eliminated only when configuration
BPDUs are transmitted to each network bridge and S2 blocks
the port connected to S3 through calculation.
There is a delay for a port (for example, port E on S2) to
change from non-forwarding to forwarding so that ports that
want to enter the non-forwarding state can complete spanning
tree calculation.
Forward Delay
The default interval for port status transition is 15 seconds.
There are specific calculation between Forwarding Delay, hello
timer and Max Age, the default value is based on the diameter
7 calculating.
Port Status Description
After a port is enabled, the port enters the Listening state and
starts the spanning tree calculation.
If the port needs to be configured as the alternate port through
calculation, the port enters the Blocking state.
If the port needs to be configured as the root port or
designated port through calculation, the port enters the
Learning state from the Listening state after a Forward Delay
period. The port then enters the Forwarding state from the
Learning state after the Forward Delay period. The port in
Forwarding state can forward data frames.
Topology Description:
Through STP calculation, S1 is the root bridge and port E1 on
S4 is blocked.
When the link of port E1 on S3 fails, the STP will be
calculation again, port E1 of S4 will turn to designated port and
the status is forwarding, S4 immediately sends a TCN BPDU
to the upstream.
After S2 receives the TCN BPDU from S3, S2 resets the TCA
bit in the subsequent configuration BPDU and sends it to S4
from port E3. S2 also sends the TCN BPDU to the root from
the root port E1.
After S1 receives the TCN BPDU from S2, S1 resets the TCA
and TC bits in the subsequent configuration BPDU and sends
it to S2 from the designated port E1. Within the period of 35
seconds (20 seconds + 15 seconds), S1 resets the TC bit in
the configuration BPDU. After receiving the configuration
BPDU with the reset TC bit, each network bridge changes its
aging time of MAC address entries to 15 seconds.
When the topology change, the MAC address table will
established soon, which can avoid wasting of bandwidth.
STP Limitation:
Port statuses or port roles are not distinguished in a finegranular manner. For example, ports in Listening and Blocking
states do not forward user traffic or learn MAC addresses.
The STP algorithm determines topology changes after the time
set by the timer expires, which slows down network
convergence.
The STP algorithm requires a stable network topology. After
the root bridge sends configuration BPDUs, other devices
process the configuration BPDUs so that the configuration
BPDUs are advertised to the entire network.
RSTP has all functions of STP, and the RSTP-capable and STPcapable network bridges can work together.
RSTP defines four port roles: root port, designated port, alternate port,
and backup port.
The functions of the root port and designated port are the same as
those defined in STP. The alternate port and backup port are described
as follows.
From the perspective of configuration BPDU transmission:
An alternate port is blocked after learning the
configuration BPDUs with a higher priority from other
bridges.
A backup port is blocked after learning the
configuration BPDUs with a higher priority than itself.
From the perspective of user traffic:
An alternate port backs up the root port and provides
an alternate path from the designated bridge to the root
bridge.
A backup port backs up the designated port and
provides an alternate path from the root bridge to a
network segment.
After all RSTP-capable ports are assigned roles, topology convergence
is completed.
Port statuses are simplified from five types to three types. Based on
whether a port forwards user traffic and learns MAC addresses, the port
is in one of the following states:
If a port neither forwards user traffic nor learns MAC
addresses, the port is in Discarding state.
If a port does not forward user traffic but learns MAC
addresses, the port is in Learning state.
If a port forwards user traffic and learns MAC addresses, the
port is in Forwarding state.
RSTP Calculation
Roles of ports in Discarding state are determined:
The root port and designated port enter the learning
state after the Forward Delay period. A port in Learning
state learns MAC addresses and enters the Forwarding
state after a Forward Delay period. RSTP accelerates
this process using another mechanism.
An alternate port maintains a Discarding state.
STP convergence
To eliminate loops, STP uses timers to complete convergence.
The default period from the time the port is enabled to the time
the port is in Forwarding state is 30 seconds. Shortening the
values of timers may cause the network to become unstable.
RSTP fast convergence
Edge port
In RSTP, a designated port on the network edge is
called an edge port. An edge port directly connects to a
terminal and does not connect to any other switching
devices. An edge port does not receive configuration
BPDUs, so it does not participate in the RSTP
calculation. It can directly change from the Disabled
state to the Forwarding state without any delay, just like
an STP-incapable port. If an edge port receives bogus
configuration BPDUs from attackers, it becomes a
common STP port. The STP recalculation is performed,
causing network flapping.
Fast switching of the root port
If the root port fails, the optimal alternate port on the
network becomes the root port and enters the
Forwarding state. This is because there must be a path
from the root bridge to a designated port on the
network segment connecting to the alternate port.
Proposal/Agreement mechanism
When a port is selected as a designated port, in STP,
the port does not enter the Forwarding state until a
Forward Delay period expires; in RSTP, the port enters
the Discarding state, and then the Proposal/Agreement
mechanism allows the port to immediately enter the
Forwarding state. The Proposal/Agreement mechanism
must be applied on the P2P links in full-duplex mode.
The P/A mechanism is short for the
Proposal/Agreement mechanism
Edge port
An edge port directly connects to a terminal. When the network
topology changes, loops do not occur on the edge port. The
edge port therefore can directly enter the Forwarding state
without waiting for two Forward Delay periods.
An edge port does not receive configuration BPDUs, so it does
not participate in the RSTP calculation. It can directly change
from the Disabled state to the Forwarding state without any
delay, just like an STP-incapable port. If an edge port receives
bogus configuration BPDUs from attackers, it becomes a
common STP port. The STP recalculation is performed,
causing network flapping.
P/A mechanism
The Proposal/Agreement (P/A) mechanism enables a
designated port to rapidly enter the Forwarding state.
The P/A mechanism requires that the link between two
switching devices should be P2P and work in full-duplex mode.
When P/A negotiation fails, the designated port is selected
after two Forward Delay periods. The negotiation process is
the same as that in STP.
After a new link is established, the negotiation process of the
P/A mechanism is as follows:
p0 and p1 become designated ports and send RST
BPDUs.
After receiving an RST BPDU with higher priority, p1
on S2 determines that it will become a root port but not
a designated port. p1 then stops sending RST BPDUs.
p0 on S1 enters the Discarding state and sends RST
BPDUs with the Proposal field of 1.
After receiving an RST BPDU with the Proposal field of
1, S2 sets the sync variable to 1 for all its ports.
As p2 has been blocked, its status remains unchanged;
p4 is an edge port and does not participate in
calculation. Only the non-edge designated port p3
therefore needs to be blocked.
When a port switches from RSTP to STP, the port loses RSTP features
such as fast convergence.
On a network where both STP-capable and RSTP-capable devices are
deployed, STP-capable devices ignore RST BPDUs; if a port on an
RSTP-capable device receives a configuration BPDU from an STPcapable device, the port switches to the STP mode after two intervals
specified by the Hello timer and starts to send configuration BPDUs. In
this manner, RSTP and STP are interoperable.
After STP-capable devices are removed, Huawei RSTP-capable
datacom devices can switch back to the RSTP mode.
The Common and Internal Spanning Tree (CIST), calculated using STP
or RSTP, connects all switching devices on a switching network.
The CIST root is the network bridge with the highest priority on
the entire network, that is, root bridge of the CIST.
In the preceding topology, the lines in red in MSTIs and the
lines in blue between MSTIs form a CIST. The root bridge of
the CIST is S1 in MST region 1.
A Common Spanning Tree (CST) connects all the MST regions on a
switching network.
The CST is calculated by all nodes using STP or RSTP.
In the preceding topology, the lines in blue form a CST. The
CST root is MST region 1.
An Internal Spanning Tree (IST) resides within an MST region.
Each spanning tree in an MST region has an MSTI ID. An IST
is a special MSTI with the MSTI ID of 0, called MSTI 0. The
VLANs that do not map to other MSTIs map to MSTI 0.
An IST is a segment of the CIST in an MST region.
In the preceding topology, the lines in red form a IST.
The master bridge is the IST master, which is the switching device
closest to the CIST root in a region.
If the CIST root is in an MST region, the CIST root is the
master bridge of the region.
MSTI
An MST region can contain multiple spanning trees, each
called an MSTI. An MSTI regional root is the root of the MSTI.
Each MSTI has its own regional root.
MSTIs are independent of each other. An MSTI can map to
one or more VLANs, but one VLAN can map to only one MSTI.
Each MSTI has an MSTI ID. The MSTI ID starts from 1, which
is distinguished with the IST (MSTI 0).
In the preceding topology, VLAN 2 maps to MSTI 2 and VLAN
4 to MSTI 4.
MSTI regional root
The MSTI regional root is the network bridge with the highest
priority in each MSTI. You can specify different roots in
different MSTIs.
In the preceding topology, assuming that S9 has the highest
priority in MSTI 2, S9 is the regional root in MSTI 2. Assuming
that S8 has the highest priority in MSTI 4, S8 is the regional
root in MSTI 2.
When compared to RSTP, MSTP has two additional port types. MSTP
ports include the root port, designated port, alternate port, backup port,
edge port, master port, and regional edge port.
Master port
A master port is on the shortest path connecting MST
regions to the CIST root.
BPDUs of an MST region are sent to the CIST root
through the master port.
Master ports are special regional edge ports,
functioning as root ports in the CIST and master ports
in instances.
In the preceding topology, the port on S7 connected to
MST region 1 is the master port.
Regional edge port
A port connecting the network bridge in an MST region
to another MST region or an STP or RSTP-enabled
network bridge is a regional edge.
In the preceding topology, the port on S8 connected to
MST region 2 is the regional edge port.
CST Calculation
CST and IST calculation is similar to the calculation in RSTP.
During CST calculation, an MST region is considered as a
network bridge and the ID of the network bridge is the IST
regional root ID.
CIST uses the following vectors: {root switching device ID,
ERPC, regional root ID, IRPC, designated switching device ID,
designated port ID, receiving port ID}. CST uses the following
vectors: {CIST root, ERPC, regional root ID, designated port ID,
receiving port ID}.
Topology description:
Assume that S1, S4, and S7 are regional roots in
Region1, Region2, and Region3 respectively. S1 has
the highest priority, S4 has the lowest priority, and the
cost of each path is the same.
Each MST region is considered as a network bridge,
and the ID of the network bridge is the regional root ID.
Each MST region sends a BPDU with itself as the CIST
root and external cost of 0 to other MST regions.
Through RSTP calculation, S1 is the CIST root.
Through ERPC comparison, the port of each regional
root connected to Region1 is the master port.
Through comparison of priorities in regional root IDs,
the regional edge port is determined.
IST Calculation
CST and IST calculation is similar to the calculation in RSTP.
MSTP calculates an IST for each MST region, and computes a
CST to interconnect MST regions. The CST and ISTs
constitute a CIST for the entire network.
CIST uses the following vectors: {root switching device ID,
ERPC, regional root ID, IRPC, designated switching device ID,
designated port ID, receiving port ID}. IST uses the following
vectors: {CIST root, IRPC, designated bridge ID, designated
port ID, receiving port ID}.
Topology description:
After CST calculation is complete, S1, S4, and S7 are
regional roots in Region1, Region2, and Region3
respectively. In this situation, the regional root is the
network bridge closest to the CIST root but not the
network bridge with the highest priority.
The role of a port on each network bridge is determined
based on the regional root as the root bridge and IRPC,
and then the IST is obtained.
Network bridges in an MST region compare IRPCs to
determine the IST root port.
Port roles in the IST are determined based on priorities
in BPDUs.
Region1 Calculation
In an MST region, MSTP calculates an MSTI for each VLAN
based on mappings between VLANs and MSTIs. Each MSTI is
calculated independently. The calculation process is similar to
the process for STP to calculate a spanning tree.
Topology description:
In Region1, VLAN 2 maps to MSTI 2, VLAN 4 to MSTI
4, and other VLANs to MSTI 0.
Different priorities are specified for network bridges in
different MSTIs. Assume that S2 is the root bridge in
MSTI 2 and S3 is the root bridge in MSTI 4.
In MSTI 2, S2, S1, and S3 are in descending order of
priority. Through calculation, the port on S3 connected
to S1 is blocked.
In MSTI 4, S3, S1, and S2 are in descending order of
priority. Through calculation, the port on S2 connected
to S1 is blocked.
MSTIs have the following characteristics:
The spanning tree is calculated independently for each MSTI,
and spanning trees of MSTIs are independent of each other.
MSTP calculates the spanning tree for an MSTI in a manner
similar to STP.
Spanning trees of MSTIs can have different roots and
topologies.
Region2 Calculation
Topology description:
In Region2, VLAN 2 maps to MSTI 2, VLAN 3 to MSTI
3, and other VLANs to MSTI 0.
Different priorities are specified for network bridges in
different MSTIs. Assume that S5 is the root bridge in
MSTI 2 and S6 is the root bridge in MSTI 3.
In MSTI 2, S5, S4, and S6 are in descending order of
priority. Through calculation, the port on S6 connected
to S4 is blocked.
In MSTI 3, S6, S4, and S5 are in descending order of
priority. Through calculation, the port on S5 connected
to S4 is blocked.
Region3 Calculation
Topology description:
In Region3, VLAN 2 maps to MSTI 2, VLAN 4 to MSTI
4, and other VLANs to MSTI 0.
Different priorities are specified for network bridges in
different MSTIs. Assume that S9 is the root bridge in
MSTI 2 and S8 is the root bridge in MSTI 4.
In MSTI 2, S9, S10, S8, and S7 are in descending
order of priority. Through calculation, the port on S7
connected to S8 and the port on S8 connected to S10
are blocked.
In MSTI 4, S8, S7, S10, and S9 are in descending
order of priority. Through calculation, the port on S9
connected to S7 and the port on S10 connected to S7
are blocked.
MSTI Calculation
After CIST and MSTI calculations are complete, the mapping
between VLANs and MSTIs in each MST region is
independent.
On an MSTP-aware network, a VLAN packet is forwarded
along the following paths:
MSTI including the IST in an MST region
CST among MST regions
Case description
S1, S2, and S3 must be in descending order of priority to meet
requirements 2 and 3.
Command usage
The stp mode command sets the working mode of a spanning
tree protocol on a switching device.
The stp root command configures a switching device as the
root bridge or secondary root bridge of a spanning tree.
The stp priority command sets the priority of the switching
device in a spanning tree.
The stp cost command sets the path cost of a port in a
spanning tree.
Parameters
stp mode { mstp | rstp | stp }
mstp: indicates the MSTP mode.
rstp: indicates the RSTP mode.
stp: indicates the STP mode.
stp [ instance instance-id ] root { primary | secondary }
instance instance-id: specifies the ID of a spanning tree
instance. It needs to be specified in MSTP.
primary: indicates that the switching device functions as
the primary root bridge of a spanning tree.
secondary: indicates that the switching device functions
as the secondary root bridge of a spanning tree.
Case description
In the preceding topology:
Requirement 1 involves interoperability between RSTP
and STP.
Requirement 2 involves the stp root command usage.
Requirement 3 involves the edge port, BPDU filtering,
and BPDU protection.
Command usage
The stp mcheck command configures a port to automatically
switch from the STP mode back to the RSTP/MSTP mode.
The stp edged-port default command configures all ports on
a switching device as edge ports.
The stp bpdu-filter default command configures all ports on a
switching device as BPDU-filter ports.
The stp bpdu-protection command enables BPDU protection
on a switching device.
The stp root-protection command enables root protection on
a port.
Precautions
After the stp bpdu-filter default and stp edged-port default
commands are run in the system view, none of the ports on
the device will initiate any BPDUs or negotiate with the directly
connected port on the remote device, and all the ports are in
Forwarding state. This may lead to a loop and cause a
broadcast storm. Exercise caution when using the stp bpdufilter default and stp edged-port default commands in the
system view.
After BPDU protection is enabled on a switching device, the
switching device sets an edge port in error-down state if the
edge port receives a BPDU and retains the port as an edge
port.
Case description
S1 must be configured as the root bridge in MSTI2 and S3
must be configured as the root bridge in MSTI3 to meet
requirement 3, the Alternate port as figure above. So, S1 need
be configured as the root bridge in MSTI2, S2, S3, and S4
must be in descending order of priority; and S3 need be
configured as the root bridge in MSTI3, S1, S4, and S2 must
be in descending order of priority.
Command usage
The region-name command configures the MST region name
of a switching device.
The instance command maps a VLAN to an MSTI.
The revision-level command configures the revision level of
an MST region of a switching device. The default value is 0.
The active region-configuration command activates the
configuration of an MST region.
The stp loop-protection command enables loop protection on
a port.
Precautions
Two switching devices belong to the same MST region only
when they have the following identical configurations:
MST region name
Mappings between MSTIs and VLANs
MST region revision level
Loop protection
On a network running a spanning tree protocol, a
switching device maintains the status of the root port
and blocked port by continuously receiving BPDUs
from the upstream switching device.
Unicast
In unicast mode, the amount of data transmitted on a network
is proportional to the number of users that require the data. If a
large number of users require the same data, the multicast
source must send many copies of data to these users,
consuming high bandwidth on the multicast source and
network. Therefore, the unicast mode is not suitable for batch
data transmission and is applicable only to networks with a
small number of users.
Broadcast
In broadcast mode, data is sent to all hosts on a network
segment regardless of whether they require the data. This
threatens information security and causes broadcast storms on
the network segment. Therefore, the broadcast mode is not
suitable for data transmission from a source to specified
destinations. In addition, the broadcast mode wastes network
bandwidth.
Multicast has the following advantages over unicast and broadcast:
Compared with the unicast mode, the multicast mode starts to
copy data and distribute data copies on the network node as
far from the source as possible. Therefore, the amount of data
and the level of network resource consumption will not
increase greatly when the number of receivers increases.
Multicast service models are classified for receiver hosts and do not
affect multicast sources. All multicast data packets sent from a
multicast source use the IP address of the multicast source as the
source IP address and use a multicast group address as the
destination address. Depending on whether receiver hosts can select
multicast sources, two multicast models are defined: any-source
multicast (ASM) model and source-specific multicast (SSM) model. The
two models use multicast group addresses in different ranges.
ASM model: Receiver hosts can only specify the group they
want to join and cannot select multicast sources.
SSM model: Receiver hosts can specify the multicast sources
from which they want to receive multicast data when they join
a group. After joining the group, the hosts receive only the data
sent from the specified sources.
Multicast addresses
IP addresses 224.0.0.0 to 224.0.0.255 are reserved as
permanent group addresses by the Internet Assigned
Numbers Authority (IANA). In this address range, 224.0.0.0 is
not allocated, and the other addresses are used by routing
protocols for topology discovery and maintenance. These
addresses are locally valid. Packets with these addresses will
not be forwarded by routers regardless of the time-to-live (TTL)
values in the packets.
Addresses in the range of 224.0.1.0 to 231.255.255.255 and
233.0.0.0 to 238.255.255.255 are ASM group addresses and
are globally valid.
Addresses 232.0.0.0 to 232.255.255.255 are SSM group
addresses available to users and are globally valid.
Addresses 239.0.0.0 to 239.255.255.255 are local
administrative multicast addresses and are valid only in the
local administrative domain. Local administrative group
addresses are private addresses. A local administrative group
address can be used in different administrative domains.
IGMP
IGMP is deployed between multicast routers and user hosts.
On a multicast router, IGMP is configured on interfaces
connected to hosts.
On hosts, IGMP allows group members to dynamically join and
leave multicast groups. On routers, IGMP manages and
maintains group memberships and exchanges information with
upper-layer multicast routing protocols.
PIM
PIM has two modes: PIM-DM and PIM-SM.
It must be enabled on all interfaces of all multicast routers.
It provides multicast routing and forwarding, and maintains the
multicast routing table based on network topology changes.
IGMP snooping
IGMP snooping is deployed in VLANs on Layer 2 switches
between multicast routers and hosts.
It listens on IGMP messages exchanged between routers and
hosts to create and maintain a Layer 2 multicast forwarding
table. In this manner, multicast data can be forwarded on a
Layer 2 network.
IGMP
IGMP is an IPv4 group membership management protocol in
the TCP/IP protocol suite. IP hosts use IGMP to report their
group memberships to any immediately-neighboring multicast
routers.
IGMP is deployed between multicast routers and hosts. On a
multicast router, IGMP is configured on interfaces connected
to hosts.
On hosts, IGMP allows group members to dynamically join and
leave multicast groups. On routers, IGMP manages and
maintains group memberships and exchanges information with
upper-layer multicast routing protocols.
The IGMP versions are backward compatible. Therefore, a
multicast router running a later IGMP version can identify
Membership Report messages sent from hosts running an
earlier IGMP version, although the IGMP messages in different
versions use different formats.
All of the IGMP versions support the any-source multicast
(ASM) model. IGMPv3 can be independently used in the
source-specific multicast (SSM) model, whereas IGMPv1 and
IGMPv2 must be used with SSM mapping.
BLOCK
Indicates that members of a multicast group no longer
want to receive data from the specified multicast
sources. If the source filter mode for the multicast
group is INCLUDE, the specified sources are deleted
from the source list. If the source filter mode is
EXCLUDE, the specified sources are added to the
source list.
An IGMPv3 Report message can carry multiple groups, whereas an
IGMPv1 or IGMPv2 Report message can carry only one group. IGMPv3
greatly reduces the number of messages transmitted on a network.
Unlike IGMPv2, IGMPv3 does not define a Leave message. Group
members send Report messages of a specified type to notify multicast
routers that they have left a group. For example, if a member of group
225.1.1.1 wants to leave the group, it sends a Report message with
(225.1.1.1, TO_IN, (0)).
Concepts
Layer 2 multicast
If users in different VLANs require the same multicast data, the
upstream router still has to send multiple copies of identical
multicast data to different VLANs.
Users in VLAN 2 and VLAN 3 need to receive the same
multicast data flow. Multicast router R1 replicates the multicast
data in each VLAN and sends two copies of data to
downstream switch S1. This wastes bandwidth between the
router and Layer 2 device and increases loads on the router.
Multicast VLAN
The multicast VLAN feature allows Layer 2 network devices to
replicate multicast data across VLANs.
After the multicast VLAN function is configured on S1, R1
replicates multicast data in the multicast VLAN (VLAN 4) and
sends only one copy to S1. As the router does not need to
replicate multicast data in VLAN 2 and VLAN 3, network
bandwidth is conserved and loads on the router are reduced.
Concepts
Multicast VLAN: VLAN to which a network-side interface
belongs. A multicast VLAN is used to aggregate multicast data
flows. One multicast VLAN can be bound to multiple user
VLANs.
User VLAN: VLAN to which a user-side interface belongs. A
user VLAN is used to receive multicast data flows from the
multicast VLAN. A user VLAN can be bound only to one
multicast VLAN.
PIM router
Routers with PIM enabled on interfaces are called PIM routers.
A multicast distribution tree contains the following types of PIM
routers:
Leaf router: The PIM router directly connected to a user
host, which may not be multicast group members.
First-hop router: The PIM router directly connected to a
multicast source on the multicast forwarding path and
responsible for forwarding multicast data from the
multicast source.
Last-hop router: The PIM router directly connected to a
multicast group member on the multicast forwarding
path and responsible for forwarding multicast data to
the member.
PIM DM overview
PIM-DM uses the push mode to forward multicast packets and
is often used on small-scale networks with densely distributed
multicast group members. PIM-DM assumes that each
network segment has multicast group members. When a
multicast source sends multicast packets, PIM-DM floods the
multicast packets to all PIM routers on the network and prunes
the branches with no members. PIM-DM establishes and
maintains a unidirectional loop-free SPT (source-specific
shortest path tree) through periodical flood-and-prune
processes. If a new group member connects to a leaf router on
a pruned branch, the router can initiate a grafting process to
restore multicast forwarding before the next flood-and-prune
process.
PIM-DM uses the following mechanisms: neighbor discovery, flooding,
pruning, grafting, assert, and state refresh. The flooding, pruning, and
grafting mechanisms are used to establish an SPT.
The total of LAN-delay and override-interval is the prunepending timer (PPT). After a router receives a Prune message
from a downstream interface, it waits until the PPT expires,
and then prune the downstream interface. If the router receives
a Join message from the downstream interface before the PPT
expires, it cancels the pruning operation.
On a PIM-SM network, each multicast group can have only RP and one
RPT. Before an SPT switchover, all multicast packets destined for a
multicast group must be encapsulated in Register messages and then
sent to the RP. The RP decapsulates Register messages and forwards
multicast packets along the RPT. All multicast packets pass through the
RP. As the rate of multicast packets increases, the RP faces heavy
loads. To resolve this problem, PIM-SM allows the RP or the receiver
DR to trigger an SPT switchover.
SPT switchover conditions
When the multicast traffic rate exceeds the specified threshold,
PIM-SM triggers an RPT-to-SPT switchover.
According to default configuration of the VRP, routers
connected to receivers join the SPT immediately after
receiving the first multicast data packet from a multicast source.
During a BSR election, each C-BSR considers itself as the BSR and
sends a Bootstrap message to the entire network. The Bootstrap
message carries the C-BSR address and priority. Each PIM router
receives Bootstrap messages from all C-BSRs and compares C-BSR
information to elect a BSR. The BSR is elected according to the
following rules:
The C-BSR with the highest priority wins (larger priority value,
higher priority).
If C-BSRs have the same priority, the C-BSR with the largest
IP address wins.
An RP election process is as follows:
Each C-RP sends an Advertisement message to the BSR. An
Advertisement message carries the C-RP address, the range
of multicast groups the C-RP serves, and the C-RP priority.
The BSR summarizes the C-RP information in an RP-Set,
encapsulates the RP-Set in a Bootstrap message, and
advertises the message all PIM-SM routers on the network.
PIM routers follow the same rules to compare RP information
in the RP-Set and elect an RP from multiple C-RP for the
same group. The RP election rules are as follows:
The C-RP interface with the longest address mask
wins.
The C-RP with the highest priority wins (larger priority
value, lower priority).
RPF check
When a router receives a multicast packet, it searches the
unicast routing table for the route to the source address of the
packet. After finding the route, the router checks whether the
outbound interface of the route is the same as the inbound
interface of the multicast packet. If they are the same, the
router considers that the multicast packet is received from a
correct interface. This process is called an RPF check, which
ensures correct forwarding paths for multicast packets.
If multiple equal-cost routes are available, the route with the
largest next-hop address is used as the RPF route.
RPF checks can be performed based on unicast routes,
Multiprotocol Border Gateway Protocol (MBGP) routes, or
static multicast routes. The priority order of these routes is
static multicast routes > MBGP routes > unicast routes.
Topology description
A multicast stream sent from the source 152.10.2.2 arrives at
interface S1 of the router. The router checks the routing table
and finds that the multicast stream from this source should
arrive at interface S0. Therefore, the RPF check fails and the
multicast stream is dropped by the router.
A multicast stream sent from the source 152.10.2.2 arrives at
interface S0 of the router. The router checks the routing table
and finds that the RPF interface is also S0. The RPF check
succeeds, and the multicast stream is correctly forwarded.
Case description
In this case, interconnection IP addresses are configured
according to the following rule:
If RTX connects to RTY, their interface IP addresses
used to connect to each other are XY.1.1.X and
XY.1.1.Y, network mask is 24.
Command usage
The multicast routing-enable command enables the
multicast routing function.
The pim dm command enables PIM-DM on an interface.
The pim hello-option dr-priority command sets the DR priority
for a PIM interface.
The igmp enable command enables IGMP on an interface.
The igmp version command specifies the IGMP version
running on an interface.
Precautions
In this network topology, R2 is the IGMP querier, and R3
forwards multicast packets to downstream receivers because
R3 is the assert winner.
The display pim routing-table command displays entries in
the PIM routing table.
The display pim routing-table fsm command displays
detailed information about the finite state machine (FSM) in the
PIM routing table.
Case description
The network topology is the same as that in PIM-DM
configuration. The network runs PIM-SM, and the transmission
scope of Bootstrap messages needs to be limited.
Command usage
The pim sm command enables PIM-SM on an interface.
The c-rp command configures a router to notify the BSR that it
is a C-RP.
The c-bsr command configures a C-BSR.
The pim bsr-boundary command configures the BSR
boundary of the PIM-SM domain on an interface.
Precautions
In this network topology, R2 is the IGMP querier, and R3
forwards multicast packets to downstream receivers because
R3 is the assert winner.
The display pim routing-table command displays entries in
the PIM routing table.
The display pim routing-table fsm command displays
detailed information about the FSM in the PIM routing table.
The method for checking the SPT in a PIM-SM network is similar to the
method for checking the RPT.
The method for checking the SPT in a PIM-SM network is similar to the
method for checking the RPT.
Case description
In this case, interconnection IP addresses are configured
according to the following rules:
If RTX connects to RTY, their interface IP addresses
used to connect to each other are XY.1.1.X and
XY.1.1.Y, network mask is 24.
The loopback interface address of RTX is X.X.X.X/32.
Pre-configuration
This page provides the basic OSPF configuration. In this case,
R1 is the DR in the FR network.
Results:
A Bootstrap message is transmitted from R1 to R2 and fails
the RPF check on R2, so R2 drops the message. To enable
Bootstrap messages to be forwarded by R2, configure a static
multicast route on R2 to change the RPF path.
Results:
A Bootstrap message is transmitted from R1 to R2 and fails
the RPF check on R2, so R2 drops the message. To enable
Bootstrap messages to be forwarded by R2, configure a static
multicast route on R2 to change the RPF path.
Results:
The ACL restricts the multicast address range.
It should be noted that an IPv6 address can contain only one double
colon (::). Otherwise, a computer cannot determine the number of zeros
in a group when restoring the compressed address to the original 128bit address.
If the first 3 bits of an IPv6 unicast address are not 000, the interface ID
must be of 64 bits. If the first 3 bits are 000, there is no such limitation.
IEEE EUI-64 standards
The length of an interface ID is 64 bits. IEEE EUI-64 defines a
method to convert a 48-bit MAC address into a 64-bit IPv6
interface ID. In the MAC address, c bits indicate the vendor ID,
d bits indicate the vendor number ID, and 0 bit indicates a
global/local bit. g specifies whether the interface ID indicates a
single host or a host group. The specific conversion algorithm
is as follows: convert 0 to 1 and insert two bytes (FFFE)
between c and d.
The method for converting MAC addresses into IPv6 interface
IDs reduces the configuration workload. When stateless
address autoconfiguration (stateless address
autoconfiguration will be explicated in the following pages) is
used, you only need an IPv6 network prefix before obtaining
an IPv6 address.
The defect of this method is that an IPv6 address can be easily
calculated based on a MAC address.
Link-local address
Link-local addresses have a limited application scope. An IPv6
link-local address can be used only for communication
between nodes on the same link. A link-local address uses a
link-local prefix FE80::/10 as the first 10 bits (1111111010 in
binary) and an interface ID as the last 64 bits.
When IPv6 runs on a node, each interface of the node is
automatically assigned a link-local address that consists of a
fixed prefix and an interface ID in EUI-64 format. This
mechanism enables two IPv6 nodes on the same link to
communicate without any additional configuration. Therefore,
link-local addresses are widely used in neighbor discovery and
stateless address autoconfiguration.
Routing devices do not forward IPv6 packets with the link-local
address as a source or destination address to devices on nonlocal links.
Unspecified address
An IPv6 unspecified address is 0:0:0:0:0:0:0:0/128 or ::/128,
indicating that an interface or a node does not have an IP
address. It can be used as the source IP address of some
packets, such as Neighbor Solicitation (NS) message in
duplicate address detection. Devices do not forward the
packets with the source IP address as an unspecified address.
Loopback address
An IPv6 loopback address is 0:0:0:0:0:0:0:1/128 or ::1/128.
Similar to IPv4 loopback address 127.0.0.1, the IPv6 loopback
address is used when a node needs to send IPv6 packets to
itself. This IPv6 loopback address is usually used as the IP
address of a virtual interface (a loopback interface for
example). The loopback address cannot be used as the
source or destination IP address of packets that need to be
forwarded.
An IPv6 packet has three parts: an IPv6 basic header, one or more
IPv6 extension headers, and an upper-layer protocol data unit (PDU).
IPv6 basic header
Each IPv6 packet must have an IPv6 basic header,
which is fixed as 40 bytes long.
The IPv6 basic header provides basic packet
forwarding information and will be parsed by all routers
on the forwarding path.
Extension headers
An IPv6 extension header is an optional header that
may follow the IPv6 basic header. An IPv6 packet may
carry zero, one, or more extension headers. The
extension headers may be different in lengths. The
IPv6 header and IPv6 extension header replace the
IPv4 header and its options. The IPv6 extension
header enhances IPv6 functions and has great
extensibility. Unlike the Options of an IPv4 header, the
maximum length of an IPv6 extension header is not
limited. Therefore, an IPv6 extension header can
contain all the extension data required by IPv6
communications.
The extension information about packet forwarding in
an IPv6 extension header is not parsed by all the
routers on the path, and is generally parsed by only the
destination router.
Each extension header can only occur once in an IPv6 packet, except
for the Destination Options header. The Destination Options header
may occur at most twice (once before a Routing header and once
before the upper-layer header).
The router finds that a better next hop IP address of the packet
is on the same network segment as the source IP address of
the packet.
After checking the source address of the packet, the router
finds a neighboring device in the neighbor entries that uses
this address as the global unicast address or the link-local
address.
IPv4/IPv6 dual stack is an efficient technology that implements IPv4-toIPv6 transition. In IPv4/IPv6 dual stack, network devices support both
the IPv4 protocol stack and IPv6 protocol stack. The source device
selects a protocol stack according to the IP address of the destination
device. Network devices between the source and destination devices
select a protocol stack to process and forward packets according to the
packet protocol type. IPv4/IPv6 dual stack can be implemented on a
single device or on a dual-stack backbone network. On a dual-stack
backbone network, all devices must support the IPv4/IPv6 dual stack,
and interfaces connected to the dual-stack network must have both
IPv4 and IPv6 addresses configured.
The topology is described as follows:
The host sends a DNS request to the DNS server for the IP
address of domain name www.huawei.com. The DNS server
replies with the requested IP address of the domain name. The
IP address may be 10.1.1.1 or 3ffe:yyyy::1. If the host sends a
class-A query, the DNS server replies with the IPv4 address of
the domain name. When the host sends a class-AAAA query,
the DNS server replies with the IPv6 address of the domain
name.
During early transition, IPv4 networks are widely deployed, while IPv6
networks are isolated islands. IPv6 over IPv4 tunneling allows IPv6
packets to be transmitted on an IPv4 network, interconnecting all IPv6
islands.
An IPv4 address can only be used as the source address of one 6to4
tunnel. If one edge router connects to multiple 6to4 networks and uses
the same IPv4 address as the tunnel source address, SLA IDs in 6to4
addresses are used to differentiate the 6to4 networks. These 6to4
networks, however, share the same 6to4 tunnel.
Example description:
The device addresses are determined as follows:
If RTX connects to RTY, the addresses of the two
devices are 2001:XY::X/64 and 2001:XY::Y/64
respectively.
Example description:
The device addresses are determined as follows:
If RTX connects to RTY, the addresses of the two
devices are 2001:XY::X/64 and 2001:XY::Y/64
respectively.
Example description:
The device addresses are determined as follows:
If RTX connects to RTY, the addresses of the two
devices are 2001:XY::X/64 and 2001:XY::Y/64
respectively.
Example description:
The device addresses are determined as follows:
If RTX connects to RTY, the addresses of the two
devices are 2001:XY::X/64 and 2001:XY::Y/64
respectively.
Example description:
IPv6 and IPv4 addresses have been specified.
Example description:
IPv6 and IPv4 addresses have been specified.
Site
A VPN target, also called the route target (RT), is a 32-bit BGP
extension community attribute. BGP/MPLS IP VPN uses VPN targets to
control VPN routes advertisement.
A VPN instance is associated with one or more VPN target attributes.
VPN target attributes are classified into the following types:
Export target: After a PE device learns IPv4 routes from
directly connected sites, it converts the routes to VPN-IPv4
routes and sets the export target attribute for those routes. The
export target attribute is advertised with the routes as a BGP
extended community attribute.
Import target: After a PE device receives VPN-IPv4 routes
from other PE devices, it checks the export target attribute of
the routes. If the export target is the same as the import target
of a VPN instance on the local PE device, the local PE device
adds the route to the VPN routing table.
A VPN target defines which sites can receive a VPN route and which
VPN routes of which sites can be received by a PE device.
The reasons for using the VPN target instead of the RD as the
extended community attribute is as follows:
Traditional BGP-4 defined in RFC 1771 can manage only the IPv4
routes but cannot process VPN routes that have overlapping address
spaces.
To correctly process VPN routes, VPNs use MP-BGP defined in RFC
2858 (Multiprotocol Extensions for BGP-4). MP-BGP supports multiple
network layer protocols. Network layer protocol information is contained
in the Network Layer Reachability Information (NLRI) field and the Next
Hop field of an MP-BGP Update message.
MP-BGP uses the address family to differentiate network layer
protocols. An address family can be a traditional IPv4 address family or
any other address family, such as a VPN-IPv4 address family or an
IPv6 address family. For the values of address families, see RFC 1700
(Assigned Numbers).
After a PE1 device receives an IPv4 route from a CE1 device, the PE
device adds the manually configured RD of the VRF to the route to
change the IPv4 route into a VPNv4 route. Then the PE device
changes the Next_Hop attribute in the Route Advertisement message
to its own Loopback address and adds a VPN label (randomly
generated by MP-IBGP) to the route. After that, the PE device adds the
Export Route Target attribute to the route and sends the route to all the
PE neighbors. In VRP5.3, after MPLS is enabled on PE1, PE1 uses
MP-BGP to allocate VPN labels to private network routes. PE devices
can then correctly exchange VPN routes.
When multiple CE devices in a VPN site connect to different PE
devices, VPN routes advertised from the CE devices to the PE devices
may be sent back to the VPN site after the routes traverse the
backbone network. This may cause routing loops in the VPN site. The
Site or Origin (SOO) specifies the source site and prevents routing
loops.
After PE2 receives a VPNv4 route advertised by PE1, PE2 converts the
VPNv4 route into an IPv4 route and adds the IPv4 route to the
corresponding VRF based on the import target attribute of the route.
The VPN label of the route is retained for packet forwarding. PE2
forwards the IPv4 route to the corresponding CE device through the
routing protocol between the PE and CE devices. The next hop in the
route is the IP address of PE2's interface.
CE2 sends an IP packet destined for CE1. After receiving the packet,
PE2 encapsulates an inner label 15362 and then an outer label 1024 to
the packet and forwards the packet to the P device. After receiving the
packet, the penultimate hop P pops out the outer label, retains the inner
label, and forwards the packet to PE1 based on the outer label. PE1
determines the VPN site to which the packet belongs based on the
inner label, removes the inner label, and forwards the packet to CE1.
Case description
In this case, the addresses for interconnecting devices are as
follows:
If RTX interconnects with RTY, the addresses are
XY.1.1.X and XY.1.1.Y, network mask is 24.
Assume that PE1 is RT1, PE2 is RT2, P is RT3.
Command usage
ip binding vpn-instance: binds the current AC interface to a
specified VPN instance.
ipv4-family: enters the IPv4 address family view of BGP.
Precautions
After a VPN instance is bound to or unbound from an interface,
Layer 3 features such as IP address and routing protocol are
deleted from the interface. If such features are required, you
need to re-configure them.
Case description
In this case, the addresses for interconnecting devices are as
follows:
If RTX interconnects with RTY, the addresses are
XY.1.1.X and XY.1.1.Y, network mask is 24.
Assume that PE1 is RT1, PE2 is RT2, P is RT3.
Command usage
ip binding vpn-instance: binds the current AC interface to a
specified VPN instance.
ipv4-family: enters the IPv4 address family view of BGP.
Precautions
Specify a VPN instance for each RIP process on the PE
device.
Case description
In this case, the addresses for interconnecting devices are as
follows:
If RTX interconnects with RTY, the addresses are
XY.1.1.X and XY.1.1.Y, network mask is 24.
Assume that PE1 is RT1, PE2 is RT2, P is RT3.
Command usage
ip binding vpn-instance: binds the current AC interface to a
specified VPN instance.
ipv4-family: enters the IPv4 address family view of BGP.
Precautions
Specify a VPN instance for each IS-IS process on the PE
device.
Deleting a VPN instance or disabling a VPN instance IPv4
address family will delete all the IS-IS processes bound to the
VPN instance or the VPN instance IPv4 address family on the
PE.
Case description
In this case, the addresses for interconnecting devices are as
follows:
If RTX interconnects with RTY, the addresses are
XY.1.1.X and XY.1.1.Y, network mask is 24.
Assume that PE1 is RT1, PE2 is RT2, P is RT3.
Command usage
ip binding vpn-instance: binds the current AC interface to a
specified VPN instance.
ipv4-family: enters the IPv4 address family view of BGP.
Precautions
Specify a VPN instance for each OSPF process on the PE
device.
Deleting a VPN instance or disabling a VPN instance IPv4
address family will delete all the OSPF processes bound to the
VPN instance or the VPN instance IPv4 address family on the
PE.
Case description
In this case, the addresses for interconnecting devices are as
follows:
If RTX interconnects with RTY, the addresses are
XY.1.1.X and XY.1.1.Y, network mask is 24.
Assume that PE1 is RT1, PE2 is RT2, P is RT3.
Command usage
ip binding vpn-instance: binds the current AC interface to a
specified VPN instance.
peer substitute-as: replaces the AS number of the peer
specified in the AS_Path attribute with the local AS number.
Precautions
VPN sites in the same AS or with different private AS numbers
can communicate over the BGP MPLS/IP VPN backbone
network. Sites in the same VPNs have the same AS number.
When a local CE device establishes an EBGP neighbor
relationship with a PE device, you need to run the peer
substitute-as command to enable AS number substitution on
the PE device. If AS number substitution is disabled, the local
CE device discards VPN routes with the local AS number. As
a result, VPN users cannot communicate with each other.
Concepts
Two network devices establish a BFD session to detect the
bidirectional forwarding paths between them and serve upper-layer
applications. BFD does not provide the neighbor discovery mechanism.
Instead, BFD obtains neighbor information from the upper-layer
applications BFD serves. After the BFD session is established, the
local device periodically sends BFD packets. If the local device does
not receive a response from the peer device within the detection time, it
considers the forwarding path faulty. BFD then notifies the upper-layer
application for processing.
BFD control messages are encapsulated in UDP packets. The
destination port number is 3784 and source port number is a random
value from 49152 to 65535.
BFD session establishment process
OSPF discovers neighbors using the hello mechanism and sets up
connections to neighbors.
After setting up a neighbor relationship, OSPF notifies neighbor
information (including destination and source addresses) to BFD.
BFD sets up a session by using the received neighbor information.
After the BFD session is set up, BFD starts to detect link faults and
rapidly responds to link faults.
BFD session establishment process
A link fault is detected.
BFD detects the link fault and changes the BFD session status to
Down.
BFD notifies the local OSPF device that the BFD peer is unreachable.
Local OSPF process tears down the connection with the OSPF
neighbor.
The BFD sessions have the following status: Down, Init, Up, and Down.
Down: indicates that a BFD session is in the Down state or has just
been set up.
Init: indicates that the local system can communicate with the peer
system, and the local system expects to make the session Up.
Up: indicates that a session is established successfully.
AdminDown: indicates that a session is in the AdminDown state.
BFD session status transition:
R1 and R2 start BFD state machines respectively. The initial state of
BFD state machine is Down. R1 and R2 send BFD control messages
with the State field as Down.
After receiving the BFD message with the State field as Down from
R1, R2 switches the session status to Init and sends a BFD message
with State field as Init.
After the local BFD session status of R2 changes to Init, R2 no longer
processes the received BFD messages with the State field as Down.
The BFD session status change on R1 is the same as that on R2.
After receiving the BFD message with the State field as Init, R2
changes the local BFD session status to Up.
The BFD session status change on R1 is the same as that on R2.
Common Commands
Single-hop detection and multi-hop detection
Single-hop or multi-hop detection:
The bfd command enables the global BFD and
displays the BFD view.
The bfd bind peer-ip command creates a BFD
binding and establishes a BFD session.
The discriminator command sets the local and
remote discriminators for the current BFD
session.
The commit command submits the
configurations of a BFD session.
Association between BFD and interface status
The bfd command enables the global BFD and
displays the BFD view.
The bfd bind peer-ip default-ip command binds the
physical status of a physical link to the BFD session.
The discriminator command sets the local and remote
discriminators for the current BFD session.
The process-interface-status command associates
the status of the current BFD session with the status of
the interface to which the session is bound.
The configuration is similar to the configuration of BFD and route
association, and is omitted here.
When a router fails, neighbors at the routing protocol layer detect that
their neighbor relationships are Down and then become Up again after
a period of time. This is the flapping of neighbor relationships. The
flapping of neighbor relationships causes route flapping, which leads to
black hole routes on the restarted router or causes data services from
the neighbors to be transmitted bypass the restarted router. This
decreases the reliability on the network.
NSF is thus introduced to address route flapping issue. The following
requirements must be met:
Hardware: Dual control boards must be configured with redundant
RP. One is the active board and the other is the standby board. If the
active board restarts, the standby board becomes the active one. The
distributed structure is used. That is, data forwarding and control are
separated, and LPUs are responsible for data forwarding.
System software: When the active control board is running, it
synchronizes configuration and interface state information to the
standby control board. When an active/standby switchover occurs,
LPUs do not reset or withdraw forwarding entries, and the interfaces
remain Up.
Protocols: Graceful restart (GR) must be supported for related
network protocols, such as routing protocols OSPF, IS-IS, and BGP,
and other protocols such as Label Distribution Protocol (LDP) and
Resource Reservation Protocol (RSVP).
When R2 receives the hello packet from R1, it maintains the neighbor
relationship with R1 and sends a hello packet. Then R2 sends a CSNP
packet and an LSP packet to R1 to help LSDB synchronization.
When the interface of R1 receives the hello packet and all CSNP
packets, R1 deletes the T1 timer; otherwise, R1 periodically sends hello
packets until it receives all hello packets and CSNP packets. If the
number of times the T1 timer expires reaches the maximum value, the
T1 timer is also deleted.
When the LSDB synchronization is complete, R1 deletes the T2 timer.
After all T2 timers are deleted, R1 starts to delete T3 timers. When
the GR is complete, R1 starts the IS-IS process. IIH timer is started on
all interfaces, and then R1 can periodically send hello packets.
After restoring all routing entries, R1 starts to recalculate routes and
updates the FIB table.
IS-IS GR command:
The graceful-restart command enables IS-IS GR.
LAND attack
Because of the vulnerability in the 3-way handshake mechanism of
TCP, a LAND attacker sends SYN packets of which the source address
and port of a device are the same as the destination address and port
respectively. After receiving the SYN packet, the target host creates a
null TCP connection with the source and destination addresses as the
address of the target host. The connection is kept until expiration. The
target host will create many null TCP connections, wasting resources or
causing device breakdown.
After defense against malformed packet attacks is enabled, the
device checks source and destination addresses in TCP SYN packets
to prevent LAND attacks. The device considers TCP SYN packets with
the same source and destination addresses as malformed packets and
discards them.
Commands for configuring defense against malformed packet attacks
The anti-attack abnormal enable command configures defense
against malformed packets. After the command is executed, the device
discards malformed packets.
URPF command
The urpf command enables URPF on an interface and set the URPF
mode.
IPSG principles
IPSG matches IP packets against static or dynamic DHCP binding
table. Before a network device forwards an IP packet, it compares the
source IP address, source MAC address, interface, and VLAN
information in the IP packet with entries in the binding table. If a
matching entry is found, the device considers the IP packet valid and
forwards it. Otherwise, the device considers the IP packet as an attack
packet and discards it.
Working process
After IPSG is configured on S1, S1 checks the incoming IP packets
against the binding table. When the packet information matches the
binding table, the packets are forwarded; otherwise, the packets are
discarded.
IPSG commands
The binding table can be generated through DHCP or manually
configured through static IP addresses (the user-bind static command
is used to configure static table).
The ip source check user-bind enable command enables the IPSG
function on an interface to check the received IP packets.
The ip source check user-bind check-item command configures
VLAN- or interface-based IP packet check items. This command is only
valid to dynamic binding table.
Topology description
The figure shows a scenario of the MITM attack. The attacker sends a
bogus ARP packet using the PC3's address as the source address to
PC1. PC1 records incorrect address mapping relationship of PC3 in the
ARP table. The attacker thus obtains the data sent by PC1 to PC3 and
sent by PC3 to PC1. Therefore, information between PC1 and PC3
leaks.
To prevent MITM attacks, configure DAI on S1.
When an attacker connects to S1 and attempts to send bogus ARP
packet to S1, S1 detects the attack behavior according to the DHCP
snooping binding table and discards the ARP packet. If the ARP
discarding alarm is enabled on S1, when the number of discarded ARP
packets exceeds the alarm threshold, S1 sends an alarm to notify the
administrator.
DAI uses DHCP snooping binding table to defend against MITM attacks.
Before a device forwards an ARP packet, it compares the source IP
address, source MAC address, interface, and VLAN information in the
ARP packet with entries in the binding table. If an entry is matched, the
device considers the packet valid and forwards it; otherwise, the device
considers the packet as an attack packet and discards it.
DAI command
The arp anti-attack check user-bind enable command enables DAI
on an interface or in a VLAN. That is, the device checks ARP packets
against the binding table.
IntServ model
The IntServ model, developed by IETF in 1993, supports
various types of service on IP networks. It provides both realtime service and best-effort service on IP networks. The
IntServ model reserves resources for each information flow.
The source and destination hosts exchange RSVP messages
to establish packet categories and forwarding status on each
node along the transmission path. The model maintains a
forwarding state for each flow, so it has a poor extensibility.
There are millions of flows on the Internet, which consume a
large number of device resources. Therefore, this model is not
widely used. In recent years, IETF has modified the RSVP
protocol, and defines that RSVP can be used together with the
DiffServ model, especially in the MPLS VPN field. Therefore,
RSVP has a new improvement. However, this model still has
not been widely used. THe DiffServ model addresses
problems in the IntServ mode, so the DiffServ model is a
widely used QoS technology.
DiffServ model
The IntServ has a poor extensibility. After 1995, SPs and
research organizations developed a new mechanism that
supports various services. This mechanism has a high
extensibility. In 1997, IETF recognized that the service model
in use is not applicable to network operation, and there should
be a way to classify information flows and provide
differentiated service for users and applications. Therefore,
IETF developed the DiffServ model, which classifies flow on
the Internet and provides differentiated service for them. The
DiffServ model supports various applications and is applicable
to many business models.
Precedence field
The 8-bit Type of Service (ToS) field in an IP packet header
contains a 3-bit IP precedence field.
Bits 0 to 2 constitute the Precedence field, representing
precedence values 7, 6, 5, 4, 3, 2, 1 and 0 in descending order
of priority. The highest priorities (values 7 and 6) are reserved
for routing and network control communication updates. Userlevel applications can use only priority values 0 to 5. Bits 6 and
7 are reserved.
Apart from the Precedence field, a ToS field also contains the
D, T, and R sub-fields:
Bit D indicates the delay. The value 0 represents a
normal delay and the value 1 represents a short delay.
Bit T indicates the throughput. The value 0 represents
normal throughput and the value 1 represents high
throughput.
Bit R indicates the reliability. The value 0 represents
normal reliability and the value 1 represents high
reliability.
DSCP field
RFC 2474 redefines the TOS field. The right-most 6 bits
identify service type and the left-most 2 bits are reserved.
DSCP can classify traffic into 64 categories.
Token bucket
A token bucket with a certain capacity stores tokens. The
system places tokens into a token bucket at the configured
rate. When the token bucket is full, excess tokens overflow
and no token is added.
A token bucket forwards packets according to the number of
tokens in the token bucket. If there are sufficient tokens in the
token bucket for forwarding packets, the traffic rate is within
the rate limit. Otherwise, the traffic rate is not within the rate
limit.
Single-rate-single-bucket
A token bucket is called bucket C. Tc indicates the number of
tokens in the bucket. Single-rate-single-bucket has two
parameters:
Committed Information Rate (CIR): indicates the rate of
putting tokens into bucket C, that is, the average traffic
rate permitted by bucket C.
Committed Burst Size (CBS): indicates the capacity of
bucket C, that is, the maximum volume of burst traffic
allowed by bucket C each time.
The system places tokens into the bucket at the CIR. If Tc is
smaller than the CBS, Tc increases; otherwise, Tc does not
increase.
B indicates the size of an arriving packet:
If B is smaller than or equal to Tc, the packet is colored
green, and Tc decreases by B.
If B is greater than Tc, the packet is colored red, and
Tc remains unchanged.
Single-Rate-Double-Bucket
Two token buckets are available: bucket C and bucket E. Tc and Te
indicate the number of tokens in the bucket. Single-rate-double-bucket
has three parameters:
Committed Information Rate (CIR): indicates the rate of
putting tokens into bucket C, that is, the average traffic
rate permitted by bucket C.
Committed Burst Size (CBS): indicates the capacity of
bucket C, that is, the maximum volume of burst traffic
allowed by bucket C each time.
Excess Burst Size (EBS): indicates the capacity of
bucket E, that is, the maximum volume of excess burst
traffic allowed by bucket E each time.
The system places tokens into the buckets at the CIR:
If Tc is smaller than the CBS, Tc increases.
If Tc is equal to the CBS and Te is smaller than the
EBS, Te increases.
If Tc is equal to the CBS and Te is equal to the EBS,
Tc and Te do not increase.
B indicates the size of an arriving packet:
If B is smaller than or equal to Tc, the packet is colored
green, and Tc decreases by B.
If B is greater than Tc and smaller than or equal to Te,
the packet is colored yellow and Te decreases by B.
If B is greater than Te, the packet is colored red, and
Tc and Te remain unchanged.
Double-Rate-Double-Bucket
Two token buckets are available: bucket P and bucket C. Tp and Tc
indicate the number of tokens in the bucket. Double-rate-double-bucket
has four parameters:
Peak information rate (PIR): indicates the rate at which
tokens are put into bucket P, that is, the maximum
traffic rate permitted by bucket P. The PIR must be
greater than the CIR.
Committed Information Rate (CIR): indicates the rate of
putting tokens into bucket C, that is, the average traffic
rate permitted by bucket C.
Peak Burst Size (PBS): indicates the capacity of bucket
P, that is, the maximum volume of burst traffic allowed
by bucket P each time. PBS is greater than CBS.
Committed Burst Size (CBS): indicates the capacity of
bucket C, that is, the maximum volume of burst traffic
allowed by bucket C each time.
The system places tokens into bucket P at the rate of PIR and
places tokens into bucket C at the rate of CIR:
If Tp is smaller than the PBS, Tp increases. If Tp is
greater than or equal to the PBS, Tp remains
unchanged.
If Tc is smaller than the CBS, Tc increases. If Tc is
greater than or equal to the CBS, Tc remains
unchanged.
If the rate of a type of traffic exceeds the threshold, the device lowers
the packet priority and then forwards or directly discards the packets.
By default, these packets are discarded.
Traffic policing commands:
Configure interface-based traffic policing: Run the qos car
command to create a QoS CAR profile and configure QoS CAR
parameters. The parameters in the command vary when the command
is executed on a WAN interface and a LAN interface.
Configure rate limiting on WAN interface: Run the qos lr command
to set the ratio of packet rate sent by a physical interface to the total
interface bandwidth.
FIFP characteristics:
Advantages:
Simple
Disadvantages:
Unfair and no separation between flows. A large flow
will occupy the bandwidth of other flows, which
prolongs the delay of other flows.
When congestion occurs, FIFO discards some packets.
When TCP detects packet loss, it lowers transmission
speed to avoid congestion. However, UDP does not
lower transmission speed because it is a
connectionless protocol. As a result, the TCP and UDP
packets in FIFO are not equally processed. The TCP
packet rate is too low.
A flow may occupy all the buffer space and blocks
other types of traffic.
RR
Advantages:
Different flows are separated, and bandwidth is equally
allocated to queues.
Available bandwidth is equally allocated to other
queues.
Disadvantages:
Weights cannot be configured for the queues.
When queues have different packet lengths,
scheduling is inaccurate.
When scheduling rate is low, delay and jitter indicators
will deteriorate. For example, when a packet arrives at
an empty queue that is just scheduled, this packet can
be processed only when all the other queues are
scheduled. In this situation, jitter is serious. However, if
scheduling rate is high, the delay is short. The RR
mode is widely used on high-speed routers.
Compared with RR, WRR can set the weights of queues. During the
WRR scheduling, the scheduling chance obtained by a queue is in
direct proportion to the weight of the queue. During the WRR
scheduling, the empty queue is directly skipped. Therefore, when there
is a small volume of traffic in a queue, the remaining bandwidth of the
queue is used by the queues according to a certain proportion.
Advantages:
Bandwidth is allocated based on weights, and the
remaining bandwidth of a queue is equally allocated to
other queues. Low-priority queues are also scheduled
in a timely manner.
It is easy to implement.
Applicable to DiffServ ports.
Disadvantages:
Similar to RR, WRR is inaccurate when queues have
different packet lengths.
When scheduling rate is low, packet delay is unstable
and the delay and jitter indicators cannot be lowered to
the expected values.
PQ
Advantages:
Precisely controls the delay of high-priority queues.
Easy to implement, differentiating services
Disadvantages:
Cannot allocate bandwidth as required. When highpriority queues have many packets, the packets in lowpriority queues cannot be scheduled.
It shortens the delay of high-priority queues by
compromising the service quality of low-priority queues.
If a high-priority queue transmits TCP packets and a
low-priority queue transmits UDP packets, the TCP
packets are transmitted at a high speed, while UDP
packets cannot obtain sufficient bandwidth.
CQ
WFQ
Congestion Avoidance
Tail drop is a traditional method in the congestion avoidance
mechanism. When the length of a queue reaches the
maximum value, all the packets are discarded. If too many
TCP packets are dropped, TCP times out. This may result in
slow TCP start and trigger the congestion avoidance
mechanism so that the device slows down the transmission of
TCP packets. When queues drop several TCP-connection
packets at the same time, these TCP connections start
congestion avoidance and slow startup, which is referred to as
global TCP synchronization. Thus, these TCP connections
simultaneously send fewer packets to the queue so that the
rate of incoming packets is smaller than the rate of outgoing
packets, reducing the bandwidth usage. Moreover, the volume
of traffic sent to the queue varies greatly from time to time. As
a result, the volume of traffic over the link fluctuates between
the bottom and the peak. The delay and jitter of certain traffic
are affected.
The traditional packet loss policy uses the tail drop method.
When the queue length reaches the upper limit, the excess
packets (buffered at the queue tail) are discarded.
To prevent global TCP synchronization, Random Early
Detection (RED) is used. The RED technique randomly
discards packets to prevent the transmission speed of multiple
TCP connections from being reduced simultaneously. The
TCP rate and network traffic volume thus are stable.
SNMP model
NMS station is the manager in a network management system. It
uses the SNMP protocol to manage and monitor the network. The NMS
software runs on an NMS server.
Agent is a process on the managed device. The agent maintains data
on the managed device, receives and processes the request packets
from the NMS, and then sends the response packets to the NMS.
Management object is the object to be managed. A device may have
multiple management objects, including a hardware component (such
as an interface board) and parameters (such as a routing protocol)
configured for the hardware or software.
MIB is a database specifying variables that are maintained by the
managed device and can be queried or set by the agent. MIB defines
attributes of the managed device, including the name, status, access
rights, and data type of objects.
NQA Principles
Creating a test instance
NQA requires two test ends, an NQA client and an
NQA server (or called the source and destination). The
NQA client (or the source) initiates an NQA test. You
can configure test instances through command lines or
the NMS. Then NQA places the test instances into test
queues for scheduling.
Starting the test instance
When starting an NQA test instance, you can choose to
start the test instance immediately, at a specified time,
or after a delay. A test packet is generated based on
the type of a test instance when the timer expires. If the
size of the generated test packet is smaller than the
minimum size of a protocol packet, the test packet is
generated and sent out with the minimum size of the
protocol packet.
Processing a test instance
After a test instance starts, the protocol-related running
status can be collected according to response packets.
The client adds a timestamp to a test packet based on
the local system time before sending the packet to the
server. After receiving the test packet, the server sends
a response packet to the client. The client then adds a
timestamp to the received response packet based on
the current local system time. This helps the client
calculate the round-trip time (RTT) of the test packet
based on the two timestamps.
An NQA ICMP test instance checks whether a route from the NQA
client to the destination is reachable. The ICMP test has a similar
function as the ping command, while the ICMP test provides more
output information:
By default, the command output shows the results of the latest five
tests.
The output includes the average delay, the packet loss ratio, and the
time the last packet is correctly received.
Test Procedure
Source (R1) sends an ICMP echo request packet to the destination
(R2).
After receiving the ICMP echo request packet, the destination (R2)
responds to the source (R1) with an ICMP echo reply packet.
The source (R1) then can calculate the time of communication
between the source (R1) and the destination (R2) by subtracting the
time the source sends the ICMP echo request packet from the time the
source receives the ICMP echo reply packet. The calculated data can
reflect the network performance and operating status.