Difference between revisions of "OSPF JUNOS"
m (→Deaktiver RIP) |
m (→Referencer) |
||
Line 285: | Line 285: | ||
</source> | </source> | ||
+ | =Tuning af OSPF= | ||
+ | ==Passiv interfaces== | ||
=Referencer= | =Referencer= | ||
<references/> | <references/> |
Revision as of 17:48, 16 October 2014
Konfigurations eksemplet for OSPF konfigureres på dette setup. Det kører allerede RIP og vi skal nu tilføje OSPF og når OSPF har konvergeret erstatter vi RIP med OSPF i route tabellen
Konfigurations rækkefælgen bliver:
- Konfigurer OSPF
- Verificer OSPF
- Fjern RIP.
Contents
Konfiguration af OSPF
Her konfigureres OSPF så forbindelserne imellem routerne tilhører Area 0 og Lo interfaces tilhører et Area med samme nummer som P-Routeren(P1 = Area 1)
Route Preference konfigureres til at være højere end RIP, så vi ikke mister routing imens OSPF konvergerer.
[edit routing-instances P1]
rael@SRX240# <input>show</input>
routing-options {
router-id 10.1.0.1;
}
protocols {
ospf {
preference 101;
external-preference 105;
area 0.0.0.0 {
interface lt-0/0/0.1;
interface lt-0/0/0.10;
}
area 0.0.0.1 {
interface lo0.1;
}
}
}
Verificer OSPF
OSPF status
[edit]
rael@SRX240# <input>run show ospf overview instance P1</input>
Instance: P1
<notice>Router ID: 10.1.0.1</notice>
Route table index: 5
Area border router
LSA refresh time: 50 minutes
Area: 0.0.0.0
Stub type: Not Stub
Authentication Type: None
Area border routers: 3, AS boundary routers: 0
Neighbors
<notice>Up (in full state): 2</notice>
Area: 0.0.0.1
Stub type: Not Stub
Authentication Type: None
Area border routers: 0, AS boundary routers: 0
Neighbors
Up (in full state): 0
Topology: default (ID 0)
Prefix export count: 0
Full SPF runs: 15
SPF delay: 0.200000 sec, SPF holddown: 5 sec, SPF rapid runs: 3
Backup SPF: Not Needed
Show ospf database for P1
[edit]
rael@SRX240# <input>run show ospf database instance P1</input>
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
<notice>Router *10.1.0.1 10.1.0.1 0x8000000c 62 0x22 0x922e 48
Router 10.2.0.1 10.2.0.1 0x8000000a 63 0x22 0xcbfb 48
Router 10.3.0.1 10.3.0.1 0x80000009 64 0x22 0x7b2d 48
Router 10.4.0.1 10.4.0.1 0x8000000a 65 0x22 0xc6e5 48</notice>
Network 10.0.0.2 10.2.0.1 0x80000005 63 0x22 0x679f 32
Network 10.0.0.6 10.4.0.1 0x80000006 69 0x22 0x49b3 32
Network 10.0.0.9 10.3.0.1 0x80000004 69 0x22 0x23db 32
Network 10.0.0.13 10.4.0.1 0x80000003 65 0x22 0x15e2 32
Summary *10.1.0.0 10.1.0.1 0x80000003 673 0x22 0x8e95 28
Summary *10.1.0.1 10.1.0.1 0x80000003 476 0x22 0x849e 28
Summary 10.2.0.0 10.2.0.1 0x80000003 687 0x22 0x7aa7 28
Summary 10.2.0.1 10.2.0.1 0x80000003 503 0x22 0x70b0 28
Summary 10.3.0.0 10.3.0.1 0x80000003 687 0x22 0x66b9 28
Summary 10.3.0.1 10.3.0.1 0x80000003 503 0x22 0x5cc2 28
Summary 10.4.0.0 10.4.0.1 0x80000003 699 0x22 0x52cb 28
Summary 10.4.0.1 10.4.0.1 0x80000003 527 0x22 0x48d4 28
OSPF database, Area 0.0.0.1
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *10.1.0.1 10.1.0.1 0x80000004 124 0x22 0x7f70 48
Summary *10.0.0.0 10.1.0.1 0x80000006 58 0x22 0x8c97 28
Summary *10.0.0.4 10.1.0.1 0x80000003 58 0x22 0x74ad 28
Summary *10.0.0.8 10.1.0.1 0x80000007 68 0x22 0x3ae0 28
Summary *10.0.0.12 10.1.0.1 0x80000005 63 0x22 0x20f7 28
Summary *10.2.0.0 10.1.0.1 0x80000003 58 0x22 0x8c95 28
Summary *10.2.0.1 10.1.0.1 0x80000003 58 0x22 0x829e 28
Summary *10.3.0.0 10.1.0.1 0x80000004 67 0x22 0x7ea1 28
Summary *10.3.0.1 10.1.0.1 0x80000004 67 0x22 0x74aa 28
Summary *10.4.0.0 10.1.0.1 0x80000005 58 0x22 0x7aa2 28
Summary *10.4.0.1 10.1.0.1 0x80000005 58 0x22 0x70ab 28
Nabo tabellen for P1:
[edit]
rael@SRX240# <input>run show ospf neighbor instance P1</input>
Address Interface State ID Pri Dead
10.0.0.2 lt-0/0/0.1 Full 10.2.0.1 128 35
10.0.0.9 lt-0/0/0.10 Full 10.3.0.1 128 32
Statistikker for OSPF
[edit]
rael@SRX240# <input>run show ospf statistics instance P1</input>
Packet type Total Last 5 seconds
Sent Received Sent Received
Hello 36 28 0 0
DbD 25 20 0 0
LSReq 5 3 0 0
LSUpdate 54 44 0 0
LSAck 37 32 0 0
DBDs retransmitted : 9, last 5 seconds : 0
LSAs flooded : 33, last 5 seconds : 0
LSAs flooded high-prio : 22, last 5 seconds : 0
LSAs retransmitted : 9, last 5 seconds : 0
LSAs transmitted to nbr: 5, last 5 seconds : 0
LSAs requested : 15, last 5 seconds : 0
LSAs acknowledged : 64, last 5 seconds : 0
Flood queue depth : 0
Total rexmit entries : 0
db summaries : 0
lsreq entries : 0
<notice>Receive errors:
None</notice>
Deaktiver RIP
Først ændrer vi Global route Preference til default og så fjerner vi RIP.
Her kan vi se at alle netværk er lært via både RIP og OSPF. RIP Routen er den aktive(*).
[edit]
rael@SRX240# <input>run show route table P1.inet.0</input>
P1.inet.0: 16 destinations, 21 routes (16 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/30 *[Direct/0] 02:02:48
> via lt-0/0/0.1
10.0.0.1/32 *[Local/0] 02:08:03
Local via lt-0/0/0.1
<notice>10.0.0.4/30 *[RIP/100] 01:20:00, metric 2, tag 0
> to 10.0.0.2 via lt-0/0/0.1</notice>
[OSPF/101] 00:14:56, metric 2
> to 10.0.0.2 via lt-0/0/0.1
10.0.0.8/30 *[Direct/0] 02:02:48
> via lt-0/0/0.10
10.0.0.10/32 *[Local/0] 02:08:03
Local via lt-0/0/0.10
<notice>10.0.0.12/30 *[RIP/100] 01:20:01, metric 2, tag 0
> to 10.0.0.9 via lt-0/0/0.10</notice>
[OSPF/101] 00:15:05, metric 2
> to 10.0.0.9 via lt-0/0/0.10
10.1.0.0/24 *[Direct/0] 01:19:59
> via lo0.1
10.1.0.1/32 *[Local/0] 01:19:59
Local via lo0.1
<notice>10.2.0.0/24 *[RIP/100] 01:19:55, metric 2, tag 0
> to 10.0.0.2 via lt-0/0/0.1</notice>
[OSPF/101] 00:14:56, metric 1
> to 10.0.0.2 via lt-0/0/0.1
10.2.0.1/32 *[OSPF/101] 00:14:56, metric 1
> to 10.0.0.2 via lt-0/0/0.1
<notice>10.3.0.0/24 *[RIP/100] 01:19:55, metric 2, tag 0
> to 10.0.0.9 via lt-0/0/0.10</notice>
[OSPF/101] 00:15:05, metric 1
> to 10.0.0.9 via lt-0/0/0.10
10.3.0.1/32 *[OSPF/101] 00:15:05, metric 1
> to 10.0.0.9 via lt-0/0/0.10
<notice>10.4.0.0/24 *[RIP/100] 01:11:15, metric 3, tag 0
> to 10.0.0.2 via lt-0/0/0.1
to 10.0.0.9 via lt-0/0/0.10</notice>
[OSPF/101] 00:14:56, metric 2
to 10.0.0.2 via lt-0/0/0.1
> to 10.0.0.9 via lt-0/0/0.10
10.4.0.1/32 *[OSPF/101] 00:14:56, metric 2
> to 10.0.0.2 via lt-0/0/0.1
to 10.0.0.9 via lt-0/0/0.10
224.0.0.5/32 *[OSPF/10] 00:33:28, metric 1
MultiRecv
224.0.0.9/32 *[RIP/100] 00:16:02, metric 1
MultiRecv
Slet den forhøjede Route Preference på 101, så den falder tilbage på 10(default)
[edit routing-instances]
rael@SRX240# <input>delete P1 protocols ospf preference</input>
[edit routing-instances]
rael@SRX240# <input>delete P2 protocols ospf preference</input>
[edit routing-instances]
rael@SRX240# <input>delete P3 protocols ospf preference</input>
[edit routing-instances]
rael@SRX240# <input>delete P4 protocols ospf preference</input
[edit routing-instances]
rael@SRX240# <input>commit</input>
Alle routes har nu skiftet til OSPF routes i stedet for RIP
[edit routing-instances]
rael@SRX240# <input>run show route table P1.inet.0</input>
P1.inet.0: 16 destinations, 20 routes (16 active, 4 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/30 *[Direct/0] 02:20:03
> via lt-0/0/0.1
10.0.0.1/32 *[Local/0] 02:25:18
Local via lt-0/0/0.1
<notice>10.0.0.4/30 *[OSPF/10] 00:00:10, metric 2
> to 10.0.0.2 via lt-0/0/0.1</notice>
[RIP/100] 01:37:15, metric 2, tag 0
> to 10.0.0.2 via lt-0/0/0.1
10.0.0.8/30 *[Direct/0] 02:20:03
> via lt-0/0/0.10
10.0.0.10/32 *[Local/0] 02:25:18
Local via lt-0/0/0.10
<notice>10.0.0.12/30 *[OSPF/10] 00:00:10, metric 2
> to 10.0.0.9 via lt-0/0/0.10</notice>
[RIP/100] 01:37:16, metric 2, tag 0
> to 10.0.0.9 via lt-0/0/0.10
10.1.0.0/24 *[Direct/0] 01:37:14
> via lo0.1
10.1.0.1/32 *[Local/0] 01:37:14
Local via lo0.1
<notice>10.2.0.0/24 *[OSPF/10] 00:00:10, metric 1
> to 10.0.0.2 via lt-0/0/0.1</notice>
[RIP/100] 01:37:10, metric 2, tag 0
> to 10.0.0.2 via lt-0/0/0.1
10.2.0.1/32 *[OSPF/10] 00:00:10, metric 1
> to 10.0.0.2 via lt-0/0/0.1
<notice>10.3.0.0/24 *[OSPF/10] 00:00:10, metric 1
> to 10.0.0.9 via lt-0/0/0.10</notice>
[RIP/100] 01:37:10, metric 2, tag 0
> to 10.0.0.9 via lt-0/0/0.10
10.3.0.1/32 *[OSPF/10] 00:00:10, metric 1
> to 10.0.0.9 via lt-0/0/0.10
10.4.0.0/24 *[OSPF/10] 00:00:10, metric 2
to 10.0.0.2 via lt-0/0/0.1
> to 10.0.0.9 via lt-0/0/0.10
10.4.0.1/32 *[OSPF/10] 00:00:10, metric 2
to 10.0.0.2 via lt-0/0/0.1
> to 10.0.0.9 via lt-0/0/0.10
224.0.0.5/32 *[OSPF/10] 00:50:43, metric 1
MultiRecv
224.0.0.9/32 *[RIP/100] 00:00:10, metric 1
MultiRecv
Nu hvor OSPF har alle de aktive routes, kan vi slette RIP i alle instances.
[edit routing-instances]
rael@SRX240# <input>delete P1 protocols rip</input>
[edit routing-instances]
rael@SRX240# <input>delete P2 protocols rip</input>
[edit routing-instances]
rael@SRX240# <input>delete P3 protocols rip</input>
[edit routing-instances]
rael@SRX240# <input>delete P4 protocols rip</input>
[edit routing-instances]
rael@SRX240# <input>commit</input>
commit complete
[edit routing-instances]
rael@SRX240# <input>run show route protocol rip table P1.inet.0</input>
P1.inet.0: 15 destinations, 15 routes (15 active, 0 holddown, 0 hidden)
[edit routing-instances]
rael@SRX240#