You are on page 1of 164

JUNOS

2010-4-20

OSPF

1.1 OSPF .................................................................................................................... 3


1.2 OSPF .......................................................................................... 13
1.3 OSPF NSSA .................................................................................................................. 23
1.4 OSPF LSA ......................................................................................... 38
1.5 OSPF ................................................................................................................ 47
1.6 OSPF ...................................................................................................................... 57
1.7 OSPF .............................................................................................................. 97
1.8 EIGRPIGP ......................................................................................... 142

1.1 OSPF

1. Loopback IDRID
2. Loopback OSPF
3. Loopback LSA3 0.0.0.1
4. T1 R3 0.0.0.0
OSPF

1.JUNOS OSPF IDRID


2. OSPF RID
3. OSPF ABR RID IP
4. JUNOS IGP PASSIVE
5. JUNOS OSPF
JUNOS
JUNOS 5
OSPF
IOS IP
JUNOS IP
OSPF
R3 JUNOS
protocols {
ospf {
3

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

*[OSPF/10] 04:49:45, metric 1

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

nigel@www.itaalab.com# run show ospf database logical-router


r3 router lsa-id 10.0.3.5 detail
OSPF link state database, area 0.0.0.0
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Router 10.0.3.5
10.0.3.5 0x80000011 186 0x2 0xf69e 60
bits 0x1, link count 3
id 10.0.2.1, data 10.0.2.1, Type Transit (2)
TOS count 0, TOS 0 metric 10
id 10.0.2.9, data 10.0.2.9, Type Transit (2)
TOS count 0, TOS 0 metric 10
id 10.0.3.5, data 255.255.255.255, Type Stub (3)
TOS count 0, TOS 0 metric 0
[edit]
nigel@www.itaalab.com# run show ospf database logical-router
r7 router lsa-id 10.0.3.5 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 0x8000000f 1394 0x2 0x195c 60
bits 0x1, link count 3
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
id 10.0.3.5, data 255.255.255.255, Type Stub (3)
TOS count 0, TOS 0 metric 0
R5 RID 0.0.0.0
LSA-3 0.0.0.1
8

[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

*[OSPF/10] 00:01:34, metric 20


10

11

> to 10.0.2.2 via fxp2.35


R3 OSPF R3 R2/R5 OSPF
nigel@www.itaalab.com# 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 39

JUNOS OSPF
JNCIx
OSPFISIS

JUNOS OSPF Hacks 1


OSPF OSPF

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

OSPF OSPF ABR


ABR OSPF R5
6 LSA-1 3 0 3 1 ABR R5 0
1 1 LSA-1 OSPF LSA-1 6
JUNOS OSPF Hacks 3
JUNOS LSA
nigel@itaalab# run show ospf database logical-router r5
router 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 0x80000003 200 0x2
Router 10.0.3.4 10.0.3.4 0x80000004 191 0x2
Router *10.0.3.5 10.0.3.5 0x80000004 190 0x2

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

JUNOS OSPF Hacks 5


T1 R3 172.16.0.12/30 IP JUNOS
172.16/16
16 172.16 IP
nigel@itaalab# 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

*[OSPF/10] 00:21:33, metric 20


> to 10.0.2.2 via fxp2.35

1.2 OSPF
13

14

Juniper JUNOS OSPF Stub Area LSA


Juniper R7 OSPF ()/LSA
200.0.0.0/24
R1, R2, R3,
R4 OSPF 10Stub Area
[][]
1. R7 200.0.0/24
2. R1 R2 0.0.0.10
3. 0.0.0.10 5 LSALSA5
4. 0.0.0.10
5. 0.0.0.10
[][]
1. LSA
2. JUNOS
3. JUNOSOSPF TSA
4. TSA BGP
10 [][]
OSPF (Stub Area)10 - R1
protocols {
ospf {
area 0.0.0.10 {
stub;
interface lo0.1 {
passive;
}
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

R5 OSPF LSA5 LSA4 R5 LSDB


nigel@www.itaalab.com#runshowospfdatabaselogicalrouterr5external
16

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

ASBRR7 LSALSA5 200.200/24 ABRR5 ASBR


SummaryLSA4 0.0.0.0
R1 R2 R3 R4
ASBRR7 R1 OSPF 200.200/24
nigel@www.itaalab.com#runshowroutelogicalrouterr1200.200/24

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

MetricTag Metric 1030


R1
static{
route200.200.0.0/24{
receive;
metric10;
tag30;
preference10;
}
}

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

Juniper JUNOS CISCO IOS OSPF


(TSA) TSA TSA
ABR Metric
(default-Metric) ABR /TSA
R1/R2/R3/R4 10 /TSA
default-Metric ABR R3/R4 10 R1/R2
10
nigel@junos# show r3 protocols ospf
area 0.0.0.0 {
interface fxp1.34;
interface fxp1.35;
interface lo0.3 {
passive;
}
interface fxp1.30 {
passive;
}
}
area 0.0.0.10 {
stub default-metric 10;
interface fxp2.13;
}
nigel@junos# show r4 protocols ospf
area 0.0.0.0 {
interface fxp2.34;
interface fxp1.45;
interface lo0.4 {
passive;
}
}
area 0.0.0.10 {
stub default-metric 10;
interface fxp1.24;
}
10 OSPF 10
Hello OSPF Option E 0 opt 00
option E 10 R1 OSPF
10 Stub Area

overview JUNOS 8.5


nigel@junos# run show ospf neighbor logical-router r1
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

nigel@junos# run show ospf overview logical-router r1


Instance: master
Router ID: 10.0.6.1
Route table index: 10
Full SPF runs: 27, SPF delay: 0.200000 sec,
SPF holddown: 5 sec, SPF rapid runs: 3
LSA refresh time: 50 minutes
Area: 0.0.0.10
Stub type: Stub
Authentication Type: None
Area border routers: 2, AS boundary routers: 0
Neighbors
Up (in full state): 2
R1 OSPF R7 200.200/24 LSA-5 R1
LSDB R1 0.0.0.0
200.200/16
nigel@junos# run clear ospf database logical-router r1
nigel@junos# run show ospf database logical-router r1
external | count
Count: 0 lines
nigel@junos# run show route protocol ospf logical-router
r1 | match 0.0.0.0
0.0.0.0/0
*[OSPF/10] 00:39:21, metric 11
nigel@junos# run show route protocol ospf logical-router
r1 200.200/16 | count
Count: 0 lines
R1 200.200/24 ABR R1
traceroute R1 200.200/24
nigel@junos# run traceroute 200.200.0.1 logical-router r1
traceroute to 200.200.0.1 (200.200.0.1), 30 hops max,
40 byte packets
1 10.0.4.13 (10.0.4.13) 0.493 ms 0.882 ms 0.337 ms
2 10.0.2.1 (10.0.2.1) 0.543 ms 0.439 ms 0.530 ms
3 10.0.8.10 (10.0.8.10) 0.608 ms 0.741 ms 0.569 ms
21

22

4 10.0.8.10 (10.0.8.10)
0.621 ms !H

0.617 ms !H

0.662 ms !H

R1 OSPF LSA-3 LSDB 10


nigel@junos# run show ospf database logical-router r1
netsummary
OSPF link state database, Area 0.0.0.10
Type
ID
Adv Rtr Seq
Age Opt
Summary 0.0.0.0 10.0.3.3 0x80000004 731 0x20
Summary 0.0.0.0 10.0.3.4 0x80000004 610 0x20
Summary 10.0.2.0 10.0.3.3 0x80000005 429 0x20

Cksum
0x849d
0x7ea2
0x7da3

Len
28
28
28

TSA BGP [][]


LSA3 OSPF ABR nosummary
10 LSA3 ABR
LSA LSA3 ABR
netsummaryLSA LSA3/4/5 LSA 10 R3/R4
ABR ABR nosummary
nigel@www.itaalab.com#setr3protocolsospfarea10stubnosummaries
nigel@www.itaalab.com#setr4protocolsospfarea10stubnosummaries

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.

1.3 OSPF NSSA


23

24

:
, 1.2
OSPF LSA-5 OSPF
LSA-5 LSA-5

LSA-5OSPF Not-So-Stubby Area (NSSA)


LSA - LSA-7 NSSA
LSA-5 NSSA ASBR ASBR
NSSA ABR LSA-5 NSSA
NSSA LSA-7 LSA-5
OSPF Option E
NSSA OSPF Option
N RFC 1587 OSPF LSA-3 NSSA
NSSA LSA-3 OSPF
JUNOS IOS NSSA OSPF LSA-3
TNSSA
[][]
1. 10 LSA-3/4/5
2. R1 OSPF 3/8 Metric 10 OSPF
R1 Metric
3. 10 OSPF
4. 2 3/8 10
[][]

24

25

1.
2.
3.

JUNOSNSSA LSA3
JUNOSNSSAType7 Type5 MetricMania
OSPFMetric JUNOSNSSA PerPacketLoadbalancing;

OSPF Type-7 LSA[][]


Juniper JUNOS OSPF (Stub Area) LSA-5
R1 OSPF
policy-options {
policy-statement 3/8 {
term 1 {
from {
protocol static;
route-filter 3.0.0.0/8 exact;
}
then {
metric 10;
external {
type 1;
}
accept;
}
}
}
}
nigel@junos7.2# set r1 protocols ospf export 3/8

JUNOS OSPF NSSA[][]


term 1 reject
term 2 term 2 JUNOS
term accept reject
R1 3
8 OSPF

reject term 2 reject


Direct 3/8
Metric 10
OSPF ASBR R1
OSPF 2 1 OSPF
COST Metric 10
10 TSA
10 LSA-5 LSA-7 LSA
nigel@junos7.2# run show ospf database logical-router r1
external | count
25

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

nigel@junos7.2# run show route protocol ospf


logical-router r1
inet.0: 12 destinations, 12 routes (12 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0
10.0.4.8/30
10.0.6.2/32
224.0.0.5/32

*[OSPF/10] 00:02:44, metric 11


> to 10.0.4.13 via fxp1.13
*[OSPF/10] 00:44:12, metric 2
> to 10.0.4.6 via fxp1.12
*[OSPF/10] 00:44:12, metric 1
> to 10.0.4.6 via fxp1.12
*[OSPF/10] 1d 10:30:35, metric 1
MultiRecv

R1 OSPF 0.0.0.0 LSA NSSA LSA-7


LSA-3 OSPF LSDB JUNOS IOS
OSPF
nigel@junos7.2# run show ospf database logical-router r1
nssa
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 0x80000004 547 0x28 0x7e7a 36
[edit logical-routers]
nigel@junos7.2# run show ospf database logical-router r1
netsummary
OSPF link state database, Area 0.0.0.10
27

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

nigel@junos7.2# run show ospf database logical-router r1


netsummary | count
Count: 0 lines
[edit logical-routers]
nigel@junos7.2# run show ospf database logical-router r1
nssa
OSPF link
Type
ID
NSSA 0.0.0.0
NSSA 0.0.0.0
NSSA *3.0.0.0

state database, Area 0.0.0.10


Adv Rtr
Seq
Age Opt
10.0.3.3 0x80000001
16 0x20
10.0.3.4 0x80000001
17 0x20
10.0.6.1 0x80000005 529 0x28

Cksum
0x62b6
0x5cbb
0x7c7b

Len
36
36
36

LSA Type 7 to Type 5 Metric Mania[][]

28

29

JNCIP 193 Harry Reynolds R6 3/8


Metric R6 3/8 traceroute R6->R5->R4->R2->R1
IP R1 R2 fxp1.12 IP 10.0.4.5
:
R6->R5->R3->R1

JUNOS 5.2R1.4 JNCIP JNCIE


JUNOS 7.2R4.2 : R6 3/8 Harry Reynolds
Metric 14 JUNOS 7.2R4.2 15 JUNOS 8.5R1.14
13 JUNOS 7.2R4.2 JUNOS 8.5R1.14
JUNOS OSPF
10Mbps fxp fxp 10M JUNOS OSPF 10
OSPF 100Mbps 10Mbps
fxp JUNOS OSPF 1 OSPF

nigel@junos# set protocols ospf reference-bandwidth 10m


Harry Reynolds LSA NSSA LSA-7 NSSA
NSSA ABR LSA
NSSA RID ABR LSA-7 LSA-5 LSA-5
RFC JUNOS 7.2/8.5

29

30

nigel@junos# run show ospf database logical-router r5


nssa | count
Count: 0 lines
[edit]
nigel@junos# 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 0x80000002 184 0x2 0xf12f 36
mask 255.0.0.0
Type 1, TOS 0x0, metric 12, fwd addr 10.0.6.1,
tag 0.0.0.0
10 NSSA ABR - R3/R4 RID 10.0.3.3/10.0.3.4 RID R4
10.0.3.4
LSA-7 LSA-5 0 0 NSSA Type-7 LSA
Metric
Harry Reynolds Metric
Harry Reynolds Metric LSA-7 NSSA ABR
LSA-7 type 1ABR Metric LSA-7 Metric ABR
3/8 Metric 10 R1-R2/R2-R4 OSPF COST
1 3/8 R4 Metric 10+2=12 JUNOS
JUNOS
nigel@junos# run show route logical-router r4 3/8
inet.0: 22 destinations, 22 routes (22 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.0.0.0/8

*[OSPF/150] 00:30:02, metric 12, tag 0


> to 10.0.4.10 via fxp1.24

ABR Harry Reynolds Metric LSA-5 Metric ABR


R5 R4 Metric 12 LSA
OSPF LSA-5 Metric Metric LSA-5 Metric
ASBR LSA-4, OSPF Metric R5 R4
13/8 R5 Metric 12+1=13
R6 Harry Reynolds 14
OSPF LSA-5 Metric Metric
LSA-5 ASBR Metric
LSA-4 3/8 LSA ASBR?
LSA-7 LSA-5 R4 ASBR ASBR
ASBR

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

JUNOS 7.2R4.2 LSA


R4 NSSA R1 LSA-7 OSPF
R1 OSPF LSA-3 R1
3/8 OSPF
3/8 R4 R1 R1 ASBR
Metric LSA-5 Metric ASBR R1 Metric
LSA-5
nigel@junos7.2# 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 0x80000002 184 0x2 0xf12f 36
mask 255.0.0.0
Type 1, TOS 0x0, metric 12, fwd addr 10.0.6.1,
tag 0.0.0.0

NSSA Metric Mania - JUNOS 7.2R4.2

31

32

JUNOS 7.2R4.2 LSA-5 R4Metric R4 12


forwarding address 10.0.6.1 R4 ASBR
R1 R5 OSPF LSA-4
nigel@junos7.2# run show ospf database logical-router r5
asbrsummary area 0 detail
OSPF link state database, area 0.0.0.0
Type
ID
Adv Rtr Seq
Age
ASBRSum 10.0.6.1 10.0.3.3 0x80000009 130
mask 0.0.0.0
TOS 0x0, metric 1
ASBRSum 10.0.6.1 10.0.3.4 0x80000009 131
mask 0.0.0.0
TOS 0x0, metric 2
ASBRSum *10.0.9.7 10.0.3.5 0x80000009 1030
mask 0.0.0.0
TOS 0x0, metric 1

Opt Cksum Len


0x2 0x72b 28

0x2 0xb25 28

0x2 0x9d89 28

ABRR3/R4 LSA-4 Metric 1 2


R5 R3 ASBR R5 Metric LSA-5 12
R3 LSA-4 1 R5 R3 1: 12+1+1=14
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

*[OSPF/150] 01:09:51, metric 14, tag 0


> to 10.0.2.2 via fxp2.35

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

*[OSPF/150] 01:09:54, metric 15, tag 0


> to 10.0.8.6 via fxp2.56

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

*[OSPF/150] 03:22:20, metric 12, tag 0


> to 10.0.2.2 via fxp2.35

[edit]
33

34

nigel@junos8.5# 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

*[OSPF/150] 03:22:24, metric 13, tag 0


> to 10.0.8.6 via fxp2.56

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

*[OSPF/150] 00:00:00, metric 15, tag 0


to 10.0.2.2 via fxp2.35
> to 10.0.2.10 via fxp2.45

JUNOS NSSA Per-Packet Load balancing


R5 3/8 hash
R5 Forwarding Table JUNOS per-packet load balancing

policy-options {
policy-statement hash {
term 1 {
from {
protocol ospf;
34

35

route-filter 3.0.0.0/8 exact;


}
then {
load-balance per-packet;
accept;
}
}
}
}
nigel@junos7.2# set r5 routing-options forwarding-table
export hash
R5 R5 3/8
R1 fxp1.38 3.0.0.1/30 IP
traceroute R5
nigel@junos7.2# run show route forwarding-table |
Logical router: r5
Routing table: inet
Internet:
Destination Type RtRef Next hop Type Index NhRef
default
perm
0
dscd 398
1
3.0.0.0/8 user
0
ulst 131070
1
10.0.2.2 ucst 645
4
10.0.2.10 ucst 640
8
......
<!--output omitted-->

find r5

Netif

fxp2.35
fxp2.45

nigel@junos7.2# run traceroute 3.0.0.1 logical-router r5


traceroute to 3.0.0.1 (3.0.0.1), 30 hops max,
40 byte packets
1 10.0.2.2 (10.0.2.2)
1.406 ms 10.0.2.10 (10.0.2.10) 0.751 ms 0.862 ms
2 3.0.0.1 (3.0.0.1)
0.949 ms 0.948 ms 10.0.4.10 (10.0.4.10) 0.797 ms
[edit logical-routers]
nigel@junos7.2# run traceroute 3.0.0.1 logical-router r5
traceroute to 3.0.0.1 (3.0.0.1), 30 hops max,
40 byte packets
1 10.0.2.10 (10.0.2.10)
1.784 ms 10.0.2.2 (10.0.2.2) 1.701 ms 2.369 ms
2 10.0.4.10 (10.0.4.10)
35

36

2.166 ms 3.002 ms 3.0.0.1 (3.0.0.1) 2.390 ms


0.0.0.10 OSPF
R3/R4 NSSA R1/R2
R6 JNCIP OSPF JUNOS OSPF ()/LSA R7
OSPF 200.200/24 traceroute
200.200/24 IP !H
nigel@junos7.2# run traceroute 10.0.9.6
logical-router r1
traceroute to 10.0.9.6 (10.0.9.6), 30 hops max,
40 byte packets
1 10.0.4.13 (10.0.4.13)
1.872 ms 2.077 ms 0.782 ms
2 10.0.2.1 (10.0.2.1)
1.951 ms 2.445 ms 2.289 ms
3 10.0.9.6 (10.0.9.6)
2.298 ms 2.887 ms 2.110 ms
[edit logical-routers]
nigel@junos7.2# run traceroute 10.0.9.6
logical-router r2
traceroute to 10.0.9.6 (10.0.9.6), 30 hops max,
40 byte packets
1 10.0.4.9 (10.0.4.9)
1.666 ms 2.465 ms 1.535 ms
2 10.0.2.9 (10.0.2.9)
1.973 ms 2.463 ms 2.444 ms
3 10.0.9.6 (10.0.9.6)
3.242 ms 2.511 ms 2.685 ms
[edit logical-routers]
nigel@junos7.2# run traceroute 200.200.0.1
logical-router r1
traceroute to 200.200.0.1 (200.200.0.1), 30 hops max,
40 byte packets
1 10.0.4.13 (10.0.4.13)
1.072 ms 1.858 ms 1.084 ms
2 10.0.2.1 (10.0.2.1)
1.562 ms 1.862 ms 1.394 ms
3 10.0.8.10 (10.0.8.10)
36

37

2.402 ms 2.285 ms 1.829 ms


4 10.0.8.10 (10.0.8.10)
1.690 ms !H 2.792 ms !H 2.053 ms !H
[edit logical-routers]
nigel@junos7.2# run traceroute 200.200.0.1
logical-router r2
traceroute to 200.200.0.1 (200.200.0.1), 30 hops max,
40 byte packets
1 10.0.4.9 (10.0.4.9)
1.894 ms 1.331 ms 1.078 ms
2 10.0.2.9 (10.0.2.9)
1.659 ms 2.495 ms 1.488 ms
3 10.0.8.10 (10.0.8.10)
1.739 ms 2.180 ms 1.746 ms
4 10.0.8.10 (10.0.8.10)
1.881 ms !H 2.193 ms !H 2.148 ms !H

37

38

1.4 OSPF LSA

[][]
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;

nigel@junos# set protocols ospf area 1 interface fxp1.68


passive
R5 OSPF 4 R6 LSA-1
nigel@junos# run show ospf database logical-router r5
lsa-id 10.0.9.6 area 1 extensive
OSPF link state database, Area 0.0.0.1
Type
ID
Adv Rtr Seq Age Opt Cksum Len
Router 10.0.9.6 10.0.9.6 0x80000037 26 0x22 0x8654 108
bits 0x0, link count 7
id 6.0.3.0, data 255.255.255.0, Type Stub (3)
TOS count 0, TOS 0 metric 1
id 6.0.2.0, data 255.255.255.0, Type Stub (3)
TOS count 0, TOS 0 metric 1
id 6.0.1.0, data 255.255.255.0, Type Stub (3)
TOS count 0, TOS 0 metric 1
id 6.0.0.0, data 255.255.255.0, Type Stub (3)
TOS count 0, TOS 0 metric 1
id 10.0.8.5, data 10.0.8.5, Type Transit (2)
TOS count 0, TOS 0 metric 1
id 10.0.8.1, data 10.0.8.1, Type Transit (2)
TOS count 0, TOS 0 metric 1
id 10.0.9.6, data 255.255.255.255, Type Stub (3)
TOS count 0, TOS 0 metric 0
Aging timer 00:59:33
39

40

Installed 00:00:25 ago, expires in 00:59:34,


sent 00:00:25 ago
Last changed 00:00:25 ago, Change count: 6

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

*[OSPF/10] 02:38:31, metric


> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:38:31, metric
> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:38:31, metric
> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:38:31, metric
> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:37:46, metric
> to 10.0.2.1 via fxp1.35

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

*[OSPF/10] 02:38:33, metric 3


> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:38:33, metric 2
> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:38:33, metric 2
> to 10.0.2.1 via fxp1.35

/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

*[OSPF/10] 02:38:35, metric


> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:38:35, metric
> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:38:35, metric
> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:38:35, metric
> to 10.0.2.1 via fxp1.35
*[OSPF/10] 02:37:50, metric
> to 10.0.2.1 via fxp1.35

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

OSPF AS SCOPE link state database


Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Extern 3.0.0.0
10.0.3.4 0x80000055 16 0x22 0x555a 36
Extern 200.200.0.0 10.0.9.7 0x8000006a 28 0x22 0xcece 36
NSSA LSA-3 [edit protocols ospf area]
0.0.0.1 LSA-3
[edit logical-routers r5]
nigel@junos# set protocols ospf area 1 area-range
10.0.8/23
[edit logical-routers r5]
nigel@junos# show protocols ospf area 1
area-range 10.0.8.0/23;
interface fxp1.56;
interface fxp1.57;
R3 5 10.0.8/23
Metric Metric Metric override-Metric

nigel@junos# run show route protocol ospf logical-router


r3 10.0.8/23
42

43

inet.0: 24 destinations, 24 routes (24 active,


0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.8.0/23

*[OSPF/10] 00:00:21, metric 3


> to 10.0.2.1 via fxp1.35

NSSA 0.0.0.10 LSA-3 10


R3/R4 ABR R3/R4
[edit logical-routers]
nigel@junos# set r3 protocols ospf area 10 area-range
10.0.4.0/22
[edit logical-routers]
nigel@junos# set r4 protocols ospf area 10 area-range
10.0.4.0/22
nigel@junos# show r3 protocols ospf
area 0.0.0.10 {
nssa {
default-lsa {
default-metric 10;
type-7;
}
no-summaries;
}
area-range 10.0.4.0/22;
interface fxp2.13 {
metric 2;
}
}
R3 R4 R5
5
nigel@junos# run show route logical-router
r5 10.0.4.0/22
inet.0: 23 destinations, 23 routes (23 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.4.0/22

*[OSPF/10] 00:00:05, metric 4


43

44

> to 10.0.2.10 via fxp2.45

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

nigel@junos# run show route logical-router r3 6/22


inet.0: 24 destinations, 24 routes (24 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
6.0.0.0/24
6.0.1.0/24
6.0.2.0/24
6.0.3.0/24

*[OSPF/10] 03:45:58, metric


> to 10.0.8.5 via fxp1.56
*[OSPF/10] 03:45:58, metric
> to 10.0.8.5 via fxp1.56
*[OSPF/10] 03:45:58, metric
> to 10.0.8.5 via fxp1.56
*[OSPF/10] 03:45:58, metric
> to 10.0.8.5 via fxp1.56

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

Metric 16777215 10.0.8/23


6.0.0/22 Discard

nigel@junos# run show route protocol ospf logical-router


r5
inet.0: 25 destinations, 25 routes (25 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.0.0.0/8
6.0.0.0/22
6.0.0.0/24

10.0.8.0/23
10.0.8.0/30

*[OSPF/150] 03:19:40, metric 14, tag 0


> to 10.0.2.10 via fxp2.45
*[OSPF/10] 02:50:47, metric 16777215
Discard
*[OSPF/10] 06:38:36, metric 2
> to 10.0.8.5 via fxp1.56

*[OSPF/10] 03:10:22, metric 16777215


Discard
*[OSPF/10] 07:00:06, metric 2
> to 10.0.8.5 via fxp1.56
to 10.0.8.10 via fxp1.57

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

OSPF NSSA LSA-7[][]


3/8 JUNOS NSSA LSA-7
JUNOS OSPF IOS
summary-address LSA-5 JUNOS
aggregate aggregate OSPF LSA-5
LSA-7 LSA-5 JUNOS
NSSA / area-range NSSA :
[edit logical-routers r3 protocols ospf area 0.0.0.10 nssa]
area-range R3/R4
area 0.0.0.10 {
nssa {
default-lsa {
default-metric 10;
type-7;
}
no-summaries;
area-range 3.0.0.0/8 restrict;
}
area-range 10.0.4.0/22;
interface fxp2.13 {
metric 2;
}
0.0.0.10 area-range area 0.0.0.10
area-range LSA-3 [nssa] area-range
NSSA LSA-7 0 OSPF
LSA-7 OSPF NSSA ASBR LSA-4
OSPF
nigel@junos# run show ospf database logical-router r5
area 0
46

47

OSPF link state database, Area 0.0.0.0


Type
ID
Adv Rtr Seq
Age
Router 10.0.3.3 10.0.3.3 0x80000055 261
Router 10.0.3.4 10.0.3.4 0x8000006a 261
Router *10.0.3.5 10.0.3.5 0x80000058 260
Network 10.0.2.2 10.0.3.3 0x80000016 227
Network 10.0.2.6 10.0.3.4 0x80000055 827
Network 10.0.2.10 10.0.3.4 0x80000013 227
Summary 10.0.4.0 10.0.3.3 0x8000000b 827
Summary 10.0.4.0 10.0.3.4 0x80000009 527
Summary *10.0.8.0 10.0.3.5 0x8000004b 14
ASBRSum 10.0.6.1 10.0.3.3 0x8000004b 260
ASBRSum 10.0.6.1 10.0.3.4 0x80000061 260
ASBRSum *10.0.9.7 10.0.3.5 0x8000004b 259
OSPF AS SCOPE link state database
Type
ID
Adv Rtr Seq
Age
Extern 200.200.0.0 10.0.9.7 0x8000007e 527

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

Opt Cksum Len


0x22 0xa6e2 36

3/8 10 1.3 3/8


per-packet load balance

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

OSPF R3 R5 LSA3 LSA3 3


LAS R3
nigel@itaalab#runshowospfdatabaselogicalrouterr3netsummaryadvertising
router10.0.3.5
extensive

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

OSPF LSA JUNOS


OSPF JUNOS
MD5 Area
MD5
KeyID MD5 RFC1321.
JUNOS JUNOS 7.2
[protocolsospfareax]authenticationtype
MD5
setarea0.0.0.0authenticationtypemd5
setarea0.0.0.1authenticationtypesimplepassword

OSPF JUNOS IOS


OSPF
JUNOS8.5

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

vl10.0.3.3 PtToPt 0.0.0.00.0.0.00.0.0.01


fxp1.56BDR0.0.0.110.0.9.610.0.3.51
fxp1.57BDR0.0.0.110.0.9.710.0.3.51
fxp2.35DR0.0.0.310.0.3.510.0.3.31

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

/var/log (M/T )/cf/var/log (J ),


traceoptions
OSPF traceoptions
Hello/error
nigel@itaalab#runmonitorstartr3/ospflog
***r3/ospflog***

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

IGP Hello BFD


IGP OSPF ISISBGP MPLS
JUNOS8.5 BFD
[editlogicalrouters]
nigel@itaalab#showr3protocolsospfarea0
virtuallinkneighborid10.0.3.5transitarea0.0.0.3{
hellointerval5;
deadinterval20;
authentication{
md510key"$9$vMg8xd24Zk.54a39";##SECRETDATA
}
}
interfacefxp1.34{
hellointerval5;
deadinterval20;
bfdlivenessdetection{
minimuminterval500;
}
}

[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;
}
}

BFD 3 500 (ms)


1.5 multiplier
BFD OSPF OSPF

BFD R4 BFD BDF OSPF


nigel@itaalab#runshowbfdsessiondetaillogicalrouterr4
Transmit
AddressStateInterfaceDetectTimeIntervalMultiplier
10.0.2.9Upfxp1.451.5000.5003
ClientOSPF,TXinterval0.500,RXinterval0.500
Sessionuptime00:13:15
LocaldiagnosticNone,remotediagnosticNone
56

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

1. R1/R2 10.0.5/24 OSPF Metric 50 420


Metric 50
2. R6/R7 10.0.5/24 RIP
3. R6/R7 192.168.0/24 192.168.3/24 RIP OSPF 0.0.0.1

4. RIP R6/R7 10.0.5/24


5. RIP 10.0.5/24
6. 192.168.03/24 OSPF OSPF
[][]
1. JUNOSRIP
2. JUNOSOSPF RIP
3.
4. JUNOSOSPF LSA5
5. JUNOSGenerateRoute
1.JUNOSRIP [][]
J Juniper IP
OSPF ISIS JUNOS IGP RIP
JUNOS RIP
JUNOS IOS RIP RIP
JUNOS
RIP
RIP
RIP
JUNOS ,JUNOS RIP RIP
RIP
RIP MPLS IPv6
RFC RIP RIP Juniper
RIP
RIP [][]
RIP 4 192.168.03/24 IP
4 RIP receive
ping/traceroute
fxp1.80 R6/R7 RIP
[editlogicalrouters]
nigel@itaa7.2#showrip
interfaces{
fxp1{
unit80{
vlanid180;
familyinet{
address172.16.40.1/24;
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

R6/R7 RIP OSPF R6 rip


ospf / R7
[editlogicalrouters]
nigel@itaa7.2#editr6policyoptionspolicystatementripospf

[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

R7 OSPF R7 LSA5 200.200.0.0


192.168/22 R7 OSPF
1.2 200.200/24 OSPF R7

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

R7 RIP RIP 10.0.5/24 RIP


nigel@itaa7.2#runshowrouteadvertisingprotocolrip172.16.40.3logicalrouter
r7

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

172.16.40.0/24 OSPF RIP traceroute


10.0.5/24 R6/R7 172.16.40/24 passive
OSPF 1
[editlogicalrouters]
nigel@itaa7.2#setr6protocolsospfarea1interfacefxp2.80passive

[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

R6/R7 RIP 10.0.5/24


R6 RIP OSPF 10.0.5/24 R6
R6 10.0.5/24 RIP
172.16.40.3R7
nigel@itaa7.2#runshowrouteadvertisingprotocolrip172.16.40.2logicalrouter
r6

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;
}

R6 10.0.5/24 OSPF ripospf


routefilter 192.168.0/22

[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

10.0.5/24 R1/R2 OSPF

[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

OSPF RIP 10.0.5/24 RIP


OSPF term
[editlogicalroutersr6]
nigel@itaa7.2#showpolicyoptions
policystatementripospf{
term1{
from{
routefilter10.0.5.0/24exact;
}
thenreject;
}
term2{
fromprotocolrip;
thenaccept;
}
}

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

R6/R7 RIP Preference 160 192.168.0


3/24 10.0.5/24 5 Preference 160.
nigel@itaa7.2#runshowroutelogicalrouterr7protocolrip

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

RIP Preference 10.0.5/24

192.168.03/24 10.0.5/24 Preference 160


RIP R6/R7 RIPPreference

[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

R6/R7 10.0.5/24 Preference 160

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 [][]

1. RIP OSPF OSPF OSPF


2. RIP
3. RIP OSPF Preference
4. Metric
R6
ripospf 10.0.5/24
RIPPreference R6 10.0.5/24 OSPF

[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

RIP OSPF Metric RIP


OSPF Metric R1/R2 OSPF Metric
10.0.5/24 OSPF R6 ripospf

[editlogicalroutersr6]
nigel@itaa7.2#showpolicyoptionspolicystatementripospf
term1{
fromprotocolrip;
then{
metric400;
accept;
}
79

80

R4OSPF R4 NSSA LSA710.0.5.0 LSA5


R1 192.168/22 traceroute
nigel@itaa7.2#runshowospfdatabaselogicalrouterr4lsaid10.0.5.0detail

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 Preference 130.


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

JUNOS Generate Route ISP


Generate Route
Generate RIP
GenerateRoute ContributingRoutes ISP
Generate Route Contributing RoutesISP
GenerateRoute Hidden

ISP JUNOS
ContributingRoute ISP GenerateRoute

1. ISP Egress R6 RIP/R7/R5 RIP/OSPF 192.168.0


3/24 Customer
VLAN R7 Aggregate 192.168.03/24
ripospf R7 OSPF
nigel@itaa7.2#showlogicalroutersr7policyoptions
policystatementripospf{
term1{
from{
protocolrip;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
84

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*

172.16.0.0/30 is subnetted, 2 subnets


172.16.89.0 is directly connected, FastEthernet0/0.89
172.16.69.0 is directly connected, FastEthernet0/0.69
0.0.0.0/0 [120/1] via 172.16.69.1, 00:00:06, FastEthernet0/0.69

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

172.16.69.1 12 msec 4 msec 4 msec


10.0.8.6 4 msec 4 msec 4 msec
10.0.2.2 4 msec 8 msec 8 msec
10.0.4.2 4 msec 4 msec 16 msec
10.0.5.1 4 msec 4 msec 4 msec

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

PrimaryContributingroute RIP 192.168.1/24


192.168.0.0/24
[editlogicalroutersr6]
nigel@itaa7.2#showpolicyoptions
policystatementripimport{
term1{
from{
protocolrip;
nexthop172.16.40.1;
routefilter192.168.0.0/24exactreject;
routefilter192.168.0.0/22orlonger;
}
thenaccept;
}
term2{
thenreject;
}
}

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*

172.16.0.0/30 is subnetted, 2 subnets


172.16.89.0 is directly connected, FastEthernet0/0.89
172.16.69.0 is directly connected, FastEthernet0/0.69
0.0.0.0/0 [120/1] via 172.16.69.1, 00:00:10, FastEthernet0/0.69
94

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

172.16.0.0/30 is subnetted, 2 subnets


172.16.89.0 is directly connected, FastEthernet0/0.89
172.16.69.0 is directly connected, FastEthernet0/0.69
0.0.0.0/0 [160/0] via 172.16.89.1

C
C
S*

Customer#ping 192.168.0.1

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/5/8 ms

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*

172.16.0.0/30 is subnetted, 2 subnets


172.16.89.0 is directly connected, FastEthernet0/0.89
172.16.69.0 is directly connected, FastEthernet0/0.69
0.0.0.0/0 [120/1] via 172.16.69.1, 00:00:03, FastEthernet0/0.69

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

1. JUNOS IOS OSPF [][]


1. OSPF RID OSPF
2. LSA3
ABR R3/R4/R5 RID OSPF 0

[edit logical-routers r5]


nigel@junos7.2# show routing-options
router-id 10.0.3.5;
[edit logical-routers r5]
nigel@junos7.2# show protocols ospf
area 0.0.0.0 {
interface lo0.5 {
passive;
}
interface fxp2.45;
interface fxp2.35;
}
area 0.0.0.20 {
interface fxp1.56;
interface fxp1.57;
}
r4#wr t
!
interface Loopback0
ip address 10.0.3.4 255.255.255.255
!
interface FastEthernet0/0
no ip address
duplex auto
99

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

Neighbor ID Pri State


Dead Time Address
10.0.3.3
128 FULL/BDR 00:00:34 10.0.2.5
10.0.3.5
128 FULL/DR 00:00:36 10.0.2.9
10.0.6.2
128 FULL/BDR 00:00:39 10.0.4.10

Interface
Fa0/0.34
Fa0/0.45
Fa0/0.24

* FastEthernet Fa
R6/R7 LSA-3 20
LSA-3
100

101

nigel@junos7.2# run show ospf database logical-router


r6 netsummary | match summary
Summary 10.0.2.0 10.0.3.5 0x8000000d 571 0x2 0x2510
Summary 10.0.2.4 10.0.3.5 0x8000000b 529 0x2 0xb27
Summary 10.0.2.8 10.0.3.5 0x80000011 399 0x2 0xcc5c
Summary 10.0.3.3 10.0.3.5 0x80000007 271 0x2 0x1a1a
Summary 10.0.3.4 10.0.3.5 0x80000009 229 0x2 0x161a
Summary 10.0.3.5 10.0.3.5 0x8000000a 99 0x2 0xf53a
Summary 10.0.4.0 10.0.3.5 0x80000006 2329 0x2 0x2712
Summary 10.0.4.4 10.0.3.5 0x80000006 2199 0x2 0x92b
Summary 10.0.4.8 10.0.3.5 0x80000008 1429 0x2 0xdc51
Summary 10.0.4.12 10.0.3.5 0x80000006 2071 0x2 0xae7e
Summary 10.0.6.1 10.0.3.5 0x80000006 2029 0x2 0x191a
Summary 10.0.6.2 10.0.3.5 0x80000006 1299 0x2 0xf23
r7#show ip ospf database summary | include summary
Link State ID: 10.0.2.0 (summary Network Number)
Link State ID: 10.0.2.4 (summary Network Number)
Link State ID: 10.0.2.8 (summary Network Number)
Link State ID: 10.0.3.3 (summary Network Number)
Link State ID: 10.0.3.4 (summary Network Number)
Link State ID: 10.0.3.5 (summary Network Number)
Link State ID: 10.0.4.0 (summary Network Number)
Link State ID: 10.0.4.4 (summary Network Number)
Link State ID: 10.0.4.8 (summary Network Number)
Link State ID: 10.0.4.12 (summary Network Number)
Link State ID: 10.0.6.1 (summary Network Number)
Link State ID: 10.0.6.2 (summary Network Number)

28
28
28
28
28
28
28
28
28
28
28
28

2. JUNOS IOS OSPF [][]


1. R1/R2 10.0.5/24 0
2. 10.0.5/24 Metric 10 420 OSPF
Metric
3. R1 Network LSALSA-2
R1/R2 OSPF Metric
1 Metric
10.0.5/24 OSPF
1 R1 OSPF 0
DR/BDR R1 DR/BDR LSA-2
nigel@junos7.2# show r1 protocols ospf
export external;
101

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

OSPF AS SCOPE link state database


Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Extern 10.0.5.0 10.0.6.1 0x80000002 2565 0x2 0x2260 36
mask 255.255.255.0
Type 1, TOS 0x0, metric 10, fwd addr 0.0.0.0,
tag 0.0.1.164
r4#show ip ospf database external 10.0.5.0 adv-router
10.0.6.1
OSPF Router with ID (10.0.3.4) (Process ID 64)
Type-5 AS External Link States
LS age: 2230
Options: (No TOS-capability, No DC)
LS Type: AS External Link
Link State ID: 10.0.5.0 (External Network Number )
Advertising Router: 10.0.6.1
LS Seq Number: 80000002
Checksum: 0x2260
Length: 36
Network Mask: /24
Metric Type: 1 (Comparable directly to link state
metric)
TOS: 0
Metric: 10
Forward Address: 0.0.0.0
External Route Tag: 420
nigel@junos7.2# run show route logical-router r5
10.0.5/24
inet.0: 23 destinations, 23 routes (23 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.5.0/24

*[OSPF/150] 00:15:30, metric 12, tag 420


> to 10.0.2.2 via fxp2.35
to 10.0.2.10 via fxp2.45
r4#sh ip route ospf
10.0.0.0/8 is variably subnetted, 18 subnets,
3 masks
<!-- Output omitted -->
O E1
10.0.5.0/24 [110/20] via 10.0.4.10, 00:00:01,
103

104

FastEthernet0/0.24
Metric 10 IOS
OSPF 110 JUNOS OSPF
Preference 10 150IOS O E1
1 IOS
Preference
JUNOS IOS

nigel@junos7.2# run show ospf route extern logical-router


r5
Prefix
Path Route NH Metric NextHop Nexthop
Type Type
Type
Interface addr/label
10.0.5.0/24 Ext1 Network IP 12
area 0.0.0.0, origin 10.0.6.2

fxp2.35

10.0.2.2

R1/R2 OSPF IOS


R4 fa0/0.47 IP 172.16.47.0/30
OSPF
r4#wr t
!
router ospf 64
router-id 10.0.3.4
log-adjacency-changes
redistribute connected subnets route-map external
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
!
access-list 1 permit 172.16.47.0 0.0.0.3
!
route-map external permit 10
match ip address 1
set metric 10
set metric-type type-1
set tag 420
!
LSA JUNOS OSPF JUNOS
Policy
access-list route-map JUNOS
route-filter IOS
redistribute Metric Metric
tag route-map
nigel@junos7.2# run show ospf database logical-router r5
104

105

lsa-id 172.16.47.0 detail


OSPF AS SCOPE link state database
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Extern 172.16.47.0 10.0.3.4 0x80000001 31 0x2 0x7e0d 36
mask 255.255.255.252
Type 1, TOS 0x0, metric 10, fwd addr 0.0.0.0,
tag 0.0.1.164

3. JUNOS IOS OSPF NSSA [][]


1. 0.0.0.1 LSA-3 LSA-5
2. 0.0.0.0 MD5 jnx
1 LSA 1 TNSSA ABR R3/R4
NSSA no-summary NSSA
LSA-7 R3 JUNOS
nigel@junos7.2# show r3 protocols ospf area 1
nssa {
default-lsa {
default-metric 1;
type-7;
}
no-summaries;
}
R3 LSA3/4/5 R1/R2 OSPF
NSSA 1 R3 LSA
nigel@junos7.2# run show ospf database logical-router r1
advertising-router 10.0.3.3
OSPF
Type
Router
Network
NSSA

link state database, area 0.0.0.1


ID
Adv Rtr Seq
Age
10.0.3.3 10.0.3.3 0x80000009 749
10.0.4.13 10.0.3.3 0x80000004 444
0.0.0.0 10.0.3.3 0x80000004 660

Opt
0x0
0x0
0x0

Cksum Len
0x14b0 48
0x1ff0 32
0xe35b 36

nigel@junos7.2# run show ospf database logical-router r2


netsummary advertising-router 10.0.3.3 | count
Count: 0 lines
IOS LSA3/4/5 1 IOS NSSA
ABR LSA
LSA-3 ABR LSA-3 NSSA

105

106

LSA-3 LSA-3 R2 OSPF


OSPF Preference
r4(config-router)#area 1 nssa no-summary
nigel@junos7.2# run show ospf database logical-router r2
netsummary advertising-router 10.0.3.3
OSPF link state database, area 0.0.0.1
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Summary 0.0.0.0 10.0.3.4 0x80000001 235 0x2 0xb173 28
nigel@junos.2# run show route logical-router r2 0.0.0.0
inet.0: 13 destinations, 14 routes (13 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0

*[OSPF/10] 00:09:36, metric 2


> to 10.0.4.9 via fxp2.24

LSA-7 no-summary no-redistribution


ASBR NSSA ABR OSPF
LSA-5 LSA-7 NSSA JUNOS
no-nssa-abr IOS LSA-7 NSSA
LSA-3 OSPF
LSA-3 LSA-3 1
r4(config-router)#no area 47 nssa
r4(config-router)#are 1 nssa no-redistribution
default-information-originate
nigel@junos7.2# run show route logical-router r2 0.0.0.0
inet.0: 23 destinations, 24 routes (23 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0

*[OSPF/150] 00:45:37, metric 2, tag 0


> to 10.0.4.1 via fxp2.23

nigel@junos7.2# run show ospf database logical-router r2


netsummary | count
Count: 13 lines
IOS JUNOS LSA
ABR 0.0.0.0 LSA-3 LSA-7 NSSA
106

107

JUNOS Preference IOS LSA LSAJuniper Cisco


LSA-3
r4(config-router)#area 1 nssa no-summary no-redistribution
default-information-originate
nigel@junos7.2# run show ospf database logical-router r2
lsa-id 0.0.0.0
OSPF
Type
Summary
NSSA
NSSA

link state database, area 0.0.0.1


ID
Adv Rtr Seq
Age Opt
0.0.0.0 10.0.3.4 0x80000002 660 0x2
0.0.0.0 10.0.3.3 0x8000000b 1263 0x0
0.0.0.0 10.0.3.4 0x80000001 660 0x2

Cksum Len
0xaf74 28
0xd562 36
0xa6e2 36

IOS NSSA NSSA


no-summary LSA-3
LSA-3 no-summary
LSA-3 no-redistribution NSSA LSA LSA-7
IOS prefix-list
prefix-list 1
1 in NSSA
LSA-5 LSA-3 R4
OSPFno-redistribution LSA-7
1 LSA-3 LSA-5 LSA-7
OSPF
r4(config-router)#area 1 nssa no-redistribution
default-information-originate
r4(config-router)#area 1 filter-list prefix
only-default-route in
nigel@junos7.2# run show ospf database logical-router r2
netsummary | count
Count: 0 lines
nigel@junos7.2# run show ospf database logical-router r2
extern | count
Count: 0 lines
nigel@junos7.2# run show ospf database logical-router r2
lsa-id 0.0.0.0
OSPF link state database, area 0.0.0.1
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
NSSA
0.0.0.0 10.0.3.3 0x80000010 228 0x0 0xcb67 36
107

108

NSSA

0.0.0.0 10.0.3.4 0x80000001 427 0x2 0xa6e2 36

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

r4#traceroute 10.0.3.3 source 10.0.3.4


Type escape sequence to abort.
Tracing the route to 10.0.3.3
1 10.0.3.3 20 msec 24 msec 8 msec
4. JUNOS IOS OSPF [][]
1.
2. RIP 192.168.x/24 RIP
OSPF 1 20
R1/R2 OSPF 10.0.5/24 NSSA
10.0.5/24
OSPF OSPF
10.0.4/22 10.0.8/23 3 ABR
JUNOS area-range restrict OSPF
IOS not-advertise IOS
Metric ABR cost

[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

R4 10.0.8.0 10.0.9.0 10.0.8/23


R5 10.0.4.0 10.0.6.0 10.0.4/22
r4#show ip route 10.0.8.0
Routing entry for 10.0.8.0/23
Known via "ospf 64", distance 110, metric 12,
type inter area
Last update from 10.0.2.9 on FastEthernet0/0.45,
00:27:09 ago
Routing Descriptor Blocks:
* 10.0.2.9, from 10.0.3.5, 00:27:09 ago,
via FastEthernet0/0.45
Route metric is 12, traffic share count is 1
r4#show ip route 10.0.9.0
Routing entry for 10.0.8.0/23
Known via "ospf 64", distance 110, metric 12,
type inter area
Last update from 10.0.2.9 on FastEthernet0/0.45,
00:27:16 ago
Routing Descriptor Blocks:
* 10.0.2.9, from 10.0.3.5, 00:27:16 ago,
via FastEthernet0/0.45
Route metric is 12, traffic share count is 1
nigel@itaa7.2# run show route logical-router r5 10.0.6.0
inet.0: 19 destinations, 19 routes (19 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.4.0/22

*[OSPF/10] 00:17:42, metric 3


> to 10.0.2.2 via fxp2.35

nigel@itaa7.2# run show route logical-router r5 10.0.4.0


inet.0: 19 destinations, 19 routes (19 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.4.0/22

*[OSPF/10] 00:17:44, metric 3


> to 10.0.2.2 via fxp2.35

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

*[OSPF/150] 00:19:40, metric 13,


tag 420
> to 10.0.2.2 via fxp2.35

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

*[RIP/100] 00:22:22, metric 2,


> to 172.16.40.1 via fxp1.60
*[RIP/100] 00:22:22, metric 2,
> to 172.16.40.1 via fxp1.60
*[RIP/100] 00:22:22, metric 2,
> to 172.16.40.1 via fxp1.60
*[RIP/100] 00:22:22, metric 2,
> to 172.16.40.1 via fxp1.60
*[RIP/100] 00:22:22, metric 2,
> to 172.16.40.1 via fxp1.60

tag 0
tag 0
tag 0
tag 0
tag 0

111

112

224.0.0.9/32

*[RIP/100] 00:22:32, metric 1


MultiRecv

r7# show ip route rip


R
192.168.4.0/24 [120/1]
R
192.168.0.0/24 [120/1]
R
192.168.1.0/24 [120/1]
R
192.168.2.0/24 [120/1]
R
192.168.3.0/24 [120/1]

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

JUNOS IOS OSPF JUNOS RIP


Aggregate Aggregate OSPF
IOS RIP OSPF
summary-address OSPF
JUNOS

[edit logical-routers r6]


nigel@itaa7.2# show routing-options
aggregate {
route 192.168.0.0/21;
}
[edit logical-routers r6]
nigel@itaa7.2# show policy-options
policy-statement rip-ospf {
term 1 {
from {
protocol aggregate;
route-filter 192.168.0.0/21 exact;
}
then accept;
}
}
r7(config-router)#router ospf 64
r7(config-router)#redistribute rip subnets
r7(config-router)#summary-address 192.168.0.0
255.255.248.0
R5 OSPF R6/R7 192.168/21 LSA-5
R5 LSA R7
172.16.40.4/30 LSA
OSPF IOS RIP OSPF
172.16.40.4/30 R7 RIP 192.168.x/24 OSPF
nigel@itaa7.2# run show ospf database logical-router r5
lsa-id 192.168.0.0
112

113

OSPF AS SCOPE link state database


Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Extern 192.168.0.0 10.0.9.6 0x80000001 50 0x2 0x5007 36
Extern 192.168.0.0 10.0.9.7 0x80000005 109 0x2 0x47d8 36
nigel@itaa7.2# run show ospf database logical-router r5
extern
OSPF AS SCOPE link state database
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Extern 10.0.5.0
10.0.3.4 0x80000005 887 0x2 0x341b 36
Extern 172.16.40.4 10.0.9.7 0x80000001 366 0x2 0xaaf5 36
Extern 192.168.0.0 10.0.9.6 0x80000001 147 0x2 0x5007 36
Extern 192.168.0.0 10.0.9.7 0x80000005 206 0x2 0x47d8 36
r7#show ip rip database
172.16.0.0/16
auto-summary
172.16.40.4/30 directly connected, Fa0/0.70
IOS

access-list route-map route-map


redistribute route-map IOS
redistributR5 172.16.40.4/30
LSA-5
!
access-list 1 permit 172.16.40.4 0.0.0.3
!
route-map rip-import deny 10
match ip address 1
!
route-map rip-import permit 20
!
r7(config-router)#redistribute rip subnets route-map
rip-import
nigel@itaa7.2# run show ospf database logical-router r5
extern
OSPF AS SCOPE link state database
Type
ID
Adv Rtr Seq
Age Opt Cksum Len
Extern 10.0.5.0
10.0.3.4 0x80000006 960 0x2 0x321c 36
113

114

Extern 192.168.0.0 10.0.9.6 0x80000002 372 0x2 0x4e08 36


Extern 192.168.0.0 10.0.9.7 0x80000006 368 0x2 0x45d9 36
5. JUNOS IOS OSPF/RIP [][]
1. R6/R7 10.0.5/24 RIP R7 RIP Metric
R6
2. 172.16.40/24 OSPF OSPF
JUNOS RIP Metric 1 IOS
RIP Metric 16 Metric IOS RIP
Metric JUNOS OSPF RIP
R6
[edit logical-routers]
nigel@itaa7.2# show r6 policy-options policy-statement
ospf-rip
term 1 {
from {
protocol ospf;
route-filter 10.0.5.0/24 exact;
}
then accept;
}
[edit logical-routers]
nigel@itaa7.2# show r6 protocols rip
group rip {
export ospf-rip;
neighbor fxp1.60;
}
nigel@itaa7.2# run show route advertising-protocol rip
172.16.40.2 logical-router r6
inet.0: 25 destinations, 26 routes (25 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.5.0/24

*[OSPF/150] 00:22:02, metric 14, tag


420
> to 10.0.8.6 via fxp2.56

R6 RIP LSA-7 LSA-5 NSSA ABR R4IOS


Metric Metric 10 JUNOS 8.5
ASBR 10.0.6.2 10.0.4/22 R3
10.0.4/22 Metric 2 R6 Metric 10+2+2=14 IOS
114

115

R7 10.0.5/24 RIP RIP R6/R7


R7 RIP Metric 1
!
router rip
version 2
redistribute ospf 64 route-map ospf-rip
network 172.16.0.0
!
access-list 2 permit 10.0.5.0 0.0.0.255
!
route-map ospf-rip permit 10
match ip address 2
set metric 1
!
RIP 10.0.5/24
R6 R1 traceroute 192.168.x/24
10.0.5/24 OSPF RIP R1
10.0.5.1 traceroute 192.168.x/24
nigel@itaa7.2# run show route logical-router rip
10.0.5/24
inet.0: 17 destinations, 17 routes (17 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.5.0/24

*[RIP/100] 00:03:04, metric 2, tag 420


> to 172.16.40.2 via fxp2.60

nigel@itaa7.2# run traceroute 192.168.2.1 logical-router


r1
traceroute to 192.168.2.1 (192.168.2.1), 30 hops max,
40 byte packets
1
2
3
4

10.0.4.13 (10.0.4.13) 1.168 ms 0.844 ms 1.150 ms


10.0.2.1 (10.0.2.1) 1.094 ms 1.182 ms 1.160 ms
10.0.8.5 (10.0.8.5) 1.314 ms 1.867 ms 1.747 ms
192.168.2.1 (192.168.2.1) 5.232 ms 3.682 ms
3.841 ms

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

nigel@itaa7.2# run show route logical-router rip 10/8


inet.0: 17 destinations, 17 routes (17 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/8
10.0.5.0/24

*[RIP/100] 00:08:31, metric 2, tag 0


> to 172.16.40.6 via fxp2.70
*[RIP/100] 00:09:21, metric 2, tag 420
> to 172.16.40.2 via fxp2.60

RIP R7 RIP Version 2


RIP R7 R7 RIP Metric
route-map 2
!
router rip
version 2
redistribute ospf 64 route-map ospf-rip
network 172.16.0.0
no auto-summary
!
access-list 2 permit 10.0.5.0 0.0.0.255
!
route-map ospf-rip permit 10
match ip address 2
set metric 2
!
RIP RIP R7
10.0.5/24 R6
nigel@itaa7.2# run restart routing logical-router rip
rip started, pid 4830
R6 OSPF 150 RIP 100 Preference
R6 RIP R7
R6/RIP RIP RIP
accept term 2 192.168.x/24
IOS R7 OSPF 110
RIP 120 distribut-list in RIP
[edit logical-routers r6]
nigel@itaa7.2# show policy-options policy-statement
rip-ospf
term 1 {
from {
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

172.16.40.x JUNOS OSPF


R5 Preference
[edit logical-routers r6]
nigel@itaa7.2# set protocols ospf area 20 interface
fxp1.60 passive
!
router ospf 64
passive-interface FastEthernet0/0.70
network 172.16.40.4 0.0.0.3 area 20
!
nigel@itaa7.2# run show route logical-router r5 172.16/16
inet.0: 22 destinations, 22 routes (22 active,
0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.40.0/30

*[OSPF/10] 00:01:50, metric 2


> to 10.0.8.5 via fxp1.56
172.16.40.4/30
*[OSPF/10] 00:01:50, metric 11
> to 10.0.8.10 via fxp1.57
r7# show ip ospf interface fa0/0.70
FastEthernet0/0.70 is up, line protocol is up
Internet Address 172.16.40.6/30, Area 20
Process ID 64, Router ID 10.0.9.7, Network Type
BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.0.9.7, Interface address
172.16.40.6
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40,
Wait 40, Retransmit 5
oob-resync timeout 40
No Hellos (Passive interface
6.JUNOS IOS OSPF [][]
1. Metric 10
Metric R5 1
13 JUNOS IOS OSPF 100Mbps
IOS 10 fa0/0
10Mbps R4 4 OSPF
1
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

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: 10
Process ID 64, Router ID 10.0.3.4, Network
BROADCAST, Cost: 10
Process ID 64, Router ID 10.0.3.4, Network
BROADCAST, Cost: 10

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

*[OSPF/10] 00:00:27, metric 40


120

121

> to 10.0.2.2 via fxp2.35


to 10.0.2.10 via fxp2.45
[][]
1. R5 RIP 10.0.5/24
2.
3.RIP 10.0.5/24

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

NSSA 10.0.5/24 1 R1/R2 NSSA


NSSAASBR
nigel@itaa7.2#runshowospfdatabaselogicalrouterr3nssalsaid10.0.5.0

OSPFlinkstatedatabase,area0.0.0.1
TypeIDAdvRtrSeqAgeOptCksumLen
NSSA10.0.5.010.0.6.10x8000001021590x80x5a0136
NSSA10.0.5.010.0.6.20x8000001f3240x80x440636
RID ABRR4 LSA5 0

RIP 192.168.x/24 ASBR R6/R7


192.168/21 20 LSA5
ASBR RIP
121

122

nigel@itaa7.2##runshowospfdatabaser5externlsaid192.168.0.0

OSPFASSCOPElinkstatedatabase
TypeIDAdvRtrSeqAgeOptCksumLen
Extern192.168.0.010.0.9.60x800000063690x20x460c36
Extern192.168.0.010.0.9.70x800000122700x200x2de536

RIP 10.0.5/24 R6/R7 OSPF


RIP RIP 10.0.5/24
Metric RIP 10.0.5/24

[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

RIP OSPF 10.0.5/24


172.16.40.x/30 OSPF
RIP 10.0.5/24
traceroute OSPF
nigel@itaa7.2#runshowroutelogicalrouterr5172.16/16

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

RIP/R7 10.0.5/24 R6 RIP


R6 R6 RIP
nigel@itaa7.2#runtraceroute10.0.5.2logicalrouterrip
tracerouteto10.0.5.2(10.0.5.2),30hopsmax,40bytepackets
1172.16.40.2(172.16.40.2)4.225ms3.328ms1.240ms
210.0.8.6(10.0.8.6)1.705ms1.168ms1.965ms
310.0.2.2(10.0.2.2)1.667ms1.561ms1.685ms
410.0.5.2(10.0.5.2)2.693ms1.743ms2.078ms

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

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
bandwidth 100000
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
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 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
!
ip prefix-list only-default-route seq 5 permit 0.0.0.0/0
!
end
R5
[editlogicalrouters]
nigel@itaa7.2#showr5
protocols{
ospf{
referencebandwidth1g;
area0.0.0.0{
authenticationtypemd5;
interfacelo0.5{
passive;
}
interfacefxp2.45{
authentication{
md510key"$9$IBIhyKsYoaUH";##SECRETDATA
}
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

network 172.16.40.4 0.0.0.3 area 20


!
router rip
version 2
redistribute ospf 64 route-map ospf-rip
network 172.16.0.0
no auto-summary
!
access-list 1 permit 172.16.40.4 0.0.0.3
access-list 2 permit 10.0.5.0 0.0.0.255
access-list 3 permit 192.168.0.0 0.0.7.255
!
route-map ospf-rip permit 10
match ip address 2
set metric 2
!
route-map rip-import deny 10
match ip address 1
!
route-map rip-import permit 20
!
end

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

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
!

[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

r4#show ip route 10.0.3.3


% Subnet not in table

R3 R4 1 R3/R4

NSSA 1 OSPF
5LSA LSA5

r4(config-router)#are 1 virtual-link 10.0.3.3


% OSPF: Area 1 is a stub or nssa so virtual links are not allowed

134

135

JUNOS IOS GRETunnel OSPF


GRETunnel OSPF [][]
OSPF Tunnel
R3 R4 1 GRETunnel
34.0.0.0/30 OSPF 0

[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
!

traceroute GRE Tunnel IP


135

136

GRE Tunnel gre


Olive gre OSPF

[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

r4#show ip ospf neighbor


Neighbor ID
Pri
State
Dead
Time
Address
Interface
10.0.3.3
0
FULL/ 00:00:39
34.0.0.1
Tunnel0
10.0.3.5
128
FULL/BDR
00:00:37
10.0.2.9
FastEthernet0/0.45
10.0.3.3
128
FULL/BDR
00:00:37
10.0.2.5
FastEthernet0/0.34
10.0.6.2
128
FULL/BDR
00:00:38
10.0.4.10
FastEthernet0/0.24

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

GRE Tunnel GRE Tunnel


down GRETunnel
GRE Tunnel
Cisco IOS 12.2(8)T GRETunnel Keepalives
GRE
Tunnel down
CiscoIOS R4 GRETunnel Keepalives
10 1
r4(config)#interface tunnel 0
r4(config-if)#keepalive 10 1
r4(config-if)#end
JUNOS R3 gre.3 commit 10 IOS R4
GRE Tunnel down GRETunnel OSPF FULL
DOWN
[editlogicalroutersr3]
nigel@itaa7.2#deactivateinterfacesgre.3

[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

1 00:29:52.107: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed


to up
1 00:29:52.303: %OSPF-5-ADJCHG: Process 64, Nbr 10.0.3.3 on Tunnel0
LOADING to FULL, Loading Done

JUNOS GRETunnel IPHeader IOS


GRETunnel
Keepalives
nigel@itaa7.2#runshowinterfacesgre.3
Logicalinterfacegre.3(Index98)(SNMPifIndex41)
Flags:PointToPointSNMPTraps16384
IPHeader10.0.2.6:10.0.2.5:47:df:64:0000000003000300
Encapsulation:GRENULL
Inputpackets:39
Outputpackets:33
Protocolinet,MTU:1472
Flags:None
Addresses,Flags:IsPreferredIsPrimary
Destination:34.0.0.0/30,Local:34.0.0.1,Broadcast:34.0.0.3
r4#show interfaces tunnel 0
Tunnel0 is up, line protocol is up
Hardware is Tunnel
Internet address is 34.0.0.2/30
MTU 1514 bytes, BW 9 Kbit, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive set (10 sec), retries 1
Tunnel source 10.0.2.6, destination 10.0.2.5
......
<!--output omitted-->
OLIVEOSPF Type1LSA[][]
Juniper Olive fxp em
OSPF DR
Cisco Serial
LSA1 2TypeTrainsit
3TypeStub OSPFType1LSA
LSA1 LSA2 R1 1
LSA1 R1 OSPF Type
1 LSA fxp
139

140

RID R2/R3 R1 DR LSA2

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

GRETunnel OSPF GRETunnel Type1LSA


1 TypePointToPoint
nigel@itaa7.2#runshowospfdatabaselogicalrouterr3area0lsaid10.0.3.3
detail

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

OSPF IOS ipospf


networkpointtopoint
1 OSPF
R1 R4
R1/R2/R3/R4 1
[editlogicalrouters]
nigel@itaa7.2#setr1protocolsospfarea1interfacefxp1.12interfacetypep2p

[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

JUNOS IOS OSPF RIP

ISIS Cisco EIGRP


JUNOS IOS EIGRP JUNOS
EIGRP EIGRP
EIGRP OSPF
EIGRP OSPF DIFICO
Cisco Playbook
EIGRP IGP EIGRP
OSPF IGP Cisco
IT
EIGRP DUAL
EIGRP EIGRPMetric offset
list EIGRP NBMA VC
EIGRP
1 EIGRP
RIP

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/R2 EIGRP AS 64 200.0.100/24 200.0.200/24


EIGP 200 R1/R2

r1#wr t
Building configuration...
!
hostname r1
!
interface Loopback0

144

145

ip address 10.0.6.1 255.255.255.255


!
interface Loopback200
ip address 200.0.100.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.12
encapsulation dot1Q 112
ip address 10.0.4.5 255.255.255.252
!
interface FastEthernet0/0.13
encapsulation dot1Q 113
ip address 10.0.2.2 255.255.255.252
!
router eigrp 64
network 10.0.0.0
network 200.0.100.0
no auto-summary
!
r2#wr t
Building configuration...
!
hostname r2
!
interface Loopback0
ip address 10.0.6.2 255.255.255.255
!
interface Loopback200
ip address 200.0.200.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.12
encapsulation dot1Q 112
ip address 10.0.4.6 255.255.255.252
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
!

JUNOS R3/R4/R6/R7 OSPFAS EIGRP


AS64 OSPF 1 2 EIGRPAS64
OSPF OSPF OSPF
1/2 NSSA EIGRPAS
64 13 IP
0 10.0.0/22 IP 13
10.0.4/22 IP
1 10.0.8/22 IP
2 10.0.12/22
IP IP
IP R3/R4/R6/R7
[editlogicalrouters]
nigel@itaa7.2#showr3protocolsospf
area0.0.0.0{
interfacefxp1.34;
interfacelo0.3{
passive;
}
}
area0.0.0.1{
nssa{
defaultlsa{
defaultmetric10;
type7;
}
}
interfacefxp1.36;
}

[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

OSPF Router with ID (10.0.6.1) (Process ID 64)


Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 1232
Options: (No TOS-capability, No DC)
LS Type: AS External Link
Link State ID: 192.168.0.0 (External Network Number )
Advertising Router: 10.0.3.4
LS Seq Number: 80000006
Checksum: 0x1A1B
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 0
Forward Address: 10.0.13.7
External Route Tag: 0
r1#traceroute 192.168.0.1
Type escape sequence to abort.
Tracing the route to 192.168.0.1
1
2
3
4

10.0.2.1 8 msec 8 msec 8 msec


10.0.2.6 4 msec 8 msec 4 msec
10.0.12.2 12 msec 12 msec 4 msec
10.0.12.2 !H !H !H

[][]
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
!

IOS routemap JUNOS policystatement

[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

10.0.2.1 4 msec 4 msec 8 msec


10.0.2.6 8 msec 8 msec 4 msec
10.0.12.2 12 msec 12 msec 4 msec
10.0.12.2 !H !H !H

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

10.0.3.3/32 [110/10] via 10.0.2.1, 00:31:36, FastEthernet0/0.13


10.0.2.4/30 [110/11] via 10.0.2.1, 00:31:36, FastEthernet0/0.13
10.0.6.1/32 is directly connected, Loopback0
10.0.3.4/32 [110/11] via 10.0.2.1, 00:31:37, FastEthernet0/0.13
10.0.6.2/32 [90/409600] via 10.0.4.6, 03:08:55, FastEthernet0/0.12
192.168.0.0/24 [110/0] via 10.0.2.1, 00:31:37, FastEthernet0/0.13
192.168.1.0/24 [110/0] via 10.0.2.1, 00:31:37, FastEthernet0/0.13
192.168.2.0/24 [110/0] via 10.0.2.1, 00:31:37, FastEthernet0/0.13
192.168.3.0/24 [110/0] via 10.0.2.1, 00:31:37, FastEthernet0/0.13

r1#show ip eigrp topology 192.168.0.0


IP-EIGRP (AS 64): Topology entry for 192.168.0.0/24
State is Passive, Query origin flag is 1, 1 Successor(s), FD is 256025600
Routing Descriptor Blocks:
10.0.2.1, from Redistributed, Send flag is 0x0
Composite metric is (256025600/0), Route is External
Vector metric:
Minimum bandwidth is 10 Kbit
Total delay is 1000 microseconds
Reliability is 255/255
Load is 1/255
Minimum MTU is 1500
Hop count is 0
External data:
Originating router is 200.0.100.1 (this system)
AS number of route is 64
External protocol is OSPF, external metric is 0
Administrator tag is 64 (0x00000040)
10.0.4.6 (FastEthernet0/0.12), from 10.0.4.6, Send flag is 0x0
Composite metric is (256051200/256025600), Route is External
Vector metric:
Minimum bandwidth is 10 Kbit
Total delay is 2000 microseconds
Reliability is 255/255
Load is 1/255
Minimum MTU is 1500
Hop count is 1
External data:
Originating router is 200.0.200.1
AS number of route is 64
External protocol is OSPF, external metric is 0
Administrator tag is 64 (0x00000040)
R1/R2 EIGRP EIGRPAS
153

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

EIGRP passiveinterface EIGRP 90


EIGRP
OSPF EIGRP
200
192.168.03/24 EIGRP
IGP BGP IGP
IGP R1
200.0.200/24 R2 OSPF/EIGRP 200.0.200/24
R2 10.0.6.2 IGP
10.0.6.2/32 200.0.200/24 EIGRPAS64
EIGRP EIGRPAS R2 R1/R2
OSPF R2 13 EIGRPAS
R1 OSPF R2
r1(config)#ip route 200.0.200.0 255.255.255.0 10.0.6.2
r2(config)#ip route 200.0.100.0 255.255.255.0 10.0.6.1
r2#traceroute 200.0.100.1 source 200.0.200.1
Type escape sequence to abort.
Tracing the route to 200.0.100.1
1 10.0.4.5 4 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

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

200.0.200.0/24 [1/0] via 10.0.6.2


200.0.100.0/24 is directly connected, Loopback200
10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
10.0.13.7/32 [110/12] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
10.0.2.8/30 [90/307200] via 10.0.4.6, 02:24:00, FastEthernet0/0.12
10.0.8.0/30 [110/11] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
10.0.9.6/32 [110/11] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
10.0.12.0/30 [110/12] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
10.0.2.0/30 is directly connected, FastEthernet0/0.13
10.0.4.4/30 is directly connected, FastEthernet0/0.12
10.0.3.3/32 [110/10] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
10.0.2.4/30 [110/11] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
10.0.6.1/32 is directly connected, Loopback0
10.0.3.4/32 [110/11] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
10.0.6.2/32 [90/409600] via 10.0.4.6, 02:24:00, FastEthernet0/0.12
192.168.0.0/24 [110/0] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
192.168.1.0/24 [110/0] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
192.168.2.0/24 [110/0] via 10.0.2.1, 00:00:03, FastEthernet0/0.13
192.168.3.0/24 [110/0] via 10.0.2.1, 00:00:03, FastEthernet0/0.13

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

10.0.4.6 48 msec 16 msec 20 msec


10.0.2.9 12 msec 12 msec 12 msec
10.0.12.2 20 msec 24 msec 28 msec
10.0.12.2 !H !H !H
156

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

10.0.2.1 4 msec 8 msec 12 msec


10.0.2.6 4 msec 8 msec 4 msec
10.0.12.2 4 msec 4 msec 4 msec
10.0.12.2 !H !H !H

IGP
JNCIx 150,000

EIGRP
13[][]

IPv4 v6 DualStack IGP

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

IOS EIGRP 90 OSPF 110


OSPF EIGRPIOS EIGRP
OSPF R1/R2 OSPF
OSPF 13

IOS EIGRP 170


OSPF 110 R1/R2 OSPF EIGRP
EIGRP OSPF EIGRP
R1/R2 OSPF EIGRP 192.168.03/24
EIGRPAS64 OSPF
200.0.100/24 200.0.200/24
192/200 IP
13
R1/R2 OSPF 13 EIGRPAS64
r1#sh run | b r o
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
network 10.0.4.4 0.0.0.3 area 13
network 10.0.6.1 0.0.0.0 area 13
158

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

200.0.200.0/24 [1/0] via 10.0.6.2


200.0.100.0/24 is directly connected, Loopback200
10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
10.0.13.7/32 [110/12] via 10.0.2.1, 00:01:41, FastEthernet0/0.13
10.0.2.8/30 [90/307200] via 10.0.4.6, 02:28:38, FastEthernet0/0.12
10.0.8.0/30 [110/11] via 10.0.2.1, 00:01:41, FastEthernet0/0.13
10.0.9.6/32 [110/11] via 10.0.2.1, 00:01:41, FastEthernet0/0.13
10.0.12.0/30 [110/12] via 10.0.2.1, 00:01:41, FastEthernet0/0.13
10.0.2.0/30 is directly connected, FastEthernet0/0.13
10.0.4.4/30 is directly connected, FastEthernet0/0.12
10.0.3.3/32 [110/10] via 10.0.2.1, 00:01:51, FastEthernet0/0.13
10.0.2.4/30 [110/11] via 10.0.2.1, 00:01:51, FastEthernet0/0.13
10.0.6.1/32 is directly connected, Loopback0
10.0.3.4/32 [110/11] via 10.0.2.1, 00:01:52, FastEthernet0/0.13
159

160

D
O
O
O
O

E2
E2
E2
E2

10.0.6.2/32 [90/409600] via


192.168.0.0/24 [110/0] via 10.0.2.1,
192.168.1.0/24 [110/0] via 10.0.2.1,
192.168.2.0/24 [110/0] via 10.0.2.1,
192.168.3.0/24 [110/0] via 10.0.2.1,

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

OSPF R1/R2 10.0.4.4/30 13


NetworkLSA2
r1#show ip ospf database network | b Area 13
Net Link States (Area 13)
Routing Bit Set on this LSA
LS age: 691
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 10.0.4.6 (address of Designated Router)
Advertising Router: 10.0.6.2
LS Seq Number: 80000003
Checksum: 0x6988
Length: 32
Network Mask: /30
Attached Router: 10.0.6.2
Attached Router: 10.0.6.1
OSPF EIGRP IOS IGP
OSPF OSPF OSPF
/ EIGRP R1
R2
r1#show ip route | e O
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
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
Gateway of last resort is not set
S
C
D
C
C
C
D

200.0.200.0/24 [1/0] via 10.0.6.2


200.0.100.0/24 is directly connected, Loopback200
10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
10.0.2.8/30 [90/307200] via 10.0.4.6, 02:52:03, FastEthernet0/0.12
10.0.2.0/30 is directly connected, FastEthernet0/0.13
10.0.4.4/30 is directly connected, FastEthernet0/0.12
10.0.6.1/32 is directly connected, Loopback0
10.0.6.2/32 [90/409600] via 10.0.4.6, 02:52:03, FastEthernet0/0.12

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

r1#show ip ospf database router adv-router 10.0.6.2 | b Area 13


Router Link States (Area 13)
Routing Bit Set on this LSA
LS age: 389
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.0.6.2
Advertising Router: 10.0.6.2
LS Seq Number: 80000006
Checksum: 0xB8F9
Length: 48
Area Border Router
AS Boundary Router
Number of Links: 2
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.0.4.6
(Link Data) Router Interface address: 10.0.4.6
Number of TOS metrics: 0
TOS 0 Metrics: 10
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.0.6.2
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
10.0.2.8/30 R2/R4 EIGRP
EIGRP 10.0.0.0/8A
EIGRPAS64 OSPF R1
R1 fa0/0.13 R3R4 10.0.2.8/30
EIGRP R2 10.0.2.8/30
OSPF OSPF
EIGRP OSPF EIGRP AS
13 0 R3/R4 13 R3R4
R1/R2 ABR 13 EIGRP
AS64 OSPF 0

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

r1(config-router)#network 10.0.2.0 0.0.0.3 area 13


r2(config-router)#network 10.0.2.8 0.0.0.3 area 13

r1#show ip ospf database router adv-router 10.0.6.2 | b Area 13


Router Link States (Area 13)
Routing Bit Set on this LSA
LS age: 368
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.0.6.2
Advertising Router: 10.0.6.2
LS Seq Number: 80000009
Checksum: 0xE388
Length: 60
AS Boundary Router
Number of Links: 3
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.0.2.9
(Link Data) Router Interface address: 10.0.2.10
Number of TOS metrics: 0
TOS 0 Metrics: 10
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.0.4.6
(Link Data) Router Interface address: 10.0.4.6
162

163

Number of TOS metrics: 0


TOS 0 Metrics: 10
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.0.6.2
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1

OSPF R1/R2 OSPF 80


r1(config)#router ospf 64
r1(config-router)#distance 80

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

200.0.200.0/24 [1/0] via 10.0.6.2


200.0.100.0/24 is directly connected, Loopback200
10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
10.0.13.7/32 [80/12] via 10.0.2.1, 00:04:33, FastEthernet0/0.13
10.0.2.8/30 [80/20] via 10.0.4.6, 00:04:33, FastEthernet0/0.12
10.0.8.0/30 [80/11] via 10.0.2.1, 00:04:33, FastEthernet0/0.13
10.0.9.6/32 [80/11] via 10.0.2.1, 00:04:33, FastEthernet0/0.13
10.0.12.0/30 [80/12] via 10.0.2.1, 00:04:33, FastEthernet0/0.13
10.0.2.0/30 is directly connected, FastEthernet0/0.13
10.0.4.4/30 is directly connected, FastEthernet0/0.12
10.0.3.3/32 [80/10] via 10.0.2.1, 00:04:33, FastEthernet0/0.13
10.0.2.4/30 [80/11] via 10.0.2.1, 00:04:33, FastEthernet0/0.13
10.0.6.1/32 is directly connected, Loopback0
10.0.3.4/32 [80/11] via 10.0.2.1, 00:04:33, FastEthernet0/0.13
10.0.6.2/32 [80/11] via 10.0.4.6, 00:04:33, FastEthernet0/0.12
163

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

R1/R2 EIGRP EIGRP


r1(config)#no router eigrp 64
*Mar 1 04:13:40.942: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 64: Neighbor 10.0.4.6
(FastEthernet0/0.12)
is down: interface down
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

10.0.2.1 8 msec 4 msec 8 msec


10.0.2.6 12 msec 20 msec 8 msec
10.0.12.2 28 msec 16 msec 16 msec
10.0.12.2 !H !H !H

r2#traceroute 192.168.0.1 source 200.0.200.1


Type escape sequence to abort.
Tracing the route to 192.168.0.1
1 10.0.2.9 4 msec 12 msec 4 msec
2 10.0.12.2 4 msec 8 msec 8 msec
3 10.0.12.2 !H !H !H
EIGRP R1/R2 192.168.03/24
EIGRP IGP
OSPF 200 OSPF
OSPF 200
OSPF R1/R2

164

You might also like