一、Passive-interface 概述
passive-interface的作用,就是让某些在routing protocol作用范围内的interface只接受更新消息,不发送更新消息。passive-interface可以根据路由协议分为以下三种:
  • 第一种是RIP和IGRP.这一种routing protcol的特点不需要与对方router建立邻居关系,所以,router是每隔一段时间就会发生只接受不发送更新消息的状况. ,所以如果要阻止update进入 router中,还要加上distribute-list 阻止进入的更新包
  • 第二种是像OSPF,EIGRP之类的routing protocol。这一种路由协议的特点是需要与对方router建立邻居关系,所以,一旦用了passive -interface之后,你就断开了router之间的邻居关系,因此,所有的更新消息即不接受也不发送。
  • 第三种是ISIS。ISIS的routing command是下在interface mode而不在routing mode。所以如果把一个网段加入,就用ip router isis命令。如果我不要这个interface接受与发送isis路由更新,但是又要这个interface所属的网段要加入ISIS的routing之中,使用passive- interface

 
二、passive-interface配置
使用passive-interface命令有两种方式。
  • 指定某个接口成为被动模式,
Router(config)# router rip 
Router(config-router)# passive-interface Ethernet 0/0
  • 要将所有接口设为被动,然后单独打开某个接口:
Router(config)# router rip 
Router(config-router)# passive-interface default 
Router(config-router)# no passive-interface Serial 0/0