パッシブインターフェースの設定

スポンサーリンク

目的

ルータにパッシブインターフェースを設定した時の動作を検証します。
ルーティングプロトコルはRIPv1を使用します。

パッシブインターフェースを設定すると、設定したインターフェースでルーティングアップデートの送信を停止することができます。不要なトラフィックを抑えることで帯域を節約します。

接続構成の例ではルータと接続されていないR1のf0/0、R2のf0/0が該当します。

接続構成

設定

R1の設定

R1(config)#int f0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut

R1(config-if)#int s0/0
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#no shut

R1(config)#router rip
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.2.0
R1(config-router)#passive-interface f0/0
パッシブインターフェースの設定

R2の設定

R2(config-if)#int s0/0
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no shut

R2(config)#int f0/0
R2(config-if)#ip add 192.168.3.1 255.255.255.0
R2(config-if)#no shut

R2(config)#router rip
R2(config-router)#network 192.168.2.0
R2(config-router)#network 192.168.3.0
R2(config-router)# passive-interface f0/0
パッシブインターフェースの設定

設定確認

ルーティングプロトコルの確認

R1#sh ip protocols
Routing Protocol is "rip"
  Sending updates every 30 seconds, next due in 14 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Redistributing: rip
  Default version control: send version 1, receive any version
    Interface             Send  Recv  Triggered RIP  Key-chain
    Serial0/0             1     1 2
  Automatic network summarization is in effect
  Maximum path: 4
  Routing for Networks:
    192.168.1.0
    192.168.2.0
  Passive Interface(s):
    FastEthernet0/0・・・①
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.2.2          120      00:00:17
  Distance: (default is 120)

①パッシブインターフェースが設定されているのは「FastEthernet0/0」

ルーティングテーブルの確認

R1#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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

C    192.168.1.0/24 is directly connected, FastEthernet0/0
C    192.168.2.0/24 is directly connected, Serial0/0
R    192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:08, Serial0/0

すべての経路を認識できている。

動作確認

デバッグモード

R1
R1#debug ip rip・・・①
RIP protocol debugging is on
R1#
Oct 19 20:14:13.487: RIP: sending v1 update to 255.255.255.255 via Serial0/0 (192.168.2.1)
Oct 19 20:14:13.487: RIP: build update entries
Oct 19 20:14:13.487:    network 192.168.1.0 metric 1・・・②

R1#
Oct 19 20:14:18.003: RIP: received v1 update from 192.168.2.2 on Serial0/0
Oct 19 20:14:18.003:      192.168.3.0 in 1 hops・・・③

R1#no debug ip rip・・・④

①デバッグを開始する

②(3行分)
Serial0/0インターフェースから「ネットワーク192.168.1.0 メトリック1」の集約ルートを通知している。

③(2行分)
Serial0/0インターフェースから「ネットワーク192.168.3.0 メトリック1」のルート情報を受信している。

④デバッグを終了する。undebug all ですべてのデバッグを終了できる。

FastEthernet0/0インターフェースからルーティングアップデートが送信されていないことが確認できる。

もし、パッシブインターフェースが設定されていない場合は以下の通りとなる。

R1#
Oct 19 20:22:44.547: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (192.168.1.1)
Oct 19 20:22:44.547: RIP: build update entries
Oct 19 20:22:44.547:    network 192.168.2.0 metric 1
Oct 19 20:22:44.547:    network 192.168.3.0 metric 2
Oct 19 20:22:44.551: RIP: sending v1 update to 255.255.255.255 via Serial0/0 (192.168.2.1)
Oct 19 20:22:44.551: RIP: build update entries
Oct 19 20:22:44.551:    network 192.168.1.0 metric 1

R1#
Oct 19 20:23:03.407: RIP: received v1 update from 192.168.2.2 on Serial0/0
Oct 19 20:23:03.407:      192.168.3.0 in 1 hops
タイトルとURLをコピーしました