A static route is manually configured. If a
network’s topology is simple, you only need to configure static routes
for the network to work normally. The proper configuration and usage of static
routes can improve network performance and ensure bandwidth for important
network applications.
The disadvantage of using static routes is
that they cannot adapt to network topology changes. If a fault or a topological
change occurs in the network, some routes will be unreachable and the network
breaks. In this case, the network administrator has to modify the static routes
manually.
II. Default route
A router selects the default route only
when it cannot find any matching entry in the routing table.
l
If the destination address of a packet fails to
match any entry in the routing table, the router selects the default route to
forward the packet.
l
If there is no default route and the destination
address of the packet fails to match any entry in the routing table, the packet
will be discarded and an ICMP packet will be sent to the source to report that
the destination or the network is unreachable.
Default routes can be configured in two
ways:
l
The network administrator can configure a
default route with both destination and mask being 0.0.0.0.
l
Some dynamic routing protocols, such as OSPF,
RIP and IS-IS, can also generate default routes.
1.1.1 Network Diagram

Figure
1-1 Network diagram for static route configuration
The IP addresses and masks of the switches
and hosts are shown in the following figure. Static routes are required for
interconnection between any two hosts.
|
Product series
|
Software version
|
Hardware version
|
|
S3610 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5510 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5500-SI Series Ethernet Switches
|
Release 1207
|
All versions (except S5500-20TP-SI)
|
|
Release 1301
|
S5500-20TP-SI
|
|
S5500-EI Series Ethernet Switches
|
Release 2102
|
All versions
|
|
S7500E Series Ethernet Switches
|
Release 6100
|
All versions
|
1)
Configuring IP addresses for interfaces
(omitted)
2)
Configuring static routes
# Configure a default route on Switch A.
<SwitchA>
system-view
[SwitchA] ip
route-static 0.0.0.0 0.0.0.0 1.1.4.2
# Configure two static routes on Switch B.
<SwitchB>
system-view
[SwitchB] ip
route-static 1.1.2.0 255.255.255.0 1.1.4.1
[SwitchB] ip
route-static 1.1.3.0 255.255.255.0 1.1.5.6
# Configure a default route on Switch C
<SwitchC>
system-view
[SwitchC] ip
route-static 0.0.0.0 0.0.0.0 1.1.5.5
3)
Configure the hosts.
The default gateways for the three hosts A,
B and C are 1.1.2.3, 1.1.6.1 and 1.1.3.1 respectively. The configuration
procedure is omitted.
l
Configure Switch A
#
vlan 300
#
vlan 500
#
interface
Vlan-interface300
ip
address 1.1.2.3 255.255.255.0
#
interface
Vlan-interface500
ip
address 1.1.4.1 255.255.255.252
#
ip
route-static 0.0.0.0 0.0.0.0 1.1.4.2
#
l
Configure Switch B
#
vlan 100
#
vlan 500
#
vlan 600
#
interface
Vlan-interface100
ip
address 1.1.6.1 255.255.255.0
#
interface
Vlan-interface500
ip
address 1.1.4.2 255.255.255.252
#
interface
Vlan-interface600
ip
address 1.1.5.5 255.255.255.252
#
ip
route-static 1.1.2.0 255.255.255.0 1.1.4.1
ip
route-static 1.1.3.0 255.255.255.0 1.1.5.6
#
l
Configure Switch C
#
vlan 600
#
vlan 900
#
interface
Vlan-interface600
ip
address 1.1.5.6 255.255.255.252
#
interface
Vlan-interface900
ip
address 1.1.3.1 255.255.255.0
#
ip
route-static 0.0.0.0 0.0.0.0 1.1.5.5
#
l
You are not recommended to specify a broadcast
interface (such as VLAN interface) as the output interface, because a broadcast
interface may have multiple next hops. If you have to do so, you must specify
the corresponding next hop for the output interface.
l
You can configure different preferences for
different static routes so that route management policies can be applied more
flexibly. For example, specifying the same preference for different routes to
the same destination enables load sharing, while specifying different
preferences for these routes enables route backup.
l
When you configure a static route, the static
route does not take effect if you specify the next hop address first and then
configure it as the IP address of a local interface, such as VLAN interface.
RIP is a simple Interior Gateway Protocol
(IGP), mainly used in small-sized networks, such as academic networks and
simple LANs. RIP is not applicable to complex networks.
RIP is still widely used in practical
networking due to easier implementation, configuration and maintenance than
OSPF and IS-IS.
1.2.1 Network
Diagram

