OSPFの設定(2)
前回はベーシックなOSPFの設定を実施しました
では今回は、redistribute-staticを実践してみたいと思います
| Building configuration…
Current configuration : 671 bytes |
JUNOSの設定をしてみましょう、前回までの設定でconfigは下のようになっています
| root# show | no-more ## Last changed: 2009-10-11 20:45:39 UTC version 8.3R2.8; system { root-authentication { encrypted-password “$1$nIAA3PPr$ZKvo645RSZFDGCmfweQRb1″; ## SECRET-DATA } syslog { user * { any emergency; } file messages { any notice; authorization info; } file interactive-commands { interactive-commands any; } } } interfaces { fxp0 { unit 0 { family inet { address 192.168.0.1/24; } } } lo0 { unit 0 { family inet { address 10.0.1.1/32; } } } } protocols { ospf { area 0.0.0.0 { interface fxp0.0; interface lo0.0; } } } |
|
[edit] root# set routing-options static route 172.30.0.0/24 next-hop 192.168.0.250 |
| [edit] root# set policy-options policy-statement REDIST_STATIC term 10 from protocol static [edit] [edit] [edit] |
|
[edit] root# set protocols ospf export REDIST_STATIC |
|
Router#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.30.0.0/24 is subnetted, 1 subnets
O E2 172.30.0.0 [110/0] via 192.168.0.1, 00:00:11, Ethernet0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 10.0.1.1/32 [110/10] via 192.168.0.1, 00:00:11, Ethernet0
C 10.0.0.0/24 is directly connected, Loopback0
C 192.168.0.0/24 is directly connected, Ethernet0
Router#
|
タグ
2009年10月11日 | コメント/トラックバック(0) |
カテゴリー:JUNOS
RIPの設定 (2)
昨日に引続きRIPの設定を見ていきましょう
先ず、対抗ルータのloopback0へpingを実施してみましょう
| [edit] root# run ping 172.16.0.1 count 5 rapid PING 172.16.0.1 (172.16.0.1): 56 data bytes !!!!! — 172.16.0.1 ping statistics — 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.055/0.073/0.141/0.034 ms [edit] |
問題なく疎通確認ができました
ちなみに上のようにpingへcount 5オプションとrapidオプションを付加させてあげる事により某社ルータと同じような出力を得ることができます
では対抗側の250側0よりこちら側のlo0インターフェースは見えているのでしょうか?
早速確認してみましょう
|
test-router>ping 192.168.10.1
Type escape sequence to abort. |
おやおや? 通信確認ができていません
ではJUNOS側に次のコンフィグを上書きしてみてください
|
[edit] root# load override terminal [Type ^D at a new line to end input] version 7.4R3.4; system { root-authentication { encrypted-password “$1$IRx5CsNE$9fS4RQv8HpGFlXW9E6T8T.”; ## SECRET-DATA } syslog { user * { any emergency; } file messages { any notice; authorization info; } file interactive-commands { interactive-commands any; } } } interfaces { fxp0 { unit 0 { family inet { address 172.16.0.1/24; } } } lo0 { unit 0 { family inet { address 192.168.10.1/32; } } } } protocols { rip { group plan-g { export redist-direct; neighbor fxp0.0; } } } policy-options { policy-statement redist-direct { from protocol direct; then accept; } } load complete [edit] |
では、投入したコンフィグが前回のコンフィグと何が違うか見てみましょう
| [edit] root# show |compare [edit protocols rip group plan-g] + export redist-direct; [edit] + policy-options { + policy-statement redist-direct { + from protocol direct; + then accept; + } + } [edit] |
lo0インターフェースはダイレクト接続となっているので、redistribute directつまりダイレクト接続されたlo0のルート情報を再広報していますね
ではcommitを実施し2500から見えるようになったか確認してみましょう
|
test-router>ping 192.168.10.1
Type escape sequence to abort. |
pingによる接続性の確認が取れました
以上、JUNOSのRIPルーティングでした
タグ
2009年9月27日 | コメント/トラックバック(0) |
カテゴリー:JUNOS



