ネットワーク備忘録

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

JUNOSの再帰Staticルート

最近、仕事でJuniper社製品を触る機会が増えてきた。
自身は今までJuniper製品だと、「NetScreenの後継機としてSRXを触る」という感じだったが、今回はそうではない。

 そして触ってみた感じとしては悪くないなーという印象

そんなわけで、Juniper製品をちゃんと勉強しようと思いいちからやり直し

まずはStaticルート

f:id:klock_3rd:20180503111939p:plain

 


構成はこんな感じ

Ciscoの場合、R3からR7へ下記のように書いてもRoutingTableにはのっかる

R3#show run | inc ip route
ip route 0.0.0.0 0.0.0.0 172.16.8.254
ip route 172.16.8.254 255.255.255.255 172.16.5.254

show ip route

R3#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
      Known via "static", distance 1, metric 0, candidate default path
      Routing Descriptor Blocks:
       * 172.16.8.254
               Route metric is 0, traffic share count is 1

これは、Ciscoは自動的に再帰LookUpしてくれるから
しかし、JUNOSの場合はそうではない。

admin@R5# show routing-options | display set
set routing-options static route 0.0.0.0/0 next-hop 172.16.2.1
set routing-options static route 172.16.2.1/32 next-hop 172.16.5.1

show route

admin@R5> show route 0.0.0.0

admin@R5>

これは、Juniperは明示的に設定しないと再帰LookUpしてくれないのが原因
そんなわけで設定を以下に変更

admin@R5# set routing-options static route 0.0.0.0/0 next-hop 172.16.2.1 resolve

show でみるとこんな感じの設定になる

admin@R5# show routing-options | display set
set routing-options static route 172.16.2.1/32 next-hop 172.16.5.1
set routing-options static route 0.0.0.0/0 next-hop 172.16.2.1
set routing-options static route 0.0.0.0/0 resolve

ルーティングテーブルは

 

admin@R5# run show route 0.0.0.0

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

0.0.0.0/0    *[Static/5] 00:00:02, metric2 0
       > to 172.16.5.1 via ge-0/0/2.0