被動接口passive-interface應用

使用passive-interface可以根據routing protocol分三種情況.

 

第一種是RIP和IGRP.這一種routing protcol的特點是不會與對方router建立關係。所以,router是每隔一段時間就會發生只聽不送的狀況. 換句話說,只要routing protocol的process還在運行,routing update還是可以接收信息,只不過因爲passive-interface指令的關係,update會送不出去,所以如果要阻止update送進 router中,還要加上distribute-list平當incoming update.這是第一路情況.


 

第二種是像OSPF,EIGRP之類的routing protocol.這一種路由協議的特點是會與對方router建立關係,也就是說router之間會建neighbor,所以,一旦用了passive -interface之後,你就斷開了router之間的關係。因爲no relationship, no update.因此,所有的update送不出去,介是也收不進來.這是第二種情況.

 

第三種是ISIS.這是最奇怪的一種.有玩過的就知道,ISIS的routing command是下在interface mode而不在routing mode.所以如果把一個網段加入,就用ip router isis命令.好了,問題是,如果我不要這個interface收送isis routing update,但是又要這個interface所屬的網段要加入ISIS的routing之中,那要怎麼做??答案就是用passive- interface.當然你也可以用redistribute connected的方式來做.但就是不如passive-interface的方式 來的簡潔,或者,你也可以笨笨的在interface下ip router isis,然後用distribute-list來阻止.不過,玩routing protocol玩到這個程度,你還是不要去考CCIE比較好.那個考試費用省下來可以多吃見頓好的了.
 

===========================================================

RIP和IGRP不用和鄰接路由器建立鄰接關係,當配置了'passive interface'後,該路由器僅從相應的接口收聽相應的路由協議包,而不發送路由協議包。
'passive interface'對OSPF,EIGRP則意義不大,因爲這兩種路由協議都要建立鄰接關係。路由包不容許發送,鄰接關係就建立不起來。因此在OSPF,EIGRP中,這條命令很少用到。
 

===========================================================

  使用passive-interface命令有兩種方式。
指定某個接口成爲被動模式,這意味着它將不會發出路由更新。
首先將所有接口設爲被動模式。然後在那些你打算髮送路由更新的接口上,使用no passive-interface命令。
讓我們來對兩種方式各看一個示例。注:兩個事例都假定你已經預先添加了對路由協議是被動接口的網絡(使用網絡命令)。
讓一個接口變成被動模式,只需要對接口進行指定。這裏是一個示例:
Router(config)# router rip Router(config-router)# passive-interface Ethernet 0/0
要將所有接口設爲被動,然後單獨打開某個接口,僅需使用passive-interface default和no passive-interface命令(在IOS 12.0中介紹)。下面是個示例:
Router(config)# router rip Router(config-router)# passive-interface default Router(config-router)# no passive-interface Serial 0/0
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章