distribute-list のpermit と deny

この質問の投稿一覧へ

なし distribute-list のpermit と deny

msg# 1
depth:
0
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 .2 | 投稿日時 2015-10-16 8:53
platina30  半人前   投稿数: 8
度々お世話になっております。
distribute-list のコマンドをヘルプで確認していた時に見つけたもので、CCNPの範囲なのかここで聞いても良いものなのか分からなかったのですが、不適切でしたら申し訳ありません。
自分なりに調べてみましたが分からなかったため質問させていただきました。


R11とR12でRIPの形成し、お互いpingが通る環境で、下記のコマンドを入力すると

router rip
distribute-list prefix all gateway Lo in

ip prefix-list Lo seq 5 deny 192.168.1.1/32
ip prefix-list all seq 5 permit 0.0.0.0/0 le 32


・debug ip rip ではRIP update は送受信されている
・しかし、経路が確立されていない(pingが通らない)

という状況に陥りました。


私なりのdistribute-listの解釈として
RIP update が遮断される→経路が確立されない という流れだと思ったので
RIP update が送受信されている = 経路も確立される と思ったのですが

gatewayコマンドを入力すると異なる結果になりました。
そこで、このコマンドは下記の解釈で正しいのでしょうか?

・最初の prefix all でRIP update も含め全て許可されているが
gateway Lo で遮断されているので、update はあってもpingが通らない


configやdebug、showコマンドの出力は下記の通りです。



[R11]
interface Loopback0
ip address 11.0.0.1 255.255.255.0 secondary
ip address 12.0.0.1 255.255.255.0 secondary
ip address 13.0.0.1 255.255.255.0 secondary
ip address 14.0.0.1 255.255.255.0 secondary
ip address 10.0.0.1 255.255.255.0

interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0

router rip
network 10.0.0.0
network 11.0.0.0
network 12.0.0.0
network 13.0.0.0
network 14.0.0.0
network 192.168.1.0


[R12]
interface GigabitEthernet0/0
ip address 192.168.1.2 255.255.255.0

router rip
network 192.168.1.0
distribute-list prefix all gateway Lo in

ip prefix-list Lo seq 5 deny 192.168.1.1/32
ip prefix-list all seq 5 permit 0.0.0.0/0 le 32



[distribute-list適用前]
R12#sh ip route rip
Gateway of last resort is not set

R 10.0.0.0/8 [120/1] via 192.168.1.1, 00:02:28, GigabitEthernet0/0
R 11.0.0.0/8 [120/1] via 192.168.1.1, 00:02:28, GigabitEthernet0/0
R 12.0.0.0/8 [120/1] via 192.168.1.1, 00:02:28, GigabitEthernet0/0
R 13.0.0.0/8 [120/1] via 192.168.1.1, 00:02:28, GigabitEthernet0/0
R 14.0.0.0/8 [120/1] via 192.168.1.1, 00:02:28, GigabitEthernet0/0

R12#debug ip rip
*Oct 16 08:12:22.495: RIP: received v1 update from 192.168.1.1 on GigabitEthernet0/0
*Oct 16 08:12:22.495: 10.0.0.0 in 1 hops
*Oct 16 08:12:22.495: 11.0.0.0 in 1 hops
*Oct 16 08:12:22.499: 12.0.0.0 in 1 hops
*Oct 16 08:12:22.499: 13.0.0.0 in 1 hops
*Oct 16 08:12:22.503: 14.0.0.0 in 1 hops

R12#ping 10.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:
!!!!!



[distribute-list適用後]
R12#sh ip route
Gateway of last resort is not set

192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.2/32 is directly connected, GigabitEthernet0/0


R12#
*Oct 16 08:13:47.507: RIP: received v1 update from 192.168.1.1 on GigabitEthernet0/0
*Oct 16 08:13:47.507: 10.0.0.0 in 1 hops
*Oct 16 08:13:47.507: 11.0.0.0 in 1 hops
*Oct 16 08:13:47.507: 12.0.0.0 in 1 hops
*Oct 16 08:13:47.507: 13.0.0.0 in 1 hops
*Oct 16 08:13:47.507: 14.0.0.0 in 1 hops

R12#ping 10.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:


お手数ですが、ご教授頂ければ幸いです。
よろしくお願いいたします。

投稿ツリー

  >フォーラム検索へ


Copyright (c) 2020 Ping-t All rights reserved.
ログイン
ユーザ名 or E-Mailアドレス:

パスワード:







Contact

LPI-Japan Logo

LPI Logo