Professional Documents
Culture Documents
Itaa-Junos Ospf
Itaa-Junos Ospf
2010-4-20
OSPF
1.1 OSPF
1. Loopback IDRID
2. Loopback OSPF
3. Loopback LSA3 0.0.0.1
4. T1 R3 0.0.0.0
OSPF
area 0.0.0.0 {
interface fxp1.34;
interface fxp1.35;
}
}
}
R4 JUNOS
protocols {
ospf {
area 0.0.0.0 {
interface fxp2.34;
interface fxp1.45;
}
}
}
R5 JUNOS
protocols {
ospf {
area 0.0.0.0 {
interface fxp2.35;
interface fxp2.45;
}
area 0.0.0.1 {
interface fxp1.56;
interface fxp1.57;
}
}
}
R6 JUNOS
protocols {
ospf {
area 0.0.0.1 {
interface fxp2.56;
interface fxp2.67;
}
}
}
R7 JUNOS
protocols {
ospf {
area 0.0.0.1 {
interface fxp1.67;
interface fxp2.57;
}
}
}
OSPF
[edit logical-routers]
nigel@www.itaalab.com# run show ospf interface
logical-router r5
Interface
fxp2.35
fxp2.45
fxp1.56
fxp1.57
State
DR
DR
BDR
BDR
Area
0.0.0.0
0.0.0.0
0.0.0.1
0.0.0.1
DR ID
10.0.3.5
10.0.3.5
10.0.9.6
10.0.9.7
BDR ID Nbrs
10.0.3.3 1
10.0.3.4 1
10.0.3.5 1
10.0.3.5 1
R5 4 OSPF 0.0.0.0
0.0.0.1 R5
[edit logical-routers]
nigel@www.itaalab.com# run show ospf neighbor
logical-router r5
Address
10.0.2.2
10.0.2.10
10.0.8.5
10.0.8.10
Interface
fxp2.35
fxp2.45
fxp1.56
fxp1.57
State
Full
Full
Full
Full
ID
10.0.3.3
10.0.3.4
10.0.9.6
10.0.9.7
Pri
128
128
128
128
Dead
37
35
35
38
OSPF IDRID
[edit]
nigel@www.itaalab.com# run show route protocol ospf
logical-router r5 | match /32
10.0.3.3/32
*[OSPF/10] 04:23:47, metric 10 ( em 1em fxp )
10.0.3.4/32
*[OSPF/10] 04:23:47, metric 10
10.0.9.6/32
*[OSPF/10] 04:23:41, metric 10
10.0.9.7/32
*[OSPF/10] 04:23:42, metric 10
5
224.0.0.5/32
R5
OSPF R5 4 OSPF R5
[edit]
nigel@www.itaalab.com# run ping 10.0.3.3 logical-router
r5 source 10.0.3.5 rapid
PING 10.0.3.3 (10.0.3.3): 56 data bytes
!!!!!
--- 10.0.3.3 ping statistics --5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.400/0.448/0.477/0.027 ms
R5 IP PING R3 R3
OSPF R5 JUNOS
OSPF RID JUNOS RPD
OSPF ID.
RID JUNOS OSPF RID.
JUNOS RID IP OSPF
OSPF
OSPF OSPF
[edit]
nigel@www.itaalab.com# run show ospf database logical-router
r5 router lsa-id 10.0.3.3 detail
OSPF link state database, area 0.0.0.0
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Router 10.0.3.3
10.0.3.3 0x8000000f 1868 0x2 0xd6cd 60
bits 0x0, link count 3
id 10.0.2.6, data 10.0.2.5, Type Transit (2)
TOS count 0, TOS 0 metric 10
id 10.0.2.1, data 10.0.2.2, Type Transit (2)
TOS count 0, TOS 0 metric 10
id 10.0.3.3, data 255.255.255.255, Type Stub (3)
TOS count 0, TOS 0 metric 0
OSPF RID
R3 OSPF ID JUNOS
IP R3
OSPF
[edit logical-routers r3]
nigel@www.itaalab.com# set routing-options router-id 10.0.2.5
[edit logical-routers r3]
nigel@www.itaalab.com# commit
commit complete
nigel@www.itaalab.com# run restart routing logical-router r3
r3 started, pid 3223
nigel@www.itaalab.com# run show ospf neighbor logical-router r5
Address
Interface
State
ID
Pri Dead
10.0.2.2 fxp2.35
Full
10.0.2.5
128 33
10.0.2.10 fxp2.45
Full
10.0.3.4
128 33
10.0.8.5 fxp1.56
Full
10.0.9.6
128 34
10.0.8.10 fxp1.57
Full
10.0.9.7
128 35
OSPF ID R3 R5 R3
R3 ID 10.0.3.3 10.0.2.5 R5 OSPF
R3 ID IP 10.0.3.3/32
nigel@www.itaalab.com# run show route logical-router r5
10.0.3.3/32 | count
Count: 0 lines
nigel@www.itaalab.com# run show ospf database logical-router
r5 router lsa-id 10.0.2.5 extensive
OSPF link state database, area 0.0.0.0
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Router 10.0.2.5 10.0.2.5 0x8000000a 351 0x2 0x3e89 48
bits 0x0, link count 2
id 10.0.2.6, data 10.0.2.5, Type Transit (2)
TOS count 0, TOS 0 metric 10
id 10.0.2.1, data 10.0.2.2, Type Transit (2)
TOS count 0, TOS 0 metric 10
Aging timer 00:54:09
Installed 00:05:48 ago, expires in 00:54:09,
sent 00:05:48 ago
OSPF ABR RID IP
7
R3 RID
OSPF OSPF RID
RID IP
RID
RID.
Weblog XHTML W3C RID
IP 0.0.0.13. JNCIx
JUNOS OSPF RID
RID IP ABR IP OSPF LSA-1
3 Loopback
LSA-3 0.0.0.1 JUNOS OSPF RID
[edit logical-routers]
nigel@www.itaalab.com# set r5 routing-options
router-id 10.0.3.5
[edit logical-routers]
nigel@www.itaalab.com# set r5 protocols ospf
area 0.0.0.0 interface lo0.5 passive
[edit logical-routers]
nigel@www.itaalab.com# commit check
configuration check succeeds
[edit logical-routers]
nigel@www.itaalab.com# commit
commit complete
R7 OSPF R5 RID 10.0.3.5/32
LSA-1ROUTER LSA-3SUMMARY 0.0.0.1 3
OSPF / PASSIVE
OSPF HELLO
R5 RID JNCIx
ABR RID IP
nigel@www.itaalab.com# run show ospf database
lsa-id 10.0.3.5 logical-router r7 detail
OSPF link state database, area 0.0.0.1
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Router 10.0.3.5
10.0.3.5 0x80000011 134 0x2 0x3c59 48
bits 0x1, link count 2
id 10.0.8.5, data 10.0.8.6, Type Transit (2)
TOS count 0, TOS 0 metric 10
id 10.0.8.10, data 10.0.8.9, Type Transit (2)
TOS count 0, TOS 0 metric 10
Summary 10.0.3.5 10.0.3.5 0x80000001 134 0x2 0x831 28
mask 255.255.255.255
TOS 0x0, metric 0
ABR R5 JUNOS
protocols {
ospf {
area 0.0.0.0 {
interface fxp2.35;
interface fxp2.45;
9
10
interface lo0.5 {
passive;
}
}
area 0.0.0.1 {
interface fxp1.56;
interface fxp1.57;
}
}
}
routing-options {
router-id 10.0.3.5;
}
JUNOS IGP PASSIVE
T1 R3 0.0.0.0
OSPF JUNOS IGP
IP Hello
/
R3 JUNOS
protocols {
ospf {
area 0.0.0.0 {
interface fxp1.34;
interface fxp1.35;
interface fxp1.30 {
passive;
}
}
}
}
R5 172.16.0.12/30 OSPF
IOS JUNOS OSPF (Preference)
OSPF Preference 10 OSPF Preference 150.
nigel@www.itaalab.com# run show route logical-router r5
protocol ospf 172.16/16
inet.0: 17 destinations, 17 routes (17 active, 0 holddown,
0 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.0.12/30
11
JUNOS OSPF
JNCIx
OSPFISIS
DR/BDR DR/BDR
R3R5R7
[edit logical-routers]
nigel@itaalab# run show ospf neighbor logical-router r3
Address
Interface
State
ID
Pri Dead
10.0.2.6
fxp1.34
Full
10.0.3.4
128 34
10.0.2.1
fxp1.35
Full
10.0.3.5
128 32
nigel@itaalab# run show ospf neighbor logical-router r5
Address
Interface
State
ID
Pri Dead
10.0.2.2
fxp2.35
Full
10.0.3.3
128 36
10.0.2.10 fxp2.45
Full
10.0.3.4
128 36
10.0.8.5
fxp1.56
Full
10.0.9.6
128 39
10.0.8.10 fxp1.57
Full
10.0.9.7
128 36
[edit logical-routers]
nigel@itaalab# run show ospf neighbor logical-router r7
Address
Interface
State
ID
Pri Dead
10.0.8.1
fxp1.67
Full
10.0.9.6
128 35
10.0.8.9
fxp2.57
Full
10.0.3.5
128 35
ID R3 R4R5 R3/R4/R6/R7R7 R6 FULL
OSPF
JUNOS OSPF Hacks 2
11
12
Cksum
0x6769
0x3a61
0x1191
Len
72
60
60
[edit]
nigel@itaalab# run show ospf database logical-router r5
router area 1
OSPF link state database, area 0.0.0.1
Type
ID
Adv Rtr Seq
Age Opt
Router *10.0.3.5 10.0.3.5 0x80000004 192 0x2
Router 10.0.9.6 10.0.9.6 0x80000004 198 0x2
Router 10.0.9.7 10.0.9.7 0x80000004 198 0x2
Cksum
0x564c
0x974
0x6e01
Len
48
60
60
[edit]
nigel@itaalab# run show ospf database logical-router r5
router | match router | count
Count: 6 lines
JUNOS OSPF Hacks 4
OSPF
IP
JUNOS 32
IP
nigel@itaalab# run show route
protocol ospf | match /32
10.0.3.3/32
*[OSPF/10]
10.0.3.4/32
*[OSPF/10]
10.0.9.6/32
*[OSPF/10]
10.0.9.7/32
*[OSPF/10]
224.0.0.5/32
*[OSPF/10]
logical-router r5
00:07:14,
00:07:04,
00:07:09,
00:07:09,
00:08:08,
metric
metric
metric
metric
metric
10
10
10
10
1
12
13
R5 4 OSPF R5
R5 [Direct/0] 224.0.0.5/32 OSPF
JNCIx
1.2 OSPF
13
14
15
interface fxp1.12;
interface fxp1.13;
}
}
}
routing-options {
router-id 10.0.6.1;
}
OSPF (Stub Area)10 - R2
protocols {
ospf {
area 0.0.0.10 {
stub;
interface lo0.2 {
passive;
}
interface fxp2.12;
interface fxp2.24;
}
}
}
routing-options {
router-id 10.0.6.2;
}
OSPF (Stub Area)10 - R3
[edit logical-routers r3 protocols]
nigel@junos# set ospf area 10 interface fxp2.13
[edit logical-routers r3 protocols]
nigel@junos# set ospf area 10 stub
OSPF (Stub Area)10 - R4
[edit logical-routers r4 protocols]
nigel@junos# set ospf area 10 interface fxp1.24
[edit logical-routers r4 protocols]
nigel@junos# set ospf area 10 stub
[][]
15
16
R7
OSPF LSA
[editlogicalrouters]
nigel@www.itaalab.com#setr7routingoptionsstaticroute200.200/24reject
[editlogicalrouters]
nigel@www.itaalab.com#editr7policyoptionspolicystatementstatic
[editlogicalroutersr7policyoptionspolicystatementstatic]
nigel@www.itaalab.com#setterm1fromprotocolstatic
[editlogicalroutersr7policyoptionspolicystatementstatic]
nigel@www.itaalab.com#setterm1fromroutefilter200.200/24exact
[editlogicalroutersr7policyoptionspolicystatementstatic]
nigel@www.itaalab.com#setterm1thenaccept
[editlogicalroutersr7policyoptionspolicystatementstatic]
nigel@www.itaalab.com#setterm2thenreject
policyoptions{
policystatementstatic{
term1{
from{
protocolstatic;
routefilter200.200.0.0/24exact;
}
thenaccept;
}
term2{
thenreject;
}
}
}
OSPF
[editlogicalroutersr7]
nigel@www.itaalab.com#setprotocolsospfexportstatic
17
OSPFASSCOPElinkstatedatabase
TypeIDAdvRtrSeqAgeOptCksumLen
Extern200.200.0.010.0.9.70x8000000220940x220x54a736
[edit]
nigel@www.itaalab.com#runshowospfdatabaselogicalrouterr5asbrsummary
OSPFlinkstatedatabase,Area0.0.0.0
TypeIDAdvRtrSeqAgeOptCksumLen
ASBRSum*10.0.9.710.0.3.50x8000000a8790x220xb94c28
inet.0:22destinations,22routes(22active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
200.200.0.0/24*[OSPF/150]00:00:13,metric0,tag0
>to10.0.4.13viafxp1.13
JUNOS [][]
Reject
R7 200.200/24 Reject
OSPF 200.200/24 OSPF R1
R1 200.200/24 traceroute Reject
traceroute R1 JUNOS !H IOS
U
static{
route200.200.0.0/24reject;
}
nigel@www.itaalab.com#runtraceroute200.200.0.1logicalrouterr1
tracerouteto200.200.0.1(200.200.0.1),30hopsmax,40bytepackets
110.0.4.13(10.0.4.13)0.445ms0.448ms0.358ms
210.0.2.1(10.0.2.1)0.849ms0.657ms0.632ms
310.0.8.10(10.0.8.10)0.974ms0.897ms0.852ms
410.0.8.10(10.0.8.10)1.085ms!H0.921ms!H0.864ms!H
17
18
Discard
Discard OSPF
200.200/24 traceroute
traceroute IOS .
static{
route200.200.0.0/24discard;
}
nigel@www.itaalab.com#runtraceroute200.200.0.1logicalrouterr1
tracerouteto200.200.0.1(200.200.0.1),30hopsmax,40bytepackets
110.0.4.13(10.0.4.13)0.453ms0.474ms0.410ms
210.0.2.1(10.0.2.1)0.737ms0.659ms0.622ms
3***
Receive
JUNOS7.2 Receive ping
IP IP
JUNOS Receive
IP R1 ping 200.200/24 IP
JUNOS 8.5
static{
route200.200.0.0/24receive;
}
nigel@www.itaalab.com#runping200.200.0.1logicalrouterr1rapid
PING200.200.0.1(200.200.0.1):56databytes
!!!!!
200.200.0.1pingstatistics
5packetstransmitted,5packetsreceived,0%packetloss
roundtripmin/avg/max/stddev=0.501/1.001/2.252/0.674ms
nigel@www.itaalab.com#runping200.200.0.254logicalrouterr1rapid
PING200.200.0.254(200.200.0.254):56databytes
!!!!!
200.200.0.254pingstatistics
5packetstransmitted,5packetsreceived,0%packetloss
roundtripmin/avg/max/stddev=1.228/1.669/1.997/0.327ms
Preference MetricTag
Preference JUNOS IOS
JUNOS Preference 5 Preference IOS
Distance MetricTag
OSPF Metric
200.200/24 Preference 10 R7
18
19
nigel@www.itaalab.com#runshowroutelogicalrouterr7200.200/24exact
inet.0:25destinations,25routes(25active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
200.200.0.0/24*[Static/10]00:03:57,metric10,tag30
Receive
nigel@www.itaalab.com#runshowroutelogicalrouterr1200.200/24exact
inet.0:23destinations,23routes(23active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
200.200.0.0/24*[OSPF/150]00:04:02,metric10,tag30
>to10.0.4.13viafxp1.13
noreadvertise
IP
OoB fxp0
fxp0 IGP
noreadvertise
Policy IGP no
readvertise 200.200/24
OSPF R1
static{
route200.200.0.0/24{
receive;
noreadvertise;
}
}
nigel@www.itaalab.com#runshowroutelogicalrouterr1200.200/24|count
Count:0lines
OSPF (TSA)[][]
19
20
21
Address
Interface
10.0.4.6
fxp1.12
10.0.4.13 fxp1.13
State
Full
Full
ID
10.0.6.2
10.0.3.3
Pri Dead
128
38
128
38
22
4 10.0.8.10 (10.0.8.10)
0.621 ms !H
0.617 ms !H
0.662 ms !H
Cksum
0x849d
0x7ea2
0x7da3
Len
28
28
28
R1 OSPF ABR /
OSPF LSA3 10
200.200/24
nigel@www.itaalab.com#runshowospfdatabaselogicalrouterr1netsummary
OSPFlinkstatedatabase,Area0.0.0.10
TypeIDAdvRtrSeqAgeOptCksumLen
Summary0.0.0.010.0.3.30x8000000b310x200x76a428
Summary0.0.0.010.0.3.40x8000000a300x200x72a828
nigel@www.itaalab.com#runtraceroutelogicalrouterr1200.200.0.1
tracerouteto200.200.0.1(200.200.0.1),30hopsmax,40bytepackets
110.0.4.13(10.0.4.13)0.476ms0.364ms0.278ms
210.0.2.1(10.0.2.1)0.438ms0.577ms0.407ms
310.0.8.10(10.0.8.10)0.613ms0.583ms0.601ms
410.0.8.10(10.0.8.10)0.581ms!H0.661ms!H0.548ms!H
OSPFTSA
LSA5 LSA3 OSPF
22
23
TSA
TSA TSA
TSA OSPF TSA BGP
Hidden
OSPF TSA
TSA.
24
:
, 1.2
OSPF LSA-5 OSPF
LSA-5 LSA-5
24
25
1.
2.
3.
JUNOSNSSA LSA3
JUNOSNSSAType7 Type5 MetricMania
OSPFMetric JUNOSNSSA PerPacketLoadbalancing;
26
Count: 0 lines
[edit logical-routers]
nigel@junos7.2# run show ospf database logical-router r1
nssa | count
Count: 0 lines
10 NSSA
nigel@junos7.2# set r1 protocols ospf area 10 nssa
[edit logical-routers]
nigel@junos7.2# set r2 protocols ospf area 10 nssa
[edit logical-routers]
nigel@junos7.2# set r3 protocols ospf area 10 nssa
[edit logical-routers]
nigel@junos7.2# set r4 protocols ospf area 10 nssa
[edit logical-routers]
nigel@junos7.2# commit
10 LSA-7 R1 Metric 10 1
10 LSA-5 LSA-5 LSA-4
nigel@junos7.2# run show ospf database logical-router r3
nssa extensive
OSPF link state database, Area 0.0.0.10
Type ID
Adv Rtr
Seq
Age Opt Cksum Len
NSSA 3.0.0.0 10.0.6.1 0x80000001 125 0x28 0x8477 36
mask 255.0.0.0
Type 1, TOS 0x0, metric 10, fwd addr 10.0.6.1,
tag 0.0.0.0
Aging timer 00:57:55
Installed 00:01:24 ago, expires in 00:57:55
Last changed 00:01:24 ago, Change count: 1
nigel@junos7.2# run show ospf database logical-router r3
area 10 external | count
Count: 0 lines
26
27
NSSA LSA3[][]
JUNOS OSPF NSSA LSA-3 TSA
default-Metric no-summary ABR
R3/R4
area 0.0.0.10 {
nssa {
default-lsa default-metric 10;
no-summaries;
}
R1 OSPF 0.0.0.0/0
28
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Summary 0.0.0.0 10.0.3.3 0x80000001 385 0x20 0x8a9a 28
Summary 0.0.0.0 10.0.3.4 0x80000001 386 0x20 0x849f 28
10 LSA-3JUNOS LSA-3
/TSA/TNSSA LSA-3 LSA-7 R3/R4
default-lsa 1 metric-type 2
nigel@junos7.2# set r3 protocols ospf area 10 nssa
default-lsa metric-type 2 type-7
[edit logical-routers]
nigel@junos7.2# set r4 protocols ospf area 10 nssa
default-lsa metric-type 2 type-7
area 0.0.0.10 {
nssa {
default-lsa {
default-metric 10;
metric-type 2;
type-7;
}
no-summaries;
}
R1 OSPF LSA-3 0.0.0.0 LSA-7
Cksum
0x62b6
0x5cbb
0x7c7b
Len
36
36
36
28
29
29
30
30
31
OSPF R1 LSA-7
LSA R4 ASBR
JUNOS 5.2R1.4
3/8 Harry Reynolds traceroute R5 R4
3/8 R4 R4
NSSA NSSA LSA-7 R4
NSSA R3 LSA LSA-5
ADV Rtr) R4: 10.0.3.4
31
32
0x2 0xb25 28
0x2 0x9d89 28
R6 15
[edit]
nigel@junos7.2# run show route logical-router r6 3/8
inet.0: 23 destinations, 23 routes (23 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.0.0.0/8
r6 traceroute
32
33
[edit]
nigel@junos7.2# run traceroute 3.0.0.1 logical-router r6
traceroute to 3.0.0.1 (3.0.0.1), 30 hops max,
40 byte packets
1 10.0.8.6 (10.0.8.6)
4.263 ms 5.136 ms 0.952 ms
2 10.0.2.2 (10.0.2.2)
1.410 ms 1.756 ms 1.959 ms
3 10.0.4.14 (10.0.4.14)
2.456 ms 1.845 ms 1.601 ms
4 10.0.4.14 (10.0.4.14)
2.962 ms !H 1.839 ms !H 2.360 ms !H
NSSA Metric Mania - JUNOS 8.5R1.14
R1 ASBR JUNOS
JUNOS 8.5 R4
JUNOS 7.2R4.2 LSA-5 R4 Metric R4
R4
R1 R4 2 LSA-7
Metric JUNOS 8.5R1.14 LSA-5 R4
Metric 12 Metric 10 R5 3/8 Metric 10
R3 LSA-4 Metric 1 R5 R3 Metric 1: 10+1+1=12 R6 13
nigel@junos8.5# run show ospf database logical-router r5
lsa-id 3.0.0.0 detail
OSPF AS SCOPE link state database
Type
ID
Adv Rtr
Seq
Age Opt Cksum Len
Extern 3.0.0.0 10.0.3.4 0x80000009 226 0x22 0xed0e 36
mask 255.0.0.0
Type 1, TOS 0x0, metric 10, fwd addr 10.0.6.1,
tag 0.0.0.0
[edit]
nigel@junos8.5# run show route logical-router r5 3/8
inet.0: 23 destinations, 23 routes (23 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.0.0.0/8
[edit]
33
34
NSSA [][]
JUNOS OSPF (Metric/Cost)
NSSA Metric R1 R3
OSPF R5 ABR R3/R4 3/8 IP
OSPF Metric SPF OSPF
ISIS (Asynchronous Routing) OSPF
R5 R1
Metric
Metric
R3 R1 R3 Metric 2
[edit logical-routers]
nigel@junos7.2# set r3 protocols ospf area 10 interface
fxp2.13 metric 2
nigel@junos7.2# run show route logical-router r5 3/8
inet.0: 23 destinations, 23 routes (23 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.0.0.0/8
policy-options {
policy-statement hash {
term 1 {
from {
protocol ospf;
34
35
find r5
Netif
fxp2.35
fxp2.45
36
37
37
38
[][]
1. R6 6.0.0.0/246.0.3.0/24 LSA
0.0.0.1 LSA3
2. 0.0.0.10 0.0.0.1
3. 3/8NSSALSA 0.0.0.10;
[][]
1. JUNOS
2. OSPF LSA3
3. OSPF LSA3
4. OSPFNSSALSA7
OSPF (LSA) LSA
OSPF
RIP
OSPF
LSDB SPF
OSPF
RFC
OSPF
OSPF LSA JUNOS OSPF LSA
OSPF AS LSA
38
39
LSA OSPF
/LSA
R6 6.0.x-3/24 OSPF [][]
R6 IP OSPF 1
fxp1 {
unit 68 {
vlan-id 68;
family inet
address
address
address
address
}
}
}
{
6.0.0.1/24;
6.0.1.1/24;
6.0.2.1/24;
6.0.3.1/24;
40
JUNOS [][]
OSPF LSA LSA
JNCIx OSPF
IP
IOS
JUNOS
1
6.0.0.0/24-6.0.3.0/24 R5/R6/R7
R6/R7 5 R3
OSPF
nigel@junos# run show route protocol ospf logical-router
r3 10.0.8/22
inet.0: 28 destinations, 28 routes (28 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.8.0/30
10.0.8.4/30
10.0.8.8/30
10.0.9.6/32
10.0.9.7/32
3
2
2
2
2
/22 5 /24
nigel@itaalab# run show route protocol ospf logical-router
r3 10.0.8/24
inet.0: 28 destinations, 28 routes (28 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
40
41
10.0.8.0/30
10.0.8.4/30
10.0.8.8/30
/24 R6/R7
/23
nigel@junos# run show route protocol ospf logical-router
r3 10.0.8/23
inet.0: 28 destinations, 28 routes (28 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.8.0/30
10.0.8.4/30
10.0.8.8/30
10.0.9.6/32
10.0.9.7/32
3
2
2
2
2
LSA3[][]
0 OSPF
nigel@junos# run show ospf database logical-router r5
area 0
OSPF link state database, Area 0.0.0.0
Type
ID
Adv Rtr Seq
Age Opt
Router 10.0.3.3 10.0.3.3 0x80000043 16 0x22
Router 10.0.3.4 10.0.3.4 0x8000005b 16 0x22
Router *10.0.3.5 10.0.3.5 0x80000043 15 0x22
Network 10.0.2.2 10.0.3.3 0x8000000a 48 0x22
Network 10.0.2.6 10.0.3.4 0x8000004c 03 0x22
Network 10.0.2.10 10.0.3.4 0x8000000a 10 0x22
Summary *6.0.0.0 10.0.3.5 0x80000008 15 0x22
Summary *6.0.1.0 10.0.3.5 0x80000008 15 0x22
Cksum Len
0xf964 60
0xb27 60
0x1f34 60
0xa84b 32
0xe3c9 32
0x5c8d 32
0xb368 28
0xa872 28
41
42
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
ASBRSum
ASBRSum
ASBRSum
*6.0.2.0
*6.0.3.0
10.0.4.4
10.0.4.4
10.0.4.8
10.0.4.8
10.0.4.12
10.0.4.12
10.0.6.1
10.0.6.1
10.0.6.2
10.0.6.2
*10.0.8.0
*10.0.8.4
*10.0.8.8
*10.0.9.6
*10.0.9.7
10.0.6.1
10.0.6.1
*10.0.9.7
10.0.3.5
10.0.3.5
10.0.3.3
10.0.3.4
10.0.3.3
10.0.3.4
10.0.3.3
10.0.3.4
10.0.3.3
10.0.3.4
10.0.3.3
10.0.3.4
10.0.3.5
10.0.3.5
10.0.3.5
10.0.3.5
10.0.3.5
10.0.3.3
10.0.3.4
10.0.3.5
0x80000008
0x80000008
0x8000003d
0x80000054
0x8000003d
0x80000054
0x8000003e
0x80000054
0x8000003c
0x80000053
0x8000003b
0x80000053
0x8000003d
0x80000001
0x80000001
0x80000001
0x80000001
0x8000003b
0x80000053
0x8000003c
15
15
16
16
16
16
16
16
16
16
16
16
15
15
15
15
15
16
16
15
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x9d7c
0x9286
0xc41a
0x8641
0xa633
0x5470
0x686e
0x407e
0xd608
0xa224
0xd805
0x8e38
0xaa33
0xf026
0xc84a
0xe32d
0xd936
0xca14
0x9431
0x557e
28
28
28
28
28
28
28
28
28
28
28
28
28
28
28
28
28
28
28
28
43
44
OSPF LSA-3[][]
LSA OSPF LSDB
NSSA
LSA-3 [edit protocols ospf area] area-range
restrict 6.0.0/24-6.0.3/24 4
2
2
2
2
[edit logical-routers]
nigel@junos# set r5 protocols ospf area 1 area-range
6/22 restrict
[edit logical-routers]
nigel@junos# show r5 protocols ospf area 1
area-range 10.0.8.0/23;
area-range 6.0.0.0/22 restrict;
interface fxp1.56;
interface fxp1.57;
R3 6/22
nigel@junos# run show route logical-router r3 6/22
[edit logical-routers]
nigel@junos#
R5 1 6/22 R5
10.0.8/23 6/22 1 R5
44
45
10.0.8.0/23
10.0.8.0/30
Discard JUNOS
OSPF JUNOS
45
46
Metric Discard
R5 0 POP
Point of Presence
R3/R4
0 10.0.8/23
R3/R4 R3/R4 BGP
R5 OSPF 6/22 LSA
10.0.8/23 6/22 /
R5
LSA-3. R3/R4 R5
10.0.8/23 6/22 Discard R5
47
Opt
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
0x22
Cksum Len
0xd576 60
0xec36 60
0xf449 60
0x9057 32
0xd1d2 32
0x4a96 32
0x5eb5 28
0x52c3 28
0x9b32 28
0xaa24 28
0x783f 28
0x378d 28
1.5 OSPF
47
48
[][]
1. R7 R5 ping 10
2. R3 R5 MD5 :junos,keyid:10
3.
[][]
1. JUNOSOSPF
2. JUNOS OSPF
3. JUNOSOSPF
OSPF
R4 R5
R5 OSPF
0.0.0.3 R3 R5 0.0.0.3 R4
R5 R3 R5 R5
OSPF
R3/R4/R5[][]
R3/R5 0 3
OSPF runclearospfdatabaselogicalrouter
[editlogicalrouters]
nigel@itaalab#deleter3protocolsospfarea0interfacefxp1.35
48
49
[editlogicalrouters]
nigel@itaalab#setr3protocolsospfarea3interfacefxp1.35
nigel@itaalab#deleter5protocolsospfarea0interfacefxp2.35
[editlogicalrouters]
nigel@itaalab#setr5protocolsospfarea3interfacefxp2.35
R4/R5 OSPF 0 OSPF deactivate
disable
[editlogicalrouters]
nigel@itaalab#setr4protocolsospfarea0interfacefxp1.45disable
[editlogicalrouters]
nigel@itaalab#deactivater5protocolsospfarea0interfacefxp2.45
OSPFlinkstatedatabase,area0.0.0.3
TypeIDAdvRtrSeqAgeOptCksumLen
Summary10.0.3.510.0.3.50x80000021490x20xc75128
mask255.255.255.255
TOS0x0,metric0
Agingtimer00:59:11
Installed00:00:45ago,expiresin00:59:11,sent1d04:45:39ago
Summary10.0.8.010.0.3.50x800000365150x20xa75b28
mask255.255.254.0
TOS0x0,metric2
Agingtimer00:51:25
Installed00:08:31ago,expiresin00:51:25,sent1d04:45:39ago
nigel@itaalab#runshowroutelogicalrouterr310.0.8.0/23
[edit]
nigel@itaalab#runshowroutelogicalrouterr310.0.3.5
1.JUNOSOSPF [][]
3 OSPF R3/R5 ABR
49
50
[editlogicalroutersr3protocolsospfarea0.0.0.0]
OSPF
R3 R5 MD5
[editlogicalrouters]
nigel@itaalab#showr3protocolsospfarea0
virtuallinkneighborid10.0.3.5transitarea0.0.0.3{
authentication{
md510key"$9$l37v87wYojHmYgQn";##SECRETDATA
}
}
[editlogicalrouters]
nigel@itaalab#showr5protocolsospfarea0
virtuallinkneighborid10.0.3.3transitarea0.0.0.3{
authentication{
md510key"$9$aFGjqTz6uORz3yK";##SECRETDATA
}
}
OSPF OSPF R5
vl10.0.3.3R5 R3
R3 R5 DR/BDR
nigel@itaalab#runshowospfinterfacelogicalrouterr5
InterfaceStateAreaDRIDBDRIDNbrs
lo0.5DRother0.0.0.00.0.0.00.0.0.00
50
51
nigel@itaalab#runshowospfneighborlogicalrouterr5
AddressInterfaceStateIDPriDead
10.0.2.2vl10.0.3.3Full10.0.3.3036
10.0.8.5fxp1.56Full10.0.9.612838
10.0.8.10fxp1.57Full10.0.9.712833
10.0.2.2fxp2.35Full10.0.3.312832
R3 OSPF 3 R5 LSA3
nigel@itaalab#runshowospfdatabaselogicalrouterr3netsummaryadvertising
router10.0.3.5detail
OSPFlinkstatedatabase,area0.0.0.0
TypeIDAdvRtrSeqAgeOptCksumLen
Summary10.0.2.010.0.3.50x8000006b8000x20x686e28
mask255.255.255.252
TOS0x0,metric1
Summary10.0.8.010.0.3.50x800003de3540x20x4d0a28
mask255.255.254.0
TOS0x0,metric2
OSPFlinkstatedatabase,area0.0.0.3
TypeIDAdvRtrSeqAgeOptCksumLen
Summary10.0.3.510.0.3.50x800000265700x20xbd5628
mask255.255.255.255
TOS0x0,metric0
Summary10.0.8.010.0.3.50x8000003e2070x20x976328
mask255.255.254.0
TOS0x0,metric2
nigel@itaalab#runshowroutelogicalrouterr310.0.3.5
inet.0:20destinations,20routes(20active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.3.5/32*[OSPF/10]00:21:49,metric1
>to10.0.2.1viafxp1.35
nigel@itaalab#runshowroutelogicalrouterr310.0.8.0
51
52
inet.0:20destinations,20routes(20active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.8.0/23*[OSPF/10]00:21:56,metric3
>to10.0.2.1viafxp1.35
1 10 R5 1
ping 10
nigel@itaalab#runtraceroute10.0.6.1logicalrouterr6
tracerouteto10.0.6.1(10.0.6.1),30hopsmax,40bytepackets
110.0.8.6(10.0.8.6)1.906ms1.297ms1.009ms
210.0.2.2(10.0.2.2)1.272ms1.482ms1.227ms
310.0.6.1(10.0.6.1)1.640ms1.569ms1.604ms
[editlogicalrouters]
nigel@itaalab#runtraceroute10.0.6.1logicalrouterr7
tracerouteto10.0.6.1(10.0.6.1),30hopsmax,40bytepackets
110.0.8.9(10.0.8.9)1.334ms1.357ms1.017ms
210.0.2.2(10.0.2.2)1.259ms1.289ms1.105ms
310.0.6.1(10.0.6.1)1.300ms1.600ms1.476ms
2.JUNOS OSPF [][]
MD5
JUNOS monitor
traffic UNIX tcpdump
R5 juniper
[editlogicalroutersr5protocolsospf]
nigel@itaalab#showarea0
virtuallinkneighborid10.0.3.3transitarea0.0.0.3{
authentication{
simplepassword"$9$NYVs4UjqQF/aZF/CtIRVw";##SECRETDATA
}
}
monitor traffic
MD5 KeyID.
nigel@itaalab#runmonitortrafficinterfacefxp1extensive
Listeningonfxp1,capturesize96bytes
06:47:16.290110In0:aa:0:0:1:740:aa:0:0:1:63810082:VID[0:135](tos0xc0,
ttl255,id44498,
52
53
offset0,flags[none],proto:OSPF(89),length:64)10.0.2.1>10.0.2.2:OSPFv2,
Hello(1),length:44
RouterID:10.0.3.5,BackboneArea,AuthenticationType:unknown
(1)juniper^@"
Options:[External]
HelloTimer:10s,DeadTimer40s,Mask:0.0.0.0,Priority:0
06:47:20.636209Out0:aa:0:0:1:630:aa:0:0:1:74810098:VID[0:135](tos0xc0,
ttl255,id44509,
offset0,flags[none],proto:OSPF(89),length:80)10.0.2.2>10.0.2.1:OSPFv2,
Hello(1),length:44
RouterID:10.0.3.3,BackboneArea,AuthenticationType:MD5(2)
KeyID:10,AuthLength:16,CryptoSequenceNumber:0x0001b8b7
Options:[External]
HelloTimer:10s,DeadTimer40s,Mask:0.0.0.0,Priority:0[|ospf]
monitor traffic
OSPF
JUNOS IOS debug ip ospf
traceoptions, OSPF
traceoptions
Jul2607:42:36OSPFpacketignored:authenticationtypemismatch(1)from10.0.2.1
Jul2607:42:36OSPFsentHello10.0.2.2>10.0.2.1(vl10.0.3.5,IFL0x0)
Jul2607:42:36Version2,length44,ID10.0.3.3,area0.0.0.0
Jul2607:42:36checksum0x0,authtype0
Jul2607:42:36mask0.0.0.0,hello_ivl10,opts0x2,prio0
Jul2607:42:36dead_ivl40,DR0.0.0.0,BDR0.0.0.0
R5
3. JUNOSOSPF [][]
R4 R5 R3 R4
R3 R5 R4/R3/R5
53
54
OSPF Hello
R3/R4/R5
OSPF
50% R3/R5
[editlogicalrouters]
nigel@itaalab#setr4protocolsospfarea0interfacefxp2.34hellointerval5
deadinterval20
[editlogicalrouters]
nigel@itaalab#setr4protocolsospfarea0interfacefxp1.45hellointerval5
deadinterval20
[editlogicalrouters]
nigel@itaalab#setr3protocolsospfarea0interfacefxp1.34hellointerval5
deadinterval20
[editlogicalrouters]
nigel@itaalab#setr5protocolsospfarea0interfacefxp2.45hellointerval5
deadinterval20
[editlogicalroutersr3protocolsospfarea0.0.0.0]
nigel@itaalab#setvirtuallinkneighborid10.0.3.5transitarea3 hello
interval5deadinterval20
[editlogicalroutersr5protocolsospfarea0.0.0.0]
nigel@itaalab#setvirtuallinkneighborid10.0.3.3transitarea3 hello
interval5deadinterval20
OSPF deadinterval Hellointerval 4
R3 OSPF 0.0.0.0
5/20sec R3 R5 0.0.0.0
3 10/40sec
nigel@itaalab#runshowospfinterfacelogicalrouterr3detail
InterfaceStateAreaDRIDBDRIDNbrs
fxp1.34BDR0.0.0.010.0.3.410.0.3.31
Type:LAN,Address:10.0.2.5,Mask:255.255.255.252,MTU:1496,Cost:1
DRaddr:10.0.2.6,BDRaddr:10.0.2.5,Adjcount:1,Priority:128
Hello:5,Dead:20,ReXmit:5,NotStub
Authtype:None
lo0.3DRother0.0.0.00.0.0.00.0.0.00
Type:LAN,Address:10.0.3.3,Mask:255.255.255.255,MTU:65535,Cost:0
Adjcount:0,Priority:128,,Passive
Hello:10,Dead:40,ReXmit:5,NotStub
54
55
Authtype:None
vl10.0.3.5PtToPt0.0.0.00.0.0.00.0.0.01
Type:Virtual,Address:10.0.2.2,Mask:0.0.0.0,MTU:0,Cost:1
Adjcount:1
Hello:5,Dead:20,ReXmit:5,NotStub
Authtype:MD5,ActivekeyID:10,Starttime:1970Jan107:00:00LONT
fxp1.35BDR0.0.0.310.0.3.510.0.3.31
Type:LAN,Address:10.0.2.2,Mask:255.255.255.252,MTU:1496,Cost:1
DRaddr:10.0.2.1,BDRaddr:10.0.2.2,Adjcount:1,Priority:128
Hello:10,Dead:40,ReXmit:5,NotStub
Authtype:None
fxp2.13BDR0.0.0.1010.0.6.110.0.3.31
Type:LAN,Address:10.0.4.13,Mask:255.255.255.252,MTU:1496,Cost:2
DRaddr:10.0.4.14,BDRaddr:10.0.4.13,Adjcount:1,Priority:128
Hello:10,Dead:40,ReXmit:5,StubNSSA
Authtype:None
Hello OSPF OSPFHello
1 4
JUNOS 6.1
BFDBidirectionalForwarding Detection)BFD
Hello BFD IGPHello
[editlogicalrouters]
55
56
nigel@itaalab#showr4protocolsospfarea0
interfacefxp2.34{
hellointerval5;
deadinterval20;
bfdlivenessdetection{
minimuminterval500;
}
}
interfacefxp1.45{
hellointerval5;
deadinterval20;
bfdlivenessdetection{
minimuminterval500;
}
}
[editlogicalrouters]
nigel@itaalab#showr5protocolsospfarea0
virtuallinkneighborid10.0.3.3transitarea0.0.0.3{
hellointerval5;
deadinterval20;
authentication{
md510key"$9$ck.rK8VYZUHVwPQ";##SECRETDATA
}
}
interfacefxp2.45{
hellointerval5;
deadinterval20;
bfdlivenessdetection{
minimuminterval500;
}
}
57
RemotestateUp,version1
Logicalrouter1,routingtableindex5
Transmit
AddressStateInterfaceDetectTimeIntervalMultiplier
10.0.2.5Upfxp2.341.5000.5003
ClientOSPF,TXinterval0.500,RXinterval0.500
Sessionuptime00:13:15
LocaldiagnosticNone,remotediagnosticNone
RemotestateUp,version1
Logicalrouter1,routingtableindex5
2sessions,2clients
Cumulativetransmitrate4.0pps,cumulativereceiverate4.0pps
1.6 OSPF
[][]
57
58
59
}
}
}
lo0{
unit8{
familyinet{
address192.168.0.1/32;
address192.168.1.1/32;
address192.168.2.1/32;
address192.168.3.1/32;
}
}
}
}
routingoptions{
static{
route192.168.0.0/24receive;
route192.168.1.0/24receive;
route192.168.2.0/24receive;
route192.168.3.0/24receive;
}
RIP [][]
JUNOS RIP RIP
JUNOS RIP RIP
RIP
RIP /
RIP Metric Preference
R6/R7/RIP RIP
[editlogicalrouters]
nigel@itaa7.2#setr6protocolsripgroupripneighborfxp2.80
[editlogicalrouters]
nigel@itaa7.2#setr7protocolsripgroupripneighborfxp3.80
[editlogicalrouters]
nigel@itaa7.2#setripprotocolsripgroupripneighborfxp1.80
[editlogicalrouters]
nigel@itaa7.2#showr6protocolsrip
grouprip{
neighborfxp2.80;
}
59
60
RIP RIP Up
[editlogicalrouters]
nigel@itaa7.2#runshowripneighborlogicalrouterrip
SourceDestinationSendReceiveIn
NeighborStateAddressAddressModeModeMet
fxp1.80Up172.16.40.1224.0.0.9mcastboth1
[editlogicalrouters]
nigel@itaa7.2#runshowripneighborlogicalrouterr6
SourceDestinationSendReceiveIn
NeighborStateAddressAddressModeModeMet
fxp2.80Up172.16.40.2224.0.0.9mcastboth1
[editlogicalrouters]
nigel@itaa7.2#runshowripneighborlogicalrouterr7
SourceDestinationSendReceiveIn
NeighborStateAddressAddressModeModeMet
fxp3.80Up172.16.40.3224.0.0.9mcastboth1
RIP [][]
RIP RIP
RIP RIP
RIP
R7 R6
[editlogicalrouters]
nigel@itaa7.2#showrippolicyoptions
policystatementrip{
term1{
fromprotocol[ripstatic];
thenaccept;
}
}
rip
[editlogicalrouters]
nigel@itaa7.2#setripprotocolsripgroupripexportrip
60
61
R6 RIP 192.168.03/24
nigel@itaa7.2#runshowrouteprotocolriplogicalrouterr6
inet.0:31destinations,31routes(31active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/24*[RIP/100]12:05:21,metric2,tag0
>to172.16.40.1viafxp2.80
192.168.1.0/24*[RIP/100]12:05:21,metric2,tag0
>to172.16.40.1viafxp2.80
192.168.2.0/24*[RIP/100]12:05:21,metric2,tag0
>to172.16.40.1viafxp2.80
192.168.3.0/24*[RIP/100]12:05:21,metric2,tag0
>to172.16.40.1viafxp2.80
224.0.0.9/32*[RIP/100]12:05:49,metric1
MultiRecv
JUNOS RIP
RIP runshowrouteadvertising
protocolrip RIP
group IP 4
192.168.03/24 RIP
nigel@itaa7.2#runshowrouteadvertisingprotocolrip172.16.40.1logicalrouter
rip
inet.0:11destinations,11routes(11active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/24*[Static/5]1d20:52:03
Receive
192.168.1.0/24*[Static/5]1d20:52:03
Receive
192.168.2.0/24*[Static/5]1d20:52:03
Receive
192.168.3.0/24*[Static/5]1d20:52:03
Receive
runshowroutereceiveprotocolrip R6 RIP
4 IP
4 192.168.03/24 RIP R6
nigel@itaa7.2#runshowroutereceiveprotocolrip172.16.40.1logicalrouterr6
inet.0:31destinations,31routes(31active,0holddown,0hidden)
61
62
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/24*[RIP/100]14:06:22,metric2,tag0
>to172.16.40.1viafxp2.80
192.168.1.0/24*[RIP/100]14:06:22,metric2,tag0
>to172.16.40.1viafxp2.80
192.168.2.0/24*[RIP/100]14:06:22,metric2,tag0
>to172.16.40.1viafxp2.80
192.168.3.0/24*[RIP/100]14:06:22,metric2,tag0
>to172.16.40.1viafxp2.80
2.JUNOSOSPF RIP [][]
RIPOSPF[][]
R6/R7 RIP OSPF RIP
RIP 10.0.5/24 R6
R7 R6/R7 OSPF RIP
[editlogicalroutersr6policyoptionspolicystatementripospf]
nigel@itaa7.2#setterm1fromprotocolrip
[editlogicalroutersr6policyoptionspolicystatementripospf]
nigel@itaa7.2#setterm1fromroutefilter192.168.0/22orlonger
[editlogicalroutersr6policyoptionspolicystatementripospf]
nigel@itaa7.2#setterm1thenaccept
[editlogicalroutersr6policyoptionspolicystatementripospf]
nigel@itaa7.2#up2
[editlogicalroutersr6]
nigel@itaa7.2#showpolicyoptions
policystatementripospf{
term1{
from{
protocolrip;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
}
62
63
[editlogicalroutersr6]
nigel@itaa7.2#up
[editlogicalrouters]
nigel@itaa7.2#editr7policyoptions
[editlogicalroutersr7policyoptions]
nigel@itaa7.2#loadmergeterminalrelative
[Type^Datanewlinetoendinput]
policystatementripospf{
term1{
from{
protocolrip;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
}
}
loadcomplete
ripospf OSPF RIP
OSPF
JUNOS / RIB IOS
Active
RIP OSPF RIB Active
RIB OSPF
[editlogicalrouters]
nigel@itaa7.2#setr6protocolsospfexportripospf
[editlogicalrouters]
nigel@itaa7.2#setr7protocolsospfexportripospf
R5 192.168/22 OSPF
R5 R6 R7
nigel@itaa7.2#runshowroutelogicalrouterr5192.168/22
inet.0:28destinations,28routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/24*[OSPF/150]00:06:03,metric2,tag0
63
64
>to10.0.8.5viafxp1.56
192.168.1.0/24*[OSPF/150]00:06:03,metric2,tag0
>to10.0.8.5viafxp1.56
192.168.2.0/24*[OSPF/150]00:06:03,metric2,tag0
>to10.0.8.5viafxp1.56
192.168.3.0/24*[OSPF/150]00:06:03,metric2,tag0
>to10.0.8.5viafxp1.56
R7 OSPF R6 LSA5 R7
nigel@itaa7.2#runshowospfdatabaselogicalrouterr7extern
OSPFASSCOPElinkstatedatabase
TypeIDAdvRtrSeqAgeOptCksumLen
Extern192.168.0.010.0.9.60x800000026160x20x85c736
Extern192.168.1.010.0.9.60x800000023150x20x7ad136
Extern192.168.2.010.0.9.60x80000002250x20x6fdb36
Extern192.168.3.010.0.9.60x8000000111650x20x66e436
Extern*200.200.0.010.0.9.70x800000a36170x20x3e4636
192.168/22 R7 Active R7 RIP
OSPF 150 Preference100 R7 Active
OSPF
nigel@itaa7.2#runshowroutelogicalrouterr7192.168/16
inet.0:27destinations,31routes(27active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/24*[RIP/100]22:10:09,metric2,tag0
>to172.16.40.1viafxp3.80
[OSPF/150]01:01:19,metric2,tag0
>to10.0.8.1viafxp1.67
192.168.1.0/24*[RIP/100]22:10:09,metric2,tag0
>to172.16.40.1viafxp3.80
[OSPF/150]01:01:19,metric2,tag0
>to10.0.8.1viafxp1.67
192.168.2.0/24*[RIP/100]22:10:09,metric2,tag0
>to172.16.40.1viafxp3.80
[OSPF/150]01:01:19,metric2,tag0
>to10.0.8.1viafxp1.67
192.168.3.0/24*[RIP/100]22:10:09,metric2,tag0
>to172.16.40.1viafxp3.80
[OSPF/150]01:01:19,metric2,tag0
>to10.0.8.1viafxp1.67
64
65
nigel@itaa7.2#showr7policyoptionspolicystatementstatic
term1{
from{
protocolstatic;
routefilter200.200.0.0/24exact;
}
thenaccept;
}
term2{
thenreject;
}
term2 reject
OSPF term
1 term2 ripospf
nigel@itaa7.2#showr7policyoptionspolicystatementstaticterm2
thennextpolicy;
R5 R7
nigel@itaa7.2#runshowospfdatabaselogicalrouterr7extern
OSPFASSCOPElinkstatedatabase
TypeIDAdvRtrSeqAgeOptCksumLen
Extern192.168.0.010.0.9.60x8000000817000x20x79cd36
Extern*192.168.0.010.0.9.70x800000057930x20x79cf36
Extern192.168.1.010.0.9.60x8000000813890x20x6ed736
Extern*192.168.1.010.0.9.70x800000054890x20x6ed936
Extern192.168.2.010.0.9.60x8000000810820x20x63e136
Extern*192.168.2.010.0.9.70x800000051980x20x63e336
Extern192.168.3.010.0.9.60x800000087990x20x58eb36
Extern*192.168.3.010.0.9.70x8000000425850x20x5aec36
Extern*200.200.0.010.0.9.70x800000a916990x20x324c36
nigel@itaa7.2#runshowroutelogicalrouterr5192.168/22
inet.0:29destinations,29routes(29active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/24*[OSPF/150]02:59:19,metric2,tag0
to10.0.8.5viafxp1.56
65
66
>to10.0.8.10viafxp1.57
192.168.1.0/24*[OSPF/150]02:59:19,metric2,tag0
to10.0.8.5viafxp1.56
>to10.0.8.10viafxp1.57
192.168.2.0/24*[OSPF/150]02:59:19,metric2,tag0
to10.0.8.5viafxp1.56
>to10.0.8.10viafxp1.57
192.168.3.0/24*[OSPF/150]02:59:19,metric2,tag0
to10.0.8.5viafxp1.56
>to10.0.8.10viafxp1.57
OSPFRIP[][]
RIP OSPF OSPF RIP
10.0.5/24 OSPF R1/R2
OSPF
Metric 2
policystatementdirect{
term1{
from{
protocoldirect;
routefilter10.0.5.0/24exact;
}
then{
metric50;
tag420;
accept;
}
}
}
[editlogicalrouters]
nigel@itaa7.2#setr1protocolsospfexportdirect
[editlogicalrouters]
nigel@itaa7.2#setr2protocolsospfexportdirect
R7 10.0.5/24 Metric
420
nigel@itaa7.2#runshowroutelogicalrouterr710.0.5/24
inet.0:28destinations,32routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[OSPF/150]00:46:25,metric50,tag420
66
67
>to10.0.8.9viafxp2.57
[edit]
nigel@itaa7.2#runtraceroute10.0.5.1logicalrouterr7
tracerouteto10.0.5.1(10.0.5.1),30hopsmax,40bytepackets
110.0.8.9(10.0.8.9)0.000ms104.845ms0.001ms
210.0.2.2(10.0.2.2)0.001ms17.034ms0.001ms
310.0.4.2(10.0.4.2)101.942ms11.221ms0.001ms
410.0.5.1(10.0.5.1)9.746ms72.241ms0.002ms
R7 ospfrip rip
[editlogicalrouters]
nigel@itaa7.2#showr7policyoptions
policystatementospfrip{
term1{
from{
protocolospf;
routefilter10.0.5.0/24exact;
}
thenaccept;
}
}
[editlogicalrouters]
nigel@itaa7.2#setr7protocolsripgroupripexportospfrip
inet.0:28destinations,32routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[OSPF/150]00:02:33,metric50,tag420
>to10.0.8.9viafxp2.57
nigel@itaa7.2#runshowroutelogicalrouterrip10/8
inet.0:12destinations,12routes(12active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[RIP/100]00:25:15,metric2,tag420
>to172.16.40.3viafxp1.80
67
68
[editlogicalrouters]
nigel@itaa7.2#setr7protocolsospfarea1interfacefxp3.80passive
nigel@itaa7.2#runtraceroute10.0.5.1logicalrouterrip
tracerouteto10.0.5.1(10.0.5.1),30hopsmax,40bytepackets
1172.16.40.3(172.16.40.3)44.395ms0.001ms0.000ms
210.0.8.9(10.0.8.9)162.080ms0.001ms0.000ms
310.0.2.2(10.0.2.2)0.001ms0.001ms0.001ms
410.0.4.2(10.0.4.2)0.001ms0.002ms0.002ms
510.0.5.1(10.0.5.1)0.002ms189.979ms147.255ms
3. [][]
ospfrip R6 rip
R7
[editlogicalrouters]
nigel@itaa7.2#showr6policyoptions
policystatementospfrip{
term1{
from{
protocolospf;
routefilter10.0.5.0/24exact;
}
thenaccept;
}
}
[editlogicalrouters]
nigel@itaa7.2#setr6protocolsripgroupripexportospfrip
68
69
RIP R7 traceroute10.0.5/24
R6 10.0.5/24
R6 OSPF RIP R7 R7
OSPF
nigel@itaa7.2#runtraceroute10.0.5.1logicalrouterr6
tracerouteto10.0.5.1(10.0.5.1),30hopsmax,40bytepackets
1172.16.40.3(172.16.40.3)6.253ms6.969ms6.814ms
210.0.8.9(10.0.8.9)6.694ms6.835ms8.679ms
310.0.2.2(10.0.2.2)8.740ms11.222ms13.234ms
410.0.4.2(10.0.4.2)9.833ms10.167ms10.124ms
510.0.5.1(10.0.5.1)8.878ms10.266ms9.793ms
nigel@itaa7.2#runshowroutelogicalrouterr610.0.5/24
inet.0:32destinations,37routes(32active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
69
70
10.0.5.0/24*[RIP/100]03:49:52,metric2,tag420
>to172.16.40.3viafxp2.80
[OSPF/150]00:09:40,metric50,tag420
>to10.0.8.6viafxp2.56
10.0.5/24
2 OSPF R4 LSA7 LSA5
0.0.0.0 R6/R7 OSPF
Preference 150 R6/R7 10.0.5/24
Preference=150Metric=50 R7 OSPF RIP
RIP RIP RIP
10.0.5/24 192.168.03/24 RIP
Preference=100Metric=2 R6/R7/RIP
R7 RIP 10.0.5/24 R6 RIP
R6 OSPF RIP 10.0.5/24
Preference RIP
[][]
R6/R7 RIP OSPF R6
10.0.5/24 OSPF RIP R6
R6 ripospf
[editlogicalrouters]
nigel@itaa7.2#showr6policyoptionspolicystatementripospf
term1{
from{
protocolrip;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
}
[editlogicalroutersr6policyoptionspolicystatementripospf]
nigel@itaa7.2#deleteterm1fromroutefilter192.168.0/22orlonger
nigel@itaa7.2#runtraceroute10.0.5.1logicalrouterrip
tracerouteto10.0.5.1(10.0.5.1),30hopsmax,40bytepackets
1172.16.40.3(172.16.40.3)8.427ms6.309ms2.601ms
210.0.8.1(10.0.8.1)2.595ms2.335ms2.333ms
3172.16.40.3(172.16.40.3)2.546ms2.901ms2.264ms
70
71
29172.16.40.3(172.16.40.3)2.515ms2.464ms2.199ms
3010.0.8.1(10.0.8.1)2.566ms2.286ms2.384ms
R6/R7 R6 RIP R7 R7 OSPF
R6
R6 10.0.5/24 OSPF Metric RIP
Metric2 R7 OSPF Metric
R6
nigel@itaa7.2#runshowroutelogicalrouterr710.0.5/24
inet.0:28destinations,32routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[OSPF/150]00:00:59,metric2,tag420
>to10.0.8.1viafxp1.67
[edit]
nigel@itaa7.2#runshowroutelogicalrouterr310.0.5/24
inet.0:27destinations,27routes(27active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[OSPF/150]00:00:44,metric2,tag420
>to10.0.2.1viafxp1.35
[edit]
nigel@itaa7.2#runshowroutelogicalrouterr410.0.5/24
inet.0:26destinations,26routes(26active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[OSPF/150]00:00:47,metric2,tag420
>to10.0.2.9viafxp1.45
[edit]
nigel@itaa7.2#runshowroutelogicalrouterr510.0.5/24
inet.0:30destinations,30routes(30active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
71
72
10.0.5.0/24*[OSPF/150]00:00:51,metric2,tag420
>to10.0.8.5viafxp1.56
R6
[][]
R7 10.0.5/24 RIP R6
R6/R7 RIP
IOS
RIP 192.168.03/24 RIP
R6/R7
[editlogicalroutersr6]
nigel@itaa7.2#showpolicyoptions
policystatementripimport{
term1{
from{
protocolrip;
nexthop172.16.40.1;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
72
73
}
term2{
thenreject;
}
}
[editlogicalrouters]
nigel@itaa7.2#setr7protocolsripgroupripimportripimport
[editlogicalrouters]
nigel@itaa7.2#setr6protocolsripgroupripimportripimport
R6/R7 RIP OSPF
RIP OSPF 10.0.5/24 OSPF
R6/R7/RIP 10.0.5/24
nigel@itaa7.2#runshowroutelogicalrouterr5192.168/22
inet.0:30destinations,30routes(30active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/24*[OSPF/150]00:07:22,metric2,tag0
>to10.0.8.5viafxp1.56
to10.0.8.10viafxp1.57
192.168.1.0/24*[OSPF/150]00:07:22,metric2,tag0
>to10.0.8.5viafxp1.56
to10.0.8.10viafxp1.57
192.168.2.0/24*[OSPF/150]00:07:22,metric2,tag0
to10.0.8.5viafxp1.56
>to10.0.8.10viafxp1.57
192.168.3.0/24*[OSPF/150]00:07:22,metric2,tag0
to10.0.8.5viafxp1.56
>to10.0.8.10viafxp1.57
nigel@itaa7.2#runshowrouteadvertisingprotocolrip172.16.40.2logicalrouter
r6
inet.0:32destinations,36routes(32active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[OSPF/150]00:11:40,metric50,tag420
>to10.0.8.6viafxp2.56
nigel@itaa7.2#runshowrouteadvertisingprotocolrip172.16.40.3logicalrouter
r7
73
74
inet.0:28destinations,32routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[OSPF/150]00:12:00,metric50,tag420
>to10.0.8.9viafxp2.57
nigel@itaa7.2#runtraceroute10.0.5.1logicalrouterrip
tracerouteto10.0.5.1(10.0.5.1),30hopsmax,40bytepackets
1172.16.40.2(172.16.40.2)1.804ms1.662ms1.598ms
210.0.8.6(10.0.8.6)1.712ms2.069ms2.443ms
310.0.2.2(10.0.2.2)2.167ms2.110ms2.247ms
410.0.4.2(10.0.4.2)1.865ms2.269ms2.168ms
510.0.5.1(10.0.5.1)3.358ms2.177ms2.551ms
nigel@itaa7.2#runtraceroute10.0.5.1logicalrouterr6
tracerouteto10.0.5.1(10.0.5.1),30hopsmax,40bytepackets
110.0.8.6(10.0.8.6)2.307ms2.799ms1.761ms
210.0.2.2(10.0.2.2)2.414ms2.715ms3.681ms
310.0.4.2(10.0.4.2)3.243ms2.772ms3.539ms
410.0.5.1(10.0.5.1)3.689ms3.386ms3.510ms
nigel@itaa7.2#runtraceroute10.0.5.1logicalrouterr7
tracerouteto10.0.5.1(10.0.5.1),30hopsmax,40bytepackets
110.0.8.9(10.0.8.9)2.322ms3.285ms2.655ms
210.0.2.2(10.0.2.2)3.624ms2.617ms2.713ms
310.0.4.2(10.0.4.2)3.657ms2.794ms2.101ms
410.0.5.1(10.0.5.1)2.229ms2.584ms2.455ms
Preference [][]
routefilter import
policy OSPF
ISIS Preference
ripospf RIP ripimport R7
R6 R7 R6 10.0.5/24
RIP Preference100 OSPF Preference150 RIP
R6 10.0.5/24 R7 RIP
R7 10.0.5/24 RIP
172.16.40/24
nigel@itaa7.2#runshowroutelogicalrouterr710.0.5/24
inet.0:28destinations,33routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
74
75
10.0.5.0/24*[RIP/100]00:10:29,metric2,tag420
>to172.16.40.2viafxp3.80
[OSPF/150]00:01:20,metric50,tag420
>to10.0.8.9viafxp2.57
nigel@itaa7.2#runshowroutelogicalrouterrip10.0.5/24
inet.0:12destinations,12routes(12active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[RIP/100]05:05:19,metric2,tag420
>to172.16.40.3viafxp1.80
R6/R7 RIP Preference OSPF 150 BGP 170
nigel@itaa7.2#setr6protocolsripgrouprippreference160
nigel@itaa7.2#setr7protocolsripgrouprippreference160
R6/R7 RIP 10.0.5/24 OSPF
RIP R6/R7
R6/R7/RIP 10.0.5/24
nigel@itaa7.2#runshowroutelogicalrouterrip10.0.5/24
inet.0:12destinations,12routes(12active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[RIP/100]05:14:46,metric2,tag420
to172.16.40.2viafxp1.80
>to172.16.40.3viafxp1.80
nigel@itaa7.2#runshowroutelogicalrouterr610.0.5/24
inet.0:32destinations,33routes(32active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[OSPF/150]00:02:49,metric50,tag420
>to10.0.8.6viafxp2.56
[RIP/160]00:11:22,metric2,tag420
>to172.16.40.3viafxp2.80
nigel@itaa7.2#runshowroutelogicalrouterr710.0.5/24
inet.0:28destinations,33routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
75
76
10.0.5.0/24*[OSPF/150]00:02:53,metric50,tag420
>to10.0.8.9viafxp2.57
[RIP/160]00:02:51,metric2,tag420
>to172.16.40.2viafxp3.80
inet.0:28destinations,33routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24[RIP/160]00:29:25,metric2,tag420
>to172.16.40.2viafxp3.80
192.168.0.0/24[RIP/160]05:44:52,metric2,tag0
>to172.16.40.1viafxp3.80
192.168.1.0/24[RIP/160]05:44:52,metric2,tag0
>to172.16.40.1viafxp3.80
192.168.2.0/24[RIP/160]05:44:52,metric2,tag0
>to172.16.40.1viafxp3.80
192.168.3.0/24[RIP/160]05:44:52,metric2,tag0
>to172.16.40.1viafxp3.80
224.0.0.9/32*[RIP/100]00:01:42,metric1
MultiRecv
R7 192.168.03/24 OSPF
traceroute
R7 10.0.8.1 OSPF 10.0.5/24
RIP 172.16.40.3 R6
nigel@itaa7.2#runshowroutelogicalrouterr7192.168.0.0/24
inet.0:28destinations,33routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/24*[OSPF/150]00:10:51,metric2,tag0
>to10.0.8.1viafxp1.67
[RIP/160]05:54:01,metric2,tag0
>to172.16.40.1viafxp3.80
nigel@itaa7.2#runtraceroute192.168.0.1logicalrouterr7source172.16.40.3
tracerouteto192.168.0.1(192.168.0.1)from172.16.40.3,30hopsmax,40byte
packets
76
77
110.0.8.1(10.0.8.1)42.734ms2.378ms1.553ms
2192.168.0.1(192.168.0.1)12.825ms2.120ms1.627ms
[editlogicalrouters]
nigel@itaa7.2#deleter6protocolsripgrouprippreference
[editlogicalrouters]
nigel@itaa7.2#deleter7protocolsripgrouprippreference
[editlogicalroutersr6policyoptions]
nigel@itaa7.2#show
policystatementrip160import{
term1{
from{
protocolrip;
routefilter10.0.5.0/24exact;
}
then{
preferenceadd60;
}
}
}
[editlogicalrouters]
nigel@itaa7.2#setr6protocolsripgroupripimportrip160import
[editlogicalrouters]
nigel@itaa7.2#setr7protocolsripgroupripimportrip160import
nigel@itaa7.2#runshowroutelogicalrouterr7protocolrip
inet.0:28destinations,33routes(28active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24[RIP/160]01:03:54,metric2,tag420
>to172.16.40.2viafxp3.80
192.168.0.0/24*[RIP/100]06:19:21,metric2,tag0
77
78
>to172.16.40.1viafxp3.80
192.168.1.0/24*[RIP/100]06:19:21,metric2,tag0
>to172.16.40.1viafxp3.80
192.168.2.0/24*[RIP/100]06:19:21,metric2,tag0
>to172.16.40.1viafxp3.80
192.168.3.0/24*[RIP/100]06:19:21,metric2,tag0
>to172.16.40.1viafxp3.80
224.0.0.9/32*[RIP/100]00:06:10,metric1
MultiRecv
nigel@itaa7.2#runtraceroute192.168.0.1logicalrouterr6
tracerouteto192.168.0.1(192.168.0.1),30hopsmax,40bytepackets
1192.168.0.1(192.168.0.1)1.535ms1.749ms1.841ms
nigel@itaa7.2#runtraceroute192.168.0.1logicalrouterr7
tracerouteto192.168.0.1(192.168.0.1),30hopsmax,40bytepackets
1192.168.0.1(192.168.0.1)2.115ms8.246ms10.278ms
nigel@itaa7.2#runtraceroute10.0.5.1logicalrouterrip
tracerouteto10.0.5.1(10.0.5.1),30hopsmax,40bytepackets
1172.16.40.3(172.16.40.3)1.764ms1.186ms3.375ms
210.0.8.9(10.0.8.9)2.105ms2.256ms1.731ms
310.0.2.2(10.0.2.2)1.964ms1.950ms2.386ms
410.0.4.2(10.0.4.2)2.108ms2.297ms2.359ms
510.0.5.1(10.0.5.1)2.176ms2.091ms2.408ms
Metric [][]
[editlogicalroutersr6policyoptionspolicystatementripospf]
nigel@itaa7.2#show
term1{
from{
routefilter10.0.5.0/24exact;
}
thenreject;
78
79
}
term2{
fromprotocolrip;
thenaccept;
}
[editlogicalroutersr6policyoptionspolicystatementripospf]
nigel@itaa7.2#deleteterm1
[editlogicalroutersr6]
nigel@itaa7.2#deleteprotocolsripgroupripimportrip160import
R4 OSPF R6
10.0.5/24 OSPF
Metric RIP Metric R1/R2
Metric 50 NSSALSA7 LSA5 R4
R6 Metric 10.0.5/24 LSA7
1 R4 10.0.5.0/24 LSA5
nigel@itaa7.2#runshowospfdatabaselogicalrouterr4lsaid10.0.5.0detail
OSPFlinkstatedatabase,area0.0.0.10
TypeIDAdvRtrSeqAgeOptCksumLen
NSSA10.0.5.010.0.6.10x8000001b9270x80x594e36
mask255.255.255.0
Type2,TOS0x0,metric50,fwdaddr10.0.6.1,tag0.0.1.164
NSSA10.0.5.010.0.6.20x8000001712290x80x694036
mask255.255.255.0
Type2,TOS0x0,metric50,fwdaddr10.0.6.2,tag0.0.1.164
OSPFASSCOPElinkstatedatabase
TypeIDAdvRtrSeqAgeOptCksumLen
Extern10.0.5.010.0.9.60x800000011960x20x24de36
mask255.255.255.0
Type2,TOS0x0,metric2,fwdaddr0.0.0.0,tag0.0.1.164
[editlogicalroutersr6]
nigel@itaa7.2#showpolicyoptionspolicystatementripospf
term1{
fromprotocolrip;
then{
metric400;
accept;
}
79
80
OSPFlinkstatedatabase,area0.0.0.10
TypeIDAdvRtrSeqAgeOptCksumLen
NSSA10.0.5.010.0.6.10x8000001c4830x80x574f36
mask255.255.255.0
Type2,TOS0x0,metric50,fwdaddr10.0.6.1,tag0.0.1.164
NSSA10.0.5.010.0.6.20x800000184840x80x674136
mask255.255.255.0
Type2,TOS0x0,metric50,fwdaddr10.0.6.2,tag0.0.1.164
OSPFASSCOPElinkstatedatabase
TypeIDAdvRtrSeqAgeOptCksumLen
Extern*10.0.5.010.0.3.40x80000001220x20x15b336
mask255.255.255.0
Type2,TOS0x0,metric50,fwdaddr10.0.6.2,tag0.0.1.164
Extern10.0.5.010.0.9.60x80000002240x20xbcb536
mask255.255.255.0
Type2,TOS0x0,metric400,fwdaddr0.0.0.0,tag0.0.1.164
nigel@itaa7.2#runtraceroute192.168.0.1logicalrouterr1source10.0.5.1
tracerouteto192.168.0.1(192.168.0.1)from10.0.5.1,30hopsmax,40bytepackets
110.0.4.13(10.0.4.13)4.413ms2.784ms4.724ms
210.0.2.1(10.0.2.1)2.812ms5.144ms2.792ms
310.0.8.10(10.0.8.10)2.584ms4.417ms4.273ms
4192.168.0.1(192.168.0.1)6.633ms5.400ms4.091ms
JUNOS
JNCIx
JNCIx
R6/R7
policystatementripospf{
term1{
from{
protocolrip;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
80
81
}
}
policystatementripimport{
term1{
from{
protocolrip;
nexthop172.16.40.1;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
}
term2{
thenreject;
}
}
policystatementospfrip{
term1{
from{
protocolospf;
routefilter10.0.5.0/24exact;
}
thenaccept;
}
}
4.JUNOSOSPF LSA5 [][]
JUNOS OSPF LSA5 JUNOS
Aggregate OSPF/ISIS/BGP
Aggregate
ASBR Aggregate OSPF LSA5
R6/R7 ripospf RIP OSPF
192.168.03/24 Aggregate OSPF
[editlogicalrouters]
nigel@itaa7.2#deleter6protocolsospfexportripospf
[editlogicalroutersr6routingoptions]
nigel@itaa7.2#setaggregateroute192.168/22
[editlogicalroutersr6]
nigel@itaa7.2#showpolicyoptionspolicystatement192
term1{
from{
81
82
protocolaggregate;
routefilter192.168.0.0/22exact;
}
thenaccept;
}
[editlogicalroutersr6]
nigel@itaa7.2#setprotocolsospfexport192
R7 R5 192.168.03/22
192.168/22 OSPF R6/R7 Aggregate
Preference 130
Aggregate
Contributing Routes
Aggregate
Reject
Aggregate
R6/R7 192.168.0/22 RIP
Contributing
nigel@itaa7.2#runshowroutelogicalrouterr5192.168/22
inet.0:27destinations,27routes(27active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/22*[OSPF/150]01:20:45,metric0,tag0
to10.0.8.5viafxp1.56
>to10.0.8.10viafxp1.57
nigel@itaa7.2#runshowroutelogicalrouterr6192.168/22detail
inet.0:33destinations,34routes(33active,0holddown,0hidden)
192.168.0.0/22(2entries,1announced)
*AggregatePreference:130
Nexthoptype:Reject
Nexthopreferencecount:2
State:<ActiveIntExt>
Age:1:15:50
Task:Aggregate
Announcementbits(2):0OSPF2KRT
ASpath:I(LocalAgg)
Flags:Depth:0Active
ASpathlist:
ASpath:IRefcount:4
ContributingRoutes(4):
192.168.0.0/24protoRIP
192.168.1.0/24protoRIP
82
83
192.168.2.0/24protoRIP
192.168.3.0/24protoRIP
5.JUNOSGenerateRoute [][]
JUNOS Aggregate GenerateRoutes
Aggregate IP Generate Aggregate
Aggregate
reject discard Generate
Generate
IP Generate Contributing Routes
Contributing Route Primary
ContributingRoute GenerateRoute ContributingRoute
discard reject Contributing route
Aggregate Generate JUNOS IOS
RIP
/ ISP
ISP
NAT
83
84
!
interface GigabitEthernet0/0
description **==CONNECTED TO ISP==**
ip address 211.168.1.254 255.255.255.252
duplex auto
speed auto
media-type rj45
!
ip route 0.0.0.0 0.0.0.0 211.168.1.253
!
ip nat inside source list 10 interface GigabitEthernet0/0 overload
!
access-list 10 permit 10.143.8.0 0.0.0.255
!
PotentialFailurePoints
ISP
ISP
ISP
ISP JUNOS
ContributingRoute ISP GenerateRoute
85
}
}
nigel@itaa7.2#setr7protocolsospfexportripospf
R6 192.168.03/24 RIP/OSPF R6
Generate ContributingRoutes
R6/R7 Aggregate
nigel@itaa7.2#runshowroutelogicalrouterr6192.168/22
inet.0:32destinations,36routes(32active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
192.168.0.0/24*[RIP/100]2d00:30:10,metric2,tag0
>to172.16.40.1viafxp2.80
[OSPF/150]00:00:09,metric2,tag0
>to10.0.8.2viafxp2.67
192.168.1.0/24*[RIP/100]2d00:30:10,metric2,tag0
>to172.16.40.1viafxp2.80
[OSPF/150]00:00:09,metric2,tag0
>to10.0.8.2viafxp2.67
192.168.2.0/24*[RIP/100]2d00:30:10,metric2,tag0
>to172.16.40.1viafxp2.80
[OSPF/150]00:00:09,metric2,tag0
>to10.0.8.2viafxp2.67
192.168.3.0/24*[RIP/100]2d00:30:10,metric2,tag0
>to172.16.40.1viafxp2.80
[OSPF/150]00:00:09,metric2,tag0
>to10.0.8.2viafxp2.67
2.
R7 R6 200.200/24
Policy R6 192.168.0
3/24 Customer 0/0 Aggregate
JUNOS Generate Contributing
Routes Generate ContributingRoutes
R6 Generate ContributingRoute
OSPF RIP
192.168/22 Generate ContributingRoutes
policystatementonlycertainroutes{
/*ALLOW192.168/32fromOSPFandRIP*/
term1{
from{
protocol[ospfrip];
routefilter192.168.0.0/22longer;
}
thenaccept;
85
86
}
/*BLOCK200.200/24andOtherRoutes*/
term2{
thenreject;
}
}
Generate R6 192.168.03/24
generate 0.0.0.0 ContributingRoutes Generate
JUNOS Generate Aggregate
Aggregate PrimaryContributingRoute
ContributingRoutes
[editlogicalroutersr6]
nigel@itaa7.2#setroutingoptionsgenerateroute0.0.0.0/0policyonlycertain
routes
nigel@itaa7.2#runshowroutelogicalrouterr6protocolaggregatedetail
inet.0:33destinations,37routes(33active,0holddown,0hidden)
0.0.0.0/0(1entry,1announced)
*AggregatePreference:130
Nexthopreferencecount:24710
Nexthop:172.16.40.1viafxp2.80,selected
State:<ActiveIntExt>
Age:17:19
Task:Aggregate
Announcementbits(1):2KRT
ASpath:I
Flags:GenerateDepth:0Active
ContributingRoutes(4):
192.168.0.0/24protoRIP
192.168.1.0/24protoRIP
192.168.2.0/24protoRIP
192.168.3.0/24protoRIP
3. R6 RIP Customer 0/0
JUNOS
IOS RIP IOS Customer VLAN69 VLAN89
R6 RIP
JUNOS IOSIPv4
[editlogicalroutersr6]
nigel@itaa7.2#setinterfacesfxp1.69vlanid69familyinetaddress
172.16.69.1/30
[editlogicalroutersrip]
nigel@itaa7.2#setinterfacesfxp1.89vlanid89familyinetaddress
86
87
172.16.89.1/30
Customer#show running-config
!
hostname Customer
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.69
encapsulation dot1Q 69
ip address 172.16.69.2 255.255.255.252
!
interface FastEthernet0/0.89
encapsulation dot1Q 89
ip address 172.16.89.2 255.255.255.252
!
Customer#ping 172.16.69.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.69.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/16/28 ms
JUNOS IOSRIP
[editlogicalrouters]
nigel@itaa7.2#setr6protocolsripgroupcustomerneighborfxp1.69
Customer#sh run | b r r
router rip
version 2
passive-interface FastEthernet0/0.89
network 172.16.0.0
!
Customer#show ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 21 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
87
88
Redistributing: rip
Default version control: send version 2, receive version 2
Interface
Send Recv Triggered RIP
FastEthernet0/0.69
2
2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
172.16.0.0
Passive Interface(s):
FastEthernet0/0.89
Routing Information Sources:
Gateway
Distance
172.16.69.1
120
Distance: (default is 120)
Key-chain
Last Update
00:00:24
JUNOS Customer R6
Customer OSPF RIP RIP
Customer fxp1.69 RIP customer
R6/R7/RIP RIP
[editlogicalrouters]
nigel@itaa7.2#showr6policyoptions
policystatementdefault{
term1{
from{
protocolaggregate;
routefilter0.0.0.0/0exact;
}
thenaccept;
}
}
policystatementdirect{
term1{
from{
protocoldirect;
routefilter172.16.69.0/30exact;
}
thenaccept;
}
}
[editlogicalrouters]
nigel@itaa7.2#showr6protocolsrip
grouprip{
88
89
export[ospfripdirect];
importripimport;
neighborfxp2.80;
}
groupcustomer{
exportdefault;
neighborfxp1.69;
}
nigel@itaa7.2#setr6protocolsospfexportdirect
Customer
RIP R6 0.0.0.0/0
traceroute 192.168/22
direct R6 Customer OSPF
RIP Customer 192.168/22
OSPFNSSA 10.0.5/24
Customer#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.69.1 to network 0.0.0.0
C
C
R*
Customer#traceroute 192.168.0.1
Type escape sequence to abort.
Tracing the route to 192.168.0.1
1 172.16.69.1 12 msec 4 msec 80 msec
2 192.168.0.1 20 msec 4 msec 16 msec
Customer#traceroute 10.0.5.1
Type escape sequence to abort.
Tracing the route to 10.0.5.1
89
90
1
2
3
4
5
AggregateRoute/GenerateRoute
4. 192.168/22 ContributingRoute Customer R6
Generate Aggregate
Aggregate Reject
Aggregate
Generate Generate ContributingRoutes
Generate Primary
ContributingRoute
GenerateRoute
Juniper
Generate
ContributingRoutes Contributing
Routes Preference
Primary ContributingRouteGenerate
Generate R6 ripimport Generate
Route R6 ripimport R6 RIP
Contributing routes 192.168.0.0/24 R7 OSPF
nigel@itaa7.2#runshowroutelogicalrouterr6protocolaggregatedetail
90
91
inet.0:36destinations,39routes(36active,0holddown,0hidden)
0.0.0.0/0(1entry,1announced)
*AggregatePreference:130
Nexthopreferencecount:26489
Nexthop:172.16.40.1viafxp2.80,selected
State:<ActiveIntExt>
Age:21
Task:Aggregate
Announcementbits(2):2KRT3RIPv2
ASpath:I
Flags:GenerateDepth:0Active
ContributingRoutes(4):
192.168.1.0/24protoRIP
192.168.2.0/24protoRIP
192.168.3.0/24protoRIP
192.168.0.0/24protoOSPF
192.168.0/24 R6 RIP
Preference 160 R7 192.168.0/24
R6 RIP Preference 160 192.168/22
R7 OSPF 192.168.0/24 Preference 150 R6
Contributingroutes Preference
PrimaryContributingroute 192.168.1.0/24
Preference 150 OSPF
[editlogicalrouters]
nigel@itaa7.2#showr6policyoptionspolicystatementripimport
term1{
from{
protocolrip;
nexthop172.16.40.1;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
}
term2{
thenreject;
}
[editlogicalrouters]
nigel@itaa7.2#showr6protocolsrip
grouprip{
preference160;
export[ospfripdirect];
importripimport;
91
92
neighborfxp2.80;
}
[editlogicalrouters]
nigel@itaa7.2#showr7policyoptionspolicystatementripimport
term1{
from{
protocolrip;
nexthop172.16.40.1;
routefilter192.168.0.0/24exactreject;
routefilter192.168.0.0/22orlonger;
}
then{
accept;
}
}
term2{
thenreject;
}
nigel@itaa7.2#runshowroutelogicalrouterr6protocolaggregatedetail
inet.0:35destinations,38routes(35active,0holddown,0hidden)
0.0.0.0/0(1entry,1announced)
*AggregatePreference:130
Nexthopreferencecount:12
Nexthop:10.0.8.2viafxp2.67,selected
State:<ActiveIntExt>
Age:1:22:03
Task:Aggregate
Announcementbits(2):2KRT3RIPv2
ASpath:I
Flags:GenerateDepth:0Active
ContributingRoutes(4):
192.168.1.0/24protoOSPF
192.168.2.0/24protoOSPF
192.168.3.0/24protoOSPF
192.168.0.0/24protoRIP
192.168.1/24 ContributingRoutes
Generate R6/R7
R6 ripimport 192.168.1/24
R7 ripospf 192.168.1/24 R6 RIP
OSPF 192.168.1/24
92
93
[editlogicalrouters]
nigel@itaa7.2#showr6policyoptionspolicystatementripimport
term1{
from{
protocolrip;
nexthop172.16.40.1;
routefilter192.168.1.0/24exactreject;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
}
term2{
thenreject;
}
[editlogicalrouters]
nigel@itaa7.2#showr7policyoptionspolicystatementripospf
term1{
from{
protocolrip;
routefilter192.168.1.0/24exactreject;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
}
R6 Generate 192.168.1/24
192.168.2/24 PrimaryContributingRoute Generate
10.0.8.2
nigel@itaa7.2#runshowroutelogicalrouterr6protocolaggregatedetail
inet.0:35destinations,37routes(35active,0holddown,0hidden)
0.0.0.0/0(1entry,1announced)
*AggregatePreference:130
Nexthopreferencecount:10
Nexthop:10.0.8.2viafxp2.67,selected
State:<ActiveIntExt>
Age:2:19:07
Task:Aggregate
Announcementbits(2):2KRT3RIPv2
ASpath:I
Flags:GenerateDepth:0Active
ContributingRoutes(3):
192.168.2.0/24protoOSPF
93
94
192.168.3.0/24protoOSPF
192.168.0.0/24protoRIP
Customer 192.168/22 Generate
ContributingRoutes
Generate Contributing Routes
Generate
Primary Contributing Route Customer
traceroute 192.168.0/24 Generate
192.168.1/24
Contributing
Customer#traceroute 192.168.0.1
Type escape sequence to abort.
Tracing the route to 192.168.0.1
1 172.16.69.1 8 msec 0 msec 4 msec
2 192.168.0.1 12 msec 4 msec 4 msec
Customer#traceroute 192.168.1.1
Type escape sequence to abort.
Tracing the route to 192.168.1.1
1 172.16.69.1 8 msec 4 msec 4 msec
2 10.0.8.2 8 msec 8 msec 4 msec
3 192.168.1.1 8 msec 4 msec 4 msec
5. 192.168/22 Customer
Generate RIP
RIP
ContributingRoutes IOS
Customer
Customer(config)#ip route 0.0.0.0 0.0.0.0 172.16.89.1 160
RIP 160Customer
R6 RIP
Customer#show ip route
Gateway of last resort is 172.16.69.1 to network 0.0.0.0
C
C
R*
95
R6/R7 192.168/22ContributingRoutes R6
ripimport R7 ripospf Generate
Contributing Routes hidden RIP
Customer Customer
192.168/22
[editlogicalrouters]
nigel@itaa7.2#showr7policyoptionspolicystatementripospf
term1{
from{
protocolrip;
routefilter192.168.0.0/22orlongerreject;
}
thenaccept;
}
[editlogicalrouters]
nigel@itaa7.2#showr6policyoptionspolicystatementripimport
term1{
from{
protocolrip;
nexthop172.16.40.1;
routefilter192.168.0.0/22orlongerreject;
}
thenaccept;
}
term2{
thenreject;
}
nigel@itaa7.2#runshowroutelogicalrouterr6hiddendetail
inet.0:32destinations,32routes(31active,0holddown,1hidden)
0.0.0.0/0(1entry,0announced)
Aggregate
Nexthoptype:Reject
Nexthopreferencecount:1
State:<HiddenIntExt>
Age:4:07:47
Task:Aggregate
ASpath:I
Flags:GenerateDepth:0Inactive
Customer#show ip route
Gateway of last resort is 172.16.89.1 to network 0.0.0.0
95
96
C
C
S*
Customer#ping 192.168.0.1
ContributingRoute Generate
R6 RIP Customer
[edit]
nigel@itaa7.2#rollback1
loadcomplete
[edit]
nigel@itaa7.2#commit
commitcomplete
Customer#show ip route
Gateway of last resort is 172.16.69.1 to network 0.0.0.0
C
C
R*
96
97
1.7 OSPF
JNCIP
Juniper Cisco JUNOS IOS
OPSF JNCIx
[][]
1. OSPF RID OSPF
2. LSA3
3. R1/R2 10.0.5/24 0
4. 10.0.5/24 Metric 10 420 , OSPF
Metric
5. R1 NetworkLSALSA2
6. 0.0.0.1 LSA3 LSA5
7. 0 MD5 jnx
8.
9. RIP 192.168.x/24 RIP
10. R6/R7 10.0.5/24 RIP R7 RIP Metric
R6
11. 172.16.40/24 OSPF OSPF
12. R5 RIP 10.0.5/24
13. Metric 10
97
98
Metric R5 1
14.
15. RIP 10.0.5/24
RIP [][]
RIP
RIP
[edit logical-routers rip]
nigel@junos7.2# show protocols rip
group rip {
export rip;
neighbor fxp2.60;
neighbor fxp2.70;
}
[edit logical-routers rip]
nigel@junos7.2# show policy-options policy-statement rip
term 1 {
from protocol [ rip static ];
then accept;
}
[edit logical-routers rip]
nigel@junos7.2# show interfaces lo0
unit 8 {
family inet {
address 192.168.0.1/32;
address 192.168.1.1/32;
address 192.168.2.1/32;
address 192.168.3.1/32;
address 192.168.4.1/32;
}
}
[edit logical-routers rip]
nigel@junos7.2# show routing-options
static {
route 192.168.0.0/24 receive;
route 192.168.1.0/24 receive;
route 192.168.2.0/24 receive;
route 192.168.3.0/24 receive;
route 192.168.4.0/24 receive;
}
98
99
[][]
OSPF
JUNOS IOS fxp MTU 1496 bytes
IOS 1500 bytes OSPF
Exchange/ExStart IOS JUNOS MUT
1496 bytes
100
speed auto
!
interface FastEthernet0/0.24
encapsulation dot1Q 24
ip address 10.0.4.9 255.255.255.252
ip mtu 1496
!
interface FastEthernet0/0.34
encapsulation dot1Q 34
ip address 10.0.2.6 255.255.255.252
ip mtu 1496
!
interface FastEthernet0/0.45
encapsulation dot1Q 45
ip address 10.0.2.10 255.255.255.252
ip mtu 1496
!
!
router ospf 64
router-id 10.0.3.4
log-adjacency-changes
network 10.0.2.4 0.0.0.3 area 0
network 10.0.2.8 0.0.0.3 area 0
network 10.0.3.4 0.0.0.0 area 0
network 10.0.4.8 0.0.0.3 area 1
!
JUNOS IOS OSPF FULL JUNOS DR
128, IOS 1
nigel@junos7.2# run show ospf
Address Interface State
10.0.2.2 fxp2.35
Full
10.0.2.10 fxp2.45
Full
10.0.8.5 fxp1.56
Full
10.0.8.10 fxp1.57
Full
r4#show ip ospf neighbor
neighbor logical-router r5
ID
Pri Dead
10.0.3.3
128 38
10.0.3.4
1 35
10.0.9.6
128 36
10.0.9.7
1 32
Interface
Fa0/0.34
Fa0/0.45
Fa0/0.24
* FastEthernet Fa
R6/R7 LSA-3 20
LSA-3
100
101
28
28
28
28
28
28
28
28
28
28
28
28
102
area 0.0.0.1 {
interface lo0.1;
interface fxp1.13 {
priority 0;
}
interface fxp1.12 {
priority 0;
}
}
[edit logical-routers]
nigel@junos7.2# show r1 policy-options
policy-statement external {
term 1 {
from {
protocol direct;
route-filter 10.0.5.0/24 exact;
}
then {
metric 10;
tag 420;
external {
type 1;
}
accept;
}
}
term 2 {
then reject;
}
}
R1 R1 OSPF DR/BDR DRother
nigel@junos7.2# run show ospf interface logical-router r1
Interface State
Area
DR ID
BDR ID Nbrs
fxp1.12 DRother 0.0.0.1 10.0.6.2 0.0.0.0
1
fxp1.13 DRother 0.0.0.1 10.0.3.3 0.0.0.0
1
lo0.1
DR
0.0.0.1 10.0.6.1 0.0.0.0
0
R4/R5 OSPF
external 10.0.5/24
LSA Metric Tag JUNOS IOS OSPF
Metric 10
JUNOS OSPF Tag IP 0.0.1.164 = 256+164 420
nigel@junos7.2# run show ospf database logical-router
r5 extern advertising-router 10.0.6.1 detail
102
103
104
FastEthernet0/0.24
Metric 10 IOS
OSPF 110 JUNOS OSPF
Preference 10 150IOS O E1
1 IOS
Preference
JUNOS IOS
fxp2.35
10.0.2.2
105
Opt
0x0
0x0
0x0
Cksum Len
0x14b0 48
0x1ff0 32
0xe35b 36
105
106
107
Cksum Len
0xaf74 28
0xd562 36
0xa6e2 36
108
NSSA
Key ID
[edit logical-routers]
nigel@junos7.2# show r5 protocols ospf area 0
authentication-type md5;
interface lo0.5;
interface fxp2.45 {
authentication {
md5 10 key "$9$IBIhyKsYoaUH"; ## SECRET-DATA
}
}
interface fxp2.35 {
authentication {
md5 10 key "$9$j8kmTOBEhrv"; ## SECRET-DATA
}
}
r4#wr t
!
interface FastEthernet0/0.34
encapsulation dot1Q 134
ip address 10.0.2.6 255.255.255.252
ip mtu 1496
ip ospf message-digest-key 10 md5 jnx
!
interface FastEthernet0/0.45
encapsulation dot1Q 145
ip address 10.0.2.10 255.255.255.252
ip mtu 1496
ip ospf message-digest-key 10 md5 jnx
!
router ospf 64
router-id 10.0.3.4
log-adjacency-changes
area 0 authentication message-digest
area 1 nssa no-redistribution
default-information-originate
area 1 filter-list prefix only-default-route in
!
R5 0 R3/R4
FULL R3/R4 traceroute
108
109
[edit logical-routers]
nigel@itaa7.2# show r5 protocols ospf area 20
area-range 10.0.8.0/23;
[edit logical-routers]
nigel@itaa7.2# show r3 protocols ospf area 1
nssa {
default-lsa {
default-metric 1;
type-7;
}
no-summaries;
}
area-range 10.0.4.0/22;
r4#conf t
Enter configuration commands, one per line.
End with CNTL/Z.
r4(config-router)#area 1 range 10.0.4.0 255.255.252.0
r4(config-router)#area 1 range 10.0.4.0 255.255.252.0 ?
advertise
Advertise this range (default)
cost
User specified metric for this range
not-advertise
DoNotAdvertise this range
<cr>
109
110
1 10.0.4/22 10.0.5/24
10.0.5/24 OSPF area-range
110
111
R5 10.0.5/24
Preference
nigel@itaa7.2# run show route logical-router r5 10.0.5.0
inet.0: 19 destinations, 19 routes (19 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.5.0/24
RIP 192.168.x/24
RIP R6 R7 RIP
OSPF JUNOS R6 IOS R7 RIP
RIP
[edit logical-routers r6]
nigel@itaa7.2# show protocols rip
group rip {
neighbor fxp1.60;
}
r7#wr t
!
router rip
version 2
network 172.16.0.0
!
nigel@itaa7.2# run show route logical-router r6 protocol
rip
inet.0: 24 destinations, 24 routes (24 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
192.168.4.0/24
tag 0
tag 0
tag 0
tag 0
tag 0
111
112
224.0.0.9/32
via
via
via
via
via
172.16.40.5,0:34,Fa0/0.70
172.16.40.5,0:34,Fa0/0.70
172.16.40.5,0:34,Fa0/0.70
172.16.40.5,0:34,Fa0/0.70
172.16.40.5,0:34,Fa0/0.70
113
114
115
RIP 10.0.5/24
R1 RIP traceroute
172.16/16
10/8 IOS R7 10.0.5/24
10.0.0.0/8 RIP RIP
115
116
117
protocol rip;
route-filter 192.168.0.0/21 orlonger;
}
then accept;
}
policy-statement rip-import {
term 1 {
from {
protocol rip;
route-filter 192.168.0.0/21 orlonger;
}
then accept;
}
term 2 {
then reject;
}
}
10.0.5/24 RIP R1 10.0.5.1
192.168.x/24 traceroute 10.0.5.1
traceroute
nigel@itaa7.2# run traceroute 192.168.1.1 logical-router
r1
traceroute to 192.168.1.1 (192.168.1.1), 30 hops max,
40 byte packets
1 10.0.4.13 (10.0.4.13) 5.114 ms 1.243 ms 1.498 ms
2 10.0.2.1 (10.0.2.1) 1.839 ms 2.311 ms 1.471 ms
3 10.0.8.5 (10.0.8.5) 1.972 ms 2.019 ms 1.756 ms
4 * * *
8 *^C
nigel@itaa7.2# run traceroute 192.168.1.1 logical-router
r1 source 10.0.5.1
traceroute to 192.168.1.1 (192.168.1.1) from 10.0.5.1,
30 hops max, 40 byte packets
1 10.0.4.13 (10.0.4.13) 1.414 ms 0.955 ms 1.458 ms
2 10.0.2.1 (10.0.2.1) 1.378 ms 1.740 ms 1.786 ms
3 10.0.8.5 (10.0.8.5) 1.916 ms 1.834 ms 1.877 ms
4 192.168.1.1 (192.168.1.1) 2.527 ms 2.221 ms
2.048 ms
117
118
119
!
interface FastEthernet0/0.34
bandwidth 100000
encapsulation dot1Q 134
ip address 10.0.2.6 255.255.255.252
ip mtu 1496
ip ospf message-digest-key 10 md5 jnx
!
r4#show ip ospf interface | include Cost
Process ID 64, Router ID 10.0.3.4, Network
LOOPBACK, Cost: 1
Process ID 64, Router ID 10.0.3.4, Network
BROADCAST, Cost: 1
Process ID 64, Router ID 10.0.3.4, Network
BROADCAST, Cost: 1
Process ID 64, Router ID 10.0.3.4, Network
BROADCAST, Cost: 1
Type
Type
Type
Type
OSPF
JUNOS 0 IOS 1
10 JUNOS IOS
[edit logical-routers]
nigel@itaa7.2# set r1 protocols ospf reference-bandwidth
1g
nigel@itaa7.2#run show ospf interface logical-router
detail | match cost
Type: LAN, Address: 10.0.2.1, Mask: 255.255.255.252,
1496, Cost: 10
Type: LAN, Address: 10.0.2.9, Mask: 255.255.255.252,
1496, Cost: 10
Type: LAN, Address: 10.0.3.5, Mask: 255.255.255.255,
65535, Cost: 0
Type: LAN, Address: 10.0.8.6, Mask: 255.255.255.252,
1496, Cost: 10
Type: LAN, Address: 10.0.8.9, Mask: 255.255.255.252,
1496, Cost: 10
r5
MTU:
MTU:
MTU:
MTU:
MTU:
r4(config)#router ospf 64
r4(config-router)#auto-cost reference-bandwidth 1000
% OSPF: Reference bandwidth is changed.
Please ensure reference bandwidth is consistent
across all routers.
119
120
Type
Type
Type
Type
R5 R3/R4 1 R3/R4
10.0.4/22 LSA-3 Metric R5 OSPF LSA JUNOS IOS
Metric R5 R4 1 ABR
nigel@itaa7.2# run show ospf database logical-router r5
lsa-id 10.0.4.0 detail
OSPF link state database, area 0.0.0.0
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Summary 10.0.4.0 10.0.3.3 0x80000019 493 0x2 0xc451 28
mask 255.255.252.0
TOS 0x0, metric 20
Summary 10.0.4.0 10.0.3.4 0x8000001d 444 0x22 0x708a 28
mask 255.255.252.0
TOS 0x0, metric 10
Metric JUNOS IOS
[edit logical-routers]
nigel@itaa7.2# show r3 protocols ospf
area 0.0.0.1 {
area-range 10.0.4.0/22 override-metric 30;
}
r4(config-router)#area 1 range 10.0.4.0 255.255.252.0
cost 30
nigel@itaa7.2# run show route logical-router r5
10.0.4/22 exact
inet.0: 22 destinations, 22 routes (22 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.4.0/22
121
1 R3/R4ABR ABR
1
nigel@itaa7.2#runshowospfdatabaselogicalrouterr5lsaid10.0.4.0
OSPFlinkstatedatabase,area0.0.0.0
TypeIDAdvRtrSeqAgeOptCksumLen
Summary10.0.4.010.0.3.30x8000001b6390x20x25e428
Summary10.0.4.010.0.3.40x8000001e6390x220x37ae28
TNSSA R1/R2 R3/R4 NSSA
ABR 1
nigel@itaa7.2#runshowospfdatabaselogicalrouterr1nssalsaid0.0.0.0
OSPFlinkstatedatabase,area0.0.0.1
TypeIDAdvRtrSeqAgeOptCksumLen
NSSA0.0.0.010.0.3.30x800000173440x00xbd6e36
NSSA0.0.0.010.0.3.40x800000172170x200x7af836
OSPFlinkstatedatabase,area0.0.0.1
TypeIDAdvRtrSeqAgeOptCksumLen
NSSA10.0.5.010.0.6.10x8000001021590x80x5a0136
NSSA10.0.5.010.0.6.20x8000001f3240x80x440636
RID ABRR4 LSA5 0
122
nigel@itaa7.2##runshowospfdatabaser5externlsaid192.168.0.0
OSPFASSCOPElinkstatedatabase
TypeIDAdvRtrSeqAgeOptCksumLen
Extern192.168.0.010.0.9.60x800000063690x20x460c36
Extern192.168.0.010.0.9.70x800000122700x200x2de536
[editlogicalrouters]
nigel@itaa7.2#deactivater6interfacesfxp1.60
[editlogicalrouters]
nigel@itaa7.2#commit
commitcomplete
[editlogicalrouters]
nigel@itaa7.2#runrestartroutinglogicalrouterrip
ripstarted,pid7466
[editlogicalrouters]
nigel@itaa7.2#runshowroutelogicalrouterrip10.0.5/24
inet.0:16destinations,16routes(16active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.5.0/24*[RIP/100]00:00:23,metric3,tag0
>to172.16.40.6viafxp2.70
inet.0:22destinations,22routes(22active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
172.16.40.0/30*[OSPF/10]00:01:18,metric20
>to10.0.8.5viafxp1.56
172.16.40.4/30*[OSPF/10]00:01:19,metric20
>to10.0.8.10viafxp1.57
122
123
r7#traceroute 10.0.5.2
Type escape sequence to abort.
Tracing the route to 10.0.5.2
1 10.0.8.9 24 msec 16 msec 4 msec
2 10.0.2.2 20 msec 28 msec 8 msec
3 10.0.5.2 8 msec 20 msec 8 msec
[][]
R1
[editlogicalrouters]
nigel@itaa7.2#showr1
protocols{
ospf{
exportexternal;
referencebandwidth1g;
area0.0.0.1{
nssanosummaries;
interfacelo0.1{
passive;
}
interfacefxp1.13{
priority0;
}
interfacefxp1.12{
priority0;
}
}
}
}
policyoptions{
policystatementexternal{
term1{
from{
123
124
protocoldirect;
routefilter10.0.5.0/24exact;
}
then{
metric10;
tag420;
external{
type1;
}
accept;
}
}
term2{
thenreject;
}
}
}
routingoptions{
routerid10.0.6.1;
}
R2
[editlogicalrouters]
nigel@itaa7.2#showr2
protocols{
ospf{
exportexternal;
referencebandwidth1g;
area0.0.0.1{
nssanosummaries;
interfacefxp2.12;
interfacefxp2.23;
interfacelo0.2{
passive;
}
interfacefxp2.24;
}
}
}
policyoptions{
policystatementexternal{
term1{
from{
protocoldirect;
124
125
routefilter10.0.5.0/24exact;
}
then{
metric10;
tag420;
external{
type1;
}
accept;
}
}
term2{
thenreject;
}
}
}
routingoptions{
routerid10.0.6.2;
}
R3
[editlogicalrouters]
nigel@itaa7.2#showr3
protocols{
ospf{
referencebandwidth1g;
area0.0.0.0{
interfacelo0.3{
passive;
}
interfacefxp1.34{
authentication{
md510key"$9$SlwlvLoaUDkP";##SECRETDATA
}
}
interfacefxp1.35{
authentication{
md510key"$9$U.iqfu0IRSe";##SECRETDATA
}
}
}
area0.0.0.1{
nssa{
defaultlsa{
125
126
defaultmetric1;
type7;
}
nosummaries;
}
arearange10.0.4.0/22overridemetric30;
interfacefxp2.13;
interfacefxp1.23;
}
}
}
routingoptions{
routerid10.0.3.3;
}
R4
r4#wr t
Building configuration...
Current configuration : 1927 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r4
!
interface Loopback0
ip address 10.0.3.4 255.255.255.255
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.24
bandwidth 100000
encapsulation dot1Q 124
ip address 10.0.4.9 255.255.255.252
ip mtu 1496
!
interface FastEthernet0/0.34
bandwidth 100000
126
127
128
}
interfacefxp2.35{
authentication{
md510key"$9$j8kmTOBEhrv";##SECRETDATA
}
}
}
area0.0.0.20{
arearange10.0.8.0/23;
interfacefxp1.56;
interfacefxp1.57;
}
}
}
routingoptions{
routerid10.0.3.5;
}
R6
[editlogicalrouters]
nigel@itaa7.2#showr6
protocols{
ospf{
exportripospf;
referencebandwidth1g;
area0.0.0.20{
interfacelo0.6{
passive;
}
interfacefxp2.67;
interfacefxp2.56;
interfacefxp1.60{
passive;
}
}
}
rip{
grouprip{
exportospfrip;
importripimport;
neighborfxp1.60;
}
}
}
128
129
policyoptions{
policystatementripospf{
term1{
from{
protocolaggregate;
routefilter192.168.0.0/21exact;
}
thenaccept;
}
}
policystatementospfrip{
term1{
from{
protocolospf;
routefilter10.0.5.0/24exact;
}
thenaccept;
}
}
policystatementripimport{
term1{
from{
protocolrip;
routefilter192.168.0.0/21orlonger;
}
thenaccept;
}
term2{
thenreject;
}
}
}
routingoptions{
aggregate{
route192.168.0.0/21;
}
routerid10.0.9.6;
}
R7
r7#wr t
Building configuration...
Current configuration : 2113 bytes
129
130
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r7
!
interface Loopback0
ip address 10.0.9.7 255.255.255.255
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.57
bandwidth 100000
encapsulation dot1Q 157
ip address 10.0.8.10 255.255.255.252
ip mtu 1496
!
interface FastEthernet0/0.67
bandwidth 100000
encapsulation dot1Q 167
ip address 10.0.8.2 255.255.255.252
ip mtu 1496
!
interface FastEthernet0/0.70
bandwidth 100000
encapsulation dot1Q 170
ip address 172.16.40.6 255.255.255.252
!
router ospf 64
router-id 10.0.9.7
log-adjacency-changes
auto-cost reference-bandwidth 1000
summary-address 192.168.0.0 255.255.248.0
redistribute rip subnets route-map rip-import
passive-interface FastEthernet0/0.70
network 10.0.8.0 0.0.0.3 area 20
network 10.0.8.8 0.0.0.3 area 20
network 10.0.9.7 0.0.0.0 area 20
network 10.0.9.0 0.0.0.255 area 20
130
131
131
132
OSPF
OSPF OSPF
OSPF OSPF
R3 R4 0.0.0.0
1
JUNOS R3
IOS R4 IOS R4 fa0/0.34
OSPF 1 IOS 10.0.2.4/30 1
1
1 OSPF MD5 fa0/0.34
[editlogicalroutersr3]
nigel@itaa7.2#showprotocolsospf
referencebandwidth1g;
area0.0.0.0{
interfacelo0.3{
passive;
}
inactive:interfacefxp1.34{
authentication{
md510key"$9$SlwlvLoaUDkP";##SECRETDATA
}
}
132
133
interfacefxp1.35{
authentication{
md510key"$9$U.iqfu0IRSe";##SECRETDATA
}
}
}
area0.0.0.1{
nssa{
defaultlsa{
defaultmetric1;
type7;
}
nosummaries;
}
arearange10.0.4.0/22overridemetric30;
interfacefxp2.13;
interfacefxp1.23;
interfacefxp1.34{
authentication{
md510key"$9$SlwlvLoaUDkP";##SECRETDATA
}
}
}
!
hostname r4
!
interface FastEthernet0/0.34
bandwidth 100000
encapsulation dot1Q 134
ip address 10.0.2.6 255.255.255.252
ip mtu 1496
ip ospf authentication message-digest
ip ospf message-digest-key 10 md5 jnx
!
router ospf 64
router-id 10.0.3.4
log-adjacency-changes
auto-cost reference-bandwidth 1000
area 0 authentication message-digest
area 1 nssa no-redistribution default-information-originate
area 1 range 10.0.4.0 255.255.252.0 cost 30
area 1 filter-list prefix only-default-route in
network 10.0.2.4 0.0.0.3 area 1
133
134
[editlogicalroutersr3]
nigel@itaa7.2#runshowospfneighborlogicalrouterr3detail10.0.3.4
AddressInterfaceStateIDPriDead
10.0.2.6fxp1.34Full10.0.3.4126
area0.0.0.1,opt0x58,DR10.0.2.5,BDR10.0.2.6
Up00:17:45,adjacent00:17:45
R3
R4 R5 R3 R4
0
R3 R5 R3 10.0.3.3/32
R4/R5
[editlogicalroutersr3]
nigel@itaa7.2#showprotocolsospfarea0
interfacelo0.3{
passive;
}
inactive:interfacefxp1.35{
authentication{
md510key"$9$U.iqfu0IRSe";##SECRETDATA
}
}
[editlogicalroutersr3]
nigel@itaa7.2#runshowroutelogicalrouterr510.0.3.3|count
Count:0lines
R3 R4 1 R3/R4
NSSA 1 OSPF
5LSA LSA5
134
135
[editlogicalroutersr3]
nigel@itaa7.2#showinterfacesgre
unit3{
tunnel{
source10.0.2.5;
destination10.0.2.6;
}
familyinet{
address34.0.0.1/30;
}
}
[editlogicalroutersr3]
nigel@itaa7.2#showprotocolsospfarea0
authenticationtypemd5;
interfacelo0.3{
passive;
}
interfacegre.3{
authentication{
md510key"$9$TF6ArlMWxd";##SECRETDATA
}
}
r4#wr t
!
interface Tunnel0
ip address 34.0.0.2 255.255.255.252
ip ospf message-digest-key 10 md5 jnx
tunnel source 10.0.2.6
tunnel destination 10.0.2.5
!
router ospf 64
network 34.0.0.0 0.0.0.3 area 0
!
136
[editlogicalroutersr3]
nigel@itaa7.2#deactivateinterfacesgre.3
[editlogicalroutersr3]
nigel@itaa7.2#commit
commitcomplete
[editlogicalroutersr3]
nigel@itaa7.2#top
[edit]
nigel@itaa7.2#rollback1
loadcomplete
[edit]
nigel@itaa7.2#commit
commitcomplete
nigel@itaa7.2#runtraceroute34.0.0.2logicalrouterr3
tracerouteto34.0.0.2(34.0.0.2),30hopsmax,40bytepackets
134.0.0.2(34.0.0.2)119.630ms*68.337ms
r4#traceroute 34.0.0.1
Type escape sequence to abort.
Tracing the route to 34.0.0.1
1 34.0.0.1 4 msec 24 msec 12 msec
GRETunnel 34.0.0.0/30 IP
OSPF 0 unnumberaddress IOS
ipunnumber OSPF 0 IP GRETunnel IP
R3/R4 OSPFHello
Unnumber
Unnumber R3/R4
GRETunnel OSPF 0
IOS R3 OSPF Metric
nigel@itaa7.2#runshowospfneighborlogicalrouterr3
AddressInterfaceStateIDPriDead
34.0.0.2gre.3Full10.0.3.4123
10.0.4.2fxp1.23Full10.0.6.212834
136
137
10.0.2.6fxp1.34Full10.0.3.4121
10.0.4.14fxp2.13Full10.0.6.1038
nigel@itaa7.2#runshowrouteprotocolospf10.0.3.3logicalrouterr5
inet.0:23destinations,23routes(23active,0holddown,0hidden)
+=ActiveRoute,=LastActive,*=Both
10.0.3.3/32*[OSPF/10]00:27:46,metric65545
>to10.0.2.10viafxp2.45
nigel@itaa7.2#runtraceroute10.0.3.3logicalrouterr5
tracerouteto10.0.3.3(10.0.3.3),30hopsmax,40bytepackets
110.0.2.10(10.0.2.10)56.178ms43.846ms23.553ms
210.0.3.3(10.0.3.3)40.511ms56.856ms46.741ms
r4#sh ip route 10.0.3.3
Routing entry for 10.0.3.3/32
Known via "ospf 64", distance 110, metric 65535, type intra area
Last update from 34.0.0.1 on Tunnel0, 00:00:17 ago
Routing Descriptor Blocks:
* 34.0.0.1, from 10.0.3.3, 00:00:17 ago, via Tunnel0
Route metric is 65535, traffic share count is 1
GRETunnelKeepalives
GRETunnel GRETunnel
Keepalives GRETunnel
GRE Tunnel up
GRETunnel up
GRETunnel
GRETunnelKeepalives[][]
137
138
GRETunnel GRETunnel
Keepalives GRETunnel
GRE Tunnel up
GRETunnel up
GRETunnel
1. GRETunnel IP
2. GRETunnel IP
3. GRETunnel IP GRETunnel
[editlogicalroutersr3]
nigel@itaa7.2#commit
commitcomplete
r4#
*Mar 1 00:25:42.107: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed
state
to down
*Mar 1 00:25:42.119: %OSPF-5-ADJCHG: Process 64, Nbr 10.0.3.3 on Tunnel0 from FULL
to DOWN,
Neighbor Down: Interface down or detached
gre.3 GRETunnel OSPF
[editlogicalroutersr3]
nigel@itaa7.2#activateinterfacesgre.3
[editlogicalroutersr3]
138
139
nigel@itaa7.2#commit
commitcomplete
r4#
*Mar
state
*Mar
from
140
nigel@itaa7.2#runshowospfdatabaselogicalrouterr1area1routerlsaid
10.0.6.1detail
OSPFlinkstatedatabase,area0.0.0.1
TypeIDAdvRtrSeqAgeOptCksumLen
Router*10.0.6.110.0.6.10x8000000b15900x00xd6ae60
bits0x2,linkcount3
id10.0.4.6,data10.0.4.5,TypeTransit(2)
TOScount0,TOS0metric10
id10.0.4.13,data10.0.4.14,TypeTransit(2)
TOScount0,TOS0metric10
id10.0.6.1,data255.255.255.255,TypeStub(3)
TOScount0,TOS0metric0
nigel@itaa7.2#runshowospfdatabaselogicalrouterr1area1network
OSPFlinkstatedatabase,area0.0.0.1
TypeIDAdvRtrSeqAgeOptCksumLen
Network10.0.2.510.0.3.30x80000008210x00x809532
Network10.0.4.210.0.6.20x8000000e3150x00x709d32
Network10.0.4.610.0.6.20x8000000e12140x00x53b532
Network10.0.4.1010.0.6.20x8000000a9110x00x36d232
Network10.0.4.1310.0.3.30x8000000a15200x00x13f632
OSPFlinkstatedatabase,area0.0.0.0
TypeIDAdvRtrSeqAgeOptCksumLen
Router*10.0.3.310.0.3.30x800000109350x20xde8a72
bits0x3,linkcount4
id10.0.2.1,data10.0.2.2,TypeTransit(2)
TOScount0,TOS0metric10
id10.0.3.4,data34.0.0.1,TypePointToPoint(1)
TOScount0,TOS0metric1
id34.0.0.0,data255.255.255.252,TypeStub(3)
TOScount0,TOS0metric1
id10.0.3.3,data255.255.255.255,TypeStub(3)
TOScount0,TOS0metric0
140
141
[editlogicalrouters]
nigel@itaa7.2#setr1protocolsospfarea1interfacefxp1.13interfacetypep2p
!
hostname r4
!
interface FastEthernet0/0.24
bandwidth 100000
encapsulation dot1Q 124
ip address 10.0.4.9 255.255.255.252
ip mtu 1496
ip ospf network point-to-point
!
interface FastEthernet0/0.34
bandwidth 100000
encapsulation dot1Q 134
ip address 10.0.2.6 255.255.255.252
ip mtu 1496
ip ospf authentication message-digest
ip ospf message-digest-key 10 md5 jnx
ip ospf network point-to-point
!
OSPF LSA1 1
LSA2
nigel@itaa7.2#runshowospfdatabaselogicalrouterr1area1routerlsaid
10.0.6.1detail
OSPFlinkstatedatabase,area0.0.0.1
TypeIDAdvRtrSeqAgeOptCksumLen
Router*10.0.6.110.0.6.10x800000107570x00x9a9a84
bits0x2,linkcount5
id10.0.6.2,data10.0.4.5,TypePointToPoint(1)
TOScount0,TOS0metric10
141
142
id10.0.4.4,data255.255.255.252,TypeStub(3)
TOScount0,TOS0metric10
id10.0.3.3,data10.0.4.14,TypePointToPoint(1)
TOScount0,TOS0metric10
id10.0.4.12,data255.255.255.252,TypeStub(3)
TOScount0,TOS0metric10
id10.0.6.1,data255.255.255.255,TypeStub(3)
TOScount0,TOS0metric0
nigel@itaa7.2#runshowospfdatabaselogicalrouterr1
OSPFlinkstatedatabase,area0.0.0.1
TypeIDAdvRtrSeqAgeOptCksumLen
Router10.0.3.310.0.3.30x8000001914080x00x999484
Router10.0.3.410.0.3.40x8000000813980x280x46fa72
Router*10.0.6.110.0.6.10x8000001014120x00x9a9a84
Router10.0.6.210.0.6.20x8000001414120x00x50b96
NSSA0.0.0.010.0.3.30x8000000511460x00xe15c36
NSSA0.0.0.010.0.3.40x8000000215840x200x602d36
NSSA*10.0.5.010.0.6.10x8000000325950x80x74f336
NSSA10.0.5.010.0.6.20x8000000517430x80x78eb36
nigel@itaa7.2#runshowospfdatabaselogicalrouterr1network|count
Count:0lines
1.8 EIGRPIGP
142
143
2
IP EIGRP
3
EIGRP Cisco IOS
EIGRP Cisco DUAL
SC Topology 1
143
144
100% FD<AD SC
SIA
EIGRP
Cisco
AS EIGRP SIA
OSPF OSPF
Cisco EIGRP IGP MPLS TE
EIGRP Cisco
[][]
IGP
OSPF
13
A. IOS EIGRPAS
B. EIGRP
C.
D. LSA5
1. EIGRPAS OSPF
2. EIGRP 200.0.100/24200.0.200/24 OSPF
192.168.03/24
3. OSPF EIGRP EIGRP
[][]
IP
OSPF EIGRP AS EIGRPAS
EIGRP OSPF OSPF EIGRPAS OSPF
EIGRPAS OSPF
r1#wr t
Building configuration...
!
hostname r1
!
interface Loopback0
144
145
146
!
interface FastEthernet0/0.24
encapsulation dot1Q 124
ip address 10.0.2.10 255.255.255.252
!
router eigrp 64
network 10.0.0.0
network 200.0.200.0
no auto-summary
!
[editlogicalrouters]
nigel@itaa7.2#showr4protocolsospf
area0.0.0.0{
interfacelo0.4{
passive;
}
146
147
interfacefxp2.34;
}
area0.0.0.2{
nssa{
defaultlsa{
defaultmetric10;
type7;
}
}
interfacefxp1.47;
}
[editlogicalrouters]
nigel@itaa7.2#showr6protocolsospf
area0.0.0.1{
nssa;
interfacelo0.6{
passive;
}
interfacefxp2.36;
}
[editlogicalrouters]
nigel@itaa7.2#showr7protocolsospf
exportospfexternal;
area0.0.0.2{
nssa;
interfacelo0.7;
interfacefxp2.47;
}
[editlogicalrouters]
nigel@itaa7.2#showr7policyoptions
policystatementospfexternal{
term1{
from{
protocolstatic;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
}
}
[editlogicalrouters]
147
148
nigel@itaa7.2#showr7routingoptions
static{
route192.168.0.0/24reject;
route192.168.1.0/24reject;
route192.168.2.0/24reject;
route192.168.3.0/24reject;
}
routerid10.0.13.7;
R1R2 R3R4 OSPF R2 OSPF
2
192.168.03/24
[editlogicalrouters]
nigel@itaa7.2#setr3protocolsospfarea0interfacefxp1.13
[editlogicalrouters]
nigel@itaa7.2#setr4protocolsospfarea0interfacefxp1.24
!
interface FastEthernet0/0.13
encapsulation dot1Q 113
ip address 10.0.2.2 255.255.255.252
ip mtu 1496
!
router ospf 64
router-id 10.0.6.1
log-adjacency-changes
network 10.0.2.0 0.0.0.3 area 0
!
!
interface FastEthernet0/0.24
encapsulation dot1Q 124
ip address 10.0.2.10 255.255.255.252
ip mtu 1496
!
router ospf 64
router-id 10.0.6.2
log-adjacency-changes
network 10.0.2.8 0.0.0.3 area 0
!
r1#show ip ospf database external 192.168.0.0
148
149
[][]
EIGRP OSPF OSPF
NSSA 192.168.03/24 EIGRPEIGRPAS64
200.0.100/24 200.0.200/24 OSPF EIGRP 200
EIGRP
R1/R2 OSPF 200
R1/R2 ip defaultnetwork EIGRP R1/R2
ipsummaryaddresseigrp640.0.0.00.0.0.0
R1/R2 200 200
EIGRP 200.0.100/24 200.0.200/24 R1/R2
EIGRP IGP
/Preference
IGP R1/R2 EIGRP
!
149
150
router eigrp 64
redistribute connected
redistribute static
network 10.0.0.0
no auto-summary
IOS routemap
accesslist
tag EIGRP
OSPF OSPF EIGRP
EIGRPAS OSPF
64 le routemap route
map EIGRP
OSPF 64 OSPF route
map 64 EIGRP OSPF
EIGRP 64
routemap OSPF
IOS OSPF IOS routemap
redistribute tag
r1(config-router)#redistribute connected metric 2 route-map red subnet
% "red" used as redistribute connected into ospf route-map, tag match not supported
EIGRP OSPF
LSA5 OSPF
OSPF 1/ 2 NSSA 2 192.168.03/24
EIGRP EIGRP OSPF
NSSA ABR /
150
151
EIGRP
Metric
R1/R2 EIGRP/OSPF
!
router eigrp 64
redistribute connected
redistribute static
redistribute ospf 64 metric 10 100 255 1 1500 route-map red
network 10.0.0.0
no auto-summary
!
router ospf 64
router-id 10.0.6.1
log-adjacency-changes
redistribute connected metric 2 subnets tag 64
redistribute static metric 3 subnets route-map red
redistribute eigrp 64 metric 4 subnets route-map red
network 10.0.2.0 0.0.0.3 area 0
!
route-map red deny 10
match tag 64
!
route-map red permit 20
set tag 64
!
[editlogicalroutersr1]
nigel@itaa7.2#showpolicyoptionspolicystatementred
term1{
fromtag64;
thenreject;
}
term2{
then{
tag64;
accept;
}
}
151
152
[editlogicalroutersr1]
nigel@itaa7.2#showpolicyoptionspolicystatementred|displayset
setlogicalroutersr1policyoptionspolicystatementredterm1fromtag64
setlogicalroutersr1policyoptionspolicystatementredterm1thenreject
setlogicalroutersr1policyoptionspolicystatementredterm2thentag64
setlogicalroutersr1policyoptionspolicystatementredterm2thenaccept
routemap match
ACL R1
200.0.100.1 traceroute R7 192.168.0.0/24 EIGRP
OSPF R1/R2
192.168.03/24 OE2 R1/R2 EIGRP topology
EIGRP
r1# traceroute 192.168.0.1 source 200.0.100.1
Type escape sequence to abort.
Tracing the route to 192.168.0.1
1
2
3
4
r1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
O E2 200.0.200.0/24 [110/2] via 10.0.2.1, 00:31:36, FastEthernet0/0.13
C
200.0.100.0/24 is directly connected, Loopback200
10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
O IA
10.0.13.7/32 [110/12] via 10.0.2.1, 00:31:36, FastEthernet0/0.13
D
10.0.2.8/30 [90/307200] via 10.0.4.6, 03:08:55, FastEthernet0/0.12
O IA
10.0.8.0/30 [110/11] via 10.0.2.1, 00:31:36, FastEthernet0/0.13
O IA
10.0.9.6/32 [110/11] via 10.0.2.1, 00:31:36, FastEthernet0/0.13
O IA
10.0.12.0/30 [110/12] via 10.0.2.1, 00:31:36, FastEthernet0/0.13
C
10.0.2.0/30 is directly connected, FastEthernet0/0.13
C
10.0.4.4/30 is directly connected, FastEthernet0/0.12
152
153
O
O
C
O
D
O
O
O
O
E2
E2
E2
E2
154
200 Metric 2
EIGRP OSPF IOS EIGRP 170 OSPF /
110 R1/R2 OSPF EIGRP
r1#traceroute 200.0.200.1
Type escape sequence to abort.
Tracing the route to 200.0.200.1
1 10.0.2.1 4 msec 12 msec 4 msec
2 10.0.2.6 8 msec 12 msec 8 msec
3 10.0.2.10 36 msec *
24 msec
36 msec
r1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
154
155
O IA
D
O IA
O IA
O IA
C
C
O
O
C
O
D
O E2
O E2
O E2
O E2
R1
fa0/0.12 R1 EIGRP OSPF R2
200.0.200/24
r1(config)#interface fa0/0.12
r1(config-subif)#sh
r1(config-subif)#
*Mar 1 04:35:31.950: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 64: Neighbor 10.0.4.6
(FastEthernet0/0.12)
is down: interface down
r1(config-subif)#do traceroute 200.0.200.1 source 200.0.100.1
Type escape sequence to abort.
Tracing the route to 200.0.200.1
1 10.0.2.1 8 msec 8 msec 28 msec
2 10.0.2.6 28 msec 4 msec 4 msec
3 10.0.2.10 16 msec *
32 msec
155
156
r1(config-subif)#no sh
r1(config-subif)#
*Mar 1 04:37:52.162: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 64: Neighbor 10.0.4.6
(FastEthernet0/0.12)
is up: new adjacency
r1(config-subif)#do traceroute 200.0.200.1 source 200.0.100.1
Type escape sequence to abort.
Tracing the route to 200.0.200.1
1 10.0.4.6 24 msec *
16 msec
R1 fa0/0.13
R1 OSPF EIGRP AS
OSPF NSSA 192.168.03/24 R2 200.0.100/24
EIGRP OSPF
OSPFR2 OSPF
200.0.100/24 traceroute
EIGRP Cisco
r1(config)#interface fa0/0.13
r1(config-subif)#sh
r1(config-subif)#
*Mar 1 04:43:28.898: %OSPF-5-ADJCHG: Process 64, Nbr 10.0.3.3 on FastEthernet0/0.13
from FULL
to DOWN, Neighbor Down: Interface down or detached
r1(config-subif)#do traceroute 192.168.0.1 source 200.0.100.1
Type escape sequence to abort.
Tracing the route to 192.168.0.1
1 10.0.4.6 12 msec 8 msec 12 msec
2 * * *
3 * * *
4 10.0.12.2 !H !H !H
r1(config-subif)#do traceroute 192.168.0.1 source 200.0.100.1
Type escape sequence to abort.
Tracing the route to 192.168.0.1
1
2
3
4
157
r1(config-subif)#no sh
r1(config-subif)#
*Mar 1 04:48:29.254: %OSPF-5-ADJCHG: Process 64, Nbr 10.0.3.3 on FastEthernet0/0.13
from
LOADING to FULL, Loading Done
r1(config-subif)#do traceroute 192.168.0.1 source 200.0.100.1
Type escape sequence to abort.
Tracing the route to 192.168.0.1
1
2
3
4
IGP
JNCIx 150,000
EIGRP
13[][]
157
158
Preference IGP
Preference
ASBR
BGP
Preference
IGP Metric
IP
JUNOS IOS
JUNOS deactivate
IOS no rollback
EIGRP 13 EIGRP AS 64
EIGRP 13 EIGRP AS
159
!
r2#sh run | b r o
router ospf 64
router-id 10.0.6.2
log-adjacency-changes
redistribute connected metric 2 subnets tag 64
redistribute static metric 3 subnets route-map red
redistribute eigrp 64 metric 4 subnets route-map red
network 10.0.2.8 0.0.0.3 area 0
network 10.0.4.4 0.0.0.3 area 13
network 10.0.6.2 0.0.0.0 area 13
!
*Mar 1 02:09:13.771: %OSPF-5-ADJCHG: Process 64, Nbr 10.0.6.1 on FastEthernet0/0.12
from
LOADING to FULL, Loading Done
13
r1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
S
C
O
D
O
O
O
C
C
O
O
C
O
IA
IA
IA
IA
160
D
O
O
O
O
E2
E2
E2
E2
10.0.4.6,
00:01:32,
00:01:32,
00:01:32,
00:01:32,
02:28:39, FastEthernet0/0.12
FastEthernet0/0.13
FastEthernet0/0.13
FastEthernet0/0.13
FastEthernet0/0.13
160
161
R2 10.0.6.2/32
R1 OSPF 13 R2 Router
LSA1 10.0.6.2/32 IGP OSPF 10.0.6.2/32
OSPF EIGRP
OSPF
IGP
R2 13 Router
161
162
LSA1 10.0.2.8/30
[editlogicalroutersr3]
nigel@itaa7.2#deleteprotocolsospfarea0interfacefxp1.13
[editlogicalroutersr3]
nigel@itaa7.2#setprotocolsospfarea13interfacefxp1.13
[editlogicalroutersr3]
nigel@itaa7.2#topeditlogicalroutersr4
[editlogicalroutersr4]
nigel@itaa7.2#deleteprotocolsospfarea0interfacefxp1.24
[editlogicalroutersr4]
nigel@itaa7.2#setprotocolsospfarea13interfacefxp1.24
163
EIGRP EIGRP
OSPF EIGRP
r1#show ip route | i D
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
o - ODR, P - periodic downloaded static route
r1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
S
C
O
O
O
O
O
C
C
O
O
C
O
O
IA
IA
IA
IA
IA
IA
IA
164
O
O
O
O
E2
E2
E2
E2
192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
[80/0]
[80/0]
[80/0]
[80/0]
via
via
via
via
10.0.2.1,
10.0.2.1,
10.0.2.1,
10.0.2.1,
00:04:33,
00:04:33,
00:04:33,
00:04:33,
FastEthernet0/0.13
FastEthernet0/0.13
FastEthernet0/0.13
FastEthernet0/0.13
164