Configuring Static Routing (CLI Procedure)
Static routes are routes that are manually configured and entered into the routing table.
Dynamic routes, in contrast, are learned by the EX Series switch and added to the routing
table using a protocol such as OSPF or RIP.
The switch uses static routes:
•
When the switch does not have a route to a destination that has a better (lower)
preference
value. The preference is an arbitrary value in the range from 0 through 255
that the software uses to rank routes received from different protocols, interfaces, or
remote systems. The routing protocol process generally determines the active route
by selecting the route with the lowest preference value. In the given range,
0
is the
lowest and
255
is the highest.
•
When the switch cannot determine the route to a destination.
•
When the switch is forwarding unroutable packets.
To configure basic static route options using the CLI:
•
To configure the switch's default gateway:
[edit]
user@switch#
set routing–options static route 0.0.0.0/0 next-hop 10.0.1.1
•
To configure a static route and specify the next address to be used when routing traffic
to the static route:
[edit]
user@switch#
set routing-options static route 20.0.0.0/24 next-hop 10.0.0.2.1
•
To always keep the static route in the forwarding table:
[edit]
user@switch#
set routing-options static route 20.0.0.0/24 retain
•
To prevent the static route from being readvertised:
[edit]
user@switch#
set routing-options static route 20.0.0.0/24 no-readvertise
•
To remove inactive routes from the forwarding table:
[edit]
user@switch#
set routing-options static route 20.0.0.0/24 active
Related
Documentation
Configuring Static Routing (J-Web Procedure) on page 1690
•
•
Monitoring Routing Information on page 1707
Configuring Static Routing (J-Web Procedure)
You can use the J-Web interface to configure static routes for EX Series switches.
Copyright © 2010, Juniper Networks, Inc.
1690
Complete Software Guide for Junos
®
OS for EX Series Ethernet Switches, Release 10.3
Summary of Contents for JUNOS OS 10.3 - SOFTWARE
Page 325: ...CHAPTER 17 Operational Mode Commands for System Setup 229 Copyright 2010 Juniper Networks Inc ...
Page 1323: ...CHAPTER 56 Operational Mode Commands for Interfaces 1227 Copyright 2010 Juniper Networks Inc ...
Page 2841: ...CHAPTER 86 Operational Commands for 802 1X 2745 Copyright 2010 Juniper Networks Inc ...
Page 3367: ...CHAPTER 113 Operational Mode Commands for CoS 3271 Copyright 2010 Juniper Networks Inc ...
Page 3435: ...CHAPTER 120 Operational Mode Commands for PoE 3339 Copyright 2010 Juniper Networks Inc ...
Page 3529: ...CHAPTER 126 Operational Mode Commands for MPLS 3433 Copyright 2010 Juniper Networks Inc ...