Похожие презентации:
JIR-12.a_C2_ProtocolIndependentRouting
1. Junos Intermediate Routing
Chapter 2: Protocol-IndependentRouting
© 2012 Juniper Networks, Inc. All rights reserved. | www.juniper.net | Worldwide Education Services
2. Chapter Objectives
▪ After successfully completing this chapter, you will beable to:
•Describe typical uses of static, aggregate, and generated
routes
•Configure and monitor static, aggregate, and generated
routes
•Explain the purpose of Martian routes and add new entries
to the list of Martian addresses
•Describe typical uses of routing instances
•Configure and share routes between routing instances
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-2
3. Agenda: Protocol-Independent Routing
→Static Routes▪ Aggregate Routes
▪ Generated Routes
▪ Martian Addresses
▪ Routing Instances
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-3
4. Review: Static Routes
▪ Manually defined routes added to route table•A default route is an example of a static route
R1
Network A
172.29.100.0/24
.1
ge-0/0/1
.2
.1
ISP X
172.30.25.0/30
192.168.63.14
user@R1> show route 192.168.63.14
inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0
© 2012 Juniper Networks, Inc. All rights reserved.
*[Static/5] 01:09:34
> to 172.30.25.1 via ge-0/0/1.0
Worldwide Education Services
Default static route with
default preference
www.juniper.net | 2-4
5. Configuring Static Routes
▪ Defined under the [edit routing-options]hierarchy level and consists of destination prefix and
valid next hop
•Next hop is typically the IP address of a directly connected
device; other options exist such as discard and reject
• Use qualified-next-hop to allow independent preference
for static routes to the same destination
• Use resolve if the specified next hop is not directly connected
172.30.25.0/30
Network A
172.29.100.0/24
R1
.1
ge-0/0/1
.2
Primary
.1
.6
Secondary
.5
ge-0/0/2
ISP X
172.30.25.4/30
Note: Routes with invalid or unreachable next hops will not become active!
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-5
6. Intentionally Left Blank
Configuration Example▪ Sample IPv4 and IPv6 static route configuration:
[edit routing-options]
user@R1# show
rib inet6.0 {
static {
route 0::/0 {
next-hop 3001::1;
preference 250;
}
}
}
static {
defaults {
preference 250;
}
route 0.0.0.0/0 {
next-hop 172.30.25.1;
qualified-next-hop 172.30.25.5 {
preference 251;
}
}
route 172.28.102.0/24 {
next-hop 10.210.11.190;
no-readvertise;
}
}
© 2012 Juniper Networks, Inc. All rights reserved.
IPv6 default static route
Parameters defined under defaults
section are applied to IPv4 static routes that
do not include explicit definitions
IPv4 default static route with
secondary qualified next hop
Restricts route from being advertised through
routing policy; highly suggested for static
routes used for management traffic
Worldwide Education Services
www.juniper.net | 2-7
7. Configuration Example
Test Your Knowledge (1 of 2)▪ Which next hop will be used in the example?
[edit routing-options]
user@R1# show
static {
defaults {
preference 180;
}
route 0.0.0.0/0 {
next-hop 172.30.25.1;
qualified-next-hop 172.30.25.5 {
preference 7;
}
}
}
Network A
172.29.100.0/24
R1
.1
172.30.25.0/30
ge-0/0/1
.2
.1
ISP-X
.6
ge-0/0/2
.5
172.30.25.4/30
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-9
8. Intentionally Left Blank
Test Your Knowledge (2 of 2)▪ Which static routes will be exported into OSPF?
[edit routing-options]
user@R1# show
static {
route 172.29.12.0/24 next-hop 172.30.25.1;
route 172.29.13.0/24 {
next-hop 172.30.25.1;
no-readvertise;
}
route 172.29.16.0/24 next-hop 172.30.25.1;
route 172.29.20.0/24 next-hop 172.30.25.1;
}
[edit protocols ospf]
user@R1# show
export export2ospf;
area 0.0.0.0 {
interface ge-0/0/2.0;
interface ge-0/0/3.0;
interface lo0.0;
}
[edit policy-options]
user@R1# show
policy-statement export2ospf {
term match-static-routes {
from {
protocol static;
route-filter 172.29.0.0/16 orlonger;
}
then accept;
}
}
172.29.12.0/24
R1
OSPF
Area 0
172.29.13.0/24
ge-0/0/1
.2
172.30.25.0/30
.1
172.29.16.0/24
172.29.20.0/24
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-10
9. Test Your Knowledge (1 of 2)
Agenda: Protocol-Independent Routing▪ Static Routes
→Aggregate Routes
▪ Generated Routes
▪ Martian Addresses
▪ Routing Instances
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-11
10. Test Your Knowledge (2 of 2)
Aggregate Routes▪ Manually defined routes that represent a collection of
more specific routes
•Typically used to reduce number of route advertisements
Network A
172.29.0.0/24
172.29.0.0/22
.1
Network B
172.29.1.0/24
R1
ge-0/0/1
.1
.2
.1
172.30.25.0/30
.1
ISP X
Network C
172.29.2.0/24
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-12
11. Agenda: Protocol-Independent Routing
Think About It…▪ Which of the prefixes are part of the 10.1.0.0/20
aggregate route?
•10.1.14.0/24
•10.1.15.0/24
•10.1.16.0/24
•10.1.17.0/24
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-13
12. Aggregate Routes
Configuring Aggregate Routes▪ Defined under the [edit routing-options]
hierarchy level and consists of destination summary
prefix
•Aggregate routes must have at least one contributing route!
Network A
172.29.0.0/24
172.29.0.0/22
.1
Network B
172.29.1.0/24
.1
ge-0/0/1
.1
Network C
172.29.2.0/24
R1
.2
172.30.25.0/30
.1
ISP X
user@R1> show route protocol aggregate
inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.29.0.0/22
© 2012 Juniper Networks, Inc. All rights reserved.
*[Aggregate/130] 00:02:23
Reject
Worldwide Education Services
Default route preference and
next hop for aggregate routes
www.juniper.net | 2-14
13. Think About It…
Configuration Example▪ Sample aggregate route configuration:
[edit routing-options]
user@R1# show
aggregate {
defaults {
community 1:888;
}
route 172.29.0.0/22;
route 172.25.0.0/16 {
community 1:999;
discard;
}
}
Parameters defined under defaults
section are applied to aggregate routes
that do not include explicit definitions
discard next hop silently discards packets
destined to a contributing subnet for which a
more specific route entry does not exist
Note: The default next hop for aggregate routes is reject, which sends an ICMP
unreachable message when a more specific contributing route does not exist.
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-15
14. Configuring Aggregate Routes
Viewing the Contributing Routes▪ Use show route prefix exact detail to
view detailed information for an aggregate route
user@R1> show route 172.29.0.0/22 exact detail
inet.0: 12 destinations, 12 routes (11 active, 0 holddown, 1 hidden)
172.29.0.0/22 (1 entry, 1 announced)
*Aggregate Preference: 130
Default route preference and
Next hop type: Reject
next hop for aggregate routes
Next-hop reference count: 2
State: <Active Int Ext>
Age: 1:39:21
Task: Aggregate
Announcement bits (1): 0-KRT
AS path: I (LocalAgg)
Flags:
Depth: 0
Active
AS path list:
AS path: I Refcount: 3
Contributing Routes (3):
172.29.0.0/24 proto Direct
172.29.1.0/24 proto Direct
Contributing routes
172.29.2.0/24 proto Direct
Note: Other commands provide similar information.
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-17
15. Configuration Example
Test Your Knowledge▪ What action does R1 take when it receives packet A
and packet B (assume the default next-hop behavior)?
Advertised Route
172.29.0.0/22
Network A
172.29.0.0/24
.1 R1
Network B
172.29.1.0/24
ge-0/0/1
.1
.1
.2
172.30.25.0/30
.1
ISP X
Network C
172.29.2.0/24
Packet A
Destined to 172.29.1.5
Packet B
Destined to 172.29.3.5
Contributing routes for the 172.29.0.0/22 aggregate
route advertised from R1 to the upstream provider
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-18
16. Intentionally Left Blank
Agenda: Protocol-Independent Routing▪ Static Routes
▪ Aggregate Routes
→Generated Routes
▪ Martian Addresses
▪ Routing Instances
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-19
17. Viewing the Contributing Routes
Generated Routes▪ Very similar to aggregate routes
•Key difference is the use of a forwarding next hop, which is
the next hop associated with the primary contributing route
•Can be used to generate a route of last resort (often a
default route) when required conditions are met
• Uses routing policy to identify required conditions
R1
Customer X
Tier 1 ISP
Regional ISP
10.0.0.0/16
Core prefixes sent from Tier
1 ISP to regional ISP
© 2012 Juniper Networks, Inc. All rights reserved.
0/0
Default route is sent from regional
ISP to customer X if core prefixes
are active in R1’s route table
Worldwide Education Services
www.juniper.net | 2-20
18. Test Your Knowledge
Case Study: Topology and Objective▪ Configure R1 to generate and advertise a default
route into OSPF when the 10.0.0.0/16 BGP route is
present in its routing table
10.0.0.0/16
R2
OSPF
Area 0
R1
ge-0/0/1
.2
172.30.25.0/30
.1
ISP X
R3
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-22
19. Agenda: Protocol-Independent Routing
Case Study: Creating the Generated Route▪ Sample generated route configuration:
[edit routing-options]
user@R1# show
generate {
defaults {
preference 130;
}
route 0.0.0.0/0;
}
…
10.0.0.0/16
R2
OSPF
Area 0
R3
Parameters defined under defaults
section are applied to generated routes
that do not include explicit definitions
R1
ge-0/0/1
.2
172.30.25.0/30
.1
ISP X
Note: The default next hop for generated routes is the next
hop associated with the primary contributing route. In our
example, this default next hop will be 172.30.25.1.
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-23
20. Generated Routes
Case Study: Defining the Required Policy▪ Sample routing policy configuration:
[edit policy-options]
user@R1# show policy-statement match-contributing-prefix
term match-bgp-prefix {
from {
protocol bgp;
route-filter 10.0.0.0/16 exact;
}
then accept;
}
term else-reject {
then reject;
}
[edit policy-options]
user@R1# show policy-statement export-default
term match-default {
from {
protocol aggregate;
route-filter 0.0.0.0/0 exact;
}
then accept;
}
© 2012 Juniper Networks, Inc. All rights reserved.
Policy matches 10.0.0.0/16
prefix exactly and rejects all
other potential contributors
Policy matches generated route
defined on the previous slide
The protocol aggregate match condition is
used for aggregate and generated routes
Worldwide Education Services
www.juniper.net | 2-24
21. Intentionally Left Blank
Case Study: Applying the Required Policy▪ Sample routing policy application:
[edit routing-options]
user@R1# show
generate {
defaults {
preference 130;
}
route 0.0.0.0/0 policy match-contributing-prefix;
}
…
[edit protocols ospf]
user@R1# show
export export-default;
area 0.0.0.0 {
interface ge-0/0/2.0;
interface ge-0/0/3.0;
interface lo0.0;
}
© 2012 Juniper Networks, Inc. All rights reserved.
The export-default policy exports
the default generate route only when
the required condition is met.
Worldwide Education Services
www.juniper.net | 2-25
22. Case Study: Topology and Objective
Case Study: Monitoring the Results (1 of 2)▪ Use the show route 0/0 exact detail
command on R1 to verify details of generated route:
user@R1> show route 0/0 exact detail
inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
0.0.0.0/0 (1 entry, 1 announced)
*Aggregate Preference: 130
Next hop type: Router, Next hop index: 546
Next-hop reference count: 4
Next hop: 172.30.25.1 via ge-0/0/1.100, selected
State: <Active Int Ext>
Local AS: 65400
Age: 1:03:46
Task: Aggregate
Announcement bits (2): 0-KRT 2-OSPF
AS path: I
Flags: Generate Depth: 0
Active
Contributing Routes (1):
10.0.0.0/16 proto BGP
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-26
23. Case Study: Creating the Generated Route
Case Study: Monitoring the Results (2 of 2)▪ Use the show route 0/0 exact command on R2
or R3 to verify that the route was received through
OSPF:
user@R2> show route 0/0 exact
inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0
*[OSPF/150] 00:15:30, metric 0, tag 0
> to 172.20.12.1 via ge-0/0/2.0
10.0.0.0/16
R2
OSPF
Area 0
R1
ge-0/0/1
.2
172.30.25.0/30
.1
ISP X
R3
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-27
24. Case Study: Defining the Required Policy
Agenda: Protocol-Independent Routing▪ Static Routes
▪ Aggregate Routes
▪ Generated Routes
→Martian Addresses
▪ Routing Instances
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-28
25. Case Study: Applying the Required Policy
Overview: Martian Addresses▪ Prefixes ignored by the Junos OS
•Martian addresses are never installed in the routing table
•Default Martian addresses include:
• 0.0.0.0/8 orlonger
• 127.0.0.0/8 orlonger
• 128.0.0.0/16 orlonger
• 191.255.0.0/16 orlonger
• 192.0.0.0/24 orlonger
• 223.255.255.0/24 orlonger
• 240.0.0.0/4 orlonger
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-29
26. Case Study: Monitoring the Results (1 of 2)
Adding Prefixes as Martian Addresses▪ Add additional prefixes to the Martian list under the
[edit routing-options] hierarchy level
[edit routing-options]
user@R1# show martians
23.0.0.0/8 orlonger;
31.0.0.0/8 orlonger;
36.0.0.0/8 orlonger;
Specify prefix and match-type
▪ Use show route martians to view the list of
registered Martian addresses
user@R1> show route martians
inet.0:
…
23.0.0.0/8 orlonger -- disallowed
31.0.0.0/8 orlonger -- disallowed
36.0.0.0/8 orlonger -- disallowed
Prefixes are added to list
Default list omitted
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-30
27. Case Study: Monitoring the Results (2 of 2)
Agenda: Protocol-Independent Routing▪ Static Routes
▪ Aggregate Routes
▪ Generated Routes
▪ Martian Addresses
→Routing Instances
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-32
28. Agenda: Protocol-Independent Routing
Review: Routing Instances▪ A routing instance is a unique collection of routing
tables, interfaces, and routing protocol parameters
Device Running the Junos OS
Routing Instance (master)
Routing Instance (cust-A)
Routing Instance (cust-B)
inet.0
inet6.0
ge-0/0/0.0
ge-0/0/1.0
lo0.0
Default Route
OSPF
cust-A.inet.0
cust-A.inet6.0
ge-0/0/3.0
ge-0/0/4.0
lo0.1
Default Route
OSPF
cust-B.inet.0
cust-B.inet6.0
ge-1/0/0.0
ge-1/0/1.0
lo0.2
Default Route
OSPF
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-33
29. Overview: Martian Addresses
Default Routing Instance▪ Master routing instance includes inet.0 route table
•Might include other route tables, such as inet6.0
user@R1> show route instance
Instance
Type
Primary RIB
master
forwarding
inet.0
inet6.0
…
Routing instance name
© 2012 Juniper Networks, Inc. All rights reserved.
Active/holddown/hidden
3/0/1
4/0/0
Participating route tables; the presence of
inet6.0 table indicates IPv6 is in use
Worldwide Education Services
www.juniper.net | 2-34
30. Adding Prefixes as Martian Addresses
User-Defined Routing Instances▪ You configure user-defined routing instances at the
[edit routing-instances] hierarchy level
•Typically used for filter-based forwarding, VPN services, and
system virtualization
•Routing instance types include:
[edit routing-instances instance-name]
user@R1# set instance-type ?
Possible completions:
forwarding
Forwarding instance
l2vpn
Layer 2 VPN routing instance
no-forwarding
Nonforwarding instance
virtual-router
Virtual routing instance
vpls
VPLS routing instance
vrf
Virtual routing forwarding instance
Note: Actual routing instance types vary between platforms;
check product documentation for support information.
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-35
31. Intentionally Left Blank
Configuration Example▪ Routing instance configuration example:
Routing instance name is user-defined
[edit routing-instances new-instance]
user@R1# show
instance-type virtual-router;
Routing instance type
interface ge-0/0/0.0;
Define interfaces under the [edit
interface ge-0/0/1.0;
interfaces] hierarchy and reference them
interface lo0.1;
under their respective routing instance
routing-options {
static {
route 0.0.0.0/0 next-hop 172.26.25.1;
}
}
protocols {
ospf {
area 0.0.0.0 {
interface ge-0/0/0.0;
interface ge-0/0/1.0;
interface lo0.1;
}
}
}
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-36
32. Agenda: Protocol-Independent Routing
Working with Routing Instances▪ When working with routing instances, always
reference the instance name
user@R1> show interfaces terse routing-instance new-instance
Interface
Admin Link Proto
Local
ge-0/0/0.0
up
up
inet
172.26.25.5/24
ge-0/0/1.0
up
up
inet
172.25.182.5/24
lo0.1
up
up
inet
192.168.100.52
Remote
--> 0/0
user@R1> ping 172.26.25.1 rapid count 25 routing-instance new-instance
PING 172.26.25.1 (172.26.25.1): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 172.26.25.1 ping statistics --25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.014/1.875/2.073/0.285 ms
Software automatically
creates IP unicast table
user@R1> show route table new-instance.inet.0
new-instance.inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0
*[Static/5] 02:06:18
> to 172.26.25.1 via ge-0/0/0.0
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-37
33. Review: Routing Instances
RIB Groups▪ Use RIB groups to share routes between routing
tables
•Helpful in deployments such as:
• Virtual private networks
• Multicast networks
• Filter-based forwarding
Table1
© 2012 Juniper Networks, Inc. All rights reserved.
Routes
Table2
Worldwide Education Services
www.juniper.net | 2-38
34. Default Routing Instance
Defining and Applying RIB Groups▪ Defined under the routing-options hierarchy
level
[edit routing-options]
user@R1# show
rib-groups {
<rib-group-name> {
export-rib <routing-table-name>;
import-rib <routing-table-names>;
import-policy <policy-name>;
}
}
The export-rib indicates table from
where routes should be retrieved
The import-rib indicates tables in
which routes should be placed
The import-policy is used to control which
routes are installed in the routing table group
▪ Applied to routing protocols, interface routes, or both
[edit protocols ospf]
user@R1# set rib-group ?
Possible completions:
<rib-group>
Routing table group for importing OSPF routes
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-39
35. User-Defined Routing Instances
Routing Between Instances▪ You can use a logical tunnel interface or a physical
interface to route between instances
•Logical tunnels are not supported on all Junos devices;
might require a services interface card
Device Running the Junos OS
Routing Instance (master)
Routing Instance (cust-A)
inet.0
inet6.0
ge-0/0/0.0
lt-0/0/0.0
lo0.0
Default Route
OSPF
cust-A.inet.0
cust-A.inet6.0
ge-1/0/0.0
lt-0/0/0.1
lo0.1
Default Route
OSPF
Logical Connection
Physical Connection
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-41
36. Configuration Example
Summary▪ In this chapter, we:
•Described typical uses of static, aggregate, and generated
routes
•Configured and monitored static, aggregate, and generated
routes
•Explained the purpose of Martian routes and added new
entries to the list of Martian addresses
•Described typical uses of routing instances
•Configured and shared routes between routing instances
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-43
37. Working with Routing Instances
Review Questions1. Which configuration option allows unique
preference values for static routes to the same
destination?
2. What is the default next hop for aggregate and
generated routes?
3. What is the purpose of the Martian address list?
4. List some common uses of routing instances.
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-44
38. RIB Groups
Lab 1: Protocol-Independent Routing▪ Configure and monitor protocol-independent routing
options.
© 2012 Juniper Networks, Inc. All rights reserved.
Worldwide Education Services
www.juniper.net | 2-45