164
JUNOS OSPF 2010-4-20

ITAA-JUNOS OSPF

Embed Size (px)

DESCRIPTION

junos ospf

Citation preview

  • JUNOS OSPF

    2010-4-20

  • 2

    2

    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

  • 3

    3

    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 IGPPASSIVE

    5. JUNOS OSPF

    JUNOS

    JUNOS 5

    OSPF

    IOS IP

    JUNOS IP

    OSPF

    R3 JUNOS

    protocols {

    ospf {

  • 4

    4

    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;

    }

    }

    }

  • 5

    5

    R7 JUNOS

    protocols {

    ospf {

    area 0.0.0.1 {

    interface fxp1.67;

    interface fxp2.57;

    }

    }

    }

    OSPF

    [edit logical-routers]

    [email protected]# run show ospf interface

    logical-router r5

    Interface State Area DR ID BDR ID Nbrs

    fxp2.35 DR 0.0.0.0 10.0.3.5 10.0.3.3 1

    fxp2.45 DR 0.0.0.0 10.0.3.5 10.0.3.4 1

    fxp1.56 BDR 0.0.0.1 10.0.9.6 10.0.3.5 1

    fxp1.57 BDR 0.0.0.1 10.0.9.7 10.0.3.5 1

    R5 4 OSPF 0.0.0.0

    0.0.0.1R5

    [edit logical-routers]

    [email protected]# 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 37

    10.0.2.10 fxp2.45 Full 10.0.3.4 128 35

    10.0.8.5 fxp1.56 Full 10.0.9.6 128 35

    10.0.8.10 fxp1.57 Full 10.0.9.7 128 38

    OSPF IDRID

    [edit]

    [email protected]# 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

  • 6

    6

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

    R5

    OSPF R5 4 OSPF R5

    [edit]

    [email protected]# 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.

    RIDJUNOS OSPF RID.

    JUNOS RID IP OSPF

    OSPF

    OSPF OSPF

    [edit]

    [email protected]# 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

  • 7

    7

    R3 OSPF ID JUNOS

    IP R3

    OSPF

    [edit logical-routers r3]

    [email protected]# set routing-options router-id 10.0.2.5

    [edit logical-routers r3]

    [email protected]# commit

    commit complete

    [email protected]# run restart routing logical-router r3

    r3 started, pid 3223

    [email protected]# 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

    [email protected]# run show route logical-router r5

    10.0.3.3/32 | count

    Count: 0 lines

    [email protected]# 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

  • 8

    8

    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

    [email protected]# 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]

    [email protected]# 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

    http://validator.w3.org/check?uri=http%3A%2F%2Fjncie.wordpress.com%2F

  • 9

    9

    [edit logical-routers]

    [email protected]# set r5 routing-options

    router-id 10.0.3.5

    [edit logical-routers]

    [email protected]# set r5 protocols ospf

    area 0.0.0.0 interface lo0.5 passive

    [edit logical-routers]

    [email protected]# commit check

    configuration check succeeds

    [edit logical-routers]

    [email protected]# 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

    [email protected]# 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;

  • 10

    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.

    [email protected]# 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

  • 11

    11

    > to 10.0.2.2 via fxp2.35

    R3 OSPF R3 R2/R5 OSPF

    [email protected]# 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

    http://jncie.wordpress.com/2008/08/27/junos-ospf-multiarea-part1/

  • 12

    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 Cksum Len

    Router 10.0.3.3 10.0.3.3 0x80000003 200 0x2 0x6769 72

    Router 10.0.3.4 10.0.3.4 0x80000004 191 0x2 0x3a61 60

    Router *10.0.3.5 10.0.3.5 0x80000004 190 0x2 0x1191 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 Cksum Len

    Router *10.0.3.5 10.0.3.5 0x80000004 192 0x2 0x564c 48

    Router 10.0.9.6 10.0.9.6 0x80000004 198 0x2 0x974 60

    Router 10.0.9.7 10.0.9.7 0x80000004 198 0x2 0x6e01 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 logical-router r5

    protocol ospf | match /32

    10.0.3.3/32 *[OSPF/10] 00:07:14, metric 10

    10.0.3.4/32 *[OSPF/10] 00:07:04, metric 10

    10.0.9.6/32 *[OSPF/10] 00:07:09, metric 10

    10.0.9.7/32 *[OSPF/10] 00:07:09, metric 10

    224.0.0.5/32 *[OSPF/10] 00:08:08, metric 1

  • 13

    13

    R5 4 OSPFR5

    R5[Direct/0] 224.0.0.5/32 OSPF

    JNCIx

    JUNOS OSPF Hacks 5

    T1 R3 172.16.0.12/30 IPJUNOS

    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

  • 14

    14

    Juniper JUNOS OSPFStub Area LSA

    Juniper R7 OSPF()/LSA200.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. JUNOSOSPFTSA

    4. TSABGP

    10 [][]

    OSPF (Stub Area)10 - R1

    protocols {

    ospf {

    area 0.0.0.10 {

    stub;

    interface lo0.1 {

    passive;

    }

    http://www.juniper.net/techpubs/software/junos/junos81/swconfig81-routing/html/ospf-overview2.htmlhttp://www.juniper.net/techpubs/software/junos/junos64/swconfig64-routing/html/ospf-overview5.htmlhttp://jncie.wordpress.com/2008/09/23/juniper-junos-ospf-external-routes-lsa/http://xuexizu.com/?q=tom/wiki_para/edit/1003090http://xuexizu.com/?q=tom/wiki_para/edit/1003090http://xuexizu.com/?q=tom/wiki_para/edit/1003091http://xuexizu.com/?q=tom/wiki_para/edit/1003091http://xuexizu.com/?q=tom/wiki_para/edit/1003092http://xuexizu.com/?q=tom/wiki_para/edit/1003092

  • 15

    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

    [][]

    http://xuexizu.com/?q=tom/wiki_para/edit/1003094http://xuexizu.com/?q=tom/wiki_para/edit/1003094

  • 16

    16

    R7

    OSPF LSA

    [editlogicalrouters]

    [email protected]#setr7routingoptionsstaticroute200.200/24reject

    [editlogicalrouters]

    [email protected]#editr7policyoptionspolicystatementstatic

    [editlogicalroutersr7policyoptionspolicystatementstatic]

    [email protected]#setterm1fromprotocolstatic

    [editlogicalroutersr7policyoptionspolicystatementstatic]

    [email protected]#setterm1fromroutefilter200.200/24exact

    [editlogicalroutersr7policyoptionspolicystatementstatic]

    [email protected]#setterm1thenaccept

    [editlogicalroutersr7policyoptionspolicystatementstatic]

    [email protected]#setterm2thenreject

    policyoptions{

    policystatementstatic{

    term1{

    from{

    protocolstatic;

    routefilter200.200.0.0/24exact;

    }

    thenaccept;

    }

    term2{

    thenreject;

    }

    }

    }

    OSPF

    [editlogicalroutersr7]

    [email protected]#setprotocolsospfexportstatic

    R5 OSPF LSA5 LSA4 R5 LSDB

    [email protected]#runshowospfdatabaselogicalrouterr5external

    mailto:[email protected]#?set?r7?routing\options?static?route?200.200/24?reject?mailto:[email protected]#?edit?r7?policy\options?policy\statement?static?mailto:[email protected]#?set?term?1?from?protocol?static???????????mailto:[email protected]#?set?term?1?from?route\filter?200.200/24?exact??mailto:[email protected]#?set?term?1?then?accept??mailto:[email protected]#?set?term?2?then?reject??mailto:[email protected]#?set?protocols?ospf?export?static??mailto:[email protected]#?run?show?ospf?database?logical\router?r5?external??????

  • 17

    17

    OSPFASSCOPElinkstatedatabase

    TypeIDAdvRtrSeqAgeOptCksumLen

    Extern200.200.0.010.0.9.70x8000000220940x220x54a736

    [edit]

    [email protected]#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

    [email protected]#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 tracerouteReject

    traceroute R1 JUNOS!H IOS

    U

    static{

    route200.200.0.0/24reject;

    }

    [email protected]#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

    mailto:[email protected]#?run?show?ospf?database?logical\router?r5?asbrsummary??mailto:[email protected]#?run?show?route?logical\router?r1?200.200/24??http://xuexizu.com/?q=tom/wiki_para/edit/1003095http://xuexizu.com/?q=tom/wiki_para/edit/1003095mailto:[email protected]#?run?traceroute?200.200.0.1?logical\router?r1????????

  • 18

    18

    Discard

    Discard OSPF

    200.200/24 traceroute

    traceroute IOS.

    static{

    route200.200.0.0/24discard;

    }

    [email protected]#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;

    }

    [email protected]#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

    [email protected]#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

    mailto:[email protected]#?run?traceroute?200.200.0.1?logical\router?r1??mailto:[email protected]#?run?ping?200.200.0.1?logical\router?r1?rapid??mailto:[email protected]#?run?ping?200.200.0.254?logical\router?r1?rapid???

  • 19

    19

    MetricTag Metric 1030

    R1

    static{

    route200.200.0.0/24{

    receive;

    metric10;

    tag30;

    preference10;

    }

    }

    [email protected]#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

    [email protected]#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 IGPnoreadvertise

    Policy IGP no

    readvertise 200.200/24

    OSPF R1

    static{

    route200.200.0.0/24{

    receive;

    noreadvertise;

    }

    }

    [email protected]#runshowroutelogicalrouterr1200.200/24|count

    Count:0lines

    OSPF(TSA)[][]

    mailto:[email protected]#?run?show?route?logical\router?r7?200.200/24?exact??mailto:[email protected]#?run?show?route?logical\router?r1?200.200/24?exact??mailto:[email protected]#?run?show?route?logical\router?r1?200.200/24?|?count?http://xuexizu.com/?q=tom/wiki_para/edit/1003093http://xuexizu.com/?q=tom/wiki_para/edit/1003093

  • 20

    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

    10Stub Area

    overview JUNOS 8.5

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

    http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801ec9f7.shtml

  • 21

    21

    Address Interface State ID Pri Dead

    10.0.4.6 fxp1.12 Full 10.0.6.2 128 38

    10.0.4.13 fxp1.13 Full 10.0.3.3 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

  • 22

    22

    4 10.0.8.10 (10.0.8.10) 0.617 ms !H 0.662 ms !H

    0.621 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 Cksum Len

    Summary 0.0.0.0 10.0.3.3 0x80000004 731 0x20 0x849d 28

    Summary 0.0.0.0 10.0.3.4 0x80000004 610 0x20 0x7ea2 28

    Summary 10.0.2.0 10.0.3.3 0x80000005 429 0x20 0x7da3 28

    TSABGP [][]

    LSA3 OSPF ABRnosummary

    10 LSA3 ABR

    LSA LSA3 ABR

    netsummaryLSA LSA3/4/5 LSA 10 R3/R4

    ABR ABRnosummary

    [email protected]#setr3protocolsospfarea10stubnosummaries

    [email protected]#setr4protocolsospfarea10stubnosummaries

    R1 OSPF ABR/

    OSPF LSA3 10

    200.200/24

    [email protected]#runshowospfdatabaselogicalrouterr1netsummary

    OSPFlinkstatedatabase,Area0.0.0.10

    TypeIDAdvRtrSeqAgeOptCksumLen

    Summary0.0.0.010.0.3.30x8000000b310x200x76a428

    Summary0.0.0.010.0.3.40x8000000a300x200x72a828

    [email protected]#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

    http://xuexizu.com/?q=tom/wiki_para/edit/1003096http://xuexizu.com/?q=tom/wiki_para/edit/1003096mailto:[email protected]#?set?r3?protocols?ospf?area?10?stub?no\summaries??mailto:[email protected]#?set?r4?protocols?ospf?area?10?stub?no\summaries??mailto:[email protected]#?run?show?ospf?database?logical\router?r1?netsummary??mailto:[email protected]#?run?traceroute?logical\router?r1?200.200.0.1??

  • 23

    23

    TSA

    TSA TSA

    TSA OSPF TSA BGP

    Hidden

    OSPF TSA

    TSA.

    1.3 OSPF NSSA

  • 24

    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 OptionENSSA OSPF Option

    N RFC 1587OSPF 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

    [][]

    http://www.juniper.net/techpubs/software/junos/junos73/swconfig73-routing/html/ospf-config7.htmlhttp://www.ietf.org/rfc/rfc1587.txthttp://xuexizu.com/?q=tom/wiki_para/edit/1003052http://xuexizu.com/?q=tom/wiki_para/edit/1003052http://xuexizu.com/?q=tom/wiki_para/edit/1003053http://xuexizu.com/?q=tom/wiki_para/edit/1003053

  • 25

    25

    1. JUNOSNSSA LSA3

    2. JUNOSNSSAType7 Type5 MetricMania

    3. 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;

    }

    }

    }

    }

    [email protected]# set r1 protocols ospf export 3/8

    JUNOS OSPF NSSA[][]

    term 1reject

    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

    [email protected]# run show ospf database logical-router r1

    external | count

    http://xuexizu.com/?q=tom/wiki_para/edit/1003054http://xuexizu.com/?q=tom/wiki_para/edit/1003054http://jncie.wordpress.com/2008/09/28/configurate-juniper-junos-ospf-stub-tsa-nssa-area/http://xuexizu.com/?q=tom/wiki_para/edit/1003055http://xuexizu.com/?q=tom/wiki_para/edit/1003055

  • 26

    26

    Count: 0 lines

    [edit logical-routers]

    [email protected]# run show ospf database logical-router r1

    nssa | count

    Count: 0 lines

    10 NSSA

    [email protected]# set r1 protocols ospf area 10 nssa

    [edit logical-routers]

    [email protected]# set r2 protocols ospf area 10 nssa

    [edit logical-routers]

    [email protected]# set r3 protocols ospf area 10 nssa

    [edit logical-routers]

    [email protected]# set r4 protocols ospf area 10 nssa

    [edit logical-routers]

    [email protected]# commit

    10 LSA-7 R1 Metric 10 1

    10 LSA-5 LSA-5 LSA-4

    [email protected]# 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

    [email protected]# run show ospf database logical-router r3

    area 10 external | count

    Count: 0 lines

    http://www.juniper.net/techpubs/software/nog/nog-baseline/html/verify-ospf16.html

  • 27

    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

    [email protected]# 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 *[OSPF/10] 00:02:44, metric 11

    > to 10.0.4.13 via fxp1.13

    10.0.4.8/30 *[OSPF/10] 00:44:12, metric 2

    > to 10.0.4.6 via fxp1.12

    10.0.6.2/32 *[OSPF/10] 00:44:12, metric 1

    > to 10.0.4.6 via fxp1.12

    224.0.0.5/32 *[OSPF/10] 1d 10:30:35, metric 1

    MultiRecv

    R1 OSPF0.0.0.0 LSA NSSA LSA-7

    LSA-3 OSPF LSDB JUNOS IOS

    OSPF

    [email protected]# 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]

    [email protected]# run show ospf database logical-router r1

    netsummary

    OSPF link state database, Area 0.0.0.10

    http://xuexizu.com/?q=tom/wiki_para/edit/1003056http://xuexizu.com/?q=tom/wiki_para/edit/1003056http://blog.ioshints.info/2008/09/external-default-route-in-ospf-nssa.htmlhttp://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801ec9fa.shtmlhttp://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801ec9fa.shtmlhttp://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801ec9fa.shtml

  • 28

    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

    [email protected]# set r3 protocols ospf area 10 nssa

    default-lsa metric-type 2 type-7

    [edit logical-routers]

    [email protected]# 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

    [email protected]# run show ospf database logical-router r1

    netsummary | count

    Count: 0 lines

    [edit logical-routers]

    [email protected]# 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 0.0.0.0 10.0.3.3 0x80000001 16 0x20 0x62b6 36

    NSSA 0.0.0.0 10.0.3.4 0x80000001 17 0x20 0x5cbb 36

    NSSA *3.0.0.0 10.0.6.1 0x80000005 529 0x28 0x7c7b 36

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

    http://xuexizu.com/?q=tom/wiki_para/edit/1003057http://xuexizu.com/?q=tom/wiki_para/edit/1003057

  • 29

    29

    JNCIP 193Harry Reynolds R6 3/8

    Metric R6 3/8 traceroute R6->R5->R4->R2->R1

    IP R1 R2 fxp1.12 IP10.0.4.5

    :

    R6->R5->R3->R1

    JUNOS 5.2R1.4 JNCIP JNCIE

    JUNOS 7.2R4.2: R6 3/8Harry 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

    http://www.juniper.net/training/certification/mt_series_track.html#jncipmhttp://www.oreillynet.com/pub/au/3278http://www.juniper.net/techpubs/software/junos/junos52/index.htmlhttp://www.juniper.net/training/certification/mt_series_track.html#jnciemhttp://www.juniper.net/techpubs/software/junos/junos72/index.htmlhttp://www.juniper.net/techpubs/software/junos/junos85/index.htmlhttp://www.juniper.net/techpubs/software/junos/junos85/index.htmlhttp://www.juniper.net/techpubs/software/junos/junos85/index.htmlhttp://www.juniper.net/products_and_services/junos/index.htmlhttp://en.wikipedia.org/wiki/Open_Shortest_Path_First

  • 30

    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

    ABRHarry 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-7LSA-5 R4ASBRASBRASBR

  • 31

    31

    OSPF R1 LSA-7

    LSA R4 ASBR

    JUNOS 5.2R1.4

    3/8 Harry Reynolds traceroute R5 R4

    3/8 R4 R4

    NSSANSSA LSA-7 R4

    NSSAR3 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

    [email protected]# 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

    http://www.juniper.net/techpubs/software/junos/junos52/index.htmlhttp://www.juniper.net/techpubs/software/junos/junos72/index.html

  • 32

    32

    JUNOS 7.2R4.2LSA-5 R4Metric R4 12

    forwarding address 10.0.6.1 R4 ASBR

    R1 R5 OSPF LSA-4

    [email protected]# 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 Opt Cksum Len

    ASBRSum 10.0.6.1 10.0.3.3 0x80000009 130 0x2 0x72b 28

    mask 0.0.0.0

    TOS 0x0, metric 1

    ASBRSum 10.0.6.1 10.0.3.4 0x80000009 131 0x2 0xb25 28

    mask 0.0.0.0

    TOS 0x0, metric 2

    ASBRSum *10.0.9.7 10.0.3.5 0x80000009 1030 0x2 0x9d89 28

    mask 0.0.0.0

    TOS 0x0, metric 1

    ABRR3/R4 LSA-4Metric 1 2

    R5 R3 ASBR R5Metric LSA-5 12

    R3 LSA-4 1 R5 R3 1: 12+1+1=14

    [email protected]# 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]

    [email protected]# 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

    http://www.ietf.org/mail-archive/web/ospf/current/msg01943.html

  • 33

    33

    [edit]

    [email protected]# 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

    [email protected]# 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]

    [email protected]# 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]

    https://www.juniper.net/techpubs/software/junos/junos85/rn-sw-85/frameset.htmlhttp://www.juniper.net/techpubs/software/junos/junos85/index.html

  • 34

    34

    [email protected]# 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]

    [email protected]# set r3 protocols ospf area 10 interface

    fxp2.13 metric 2

    [email protected]# 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;

    http://xuexizu.com/?q=tom/wiki_para/edit/1003058http://xuexizu.com/?q=tom/wiki_para/edit/1003058http://www.juniper.net/techpubs/software/junos/junos61/swconfig61-routing/html/ospf-config17.htmlhttp://en.wikipedia.org/wiki/Dijkstra's_algorithmhttp://www.juniper.net/products_and_services/junos/index.htmlhttp://www.juniper.net/techpubs/software/junos/junos70/swconfig70-policy/html/policy-actions-config11.htmlhttp://www.juniper.net/techpubs/software/junos/junos70/swconfig70-policy/html/policy-actions-config13.html#1021911http://jncie.wordpress.com/2008/08/25/labs-junos-per-packet-load-balancing/http://jncie.wordpress.com/2008/08/25/labs-junos-per-packet-load-balancing/http://jncie.wordpress.com/2008/08/25/labs-junos-per-packet-load-balancing/

  • 35

    35

    route-filter 3.0.0.0/8 exact;

    }

    then {

    load-balance per-packet;

    accept;

    }

    }

    }

    }

    [email protected]# set r5 routing-options forwarding-table

    export hash

    R5R5 3/8

    R1 fxp1.38 3.0.0.1/30 IP

    traceroute R5

    [email protected]# run show route forwarding-table | find r5

    Logical router: r5

    Routing table: inet

    Internet:

    Destination Type RtRef Next hop Type Index NhRef Netif

    default perm 0 dscd 398 1

    3.0.0.0/8 user 0 ulst 131070 1

    10.0.2.2 ucst 645 4 fxp2.35

    10.0.2.10 ucst 640 8 fxp2.45

    ......

    [email protected]# 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]

    [email protected]# 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)

  • 36

    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 OSPFJUNOS OSPF ()/LSA R7

    OSPF 200.200/24 traceroute

    200.200/24 IP!H

    [email protected]# 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]

    [email protected]# 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]

    [email protected]# 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)

    http://jncie.wordpress.com/2008/09/23/juniper-junos-ospf-external-routes-lsa/

  • 37

    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]

    [email protected]# 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

  • 38

    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

    http://xuexizu.com/?q=tom/wiki_para/edit/1003082http://xuexizu.com/?q=tom/wiki_para/edit/1003082http://xuexizu.com/?q=tom/wiki_para/edit/1003083http://xuexizu.com/?q=tom/wiki_para/edit/1003083http://www.juniper.net/techpubs/software/nog/nog-baseline/html/track-error-conds16.htmlhttp://www.juniper.net/techpubs/software/nog/nog-baseline/html/track-error-conds17.html

  • 39

    39

    LSA OSPF

    /LSA

    R6 6.0.x-3/24 OSPF[][]

    R6 IP OSPF 1

    fxp1 {

    unit 68 {

    vlan-id 68;

    family inet {

    address 6.0.0.1/24;

    address 6.0.1.1/24;

    address 6.0.2.1/24;

    address 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

    http://xuexizu.com/?q=tom/wiki_para/edit/1003084http://xuexizu.com/?q=tom/wiki_para/edit/1003084

  • 40

    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 *[OSPF/10] 02:38:31, metric 3

    > to 10.0.2.1 via fxp1.35

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

    > to 10.0.2.1 via fxp1.35

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

    > to 10.0.2.1 via fxp1.35

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

    > to 10.0.2.1 via fxp1.35

    10.0.9.7/32 *[OSPF/10] 02:37:46, metric 2

    > to 10.0.2.1 via fxp1.35

    /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

    http://xuexizu.com/?q=tom/wiki_para/edit/1003085http://xuexizu.com/?q=tom/wiki_para/edit/1003085

  • 41

    41

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

    > to 10.0.2.1 via fxp1.35

    10.0.8.4/30 *[OSPF/10] 02:38:33, metric 2

    > to 10.0.2.1 via fxp1.35

    10.0.8.8/30 *[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 *[OSPF/10] 02:38:35, metric 3

    > to 10.0.2.1 via fxp1.35

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

    > to 10.0.2.1 via fxp1.35

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

    > to 10.0.2.1 via fxp1.35

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

    > to 10.0.2.1 via fxp1.35

    10.0.9.7/32 *[OSPF/10] 02:37:50, metric 2

    > to 10.0.2.1 via fxp1.35

    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 Cksum Len

    Router 10.0.3.3 10.0.3.3 0x80000043 16 0x22 0xf964 60

    Router 10.0.3.4 10.0.3.4 0x8000005b 16 0x22 0xb27 60

    Router *10.0.3.5 10.0.3.5 0x80000043 15 0x22 0x1f34 60

    Network 10.0.2.2 10.0.3.3 0x8000000a 48 0x22 0xa84b 32

    Network 10.0.2.6 10.0.3.4 0x8000004c 03 0x22 0xe3c9 32

    Network 10.0.2.10 10.0.3.4 0x8000000a 10 0x22 0x5c8d 32

    Summary *6.0.0.0 10.0.3.5 0x80000008 15 0x22 0xb368 28

    Summary *6.0.1.0 10.0.3.5 0x80000008 15 0x22 0xa872 28

    http://xuexizu.com/?q=tom/wiki_para/edit/1003086http://xuexizu.com/?q=tom/wiki_para/edit/1003086

  • 42

    42

    Summary *6.0.2.0 10.0.3.5 0x80000008 15 0x22 0x9d7c 28

    Summary *6.0.3.0 10.0.3.5 0x80000008 15 0x22 0x9286 28

    Summary 10.0.4.4 10.0.3.3 0x8000003d 16 0x22 0xc41a 28

    Summary 10.0.4.4 10.0.3.4 0x80000054 16 0x22 0x8641 28

    Summary 10.0.4.8 10.0.3.3 0x8000003d 16 0x22 0xa633 28

    Summary 10.0.4.8 10.0.3.4 0x80000054 16 0x22 0x5470 28

    Summary 10.0.4.12 10.0.3.3 0x8000003e 16 0x22 0x686e 28

    Summary 10.0.4.12 10.0.3.4 0x80000054 16 0x22 0x407e 28

    Summary 10.0.6.1 10.0.3.3 0x8000003c 16 0x22 0xd608 28

    Summary 10.0.6.1 10.0.3.4 0x80000053 16 0x22 0xa224 28

    Summary 10.0.6.2 10.0.3.3 0x8000003b 16 0x22 0xd805 28

    Summary 10.0.6.2 10.0.3.4 0x80000053 16 0x22 0x8e38 28

    Summary *10.0.8.0 10.0.3.5 0x8000003d 15 0x22 0xaa33 28

    Summary *10.0.8.4 10.0.3.5 0x80000001 15 0x22 0xf026 28

    Summary *10.0.8.8 10.0.3.5 0x80000001 15 0x22 0xc84a 28

    Summary *10.0.9.6 10.0.3.5 0x80000001 15 0x22 0xe32d 28

    Summary *10.0.9.7 10.0.3.5 0x80000001 15 0x22 0xd936 28

    ASBRSum 10.0.6.1 10.0.3.3 0x8000003b 16 0x22 0xca14 28

    ASBRSum 10.0.6.1 10.0.3.4 0x80000053 16 0x22 0x9431 28

    ASBRSum *10.0.9.7 10.0.3.5 0x8000003c 15 0x22 0x557e 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

  • 43

    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

  • 44

    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 *[OSPF/10] 03:45:58, metric 2

    > to 10.0.8.5 via fxp1.56

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

    > to 10.0.8.5 via fxp1.56

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

    > to 10.0.8.5 via fxp1.56

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

    > to 10.0.8.5 via fxp1.56

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

    R36/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

    http://xuexizu.com/?q=tom/wiki_para/edit/1003087http://xuexizu.com/?q=tom/wiki_para/edit/1003087

  • 45

    45

    Metric1677721510.0.8/236.0.0/22Discard

    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 *[OSPF/150] 03:19:40, metric 14, tag 0

    > to 10.0.2.10 via fxp2.45

    6.0.0.0/22 *[OSPF/10] 02:50:47, metric 16777215

    Discard

    6.0.0.0/24 *[OSPF/10] 06:38:36, metric 2

    > to 10.0.8.5 via fxp1.56

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

    Discard

    10.0.8.0/30 *[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

    OSPFJUNOS

  • 46

    46

    Metric Discard

    R5 0 POPPoint 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 DiscardR5

    OSPF NSSA LSA-7[][]

    3/8 JUNOSNSSA LSA-7

    JUNOS OSPF IOS

    summary-address LSA-5 JUNOS

    aggregate aggregate OSPF LSA-5

    LSA-7 LSA-5JUNOS

    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

    http://xuexizu.com/?q=tom/wiki_para/edit/1003088http://xuexizu.com/?q=tom/wiki_para/edit/1003088

  • 47

    47

    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 0x80000055 261 0x22 0xd576 60

    Router 10.0.3.4 10.0.3.4 0x8000006a 261 0x22 0xec36 60

    Router *10.0.3.5 10.0.3.5 0x80000058 260 0x22 0xf449 60

    Network 10.0.2.2 10.0.3.3 0x80000016 227 0x22 0x9057 32

    Network 10.0.2.6 10.0.3.4 0x80000055 827 0x22 0xd1d2 32

    Network 10.0.2.10 10.0.3.4 0x80000013 227 0x22 0x4a96 32

    Summary 10.0.4.0 10.0.3.3 0x8000000b 827 0x22 0x5eb5 28

    Summary 10.0.4.0 10.0.3.4 0x80000009 527 0x22 0x52c3 28

    Summary *10.0.8.0 10.0.3.5 0x8000004b 14 0x22 0x9b32 28

    ASBRSum 10.0.6.1 10.0.3.3 0x8000004b 260 0x22 0xaa24 28

    ASBRSum 10.0.6.1 10.0.3.4 0x80000061 260 0x22 0x783f 28

    ASBRSum *10.0.9.7 10.0.3.5 0x8000004b 259 0x22 0x378d 28

    OSPF AS SCOPE link state database

    Type ID Adv Rtr Seq Age Opt Cksum Len

    Extern 200.200.0.0 10.0.9.7 0x8000007e 527 0x22 0xa6e2 36

    3/8 10 1.3 3/8

    per-packet load balance

    1.5 OSPF

    http://jncie.wordpress.com/2008/10/07/jncip-labs-ospf-nssa-external-routes-load-balancing/

  • 48

    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

    http://xuexizu.com/?q=tom/wiki_para/edit/1003261http://xuexizu.com/?q=tom/wiki_para/edit/1003261http://xuexizu.com/?q=tom/wiki_para/edit/1003262http://xuexizu.com/?q=tom/wiki_para/edit/1003262http://xuexizu.com/?q=tom/wiki_para/edit/1003263http://xuexizu.com/?q=tom/wiki_para/edit/1003263mailto:nigel@itaalab#?delete?r3?protocols?ospf?area?0?interface?fxp1.35??

  • 49

    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

    mailto:nigel@itaalab#?set?r3?protocols?ospf?area?3?interface?fxp1.35?????mailto:nigel@itaalab#?delete?r5?protocols?ospf?area?0?interface?fxp2.35????mailto:nigel@itaalab#?set?r5?protocols?ospf?area?3?interface?fxp2.35???mailto:nigel@itaalab#?set?r4?protocols?ospf?area?0?interface?fxp1.45?disable??mailto:nigel@itaalab#?deactivate?r5?protocols?ospf?area?0?interface?fxp2.45??mailto:nigel@itaalab#?run?show?ospf?database?logical\router?r3?netsummary?advertising\router?10.0.3.5.mailto:nigel@itaalab#?run?show?ospf?database?logical\router?r3?netsummary?advertising\router?10.0.3.5.mailto:nigel@itaalab#?run?show?route?logical\router?r3?10.0.8.0/23?????mailto:nigel@itaalab#?run?show?route?logical\router?r3?10.0.3.5?http://xuexizu.com/?q=tom/wiki_para/edit/1003264http://xuexizu.com/?q=tom/wiki_para/edit/1003264

  • 50

    50

    [editlogicalroutersr3protocolsospfarea0.0.0.0]

    OSPF

    OSPF LSAJUNOS

    OSPFJUNOS

    MD5 Area

    MD5

    KeyID MD5 RFC1321.

    JUNOS JUNOS 7.2

    [protocolsospfareax]authenticationtype

    MD5

    setarea0.0.0.0authenticationtypemd5

    setarea0.0.0.1authenticationtypesimplepassword

    OSPFJUNOS 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

    mailto:nigel@itaalab#?show?r3?protocols?ospf?area?0??mailto:nigel@itaalab#?show?r5?protocols?ospf?area?0?????mailto:nigel@itaalab#?run?show?ospf?interface?logical\router?r5??

  • 51

    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

    mailto:nigel@itaalab#?run?show?ospf?neighbor?logical\router?r5???mailto:nigel@itaalab#?run?show?ospf?database?logical\router?r3?netsummary?advertising\router?10.0.3.5?detail???????mailto:nigel@itaalab#?run?show?ospf?database?logical\router?r3?netsummary?advertising\router?10.0.3.5?detail???????mailto:nigel@itaalab#?run?show?route?logical\router?r3?10.0.3.5??mailto:nigel@itaalab#?run?show?route?logical\router?r3?10.0.8.0?

  • 52

    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

    JUNOSmonitor

    traffic UNIX tcpdump

    R5juniper

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

    mailto:nigel@itaalab#?run?traceroute?10.0.6.1?logical\router?r6??mailto:nigel@itaalab#?run?traceroute?10.0.6.1?logical\router?r7?????http://xuexizu.com/?q=tom/wiki_para/edit/1003265http://xuexizu.com/?q=tom/wiki_para/edit/1003265mailto:nigel@itaalab#?show?area?0??mailto:nigel@itaalab#?run?monitor?traffic?interface?fxp1?extensive??

  • 53

    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

    mailto:nigel@itaalab#?run?monitor?start?r3/ospf\log?bhttp://xuexizu.com/?q=tom/wiki_para/edit/1003266http://xuexizu.com/?q=tom/wiki_para/edit/1003266

  • 54

    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

    mailto:nigel@itaalab#?set?r4?protocols?ospf?area?0?interface?fxp2.34?hello\interval?5?dead\interval?20?03mailto:nigel@itaalab#?set?r4?protocols?ospf?area?0?interface?fxp2.34?hello\interval?5?dead\interval?20?0mailto:nigel@itaalab#?set?r4?protocols?ospf?area?0?interface?fxp1.45?hello\interval?5?dead\interval?20?0mailto:nigel@itaalab#?set?r4?protocols?ospf?area?0?interface?fxp1.45?hello\interval?5?dead\interval?20?0mailto:nigel@itaalab#?set?r3?protocols?ospf?area?0?interface?fxp1.34?hello\interval?5?dead\interval?20?0mailto:nigel@itaalab#?set?r3?protocols?ospf?area?0?interface?fxp1.34?hello\interval?5?dead\interval?20?0mailto:nigel@itaalab#?set?r5?protocols?ospf?area?0?interface?fxp2.45?hello\interval?5?dead\interval?20?0mailto:nigel@itaalab#?set?r5?protocols?ospf?area?0?interface?fxp2.45?hello\interval?5?dead\interval?20?0mailto:nigel@itaalab#?set?virtual\link?neighbor\id?10.0.3.5?transit\area?mailto:nigel@itaalab#?set?virtual\link?neighbor\id?10.0.3.3?transit\area?mailto:nigel@itaalab#?run?show?ospf?interface?logical\router?r3?detail?????

  • 55

    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 OSPFOSPFHello

    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]

    mailto:nigel@itaalab#?show?r3?protocols?ospf?area?0??

  • 56

    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

    mailto:nigel@itaalab#?show?r4?protocols?ospf?area?0??mailto:nigel@itaalab#?show?r5?protocols?ospf?area?0??mailto:nigel@itaalab#?run?show?bfd?session?detail?logical\router?r4???????

  • 57

    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

    [][]

    http://xuexizu.com/?q=tom/wiki_para/edit/1003269http://xuexizu.com/?q=tom/wiki_para/edit/1003269

  • 58

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

    JJuniper IP

    OSPF ISIS JUNOS IGP RIP

    JUNOS RIP

    JUNOS IOS RIP RIP

    JUNOS

    RIP

    RIP

    RIP

    JUNOS,JUNOS RIP RIP

    RIP

    RIP MPLSIPv6

    RFC RIP RIP Juniper

    RIP

    RIP [][]

    RIP 4 192.168.03/24 IP

    4 RIP receive

    ping/traceroute

    fxp1.80 R6/R7 RIP

    [editlogicalrouters]

    [email protected]#showrip

    interfaces{

    fxp1{

    unit80{

    vlanid180;

    familyinet{

    address172.16.40.1/24;

    http://xuexizu.com/?q=tom/wiki_para/edit/1003270http://xuexizu.com/?q=tom/wiki_para/edit/1003270http://xuexizu.com/?q=tom/wiki_para/edit/1003271http://xuexizu.com/?q=tom/wiki_para/edit/1003271http://xuexizu.com/?q=tom/wiki_para/edit/1003272http://xuexizu.com/?q=tom/wiki_para/edit/1003272mailto:[email protected]#?show?rip??

  • 59

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

    JUNOSRIP RIP

    JUNOS RIP RIP

    RIP

    RIP/

    RIPMetric Preference

    R6/R7/RIP RIP

    [editlogicalrouters]

    [email protected]#setr6protocolsripgroupripneighborfxp2.80

    [editlogicalrouters]

    [email protected]#setr7protocolsripgroupripneighborfxp3.80

    [editlogicalrouters]

    [email protected]#setripprotocolsripgroupripneighborfxp1.80

    [editlogicalrouters]

    [email protected]#showr6protocolsrip

    grouprip{

    neighborfxp2.80;

    }

    http://xuexizu.com/?q=tom/wiki_para/edit/1003273http://xuexizu.com/?q=tom/wiki_para/edit/1003273mailto:[email protected]#?set?r6?protocols?rip?group?rip?neighbor?fxp2.80??mailto:[email protected]#?set?r7?protocols?rip?group?rip?neighbor?fxp3.80??mailto:[email protected]#?set?rip?protocols?rip?group?rip?neighbor?fxp1.80?mailto:[email protected]#?show?r6?protocols?rip??

  • 60

    60

    RIP RIP Up

    [editlogicalrouters]

    [email protected]#runshowripneighborlogicalrouterrip

    SourceDestinationSendReceiveIn

    NeighborStateAddressAddressModeModeMet

    fxp1.80Up172.16.40.1224.0.0.9mcastboth1

    [editlogicalrouters]

    [email protected]#runshowripneighborlogicalrouterr6

    SourceDestinationSendReceiveIn

    NeighborStateAddressAddressModeModeMet

    fxp2.80Up172.16.40.2224.0.0.9mcastboth1

    [editlogicalrouters]

    [email protected]#runshowripneighborlogicalrouterr7

    SourceDestinationSendReceiveIn

    NeighborStateAddressAddressModeModeMet

    fxp3.80Up172.16.40.3224.0.0.9mcastboth1

    RIP[][]

    RIP RIP

    RIP RIP

    RIP

    R7 R6

    [editlogicalrouters]

    [email protected]#showrippolicyoptions

    policystatementrip{

    term1{

    fromprotocol[ripstatic];

    thenaccept;

    }

    }

    rip

    [editlogicalrouters]

    [email protected]#setripprotocolsripgroupripexportrip

    mailto:[email protected]#?run?show?rip?neighbor?logical\router?rip????????????????????????Amailto:[email protected]#?run?show?rip?neighbor?logical\router?r6??????24.23 Tm[] TJET EMC /P BDC BT/F10 10.56 Tf1 0 0 1 99.144 524.23 Tm[(st)11(atic)] TJET EMC /P BDC BT/F7 10.56 Tf1 0 0 1 130.58 524.23 Tm[] TJET EMC /P BDC BT/F10 10.56 Tf1 0 0 1 135.86 524.23 Tm[({)] TJET EMC /P BDC BT/F7 10.56 Tf1 0 0 1 141.14 524.23 Tm[] TJET Emailto:[email protected]#?run?show?rip?neighbor?logical\router?r7????? 10.56 Tf1 0 0 1 214.73 383.81 Tm[(RI)11(P)] TJET EMC /P BDC BT/F11 10.56 Tf1 0 0 1 233.09 383.81 Tm[1111111111111111] TJET EMC /P BDC BT/F10 10http://xuexizu.com/?q=tom/wiki_para/edit/1003274http://xuexizu.com/?q=tom/wiki_para/edit/1003274mailto:[email protected]#?show?rip?policy\options?????????????????????6>> BDC BT/F10 10.56 Tf1 0 0 1 156.86 180.98 Tm[(set)] TJET EMC /Span Bmailto:[email protected]#?set?rip?protocols?rip?group?rip?export?rip?

  • 61

    61

    R6 RIP 192.168.03/24

    [email protected]#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

    [email protected]#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

    [email protected]#runshowroutereceiveprotocolrip172.16.40.1logicalrouterr6

    inet.0:31destinations,31routes(31active,0holddown,0hidden)

    mailto:[email protected]#?run?show?route?protocol?rip?logical\router?r6??#|]mailto:[email protected]#?run?show?route?advertising\protocol?rip?172.16.40.1?logical\router?rip???????????03mailto:[email protected]#?run?show?route?advertising\protocol?rip?172.16.40.1?logical\router?rip???????????0mailto:[email protected]#?run?show?route?receive\protocol?rip?172.16.40.1?logical\router?r6?????????????????mailto:[email protected]#?run?show?route?receive\protocol?rip?172.16.40.1?logical\router?r6?????????????????

  • 62

    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]

    [email protected]#editr6policyoptionspolicystatementripospf

    [editlogicalroutersr6policyoptionspolicystatementripospf]

    [email protected]#setterm1fromprotocolrip

    [editlogicalroutersr6policyoptionspolicystatementripospf]

    [email protected]#setterm1fromroutefilter192.168.0/22orlonger

    [editlogicalroutersr6policyoptionspolicystatementripospf]

    [email protected]#setterm1thenaccept

    [editlogicalroutersr6policyoptionspolicystatementripospf]

    [email protected]#up2

    [editlogicalroutersr6]

    [email protected]#showpolicyoptions

    policystatementripospf{

    term1{

    from{

    protocolrip;

    routefilter192.168.0.0/22orlonger;

    }

    thenaccept;

    }

    http://xuexizu.com/?q=tom/wiki_para/edit/1003275http://xuexizu.com/?q=tom/wiki_para/edit/1003275http://xuexizu.com/?q=tom/wiki_para/edit/1003276http://xuexizu.com/?q=tom/wiki_para/edit/1003276mailto:[email protected]#?edit?r6?policy\options?policy\statement?rip\ospfmailto:[email protected]#?set?term?1?from?protocol?rip?????mailto:[email protected]#?set?term?1?from?route\filter?192.168.0/22?orlonger??mailto:[email protected]#?set?term?1?then?accept??mailto:[email protected]#?up?2??mailto:[email protected]#?show?policy\options??

  • 63

    63

    }

    [editlogicalroutersr6]

    [email protected]#up

    [editlogicalrouters]

    [email protected]#editr7policyoptions

    [editlogicalroutersr7policyoptions]

    [email protected]#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]

    [email protected]#setr6protocolsospfexportripospf

    [editlogicalrouters]

    [email protected]#setr7protocolsospfexportripospf

    R5 192.168/22 OSPF

    R5 R6 R7

    [email protected]#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

    mailto:[email protected]#?up??mailto:[email protected]#?edit?r7?policy\options??mailto:[email protected]#?load?merge?terminal?relative??mailto:[email protected]#?set?r6?protocols?ospf?export?rip\ospf??mailto:[email protected]#?set?r7?protocols?ospf?export?rip\ospf??mailto:[email protected]#?run?show?route?logical\router?r5?192.168/22??

  • 64

    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

    [email protected]#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

    [email protected]#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

    mailto:[email protected]#?run?show?ospf?database?logical\router?r7?extern??W"mailto:[email protected]#?run?show?route?logical\router?r7?192.168/16?????

  • 65

    65

    R7 OSPF R7 LSA5 200.200.0.0

    192.168/22 R7 OSPF

    1.2 200.200/24 OSPF R7

    [email protected]#showr7policyoptionspolicystatementstatic

    term1{

    from{

    protocolstatic;

    routefilter200.200.0.0/24exact;

    }

    thenaccept;

    }

    term2{

    thenreject;

    }

    term2 reject

    OSPF term

    1 term2ripospf

    [email protected]#showr7policyoptionspolicystatementstaticterm2

    thennextpolicy;

    R5 R7

    [email protected]#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.60x8000000810820x20x63