RIPng Configuration
RIPng Configuration
Ethernet Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration
4 RIPng Configuration
NOTE
RIPng does not have any security authentication mechanism. For security purposes, use
OSPFv3, IPv6 IS-IS, or BGP4+.
4.2.1 RIPng
In addition to IPv4 networks, RIP is also applicable to IPv6 networks to provide
accurate route information for IPv6 packets. The IETF has defined RIP next
generation (RIPng) based on RIP for IPv6 networks. RIPng is an important protocol
for IPv6 networks.
● RIPng uses UDP port 521 to send and receive routing information.
● RIPng uses the destination addresses with 128-bit prefixes (mask length).
● RIPng uses 128-bit IPv6 addresses as next-hop addresses.
● RIPng uses the local-link address FE80::/10 as the source address to send
RIPng Update packets.
● RIPng periodically sends routing information in multicast mode and uses
FF02::9 as multicast address.
● A RIPng packet consists of a header and multiple route table entries (RTEs). In
a RIPng packet, the maximum number of RTEs depends on the MTU of an
interface.
Licensing Requirements
RIPng is a basic feature of a switch and is not under license control.
NOTE
For details about software mappings, visit Info-Finder and search for the desired product
model.
Feature Limitations
When the maximum number of RIPng routes supported by a switch is fixed, the
maximum number of running RIPng routes supported on the switch is limited by
the CAR value of RIPng protocol packets, interval for sending RIP update packets,
and values of RIPng Age and Garbage-collect timers. To increase the maximum
number of running RIPng routes on a switch if there are large numbers of RIPng
routes running on the network, increase the values of the Age timer, Garbage-
collect timer, or CAR for RIPng protocol packets, as well as reducing the interval
for sending RIPng update packets.
Pre-configuration Tasks
Before configuring basic RIPng functions, complete the following tasks:
● Enable IPv6 on the switch.
● Configure IPv6 addresses for interfaces to ensure that neighboring nodes are
reachable at the network layer.
Configuration Procedure
Creating RIPng processes is the prerequisite for enabling RIPng on interfaces.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]
A RIPng process is created, RIPng is enabled, and the RIPng view is displayed.
If a VPN instance is specified, the RIPng process belongs to this VPN instance. If no
VPN instance is specified, the RIPng process belongs to a public network instance.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 (Optional) On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
NOTE
If IPv6 is not enabled on this interface, this command does not take effect on this interface.
----End
Pre-configuration Tasks
Before configuring split horizon and poison reverse, configure basic RIPng
functions.
Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying
the RIPng Routing Loop Prevention Configuration) in any sequence as required.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 (Optional) On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
NOTE
----End
Context
Poison reverse can prevent routing loops.
Procedure
Step 1 Run system-view
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
NOTE
If both split horizon and poison reverse are configured, only poison reverse takes effect.
----End
Procedure
● Run the display ripng process-id interface [ interface-type interface-
number ] [ verbose ] command to check information about the specified
RIPng interface.
----End
Pre-configuration Tasks
Before configuring RIPng route attributes, configure basic RIPng functions.
Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying
the RIPng Routing Control Configuration) in any sequence as required.
Context
When different routing protocols discover the routes to the same destination, set
the RIPng preference to select the required route.
Procedure
Step 1 Run system-view
----End
Context
Configuring the additional metrics of a RIPng interface can change the route
selection sequence.
The additional metric is the metric (hop count) to be added to the original metric
of a RIPng route. You can set additional metrics for incoming and outgoing RIPng
routes using commands.
Procedure
Step 1 Run system-view
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
● The ripng metricin command adds an additional metric to an incoming route. After this
route is added to the routing table, its metric in the routing table changes. Running this
command affects route selection on the local device and other devices on the network.
● The ripng metricout command adds an additional metric to an outgoing route. When
this route is advertised, an additional metric is added to this route, but the metric of the
route in the routing table does not change. Running this command does not affect route
selection on the local device but other devices on the network.
----End
Context
By setting the maximum number of equal-cost RIPng routes, you can change the
number of routes for load balancing.
NOTE
Only the S5720I-SI, S5735-S, S500, S5735S-S, S5735-S-I, S5735S-H, S5736-S, S5731-H,
S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6720S-S, S6730-H, S6730S-
H, S6730-S, and S6730S-S support this function.
Procedure
Step 1 Run system-view
----End
Procedure
● Run the display ripng [ process-id | vpn-instance vpn-instance-name ]
command to check the running status and configurations of RIPng.
● Run the display ripng process-id database [ verbose ] command to check all
the active routes in the RIPng database.
● Run the display ripng process-id route command to check all RIPng routes
learned from other devices.
----End
Pre-configuration Tasks
Before controlling RIPng route advertisement, configure basic RIPng functions.
Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying
the RIPng Route Advertisement Control Configuration) in any sequence as
required.
Context
Route summarization can reduce the routing table size and minimize impact of
route flapping on the network.
Procedure
Step 1 Run system-view
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 (Optional) On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
The device advertises generated RIPng default routes using Update packets
through a specified interface regardless of whether these routes exist in the local
IPv6 routing table.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]
The RIPng view is displayed.
Step 3 (Optional) Run default-cost cost
The default cost of external routes to be imported is set.
By default, the default cost of RIPng routes is 0.
If no cost is set for external routes to be imported, the default cost is used.
NOTE
When a RIPng process imports IBGP routes, routing loops may occur. Therefore, exercise
caution before you configure this function.
----End
Context
When a device running RIPng is connected to a network running other routing
protocols, you can run the undo ripng output command on the interface that
connects the device to the network to prevent the interface from sending useless
packets to the network.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 (Optional) On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
----End
Context
When a device running RIPng is connected to a network running other routing
protocols, you can run the undo ripng input command on the interface that
connects the device to the network to prevent the interface from receiving useless
packets from the network.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 (Optional) On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
----End
Procedure
● Run the display ripng process-id database [ verbose ] command to check all
activated routes in the RIPng database.
● Run the display ripng process-id route command to check all the RIPng
routes that are learned from other switches.
----End
Pre-configuration Tasks
Before controlling the receiving of RIPng routes, configure basic RIPng functions.
Procedure
Step 1 Run system-view
You can use ACL6, route policy and IPv6 prefix lists to filter received RIPng routes,
allowing only the routes matching ACL6, route policy and IPv6 prefix lists to be
added to RIPng routing tables.
----End
Pre-configuration Tasks
Before improving RIPng network performance, configure basic RIPng functions.
Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying
the RIPng Network Performance Optimization Configuration) in any sequence as
required.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]
The RIPng process is enabled and the RIPng view is displayed.
Step 3 Run timers ripng update age garbage-collect
RIPng timers are configured.
NOTE
By default, the Update timer is 30s; the Age timer is 180s; the Garbage-collect
timer is 120s (four times the Update timer).
In practice, the Garbage-collect timer is not fixed. If the Update timer is set to 30s,
the Garbage-collect timer may range from 90s to 120s.
Before permanently deleting an unreachable route from its RIPng routing table, a
RIPng device advertises this route (with the metric set to 16) four times by
periodically sending Update packets. Subsequently, all the neighbors learn that
this route is unreachable. Because a route may not always become unreachable at
the beginning of an Update period, the Garbage-collect timer ranges from three
or four times the Update timer.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 (Optional) On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.
----End
Enabling zero field check on RIPng Update packets can improve network security.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]
The RIPng view is displayed.
Step 3 Run checkzero
Zero field check is enabled for RIPng packets.
----End
Context
Internet Protocol Security (IPSec) can be configured to prevent data theft and
spoofing during data transmission in a network.
A security association (SA) must be established so that IPSec can protect
transmitted data. An SA is a unidirectional logical connection set up for security
purpose and specifies the elements used by two IPSec peers (two parties that use
the IPSec protocol to protect data transmitted between them). The elements of an
SA include the following:
● Security protocol
● Authentication or encryption algorithm supported by the security protocol
● Data encapsulation mode
● Security parameter index (SPI) of the SA
● Authentication key or encryption key of the SA
The first three elements are specified in an IPSec proposal. To configure IPSec
functions, first configure an IPSec proposal on the IPSec peers, and then configure
an SA.
Procedure
Step 1 Configure an IPSec proposal.
1. Run system-view
The system view is displayed.
2. Run ipsec proposal proposal-name
An IPSec proposal is created and the IPSec proposal view is displayed.
3. Run transform { ah | esp }
A security protocol is specified for the IPSec proposal.
By default, the security protocol used by an IPSec proposal is the
Encapsulation Security Protocol (ESP).
4. An authentication or encryption algorithm is configured.
– If AH is used, you can only configure the AH-specific authentication
algorithm because AH only authenticates packets.
Run the ah authentication-algorithm { sha1 | sha2-256 } command to
specify the authentication algorithm for the AH protocol.
By default, the AH protocol uses the Secure Hash Algorithm-256
(SHA2-256) authentication algorithm.
– When ESP is specified, ESP can encrypt/authenticate, or encrypt and
authenticate packets. Configure the ESP-specific authentication or
encryption algorithm.
NOTE
In transport mode, the packet encryption device and decryption device must be the
originator and receiver of packets.
6. Run quit
Return to the system view.
Step 2 Configure an IPSec SA.
1. Run ipsec sa sa-name
An IPSec SA is created and the IPSec SA view is displayed.
By default, no IPSec SA exists in the system.
2. Run proposal proposal-name
The IPSec proposal is bound to the IPSec SA.
By default, an IPSec policy does not reference any IPSec proposal.
NOTE
An IPSec can use only one IPSec proposal. To bind a new IPSec proposal to the IPSec
SA, delete the original IPSec proposal.
3. Run sa spi { inbound | outbound } { ah | esp } spi-number
An SPI is configured for the SA.
NOTE
– An SPI uniquely identifies an SA. Each SA must be configured with an inbound SPI
and an outbound SPI. The outbound SPI on the local end must be the same as the
inbound SPI on the remote end.
– The security protocol (AH or ESP) you select when configuring the SPI must be the
same as that used in the IPSec proposal bound to the SA.
4. Configure a key according to the security protocol used in the IPSec proposal
bound to the SA.
– If the AH protocol is used, you can configure an authentication key that is
a hexadecimal number or a character string.
– The security protocol (AH or ESP) you select when configuring the key must be the
same as that used in the IPSec proposal bound to the SA.
– The outbound key on the local end must be the same as the inbound key on the
remote end.
– The IPSec peers must use the authentication or encryption key in the same format.
For example, if the key on one end is a character string but the key on the other
end is a hexadecimal number, the IPSec tunnel cannot be set up.
– If you configure multiple keys in different formats, the last configured key takes
effect.
----End
Procedure
● Configuring IPSec authentication in a RIPng process
a. Run system-view
The system view is displayed.
NOTE
NOTE
The ripng ipsec sa command takes precedence over the ipsec sa command. If
both commands are run in respective views and different SA names are specified,
only the configuration of the ripng ipsec sa command takes effect.
----End
Procedure
● Run the display ipsec proposal [ name proposal-name ] command to check
IPSec proposal information.
● Run the display ipsec sa [ name sa-name ] [ brief ] command to check
information about a Security Association (SA).
● Run the display ipsec statistics [ sa-name sa-name slot slot-number ]
command to check statistics about packets processed by IPSec.
● Run the display ripng process-id interface [ interface-type interface-
number ] [ verbose ] command to check the SA used in IPSec authentication.
NOTICE
Procedure
● Run the reset ripng process-id statistics [ interface { interface-type
interface-number [ neighbor neighbor-ip-address ] } ] command in the user
view to clear statistics about the counter that is maintained by a specified
RIPng process.
----End
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable RIPng on each Switch so that the Switches can communicate with
each other.
2. Configure an ACL on SwitchB to filter the received routes.
Procedure
Step 1 Add interfaces to VLANs.
# Configure SwitchA. Ensure that the configurations of SwitchB, and SwitchC are
similar to the configuration of SwitchA.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan 10
[SwitchA-vlan10] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 10
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] vlan 20
[SwitchA-vlan20] quit
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 20
[SwitchA-GigabitEthernet0/0/1] quit
# Configure SwitchB.
[SwitchB] ripng 1
[SwitchB-ripng-1] quit
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] ripng 1 enable
[SwitchB-Vlanif20] quit
[SwitchB] interface vlanif 30
[SwitchB-Vlanif30] ripng 1 enable
[SwitchB-Vlanif30] quit
# Configure SwitchC.
[SwitchC] ripng 1
[SwitchC-ripng-1] quit
[SwitchC] interface vlanif 30
[SwitchC-Vlanif30] ripng 1 enable
[SwitchC-Vlanif30] quit
[SwitchC] interface vlanif 40
[SwitchC-Vlanif40] ripng 1 enable
[SwitchC-Vlanif40] quit
[SwitchC] interface vlanif 50
[SwitchC-Vlanif50] ripng 1 enable
[SwitchC-Vlanif50] quit
The preceding information shows that the RIPng routing table of SwitchB contains
the route of network segment FC00:0:0:3::/64.
# Check the RIPng routing table of SwitchA.
[SwitchA] display ripng 1 route
Route Flags: R - RIPng
A - Aging, G - Garbage-collect
----------------------------------------------------------------
Dest FC00:0:0:3::/64,
via FE80::476:0:3624:1, cost 2, tag 0, RA, 21 Sec
The preceding information shows that the RIPng routing table of SwitchA contains
the route of network segment FC00:0:0:3::/64 advertised by SwitchB.
Step 4 Configure SwitchB to filter the received routes.
[SwitchB] acl ipv6 number 2000
[SwitchB-acl6-basic-2000] rule deny source fc00:0:0:3:: 64
[SwitchB-acl6-basic-2000] rule permit
[SwitchB-acl6-basic-2000] quit
[SwitchB] ripng 1
[SwitchB-ripng-1] filter-policy 2000 import
[SwitchB-ripng-1] quit
After the aging time of the filtered routing entry expires, check the verification result. The
default aging time is 180 seconds.
# Check the RIPng routing table of SwitchB. The RIPng routing table should not
contain the route of network segment FC00:0:0:3::/64.
[SwitchB] display ripng 1 route
Route Flags: R - RIPng
A - Aging, G - Garbage-collect
----------------------------------------------------------------
Peer FE80::D472:0:3C23:1 on Vlanif20
Dest FC00:0:0:1::/64,
via FE80::D472:0:3C23:1, cost 1, tag 0, RA, 25 Sec
Peer FE80::F54C:0:9FDB:1 on Vlanif30
Dest FC00:0:0:2::/64,
via FE80::F54C:0:9FDB:1, cost 1, tag 0, RA, 14 Sec
# Check the RIPng routing table of SwitchA. The RIPng routing table should not
contain the route of network segment FC00:0:0:3::/64.
[SwitchA] display ripng 1 route
Route Flags: R - RIPng
A - Aging, G - Garbage-collect
----------------------------------------------------------------
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
ipv6
#
vlan batch 10 20
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:1::1/64
ripng 1 enable
#
interface Vlanif20
ipv6 enable
ipv6 address auto link-local
ripng 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
ripng 1
#
return
● SwitchB configuration file
#
sysname SwitchB
#
ipv6
#
vlan batch 20 30
#
acl ipv6 number 2000
rule 0 deny source FC00:0:0:3::/64
rule 1 permit
#
interface Vlanif20
ipv6 enable
ipv6 address auto link-local
ripng 1 enable
#
interface Vlanif30
ipv6 enable
ipv6 address auto link-local
ripng 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
ripng 1
filter-policy 2000 import
#
return
● SwitchC configuration file
#
sysname SwitchC
#
ipv6
#
vlan batch 30 40 50
#
interface Vlanif30
ipv6 enable
ipv6 address auto link-local
ripng 1 enable
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:2::1/64
ripng 1 enable
#
interface Vlanif50
ipv6 enable
ipv6 address FC00:0:0:3::1/64
ripng 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 50
#
ripng 1
#
return