- Table of Contents
-
- 07-Layer 3 - IP Routing Configuration Guide
- 00-Preface
- 01-Basic IP Routing Configuration
- 02-Static Routing Configuration
- 03-RIP Configuration
- 04-OSPF Configuration
- 05-IS-IS Configuration
- 06-BGP Configuration
- 07-Policy-Based Routing Configuration
- 08-Guard Route Configuration
- 09-IPv6 Static Routing Configuration
- 10-RIPng Configuration
- 11-OSPFv3 Configuration
- 12-IPv6 IS-IS Configuration
- 13-IPv6 BGP Configuration
- 14-IPv6 Policy-Based Routing Configuration
- 15-Routing Policy Configuration
- 16-Tunnel End Packets Policy Routing Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
09-IPv6 Static Routing Configuration | 113.41 KB |
Contents
Configuring IPv6 static routing
Introduction to IPv6 static routing
Configuring an IPv6 static route
Displaying and maintaining IPv6 static routes
IPv6 static routing configuration example
Configuring an IPv6 default route·
Introduction to IPv6 static routing
Static routes are manually configured. If a network's topology is simple, you only need to configure static routes for the network to work correctly.
Static routes cannot adapt to network topology changes. If a fault or a topological change occurs in the network, the network administrator has to modify the static routes manually.
Similar to IPv4 static routes, IPv6 static routes work well in simple IPv6 network environments.
IPv6 static routes features
Similar to IPv4 static routes, IPv6 static routes work well in simple IPv6 network environments.
Their major difference lies in the destination and next hop addresses. IPv6 static routes use IPv6 addresses whereas IPv4 static routes use IPv4 addresses.
IPv6 default route
The IPv6 static route that has the destination address configured as ::/0 (indicating a prefix length of 0) is the IPv6 default route. If the destination address of an IPv6 packet does not match any entry in the routing table, this default route will be used to forward the packet.
Configuring an IPv6 static route
In small IPv6 networks, IPv6 static routes can be used to forward packets. In comparison to dynamic routes, it helps to save network bandwidth.
Before you configure an IPv6 static route, complete the following tasks:
· Configure parameters for the related interfaces.
· Configure link layer attributes for the related interfaces.
· Enable IPv6 packet forwarding.
· Make sure the neighboring nodes are IPv6 reachable.
To configure an IPv6 static route:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure an IPv6 static route. |
· Method 1: · Method 2: |
Use either method. By default, no IPv6 static route is configured. |
3. Delete all IPv6 static routes, including the default route. |
delete ipv6 [ vpn-instance vpn-instance-name ] static-routes all |
Optional. To delete one IPv6 static route, use the undo ipv6 route-static command. |
Displaying and maintaining IPv6 static routes
Task |
Command |
Remarks |
Display IPv6 static route information. |
display ipv6 routing-table protocol static [ inactive | verbose ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
IPv6 static routing configuration example
By default, Ethernet, VLAN, and aggregate interfaces are down. Before configuring these interfaces, bring them up by using the undo shutdown command.
Network requirements
As shown in Figure 1, with IPv6 static routes configured, all hosts and switches can interact with each other.
Configuration procedure
1. Configure IPv6 addresses for all VLAN interfaces. (Details not shown.)
2. Configure IPv6 static routes:
# Enable IPv6 and configure the IPv6 static route on Switch A.
<SwitchA> system-view
[SwitchA] ipv6
[SwitchA] ipv6 route-static :: 0 4::2
# Enable IPv6 and configure two IPv6 static routes on Switch B.
<SwitchB> system-view
[SwitchB] ipv6
[SwitchB] ipv6 route-static 1:: 64 4::1
[SwitchB] ipv6 route-static 3:: 64 5::1
# Enable IPv6 and configure the IPv6 static route on Switch C.
<SwitchC> system-view
[SwitchC] ipv6
[SwitchC] ipv6 route-static :: 0 5::2
3. Configure the IPv6 addresses of all the hosts based upon the network diagram, and configure the default gateway of Host A, Host B, and Host C as 1::1, 2::1, and 3::1.
4. Verify the configuration:
# Display the IPv6 routing table on Switch A.
[SwitchA] display ipv6 routing-table
Routing Table : Public
Destinations : 5 Routes : 5
Destination: :: Protocol : Static
NextHop : 4::2 Preference: 60
Interface : Vlan-interface200 Cost : 0
Destination: ::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Destination: 1::/64 Protocol : Direct
NextHop : 1::1 Preference: 0
Interface : Vlan-interface100 Cost : 0
Destination: 1::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Destination: FE80::/10 Protocol : Direct
NextHop : :: Preference: 0
Interface : NULL0 Cost : 0
# Verify the connectivity with the ping command.
[SwitchA] ping ipv6 3::1
PING 3::1 : 56 data bytes, press CTRL_C to break
Reply from 3::1
bytes=56 Sequence=1 hop limit=254 time = 63 ms
Reply from 3::1
bytes=56 Sequence=2 hop limit=254 time = 62 ms
Reply from 3::1
bytes=56 Sequence=3 hop limit=254 time = 62 ms
Reply from 3::1
bytes=56 Sequence=4 hop limit=254 time = 63 ms
Reply from 3::1
bytes=56 Sequence=5 hop limit=254 time = 63 ms
--- 3::1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/62/63 ms
An IPv6 default route is used to forward packets that match no entry in the routing table.
An IPv6 default route can be configured in either of the following ways:
· The network administrator can configure a default route with a destination prefix of ::/0. For more information, see "Configuring IPv6 static routing."
· Some dynamic routing protocols, such as Open Shortest Path First version 3 (OSPFv3), Routing Information Protocol next generation (RIPng), and IPv6 Intermediate System-to-Intermediate System (IPv6 IS-IS), can generate an IPv6 default route. For example, an upstream router running OSPFv3 can generate an IPv6 default route and advertise it to other routers, which install the IPv6 default route with the next hop being the upstream router. For more information, see configuration guides of relevant routing protocols.