Figure 1-2 Network diagam for RIP version configuration
As shown in Figure 1-2, enable RIPv2 on all interfaces
on Switch A and Switch B.
|
Product series
|
Software version
|
Hardware version
|
|
S3610 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5510 Series Ethernet Switches
|
Release 5301
|
All versions
|
|
S5500-SI Series Ethernet Switches
|
Release 1207
|
All versions, except S5500-20TP-SI
|
|
Release 1301
|
S5500-20TP-SI
|
|
S5500-EI Series Ethernet Switches
|
Release 2102
|
All versions
|
|
S7500E Series Ethernet Switches
|
Release 6100
|
All versions
|
1)
Configure an IP addresses for interfaces (omitted).
2)
Configure RIP basic functions.
# Configure Switch A.
<SwitchA>
system-view
[SwitchA]
rip
[SwitchA-rip-1]
network 192.168.1.0
[SwitchA-rip-1]
network 172.16.0.0
[SwitchA-rip-1]
network 172.17.0.0
[SwitchA-rip-1]
quit
# Configure Switch B.
<SwitchB>
system-view
[SwitchB]
rip
[SwitchB-rip-1]
network 192.168.1.0
[SwitchB-rip-1]
network 10.0.0.0
[SwitchB-rip-1]
quit
# Display the RIP routing table of Switch
A.
[SwitchA] display
rip 1 route
Route
Flags: R - RIP, T - TRIP
P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect
--------------------------------------------------------------------------
Peer
192.168.1.2 on Vlan-interface100
Destination/Mask Nexthop Cost Tag Flags Sec
10.0.0.0/8 192.168.1.2 1 0 RA 11
From the routing table, you can find that
RIPv1 uses a natural mask.
3)
Configure RIP version
# Configure RIPv2 on Switch A.
[SwitchA] rip
[SwitchA-rip-1]
version 2
[SwitchA-rip-1]
undo summary
# Configure RIPv2 on Switch B.
[SwitchB]
rip
[SwitchB-rip-1]
version 2
[SwitchB-rip-1]
undo summary
# Display the RIP routing table on Switch
A.
[SwitchA] display
rip 1 route
Route
Flags: R - RIP, T - TRIP
P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect
--------------------------------------------------------------------------
Peer
192.168.1.2 on Vlan-interface100
Destination/Mask Nexthop Cost Tag Flags Sec
10.2.1.0/24 192.168.1.2 1 0 RA 16
10.1.1.0/24 192.168.1.2 1 0 RA 16
From the routing table, you can see RIPv2
uses a classless subnet mask.
Since RIPv1 routing
information has a long aging time, it may still exist until it ages out after
RIPv2 is configured.
l
Configure Switch A.
#
vlan 100
to 102
#
interface
Vlan-interface100
ip
address 192.168.1.3 255.255.255.0
#
interface
Vlan-interface101
ip
address 172.17.1.1 255.255.255.0
#
interface
Vlan-interface102
ip
address 172.16.1.1 255.255.255.0
#
rip 1
undo
summary
version 2
network
192.168.1.0
network
172.16.0.0
network
172.17.0.0
#
l
Configure Switch B.
#
vlan 100
to 102
#
interface
Vlan-interface100
ip
address 192.168.1.2 255.255.255.0
#
interface
Vlan-interface101
ip
address 10.2.1.1 255.255.255.0
#
interface
Vlan-interface102
ip
address 10.1.1.2 255.255.255.0
#
rip 1
undo
summary
version 2
network
192.168.1.0
network
10.0.0.0
#
l
The S5500-EI series switches with the software
version Release 2102 support only RIP single process.
l
The S5500-SI series switches with the software
versions Release 1207 or Release 1301 support only RIP single process.
l
RIPv2 has two types of message transmission:
broadcast and multicast. Multicast is the default type using 224.0.0.9 as the
multicast address. The interface working in the RIPv2 broadcast mode can also
receive RIPv1 messages.
l
RIP runs only on the interfaces residing on the
specified networks. Therefore, you need to specify the network after enabling
RIP to validate RIP on a specific interface.

Figure 1-3 Network diagram for RIP route redistribution configuration
l
Two RIP processes are running on Switch B, which
communicates with Switch A through RIP 100 and with Switch C through RIP 200.
l
Configure route redistribution on Switch B to
make RIP 200 redistribute direct routes and routes from RIP 100. Thus, Switch C
can learn routes destined for 10.2.1.0/24 and 11.1.1.0/24, while Switch A
cannot learn routes destined for 12.3.1.0/24 and 16.4.1.0/24.
l
Configure a filtering policy on Switch B to
filter out the route 10.2.1.1/24 from RIP 100, making the route not advertised
to Switch C.
|
Product series
|
Software version
|
Hardware version
|
|
S3610 Series Ethernet Switches
|
|