NA-NP-IE系列实验12:被动接口与单播更新

简介:
实验12:被动接口与单播更新
1. 实验目的
通过本实验可以掌握:
1)被动接口的含义、配置和应用场合
2)单播更新的应用场合和配置
2. 拓扑结构
实验拓扑如图4-2 所示。
 4-2 配置被动接口
由于以太口f0/0 和f0/1 连接主机,不需要向这些接口发送路由更新,所以可以考虑将 路由器的该接口设置为被动接口。
3. 实验步骤
1)步骤1:配置路由器R0
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho r0
r0(config)#no ip domain-loo
r0(config)#lin c 0
r0(config-line)#logg s
r0(config-line)#exec-t 00
r0(config-line)#exit
r0(config)#int f0/0
r0(config-if)#ip add 172.16.1.2 255.255.255.0
r0(config-if)#no sh
 
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
r0(config-if)#
r0(config-if)#exit
r0(config)#int f0/1
r0(config-if)#ip add 172.16.2.2 255.255.255.0
r0(config-if)#no sh
 
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
r0(config-if)#
r0(config-if)#exit
r0(config)#int s1/1/0
r0(config-if)#ip add 172.16.3.1 255.255.255.0
r0(config-if)#clo r 64000
r0(config-if)#no sh
 
%LINK-5-CHANGED: Interface Serial1/1/0, changed state to down
r0(config-if)#
%LINK-5-CHANGED: Interface Serial1/1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1/0, changed state to up
r0(config-if)#exit
r0(config)#router rip
r0(config-router)#v 1
r0(config-router)#net 172.16.0.0
r0(config-router)#do 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, 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
 
R    1.0.0.0/8 [120/1] via 172.16.3.2, 00:00:07, Serial1/1/0
     172.16.0.0/24 is subnetted, 3 subnets
C       172.16.1.0 is directly connected, FastEthernet0/0
C       172.16.2.0 is directly connected, FastEthernet0/1
C       172.16.3.0 is directly connected, Serial1/1/0
r0(config-router)#do sh ip protocols
Routing Protocol is "rip"
// 路由器上运行的路由协议是RIP
Sending updates every 30 seconds, next due in 16 seconds
// 更新周期是30 秒,距离下次更新还有23 
Invalid after 180 seconds, hold down 180, flushed after 240
//invalid after :路由条目如果在180 秒还没有收到更新,则被标记为无效
hold down:抑制计时器的时间为180 
flushed after:路由条目如果在240 秒还没有收到更新,则从路由表中删除此路由条目
flash update(闪式更新)指的是当网络上某个路径的度量值发生变化,路由器立即发出更新信息,而不管是否到达常规路由信息更新的周期。
 
可以通过下面的命令来调整以上三个时间参数:
timers basic update invalid holddown flushed
 
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 1
  Interface             Send  Recv  Triggered RIP  Key-chain
  FastEthernet0/0       1     1    
  FastEthernet0/1       1     1    
  Serial1/1/0           1     1    
Automatic network summarization is in effect
Maximum path: 4
//RIP  路由协议可以支持条等价路径,最大为
可以通过下面的命令来修改RIP 路由协议支持等价路径的条数:
maximum-paths  number-paths
 
Routing for Networks:
       172.16.0.0
// 以上三行表明RIP 通告的网络
Passive Interface(s):
Routing Information Sources:
       Gateway         Distance      Last Update
       172.16.3.2           120      00:00:06
//gateway :学习路由信息的路由器的接口地址,也就是下一跳地址
distance :管理距离
last update :更新发生在多长时间以前
 
Distance: (default is 120)
// 默认管理距离是120
r0(config-router)#passive-interface f0/0
r0(config-router)#passive-interface f0/1
r0(config-router)#do debug ip rip
RIP protocol debugging is on
//该命令可以查看RIP 路由协议的动态更新过程。
r0(config-router)#do clear ip route *
r0(config-router)#RIP: sending  v1 update to 255.255.255.255 via Serial1/1/0 (172.16.3.1)
RIP: build update entries
      network 172.16.1.0 metric 1
      network 172.16.2.0 metric 1
 
r0(config-router)#RIP: received v1 update from 172.16.3.2 on Serial1/1/0
      1.0.0.0 in 1 hops
 
r0(config-router)#RIP: sending  v1 update to 255.255.255.255 via Serial1/1/0 (172.16.3.1)
RIP: build update entries
      network 172.16.1.0 metric 1
      network 172.16.2.0 metric 1
 
r0(config-router)#RIP: received v1 update from 172.16.3.2 on Serial1/1/0
      1.0.0.0 in 1 hops
 
r0(config-router)#do un all
All possible debugging has been turned off
r0(config-router)#
从以上输出可以看出,路由器R1 确实不向被动接口f0/0 和f0/1 发送路由更新。
 
 
2)步骤2:配置路由器R1
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho r2
r2(config)#no ip domain-loo
r2(config)#lin  c 0
r2(config-line)#logg s
r2(config-line)#exec-t 00
r2(config-line)#exit
r2(config)#int loo 1
 
%LINK-5-CHANGED: Interface Loopback1, changed state to up
r2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r2(config-if)#ip add 1.1.1.1 255.255.255.0
r2(config-if)#exit
r2(config)#int s1/1/0
r2(config-if)#ip add 172.16.3.2 255.255.255.0
r2(config-if)#no sh
 
%LINK-5-CHANGED: Interface Serial1/1/0, changed state to up
r2(config-if)#
r2(config-if)#do ping 172.16.3.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.1, timeout is 2 seconds:
 
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1/0, changed state to up
r2(config-if)#.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 3/3/4 ms
 
r2(config-if)#exit
r2(config)#router rip
r2(config-router)#v 1
r2(config-router)#net 1.1.10
                      ^
% Invalid input detected at '^' marker.
      
r2(config-router)#net 1.1.1.0
r2(config-router)#net 172.16.3.0
r2(config-router)#do 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, 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
 
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback1
     172.16.0.0/24 is subnetted, 3 subnets
R       172.16.1.0 [120/1] via 172.16.3.1, 00:00:07, Serial1/1/0
R       172.16.2.0 [120/1] via 172.16.3.1, 00:00:07, Serial1/1/0
C       172.16.3.0 is directly connected, Serial1/1/0
r2(config-router)#

本文转自gauyanm 51CTO博客,原文链接:http://blog.51cto.com/gauyanm/235089,如需转载请自行联系原作者
 
相关文章
|
数据安全/隐私保护 网络架构