公告

如果你不征服网络,你就会被网络吞噬
E-mail:gairuhe(AT)gmail.com
QQ:41799251

 
一封迟到的讣告——纪念我永远的兄弟,小龙
 
这篇文章其实早就应该在2008年完成,但是当我得知这个消息的时候,我无法下笔。2008年7月31日,那个曾经51CTO博客群最活跃的“老虚伪..

传阿里巴巴小宗外贸受挫 与对手eBay达成合作

2010年03月11日13:26腾讯科技乐天我要评论(7)
字号:T|T



[导读]据该人士透露,全面支持PayPal支付的阿里巴巴Express将在4月全新上线。

腾讯科技讯(..
2010-03-03 16:24:03
    好久没写东西了,已经离开技术了。是不是应该写点啥呢?要不然“推荐博客”放在这里自己看着都不好意思了呢?
    那就有空就在这里写点啥?写点啥呢?
 &nb..
51cto带给我的……【博友话题】 真的很久很久没有写博客了。第一是因为自己时间比较忙,临近毕业总是有很多很多事情令我心烦,还有就是自己懒,其实有很多题材可以写,但是就是不想动。也许在经历着毕业的暴雨腥..
[url]www.qiepo.cn[/url] qiepo是什么意思?切破? 呵呵~~~
十大慢慢被我遗忘的软件
优胜劣汰是自然界最基本的生存法则,对于软件也同样如此。有的软件红极一时,有的软件技术领先而成为一方霸主。但是由于各种不同的原因,有许多曾经耳熟能详的软件慢慢的消失在人们的视..
2007-10-28 15:18:27
     大四了,忙着找工作。博客也没有时间更新。找工作才发现不是2XX的学校真是很困难。虽然现在有几个offer在谈,但是还是有这种感觉。
 
    今天收到CCNA的证书了..
2007-10-03 21:01:12
旧闻联播:51cto游记


本文为纪念9月29日51cto一日游而发。本文亦真亦假有真有假请读者自辩真假。


观众朋友们大家好,今天是2007年9月29日,欢迎收看51cto博客电视台的旧闻联播节目。下面是本次节目的主要内..
9月30日,通过CCNA,过程及一些感受
首先对博友表示歉意,这篇文章本来应该昨天就发了,但是昨天我实在是太累了,坐在电脑前面感觉地板都是晃得,所以推迟到今天发布。
 
先说说考试的结果吧,满分通过,..
类别:CCNA|阅读(3863)|回复(34)|(0)阅读全文>>
控制路由更新数据流(被动接口和分布列表)
本实验使用拓扑:

 
在R1上建立一个环回口模拟R4
 
1.为什么要控制路由更新
   首先假设我们在上面的拓扑中配置rip协议。在默认情况下,r1将通告以下网络:10.1.1.0   10.1.2.0   10.1.3.0   10.1.4.0
A.由于子网10.1.3.0没有其他的路由器能接受路由更新。所以向e0/0口发送rip更新没有意义。不但产生了一些不必要的额外开销,并可能引起安全风险。
B.若r1和r4是通过dial-on-demand(按需拨号)的ISDN链路相连,那么定期的路由更新会让链路保持在线状态,从而产生高额的费用。
 
2.通过passive-interface控制路由更新
   被动接口可以完全阻止接口发送路由更新。此命令适用于所有的IGP协议。
   命令格式:(config-router)#passive-interface  type  number
   实例1:禁止e口上发送路由更新。

*Nov 18 08:14:47.639:   subnet 10.1.3.0 metric 1
*Nov 18 08:14:47.639:   subnet 10.1.4.0 metric 1
*Nov 18 08:14:47.891: RIP: sending v1 update to 255.255.255.255 via Serial2/0 (10.1.2.1)
*Nov 18 08:14:47.891: RIP: build update entries
*Nov 18 08:14:47.891:   subnet 10.1.1.0 metric 1
*Nov 18 08:14:47.891:   subnet 10.1.3.0 metric 1
*Nov 18 08:14:47.891:   subnet 10.1.4.0 metric 1
*Nov 18 08:14:57.079: RIP: sending v1 update to 255.255.255.255 via Loopback1 (10.1.4.2)
*Nov 18 08:14:57.079: RIP: build update entries
*Nov 18 08:14:57.079:   subnet 10.1.1.0 metric 1
*Nov 18 08:14:57.079:   subnet 10.1.2.0 metric 1
*Nov 18 08:14:57.079:   subnet 10.1.3.0 metric 1
现在输入这个命令:
R1(config)#router rip
R1(config-router)#passive-interface ethernet 0/0
R1(config-router)#end
观察debug信息
*Nov 18 08:15:15.507: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (10.1.1.1)
*Nov 18 08:15:15.507: RIP: build update entries
*Nov 18 08:15:15.507:   subnet 10.1.2.0 metric 1
*Nov 18 08:15:15.507:   subnet 10.1.3.0 metric 1
*Nov 18 08:15:15.507:   subnet 10.1.4.0 metric 1
*Nov 18 08:15:25.967: RIP: sending v1 update to 255.255.255.255 via Loopback1 (10.1.4.2)
*Nov 18 08:15:25.967: RIP: build update entries
*Nov 18 08:15:25.967:   subnet 10.1.1.0 metric 1
*Nov 18 08:15:25.967:   subnet 10.1.2.0 metric 1
*Nov 18 08:15:25.967:   subnet 10.1.3.0 metric 1
*Nov 18 08:15:41.587: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (10.1.1.1)
*Nov 18 08:15:41.587: RIP: build update entries
*Nov 18 08:15:41.587:   subnet 10.1.2.0 metric 1
*Nov 18 08:15:41.587:   subnet 10.1.3.0 metric 1
*Nov 18 08:15:41.587:   subnet 10.1.4.0 metric 1
*Nov 18 08:15:41.639: RIP: sending v1 update to 255.255.255.255 via Serial2/0 (10.1.2.1)
*Nov 18 08:15:41.639: RIP: build update entries
*Nov 18 08:15:41.639:   subnet 10.1.1.0 metric 1
*Nov 18 08:15:41.639:   subnet 10.1.3.0 metric 1
*Nov 18 08:15:41.639:   subnet 10.1.4.0 metric 1
*Nov 18 08:15:55.907: RIP: sending v1 update to 255.255.255.255 via Loopback1 (10.1.4.2)
*Nov 18 08:15:55.907: RIP: build update entries
*Nov 18 08:15:55.907:   subnet 10.1.1.0 metric 1
*Nov 18 08:15:55.907:   subnet 10.1.2.0 metric 1
*Nov 18 08:15:55.907:   subnet 10.1.3.0 metric 1
此时没有e口的更新。
此命令在不同协议下的工作方式:
   RIP:只接受路由更新但是不发送
   OSPF:即不发送也不接受
   EIGRP和OSPF:不发送hello分组,不能在接口上与其他路由器建立邻居关系。
实例2:在OSPF上运用此命令观察现象。
R1(config)#router ospf 10
R1(config-router)#net 10.1.1.0 0.0.0.255 area 0
R1(config-router)#net 10.1.2.0 0.0.0.255 area 0
R1(config-router)#net 10.1.3.0 0.0.0.255 area 0
R1(config-router)#net 10.1.4.0 0.0.0.255 area 0
R2(config)#router ospf 10
R2(config-router)#net 10.1.1.0 0.0.0.255 area 0
R3(config)#router ospf 10
R3(config-router)#net 10.1.2.0 0.0.0.255 area 0
R1#sho ip ospf nei
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.2          0   FULL/  -        00:00:38    10.1.1.2        Serial1/0
10.1.2.2          0   FULL/  -        00:00:35    10.1.2.2        Serial2/0
R1#debug ip ospf hell
OSPF hello events debugging is on
R1#
*Nov 18 08:32:18.611: OSPF: Rcv hello from 10.1.2.2 area 0 from Serial2/0 10.1.2.2
*Nov 18 08:32:18.611: OSPF: End of hello processing
*Nov 18 08:32:19.659: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 10.1.1.1
*Nov 18 08:32:20.459: OSPF: Send hello to 224.0.0.5 area 0 on Serial2/0 from 10.1.2.1
*Nov 18 08:32:31.019: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 10.1.3.1
在接口s1/0上运行此命令:
R1(config)#router ospf 10
R1(config-router)#passive-interface serial 1/0
R1#sho ip ospf nei
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.2.2          0   FULL/  -        00:00:33    10.1.2.2        Serial2/0
此时发现10.1.1.2这个邻居已经没有了。
3.用分布控制列表过滤路由更新
   分布控制列表只抑制某些特定的路由不被发送或接受。
 命令格式:
A.应用于进入路由更新
 (config-router)#distribute-list  access-list number   in  {interfacename}
B.应用于出口路由更新
(config-router)#distribute-list access-listnumber out (interface name |routing pro|as-number)
实例3:禁止R2接受有关于网络10.1.2.0的路由更新
R2#sho ip rou
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
 
     10.0.0.0/24 is subnetted, 4 subnets
R       10.1.3.0 [120/1] via 10.1.1.1, 00:00:07, Serial2/0
R       10.1.2.0 [120/1] via 10.1.1.1, 00:00:07, Serial2/0
C       10.1.1.0 is directly connected, Serial2/0
R       10.1.4.0 [120/1] via 10.1.1.1, 00:00:07, Serial2/0
R2(config)#access-list 1 deny 10.1.2.0
R2(config)#access-list 1 permit any
R2(config)#router rip
R2(config-router)#distribute-list 1 in
180s后查看路由表:
R2#sh ip rou
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
 
     10.0.0.0/24 is subnetted, 4 subnets
R       10.1.3.0 [120/1] via 10.1.1.1, 00:00:16, Serial2/0
R       10.1.2.0/24 is possibly down,
          routing via 10.1.1.1, Serial2/0
C       10.1.1.0 is directly connected, Serial2/0
R       10.1.4.0 [120/1] via 10.1.1.1, 00:00:16, Serial2/0
 
实例4:利用distribute-list“伪”被动EIGRP OSPF的接口。观察效果。
R1(config)#router eigrp 10
R1(config-router)#net 10.1.1.0 0.0.0.255
R1(config-router)#net 10.1.2.0 0.0.0.255
R1(config-router)#net 10.1.3.0 0.0.0.255
R1(config-router)#net 10.1.4.0 0.0.0.255
R2(config)#router eigrp 10
R2(config-router)#net 10.1.1.0 0.0.0.255
R3(config)#router eigrp 10
R3(config-router)#net 10.1.2.0 0.0.0.255
R2#sho ip rou
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
 
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D       10.1.3.0/24 [90/2195456] via 10.1.1.1, 00:00:27, Serial2/0
D       10.1.2.0/24 [90/2681856] via 10.1.1.1, 00:00:27, Serial2/0
C       10.1.1.0/24 is directly connected, Serial2/0
D       10.1.4.0/24 [90/2297856] via 10.1.1.1, 00:00:27, Serial2/0
R2#sho ip eigrp nei
IP-EIGRP neighbors for process 10
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
0   10.1.1.1                Se2/0             11 00:03:42  283  1698  0  1
 
R2(config)#access-list 3 deny any
R2(config)#router eigrp 10
R2(config-router)#distribute-list 3 out serial 1/0
在240s后查看路由表
R2#sho ip rou
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
 
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D       10.1.3.0/24 [90/2195456] via 10.1.1.1, 00:11:54, Serial2/0
D       10.1.2.0/24 [90/2681856] via 10.1.1.1, 00:11:54, Serial2/0
C       10.1.1.0/24 is directly connected, Serial2/0
O       10.1.4.2/32 [110/65] via 10.1.1.1, 00:19:37, Serial2/0
D       10.1.4.0/24 [90/2297856] via 10.1.1.1, 00:11:54, Serial2/0
 
此时发现路由器已经有很长时间没有收到路由更新。
R2#sho ip eigrp nei
IP-EIGRP neighbors for process 10
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
0   10.1.1.1                Se2/0             13 00:13:45   60   360  0  3
发现邻居信息依然存在。说明利用分布列表仍然可以保持邻居信息。
 
总结:RIP和IGRP不用和邻接路由器建立邻接关系,当配置了'passive interface'后,该路由器仅从相应的接口收听相应的路由协议包,而不发送路由协议包。 'passive interface'对OSPF,EIGRP则意义不大,因为这两种路由协议都要建立邻接关系。路由包不容许发送,邻接关系就建立不起来。因此在OSPF,EIGRP中,这条命令很少用到。
而分布列表对于任何网络协议都是一个比较好的解决显示问题的方法。它可以“伪被动”端口但是同时保持邻居信息。
 [/img]..
类别:路由|阅读(1917)|回复(6)|(0)阅读全文>>
 <<   1   2   3   4   >>   页数 ( 1/4 )

博客统计信息

51cto推荐博客
用户名:gairuhe
文章数:40
评论数:443
访问量:180702
无忧币:12732
博客积分:2687
博客等级:7
注册日期:2006-11-28

我最近发表的评论

【限量珍藏】51CT.. 回复
求模特的联系方式。。。
Dear小弟小妹,给.. 回复
新年快乐啊废总
写给我的24岁,写.. 回复
V5V5,没想到废总和我同年啊,还比我..
51CTO的企业文化.. 回复
滚滚长江东逝水,奔流到海不复回
考上MBA,为自己.. 回复
博主回复: 发现潜水达人纷纷冒头..