SR Ip
SR Ip
SR Ip
This chapter provides an overview of IP routing and describes the tasks and commands used to configure
basic IP routing features through the SmartEdge® OS.
For information about the tasks and commands used to monitor, troubleshoot, and administer basic IP
routing, see the “Basic IP Routing Operations” chapter in the Routing Protocols Operations Guide for the
SmartEdge OS.
This chapter includes the following sections:
• Overview
• Configuration Tasks
• Configuration Examples
• Command Descriptions
Overview
IP routing moves information across an internetwork from a source to a destination, typically passing
through one or more intermediate nodes along the way. The primary difference between routing and
bridging is that the two access different levels of information to determine how to transport packets from
source to destination—routing occurs at layer 3 (the network layer), while bridging occurs at layer 2 (the
link layer) of the Open Systems Interconnection (OSI) reference model.
In addition to transporting packets through an internetwork, routing involves determining optimal paths to
a destination. Routing algorithms use metrics, or standards of measurement, to establish these optimal
paths, initializing and maintaining routing tables that contain all route information.
The SmartEdge OS routing table stores routes to directly attached devices, static IP routes, and routes
learned dynamically from the Routing Information Protocol (RIP), the Open Shortest Path First (OSPF)
protocol, the Border Gateway Protocol (BGP), and the Intermediate System-to-Intermediate System
(IS-IS) routing protocol. In the routing table, next-hop associations specify that a destination can be reached
by sending packets to a next-hop router located on an optimal path to the destination. Routing algorithms
must converge rapidly; that is, all routers must agree on optimal routes.
When a network event causes routes either to go down or become unavailable, routers distribute routing
update messages that are propagated across networks, causing a universally agreed recalculation of optimal
routes. Routing algorithms that converge slowly can cause routing loops or network outages. Many
algorithms can quickly select next-best paths and adapt to changes in network topology.
Methods for implementing IP routing, and the protocols used, are described in the following sections:
• Static Versus Dynamic Routing
• IGPs Versus EGPs
• IP Routing Protocols
• Protocol Distances
IP Routing Protocols
Redback® currently supports the following IP routing protocols:
• The Virtual Router Redundancy Protocol (VRRP) eliminates the single point of failure that is common
in a static default routed environment. A VRRP router controls IP addresses associated with a virtual
router. Any of the virtual router’s IP addresses on a LAN can then be used as the default first hop router
by end hosts, providing a dynamic failover in forwarding responsibility should the VRRP router
become unavailable. The main advantage of using VRRP is having a higher availability default path
without requiring configuration of dynamic routing or router discovery protocols on every end host; see
Chapter 4, “VRRP Configuration.”
• RIP is a distance-vector IGP that uses hop count as its metric. Each router sends all or some of the
portion of its routing table, but only to its neighbors. The RIP is widely used for routing traffic in the
global Internet; see Chapter 5, “RIP Configuration.”
• OSPF is a link-state IGP that uses link-state advertisements (LSAs) to inform other routers of the state
of the sender’s links. Each router sends only the portion of the routing table that describes the state of
its own links to all nodes in the internetwork. LSAs are used to build a complete picture of the network
topology, enabling other routers to determine optimal routes to destinations.
In OSPF, the autonomous system can be hierarchically organized by partitioning it into areas. Each area
contains a group of contiguous networks and hosts. An area border router (ABR) communicates routing
information between the areas; see Chapter 6, “OSPF Configuration.”
• BGP-4 is a distance-vector EGP, and uses the Transmission Control Protocol (TCP) as its transport
protocol. With BGP, a TCP connection is established over which two BGP peers exchange routing
information. Routers that belong to the same autonomous system run internal BGP (iBGP), while
routers that belong to different autonomous systems run external BGP (eBGP); see Chapter 8, “BGP
Configuration.”
• IS-IS is an OSI link-state hierarchical routing protocol that floods the network with link-state
information. This builds a complete and consistent picture of network topology. Hierarchical routing
simplifies backbone design, and the backbone routing protocol can also change without impacting the
intra-area routing protocol; see Chapter 10, “IS-IS Configuration.”
Protocol Distances
When determining a single optimal route among multiple routes within a single routing protocol, the
SmartEdge OS selects the route that has the shortest distance. When deciding a best path among routes
originating from multiple protocols, the system uses a more complex methodology. The SmartEdge routing
table stores direct, static, eBGP, OSPF, IS-IS, RIP, and iBGP routes.
Table 2-1 lists the protocols and their default values for routes learned through various protocols.
Directly connected 0
Static IP 1
eBGP 20
OSPF 110
IS-IS 115
RIP 120
iBGP 200
Configuration Tasks
Note In this section, the command syntax in the task tables displays only the root command; for the
complete command syntax, see the full description for the command in the “Command
Descriptions” section.
To configure basic IP routing, perform the tasks described in the following sections:
• Configuring Static Routes
• Configuring Additional Basic IP Routing Parameters
Configure one or more IPv6 static routes to the same ipv6 route
destination.
Configure a static route for multicast RPF lookup. ip mstatic Enter this command in interface
configuration mode.
Perform a reverse path forwarding (RPF) check to verify ip verify unicast source
the source IP address on all incoming unicast packets at
the specified interface.
Configure a global router ID for the SmartEdge router. router-id The global router ID must be configured for
RSVP to operate correctly.
Enable intercontext static routing among non-local service inter-context routing Enter this command in global configuration
contexts. mode.
This command can only be disabled when
there is no instance of non-local context
static routing configured on the router.
Enable the negotiation of the maximum transmission unit tcp path-mtu-discovery Enter this command in global configuration
(MTU) for Transmission Control Protocol (TCP) mode.
sessions. Enabling MTU negotiation has no effect on
existing TCP sessions.
Both the SmartEdge router and the remote
router must be configured for MTU
negotiation to work properly.
Configuration Examples
The following example routes packets for network 10.10.0.0/16 via interface, enet1:
[local]Redback(config-ctx)#ip route 10.10.0.0/16 enet1
The following example defines a default route through interface atm5. Because no cost is defined, this
route uses a cost of 0, and is therefore used as the active route. If this route goes away, the second and third
routes alternate because they have the same distance and cost.
[local]Redback(config-ctx)#ip route 0.0.0.0/0 atm5
[local]Redback(config-ctx)#ip route 0.0.0.0/0 10.1.1.1 cost 2
[local]Redback(config-ctx)#ip route 0.0.0.0/0 172.21.200.254 cost 2
The following example displays the routing table for the routes configured in the previous examples:
[local]Redback>show ip route
The following example shows the routing table after the default route through interface atm5 is removed:
[local]Redback>show ip route
Command Descriptions
This section describes the syntax and usage guidelines for the commands used to configure basic IP routing
features. The commands are presented in alphabetical order.
ip martian
ip martian ip-addr/prefix-length [eq eq-value] [ge ge-value] [le le-value]
no ip martian ip-addr/prefix-length [eq eq-value] [ge ge-value] [le le-value]
Purpose
Adds custom IP martian addresses to the list of default martian IP addresses in the routing table.
Command Mode
context configuration
Syntax Description
ip-addr/prefix-length IP address (in the form A.B.C.D) and prefix length, separated by the slash (/)
character. The range of values for the prefix-length argument is 0 to 32.
eq eq-value Optional. Equal to value. The eq-value argument specifies the length of the
mask to be matched; the eq keyword indicates that the mask length must
exactly match the specified value. The range of values for the eq-value
argument is 1 to 32.
ge ge-value Optional. Greater than or equal to value. The ge-value argument specifies the
length of the mask to be matched; the ge keyword indicates that all masks of
a length greater than or equal to the specified value will match. The range of
values for the ge-value argument is 1 to 32.
le le-value Optional. Less than or equal to value. The le-value argument specifies the
length of the mask to be matched; the le keyword indicates that all masks of a
length less than or equal to the specified value will match. The range of
values for the le-value argument is 1 to 32.
Default
For IPv4, the martian addresses of 0.0.0.0/8 and 127.0.0.0/8 are installed in the routing table.
Usage Guidelines
Use the ip martian command to add custom IP martian addresses to the list of default martian IP addresses
in the routing table.
IP martian addresses are host or network addresses about which all routing information is ignored. IP
martian addresses are typically advertised by misconfigured routers using dynamic protocols.
Use the no form of this command to remove a configured IP martian address from the routing table.
Examples
The following example configures a martian address of 10.1.0.0/20 for the local context. Routes
matching this prefix are ignored.
[local]Redback(config-ctx)#ip martian 10.1.0.0/20
Related Commands
ip route
ip maximum-routes
ip maximum-routes [multicast] [vpn] route-limit [log-only | threshold value]
Purpose
Configures an upper limit for the number of routes installed in an IP routing table.
Command Mode
context configuration
Syntax Description
multicast Optional. Sets the maximum route limit for unicast routes in a multicast
topology.
vpn Optional. Sets the maximum route limit for all non-local context unicast
routing tables.
When the vpn keyword is used in the local context, it specifies a default
maximum route setting that automatically applies to all non-local contexts;
however, if the ip maximum-route command is used in a specific non-local
context, then it overrides the default maximum route setting.
route-limit Maximum number of routes allowed in the IP routing table. If this limit is
reached, a warning is triggered and any additional routes are rejected. Range
of values is 1 to 4,294,967,295.
log-only Optional. Configures the route limit as an advisory limit. An advisory limit
triggers only a warning, and additional routes are not rejected.
threshold value Optional. Threshold value for the mandatory limit that triggers a warning.
Range of values is 1 to 100.
Default
No maximum limit is set.
Usage Guidelines
Use the ip maximum-routes command to configure an upper limit for the number of routes installed in an
IP routing table.
A route limit sets an upper limit for the number of prefixes installed in a routing table; for example, you
can use a route limit to limit the number of routes received from the customer edge (CE) router in a Virtual
Private Network (VPN) context.
There are two modes for route limits: advisory and mandatory. An advisory limit only triggers warnings,
and a mandatory limit rejects any additional routes after the threshold is reached.
Use the vpn keyword in the local context, to specify a default maximum route setting that automatically
applies to all non-local contexts. To override the default maximum route setting, use the ip
maximum-route command in the non-local context that you want to configure.
Examples
The following example configures an upper limit of 500 routes for the IP routing table:
[local]Redback#ip maximum-routes 500
Related Commands
None
ip mstatic
ip mstatic source-ip-addr/prefix-length {rpf-ip-addr | rpf-if-name} [distance distance]
no ip mstatic source-ip-addr/prefix-length rpf-ip-addr [distance distance]
Purpose
Configures a static route for multicast reverse path forwarding (RPF) lookup.
Command Mode
context configuration
Syntax Description
source-ip-addr/prefix-length IP address of the multicast source (in the form A.B.C.D) and prefix
length, separated by the slash (/) character. The range of values for the
prefix-length argument is 0 to 32.
distance distance Optional. Administrative distance assigned to the static route used for
RPF lookup. The range of values for the distance argument is 1 to 255.
Default
None
Usage Guidelines
Use the ip mstatic command to configure a static route for multicast RPF lookup.
Use the no form of this command to delete a static route for multicast RPF lookup.
Examples
The following example shows how to configure a static route for multicast RPF lookup with the source IP
address 192.168.100.100 and a prefix length of 24. The route uses the foo interface to perform the
RPF lookup and is assigned an administrative distance of 110.
[local]Redback(config)#context isp1
[local]Redback(config-ctx)#ip mstatic 192.168.100.100/24 foo 110
Related Commands
None
ip route
ip route ip-addr/prefix-length {next-hop-ip-addr | next-hop-if-name | null0 | context ctx-name} [bfd]
[dvsr dvsr-profile-name [verify-address verify-addr]] [cost cost] [description text]
[distance distance] [permanent] [tag tag]
no ip route ip-addr/prefix-length {next-hop-ip-addr | next-hop-if-name | null0 | context ctx-name}
[bfd] [dvsr dvsr-profile-name [verify-address verify-addr]] [cost cost] [description text]
[distance distance] [permanent] [tag tag]
Purpose
Configures one or more static routes when the system is not configured to dynamically select a route to the
destination.
Command Mode
context configuration
Syntax Description
ip-addr/prefix-length IP address (in the form A.B.C.D) and prefix length, separated by the slash
(/) character. The range of values for the prefix-length argument is 0 to 32.
next-hop-ip-addr IP address of the next hop that can be used to reach the network.
next-hop-if-name Interface name of the next hop that can be used to reach the network.
context ctx-name Another context, which can be used as a next hop to reach a network.
bfd Optional. Enables Bidirectional Forwarding Detection (BFD) for the static
route.
dvsr dvsr-profile-name Optional. dynamically verified static routing (DVSR) profile name. Defines
a DVSR using the specified profile name. The dvsr dvsr-profile-name
construct cannot be used with the next-hop-ip-addr or next-hop-if-name
arguments, or the null0 or permanent keywords.
verify-address verify-addr Optional. Host IP address the DVSR route should verify. If the
verify-address verify-addr construct is not configured, the
next-hop-ip-addr or next-hop-if-name argument will be used for the
verification.
cost cost Optional. Cost of the route. The range of values is 0 to 15.
distance distance Optional. Administrative distance assigned to the route. The range of values
is 1 to 255.
permanent Optional. Indicates that the route cannot be removed, even if the interface is
shut down.
tag tag Optional. Route tag used as a match value for controlling redistribution
through route maps. An unsigned 32-bit integer, the range of values is 1 to
4,294,967,295; the default value is 0.
Default
None
Usage Guidelines
Use the ip route command to configure one or more static routes when the system is not configured to
dynamically select a route to the destination.
A static route can be overridden by a dynamically learned route with a lower administrative distance.
Use the null0 keyword to prevent routing loops. A null interface is always up and can never forward or
receive traffic. The null interface provides an alternative method of filtering traffic. You can avoid the
overhead involved with using access control lists by directing undesired network traffic to the null
interface.
Note The Open Shortest Path First (OSPF) and Intermediate System-to-Intermediate System (IS-IS)
routing processes always create a route to a null interface when summarizing a group of routes.
Use the context ctx-name construct to forward traffic to another routing context (next-hop context). The
context ctx-name construct can be used to configure VPN customer Internet access, or Inter-VPN routing
leaks. The next-hop context must be a different routing context than the one to which the static route
belongs. If the next-hop context does not exist, and the service multiple-contexts command is enabled on
the router, the context will be created. Intercontext static routing between two non-local contexts is not
allowed unless the service inter-context routing command is enabled on the router. The prefix using the
next-hop context is considered to be valid only if the next-hop context has the routes that are being covered
by this prefix. In other words, this prefix will be installed in the RIB only if the next-hop context can reach
those networks.
Use the bfd keyword to enable BFD for a static route. BFD is a simple Hello protocol that provides the
ability to detect communication failures in less than one second. When BFD detects a communication
failure to the next hop specified for a static route (that has BFD enabled), that static route is withdrawn. By
default, BFD is disabled for all static routes.
Use the dvsr dvsr-profile-name construct to configure a static route with DVSR capability. A DVSR route
needs to reference an existing DVSR profile by name. Protocol redistribution can specify redistribute static
dvsr to only import DVSR capable routes. The verify-host address of the DVSR route is by default the
next-hop IP address of the route. If the DVSR verify-host is not the same as the next-hop IP address, the
user need to make sure that there is a route to reach that verify-host address, and also the nexthop of that
route needs to be the same as the next-hop of the DVSR route itself.
Use the no form of this command to remove static routes.
Examples
The following example routes packets for network 20.0.0.0/8 to the device at IP address
121.109.3.4 if dynamic information with administrative distance less than 110 is not available:
[local]Redback(config-ctx)#ip route 20.0.0.0/8 121.109.3.4 distance 110
The following example routes packets for network 129.108.0.0/16 to the device at IP address
129.108.6.6:
[local]Redback(config-ctx)#ip route 129.108.0.0/16 129.108.6.6
The following example configures a static route from the local context using context, vpn-abc, as the
next hop context:
[local]Redback(config-ctx)#ip route 12.1.1.0/24 context vpn-abc
Related Commands
ipv6 route
service inter-context routing
ipv6 route
ipv6 route ipv6-addr/prefix-length {next-hop-ipv6-addr | next-hop-if-name | null0} [cost cost]
[distance distance] [permanent] [tag tag]
no ipv6 route ipv6-addr/prefix-length {next-hop-ipv6-addr | next-hop-if-name | null0} [cost cost]
[distance distance] [permanent] [tag tag]
Purpose
Configures one or more static routes when the system is not configured to dynamically select a route to the
destination.
Command Mode
context configuration
Syntax Description
ipv6-addr/prefix-length IPv6 address (in the form A:B:C:D:E:F:G:H) and prefix length, separated
by the slash (/) character. The range of values for the prefix-length argument
is 0 to 128.
next-hop-ipv6-addr IPv6 address of the next hop that can be used to reach the network.
next-hop-if-name Interface name of the next hop that can be used to reach the network.
cost cost Optional. Cost of the route. The range of values is 0 to 15.
distance distance Optional. Administrative distance assigned to the route. The range of values
is 1 to 255.
permanent Optional. Indicates that the route cannot be removed, even if the interface is
shut down.
tag tag Optional. Route tag used as a match value for controlling redistribution
through route maps. An unsigned 32-bit integer, the range of values is 1 to
4,294,967,295; the default value is 0.
Default
None
Usage Guidelines
Use the ipv6 route command to configure one or more static routes when the system is not configured to
dynamically select a route to the destination.
A static route can be overridden by a dynamically learned route with a lower administrative distance.
Use the null0 keyword to prevent routing loops. A null interface is always up and can never forward or
receive traffic. The null interface provides an alternative method of filtering traffic. You can avoid the
overhead involved with using access control lists by directing undesired network traffic to the null
interface.
Note The Open Shortest Path First Version 3 (OSPFv3) and Intermediate System-to-Intermediate System
(IS-IS) routing processes always create a route to a null interface when summarizing a group of
routes.
Examples
The following example routes packets for network, 2000:8A2E:5648:CDF7:65B3:2F29:B3D5:
3995/64, to the device at IPV6 address, AB34:665F:B90B:3290:EA11:2678:FFFF:3210:
[local]Redback(config-ctx)#ipv6 route 2000:8A2E:5648:CDF7:65B3:2F29:B3D5:3995/64
AB34:665F:B90B:3290:EA11:2678:FFFF:3210
Related Commands
ip route
Purpose
Performs a reverse path forwarding (RPF) check to verify the source IP address on all incoming unicast
packets at the specified interface.
Command Mode
interface configuration
Syntax Description
reachable-via any Specifies that the source IP address can be reached through any interface.
reachable-via rx Specifies that the source IP address can be reached through an incoming
interface.
allow-default Optional. Allows the RPF check to look up the default route for verification.
access-group acl-name Optional. Access control list (ACL) to use for verifying source IP addresses.
Default
None
Usage Guidelines
Use the ip verify unicast source command to performs an RPF check to verify the source IP address on all
incoming unicast packets at the specified interface.
If the packet passes the RPF check, the packet is forwarded as normal; however, if the router does not find
a reverse path for the packet, the packet is dropped.
The unicast RPF check is a network security feature designed to address RFC 2827, Network Ingress
Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing. That is, the
Unicast RPF check feature addresses problems that are caused by the introduction of frequently changing
or forged (spoofed) source IP addresses into a network by discarding IP packets that have no verifiable
source IP address. Denial-of-Service (DoS) attacks use spoofed source IP addresses to give attackers the
ability to circumvent efforts to locate or stop the attacks. Such attacks are eliminated by forwarding only
packets that have source addresses that are valid and consistent with the IP routing table.
Note Verifying the unicast source should be applied to an inbound interface at the upstream end of a
connection.
Examples
The following example performs a unicast RPF check from interface foo on all unicast sources reachable
by any interface:
[local]Redback(config-ctx)#interface foo
[local]Redback(config-if)#ip verify unicast source reachable-via any
Related Commands
ip route
router-id
router-id ip-addr
no router-id
Purpose
Configures a global router ID for the SmartEdge router.
Command Mode
context configuration
Syntax Description
ip-addr IP address of the interface to be used as the router ID.
Default
A global router ID is not preconfigured.
Usage Guidelines
Use the router-id command to configure a global router ID for the SmartEdge router.
The global router ID in context configuration mode provides a consistent router ID for use by all routing
protocols; however, if the router ID is configured as part of an individual routing protocol, such as the Open
Shortest Path First (OSPF) protocol or the Border Gateway Protocol (BGP), it will take precedence over
the global router ID in context configuration mode.
Note The global router ID must be configured for the Resource Reservation Protocol (RSVP) to operate
correctly.
Examples
The following example configures the IP address, 193.25.105.83, as the global router ID in context
configuration mode:
[local]Redback(config)#context local
[local]Redback(config-ctx)#router-id 193.25.105.83
Related Commands
router-id—BGP router configuration mode
router-id—OSPF router configuration mode
router rsvp
Purpose
Enables intercontext static routing among non-local contexts.
Command Mode
global configuration
Syntax Description
This command has no keywords or arguments.
Default
Disabled
Usage Guidelines
Use the service inter-context routing command to enable intercontext static routing among non-local
contexts. When this command is not enabled, intercontext static routing can still be used between the local
context and non-local contexts.
Note This command can only be disabled when there is no instance of non-local context static routing
configured on the router.
For more information on creating and servicing contexts, see the “Context Configuration” chapter in the
Basic System Configuration Guide for the SmartEdge OS.
Examples
The following example enables non-local inter-context static routing:
[local]Redback(config)#service inter-context routing
[local]Redback(config)#context cust-abc
[local]Redback(config-ctx)#ip route 11.1.1.0/24 context web-xyz
[local]Redback(config-ctx)#context web-xyz
[local]Redback(config-ctx)#ip route 12.2.0.0/16 context cust-abc
Related Commands
ip route
tcp path-mtu-discovery
tcp path-mtu-discovery
no tcp path-mtu-discovery
Purpose
Enables the negotiation of the maximum transmission unit (MTU) for Transmission Control Protocol
(TCP) sessions.
Command Mode
global configuration
Syntax Description
This command has no keywords or arguments.
Default
MTU negotiation is disabled.
Usage Guidelines
Use the tcp path-mtu-discovery command to enable the negotiation of the MTU for TCP sessions.
Enabling MTU negotiation has no effect on existing TCP sessions.
TCP has the ability to dynamically discover the largest MTU that can be used on the session pipe and that
minimizes fragmentation and maximizes efficiency. As described in RFC 1191, Path MTU Discovery, the
default size of an IP packet is 576 bytes. The IP and TCP portions of the frame occupy 40 bytes leaving
536 bytes for the data payload. This payload is referred to as the maximum segment size (MSS).
This command allows the MSS (and hence the MTU) to be negotiated. When you enter this command and
start a TCP session, the SYN packet sent by the SmartEdge router contains a TCP option specifying a larger
MSS. This larger MSS is the MTU of the outbound interface minus 40 bytes. If the MTU of the outbound
interface is 1500 bytes, the advertised MSS is 1460.
Both the SmartEdge router and the remote router must be configured for MTU negotiation to work
properly. If both routers have MTU negotiation enabled, the SYN from one router to the other contains the
optional TCP value advertising the higher MSS. The returning SYN then advertises the higher MSS value.
If one router has MTU negotiation enabled and the second router never advertises the larger MSS, the first
router is locked into sending the default values.
Use the no form of this command to disable the negotiation of the MTU for TCP sessions.
Examples
The following example enables the negotiation of the MTU for TCP sessions.
[local]Redback(config)#tcp path-mtu-discovery
Related Commands
None