被动接口的配置 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

<router 0 f 0/0 口上做被动接口 >

 

Router 0 的配置:

Router>en
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 10.1.1.1 255.0.0.0
Router(config-if)#no shutdown

 

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#int f0/1
Router(config-if)#ip add 11.1.1.1 255.0.0.0
Router(config-if)#no shut

 

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
Router(config)#router rip
Router(config-router)#passive-interface f

Router(config-router)#passive-interface fastEthernet 0/0

Router(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console

 

Router#show ip rou
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />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, 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    10.0.0.0/8 is directly connected, FastEthernet0/0

C    11.0.0.0/8 is directly connected, FastEthernet0/1

Router#ping 10.1.1.3

 

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 6/8/9 ms

 

Router#

 

 

 

Router 1 的配置 :

Router>en

Router#conf

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#int f0/0

Router(config-if)#ip add 10.1.1.2 255.0.0.0

Router(config-if)#no shut

 

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit

Router(config)#router rip

Router(config-router)#ne

Router(config-router)#network 10.0.0.0

Router(config-router)#end

%SYS-5-CONFIG_I: Configured from console by console

Router#show ip rou

Router#show 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, 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    10.0.0.0/8 is directly connected, FastEthernet0/0

Router#ping 10.1.1.3

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/11 ms

 

Router#ping 11.1.1.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 11.1.1.2, timeout is 2 seconds:

.....

Success rate is 0 percent (0/5)

 

Router#

 

 

Router 2 的配置:

Router>en

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#int f0/0

Router(config-if)#ip add 10.1.1.3 255.0.0.0

Router(config-if)#no shut

 

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit

Router(config)#router  r

Router(config-router)#net 10.0.0.0

Router(config-router)#end

%SYS-5-CONFIG_I: Configured from console by console

Router#show ip rou

Router#show 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, 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    10.0.0.0/8 is directly connected, FastEthernet0/0

Router#ping 10.1.1.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 7/8/10 ms

 

Router#ping 11.1.1.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 11.1.1.2, timeout is 2 seconds:

.....

Success rate is 0 percent (0/5)

 

Router#