Professional Documents
Culture Documents
Configuration Guide - IP Routing (V100R006C00 - 01) PDF
Configuration Guide - IP Routing (V100R006C00 - 01) PDF
V100R006C00
01
Date
2011-07-15
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,
and recommendations in this document are provided "AS IS" without warranties, guarantees or representations
of any kind, either express or implied.
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, express or implied.
Website:
http://www.huawei.com
Email:
support@huawei.com
Issue 01 (2011-07-15)
Commissioning engineers
Symbol Conventions
The symbols that may be found in this document are defined as follows.
Symbol
Description
DANGER
WARNING
CAUTION
Issue 01 (2011-07-15)
TIP
NOTE
ii
Command Conventions
The command conventions that may be found in this document are defined as follows.
Convention
Description
Boldface
Italic
[]
{ x | y | ... }
[ x | y | ... ]
{ x | y | ... }*
[ x | y | ... ]*
&<1-n>
Change History
Updates between document issues are cumulative. Therefore, the latest document issue contains
all changes made in previous issues.
Issue 01 (2011-07-15)
iii
Contents
Contents
About This Document.....................................................................................................................ii
1 IP Static Route Configuration.....................................................................................................1
1.1 Static Route.........................................................................................................................................................2
1.2 Static Routing Features Supported by the S2700...............................................................................................2
1.3 Configuring an IPv4 Static Route.......................................................................................................................3
1.3.1 Establishing the Configuration Task.........................................................................................................3
1.3.2 Configuring an IPv4 Static Route..............................................................................................................4
1.3.3 (Optional) Setting the Default Preference for IPv4 Static Routes.............................................................4
1.3.4 Checking the Configuration.......................................................................................................................5
1.4 Configuring an IPv6 Static Route.......................................................................................................................5
1.4.1 Establishing the Configuration Task.........................................................................................................5
1.4.2 Configuring an IPv6 Static Route..............................................................................................................6
1.4.3 (Optional) Setting the Default Preference for IPv6 Static Routes.............................................................6
1.4.4 Checking the Configuration.......................................................................................................................7
1.5 Configuration Examples.....................................................................................................................................7
1.5.1 Example for Configuring IPv4 Static Routes............................................................................................7
1.5.2 Example for Configuring IPv6 Static Routes..........................................................................................11
Issue 01 (2011-07-15)
iv
Issue 01 (2011-07-15)
The main differences between IPv6 static routes and IPv4 static routes are their destination addresses and
next-hop addresses. The next-hop address of an IPv6 static route is an IPv6 address, whereas the next-hop
address of an IPv4 static route is an IPv4 address.
Default Route
Default routes are a special type of routes. Generally, administrators can manually configure
default routes.
Default routes are used only when packets to be forwarded fail to match any entry in the routing
table. In the routing table, the destination address and subnet mask of a default route are both
Issue 01 (2011-07-15)
0.0.0.0. You can run the display ip routing-table command to check whether the default route
is configured.
If the destination address of a packet does not match any entry in the routing table, the switch
uses the default route to forward this packet. If no default route exists and the destination address
of the packet does not match any entry in the routing table, the packet is discarded. An Internet
Control Message Protocol (ICMP) packet is then sent back to the originating host, informing
that the destination host or network is unreachable.
Applicable Environment
When configuring an IPv4 static route, note the following:
l
Other attributes
Setting different preferences for static routes helps flexibly apply routing policies. For
example, when configuring multiple routes to the same destination address, you can set the
same preference for these routes to implement load balancing. You can also set different
preferences to implement routing redundancy.
When the ip route-static command is run to configure a static route, if the destination
address and the mask are set to all 0s (0.0.0.0 0.0.0.0), it indicates that a default route is
configured.
Pre-configuration Tasks
Before configuring an IPv4 static route, complete the following task:
Issue 01 (2011-07-15)
Configuring link layer protocol parameters and IP addresses for interfaces to ensure that
the link layer protocol status of the interfaces is Up
Data Preparation
To configure an IPv4 static route, you need the following data.
No.
Data
Context
Do as follows on the switch to be configured with static route:
Procedure
Step 1 Run:
system-view
Context
Do as follows on the switchs that need to be configured with static routes and change the default
priority for static routes:
Issue 01 (2011-07-15)
Procedure
Step 1 Run:
system-view
Prerequisite
The configurations of an IPv4 static route are complete.
Procedure
l
Run the display ip routing-table command to check brief information about the IPv4
routing table.
Run the display ip routing-table verbose command to check detailed information about
the IPv4 routing table.
----End
Applicable Environment
On a small IPv6 network, you can implement network interconnection by configuring IPv6 static
routes. Compared with using dynamic routes, using static routes saves the bandwidth.
Pre-configuration Tasks
Before configuring an IPv6 static route, complete the following task:
Issue 01 (2011-07-15)
Configuring link layer protocol parameters and IP addresses for interfaces to ensure that
the link layer protocol status of the interfaces is Up
Data Preparation
To configure an IPv6 static route, you need the following data.
No.
Data
Context
Do as follows on the switch to be configured with static routes:
Procedure
Step 1 Run:
system-view
Context
Do as follows on the switch that need to be configured with IPv6 static routes and change the
default priority for IPv6 static routes:
Procedure
Step 1 Run:
system-view
Prerequisite
The configurations of an IPv6 static route are complete.
Procedure
l
Run the display ipv6 routing-table command to check brief information about the IPv6
routing table.
Run the display ipv6 routing-table verbose command to check detailed information about
the IPv6 routing table.
----End
PC2
1.1.2.2/24
Eth0/0/3
Eth0/0/1
Eth0/0/2
Switch B
Switch A
Eth0/0/1
Switch C
Eth0/0/1
Eth0/0/2
Eth0/0/2
PC1
1.1.1.2/24
PC3
1.1.3.2/24
Switch
Interface
VLANIF Interface
IP Address
SwitchA
Eth0/0/1
VLANIF 10
1.1.4.1/30
SwitchA
Eth 0/0/2
VLANIF 30
1.1.1.1/24
SwitchB
Eth 0/0/1
VLANIF 10
1.1.4.2/30
SwitchB
Eth 0/0/2
VLANIF 20
1.1.4.5/30
SwitchB
Eth 0/0/3
VLANIF 40
1.1.2.1/24
SwitchC
Eth 0/0/1
VLANIF 20
1.1.4.6/30
SwitchC
Eth 0/0/2
VLANIF 50
1.1.3.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1.
2.
3.
4.
Data Preparation
To complete the configuration, you need the following data:
l
The IDs of the VLANs to which the interfaces belong are shown in Figure 1-1.
The VLANIF interfaces and the IP addresses of the hosts are shown in Figure 1-1.
The destination address of Switch B is 1.1.1.0, and the next hop address of the static route
is 1.1.4.1.
Issue 01 (2011-07-15)
The destination address of Switch B is 1.1.3.0, and the next hop address of the static route
is 1.1.4.6.
Configuration Procedure
1.
2.
3.
4.
5.
Proto
Pre
Cost
Static
Direct
Direct
Direct
Direct
Direct
Direct
Direct
60
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Flags
RD
D
D
D
D
D
D
D
NextHop
Interface
1.1.4.2
1.1.1.1
127.0.0.1
1.1.4.1
127.0.0.1
1.1.4.2
127.0.0.1
127.0.0.1
Vlanif10
Vlanif30
InLoopBack0
Vlanif10
InLoopBack
Vlanif10
InLoopBack0
InLoopBack0
ms
ms
ms
ms
ms
Issue 01 (2011-07-15)
Configuration Files
l
Issue 01 (2011-07-15)
10
vlan batch 20 50
#
interface Vlanif20
ip address 1.1.4.6 255.255.255.252
#
interface Vlanif40
ip address 1.1.3.1 255.255.255.0
#
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface Ethernet0/0/2
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
ip route-static 0.0.0.0 0.0.0.0 1.1.4.5
#
return
Vlanif100
2::1/64
Vlanif1
Vlanif2
4::1/64
5::1/64
Switch B
Switch A
Vlanif1
4::2/64
Vlanif2
5::2/64
Vlanif100
Vlanif100
1::1/64
PC1
1::2/64
Switch C
3::1/64
PC3
3::2/64
Configuration Roadmap
The configuration roadmap is as follows:
1.
Issue 01 (2011-07-15)
11
2.
Configure the IPv6 static route and the default route to the destination address on each
Switch.
3.
Configure the IPv6 default gateway on each host to make any two hosts reachable.
Data Preparation
To complete the configuration, you need the following data:
l
Default gateways of host PC1, host PC2, and host PC3: 1::1, 2::1, and 3::1
Configuration Procedure
1.
Assign an IPv6 address to each interface. The configuration details are not mentioned here.
2.
Configuration Files
l
Issue 01 (2011-07-15)
12
return
Issue 01 (2011-07-15)
13