ネットワーク備忘録

アラフォーエンジニアのネットワーク系の備忘録。twitter:@deigo25374582

JUNOSのOSPF_その2

 コストの確認

 

f:id:klock_3rd:20180503154933p:plain

構成は↑で全部エリア0

 

 R1側でR7上のlo(2.1.1.7)の経路確認

 R1>show ip route 2.1.1.7
Routing entry for 2.1.1.7/32
  Known via "ospf 1", distance 110, metric 3, type intra area
  Last update from 172.16.2.254 on GigabitEthernet3, 20:29:25 ago
  Routing Descriptor Blocks:
  * 172.16.2.254, from 2.1.1.7, 20:29:25 ago, via GigabitEthernet3
    Route metric is 3, traffic share count is 1
R1>

 Ciscoは着信時にコスト加算だったはずなので、Gi3をコスト2にしてみる。

R1(config-if)#do sho run int gi3
!
interface GigabitEthernet3
ip address 172.16.2.1 255.255.255.0
ip ospf 1 area 0
ip ospf cost 2
end

再度確認

R1(config-if)#do sho ip route 2.1.1.7
Routing entry for 2.1.1.7/32
  Known via "ospf 1", distance 110, metric 4, type intra area
  Last update from 172.16.2.254 on GigabitEthernet3, 00:00:29 ago
  Routing Descriptor Blocks:
  * 172.16.2.254, from 2.1.1.7, 00:00:29 ago, via GigabitEthernet3
    Route metric is 4, traffic share count is 1
R1(config-if)# 

問題なし。 今度はJUNOSで確認。 Ciscoと同じはずだが念のため
R7でR1のlo(1.1.1.1)を確認

 admin@R7# run show route 1.1.1.1

inet.0: 20 destinations, 21 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32    *[OSPF/10] 00:02:02, metric 4
        > to 172.16.8.1 via ge-0/0/1.0

[edit]
admin@R7#

 R7のGi1のコストを2に変更

admin@R7# show protocols ospf | display set
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 metric 2
set protocols ospf area 0.0.0.0 interface lo0.0 interface-type p2p 

 もう一度確認

admin@R7# run show route 1.1.1.1

inet.0: 20 destinations, 21 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32    *[OSPF/10] 00:00:45, metric 5
        > to 172.16.8.1 via ge-0/0/1.0

 

 これはCiscoと同様

ついでにMD5認証も確認 R4-R6でMD5認証を実施
まずCisco

R4#show run int gi4
!
interface GigabitEthernet4
description To_R6_Gi4
ip address 172.16.6.254 255.255.255.0
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 Juniper@cisco
ip ospf 1 area 0
negotiation auto
end

JUNOS

admin@R6# show protocols ospf | display set
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 authentication md5 1 key "$9$KFnWXNs2aikPdbkP5Q9CKM8LXNbwgoJDbs4ZjqQz"
set protocols ospf area 0.0.0.0 interface lo0.0 

 結果は・・・

 admin@R6# run show ospf neighbor
Address    Interface     State  ID     Pri Dead
172.16.7.1   ge-0/0/0.0     Full  2.1.1.5    128  35
172.16.9.1   ge-0/0/1.0     Full  2.1.1.8    128  36
172.16.6.254  ge-0/0/2.0     Full  1.1.1.4    1  31

 問題なし

 

・・・最近Python/Djangoを全然触れてないからこういうのをやっても早めに終わらせないと