闫辉CNP笔记一(1-4)_第1页
闫辉CNP笔记一(1-4)_第2页
闫辉CNP笔记一(1-4)_第3页
闫辉CNP笔记一(1-4)_第4页
闫辉CNP笔记一(1-4)_第5页
已阅读5页,还剩14页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1.回顾:园区网三层架构接入层access:连接pc的交换机汇聚层distribution:做策略的稍微高端的交换机核心层core:园区网最高端的交换机 交换区块技术:接入:划分vlan划分广播域,生成树 vtp 端口安全汇聚:部署vlan vtp 中继 生成树 起SVI(实现vlan间通信)静态路由 rip eigrp ospf(实现汇聚层跟核心层传递路由协议) 部署ACL做访问控制NP要求:1.知道路由协议的特性 什么的场景该使用什么样的特性 2.精确的路由操控 路由选择协议:静态 动态路由选择协议数据层面:生产流量在被转发的层面控制层面:路由的传递方向路由条目(元素:目的网段前缀、掩码、

2、下一跳、出站接口、度量值、管理距离)加表原则:先比较管理距离(管理距离最小加入路由表) 管理距离一样再比较路由条目度量值(度量值小的加表) metric值一样多条加表管理距离取值范围0-255 值越小代表获悉路由越可靠度量值(metric值)描述一条路由的开销 度量值越小开销越小静态路由:路由控制 在距离矢量型路由中使用静态路由实现路由传递的过滤Rip协议配置R1(config)#router ripR1(config-router)#version 2R1(config-router)#no auto-summaryR1(config-router)#network 1.0.0.0R1(co

3、nfig-router)#network 12.0.0.0R2(config)#ip route 1.1.1.0 255.255.255.0 e0/0 12.1.1.1ospf协议配置:R1(config)#router ospf 110R1(config-router)#router-id 1.1.1.1R1(config-router)#network 1.1.1.1 0.0.0.0 area 0R1(config-router)#network 12.1.1.1 0.0.0.0 area 0R2(config)#router ospf 110R2(config-router)#route

4、r-id 2.2.2.2R2(config-router)#network 2.2.2.2 0.0.0.0 area 0R2(config-router)#network 12.1.1.2 0.0.0.0 area 0R2(config-router)#network 23.1.1.1 0.0.0.0 area 0R1(config)#inter loopback 0R1(config-if)#ip ospf network point-to-point静态路由不会永久存在 发包接口(出站接口)down掉条目就丢失使用permanent参数 接口down路由条目不会丢失当使用clear ip

5、route *也会消失R2(config)#no ip route 1.1.1.0 255.255.255.0 e0/0 12.1.1.1R2#show run | section routeR2(config)#ip route 1.1.1.0 255.255.255.0 e0/0 12.1.1.1 permanent permanent永久生效R2(config)#do show ip route 1.1.1.0 255.255.255.0静态路由第三个用途:使用静态路由的管理距离实现备份链路的冗余备份修改管理距离 当IGP路由存在的时候不会出现在路由表中主链路能用的时候使用主链路 dow

6、n的时候使用ISDN低速链路R2(config)#no ip route 1.1.1.0 255.255.255.0 e0/0 12.1.1.1 permanentR2(config)#ip route 1.1.1.0 255.255.255.0 e0/0 12.1.1.1 121 红色121为管理距离R2#show ip route 1.1.1.0 255.255.255.0Routing entry for 1.1.1.0/24 Known via "ospf 110", distance 110, metric 11, type intra area Last upd

7、ate from 12.1.1.1 on Ethernet0/0, 00:01:03 ago Routing Descriptor Blocks: * 12.1.1.1, from 1.1.1.1, 00:01:03 ago, via Ethernet0/0 Route metric is 11, traffic share count is 1命令小总结:show run | section route show ip route 1.1.1.0 255.255.255.0clear ip route *ARP表存活时间为4个小时修改ARP表项的更新时间R1(config)#inter e0

8、/0R1(config-if)#arp timeout 10配置:R1:interface Ethernet0/0 ip address 100.1.1.1 255.255.255.0 arp timeout 10ip route 10.0.1.0 255.255.255.0 Ethernet0/0 200.2.2.4ip route 10.1.1.0 255.255.255.0 Ethernet0/0 200.2.2.4ip route 10.2.1.0 255.255.255.0 Ethernet0/0 200.2.2.4ip route 10.3.1.0 255.255.255.0 Et

9、hernet0/0 200.2.2.4ip route 200.2.2.0 255.255.255.0 Ethernet0/0 100.1.1.2R2:interface Ethernet0/0 ip address 100.1.1.2 255.255.255.0interface Ethernet0/1 ip address 200.2.2.2 255.255.255.0ip route 10.0.1.0 255.255.255.0 Ethernet0/3 200.2.2.4ip route 10.0.1.0 255.255.255.0 Ethernet0/1 200.2.2.4ip rou

10、te 10.1.1.0 255.255.255.0 Ethernet0/1 200.2.2.4ip route 10.2.1.0 255.255.255.0 Ethernet0/1 200.2.2.4ip route 10.3.1.0 255.255.255.0 Ethernet0/1 200.2.2.4R3:interface Ethernet0/0 ip address 100.1.1.3 255.255.255.0 interface Ethernet0/1 ip address 200.2.2.3 255.255.255.0ip route 10.0.1.0 255.255.255.0

11、 Ethernet0/1 200.2.2.4ip route 10.1.1.0 255.255.255.0 Ethernet0/1 200.2.2.4ip route 10.2.1.0 255.255.255.0 Ethernet0/1 200.2.2.4ip route 10.3.1.0 255.255.255.0 Ethernet0/1 200.2.2.4R4:interface Loopback0 ip address 10.0.1.4 255.255.255.0 interface Loopback1 ip address 10.1.1.4 255.255.255.0interface

12、 Loopback2 ip address 10.2.1.4 255.255.255.0interface Loopback3 ip address 10.3.1.4 255.255.255.0interface Ethernet0/3 ip address 200.2.2.4 255.255.255.0 arp timeout 10ip route 100.1.1.0 255.255.255.0 Ethernet0/3 200.2.2.2ip route 100.1.1.0 255.255.255.0 Ethernet0/3 200.2.2.3关闭接口的arp代理功能 非对称路由的实现 静态

13、路由的精确选路R1(config-if)#inter lo 0R1(config-if)#ip add 1.1.1.1 255.255.255.0R4(config)#no ip route 100.1.1.0 255.255.255.0 Ethernet0/3 200.2.2.2R4(config)#no ip route 100.1.1.0 255.255.255.0 Ethernet0/3 200.2.2.3R4去往1.1.1.0网段 先写主路由R4(config)#ip route 1.1.1.0 255.255.255.0 e0/3 100.1.1.1再写一条递归路由R4(confi

14、g)#ip route 100.1.1.0 255.255.255.0 e0/3 然后R1 R4清除arp表项 R1(config-if)#inter e0/0R1(config-if)#shutdownR1#clear arp-cache打开R2上关闭的接口R2(config)#inter ran e0/0 -1R2(config-if-range)#no shu再开启R1 R4关闭的接口R2(config)#inter e0/0R2(config-if)#no ip proxy-arpR3(config)#inter e0/1R3(config-if)#no ip proxy-arpR2

15、R3要加一条去往1.1.1.0/24的路由R1#ping 10.0.1.4 source 1.1.1.1 repeat 10查看arp表R1#show arpProtocol Address Age (min) Hardware Addr Type InterfaceInternet 100.1.1.1 - aabb.cc00.0100 ARPA Ethernet0/0Internet 100.1.1.2 0 aabb.cc00.0300 ARPA Ethernet0/0Internet 200.2.2.4 0 aabb.cc00.0400(R3 e0/0) ARPA Ethernet0/0R

16、4#show arpProtocol Address Age (min) Hardware Addr Type InterfaceInternet 100.1.1.1 30 aabb.cc00.0310(R2 e0/1) ARPA Ethernet0/3Internet 200.2.2.4 - aabb.cc00.0630 ARPA Ethernet0/32.rip协议rip更新报文只能容纳25条路由条目 建议运行在小型网络 广播域不多更新的机制:触发更新 周期性更新(30秒)rip有几类报文:请求 更新rip的度量值就是跳数IGP 内部网关协议 为园区网服务EGP 连接两个园区网之间的路由协

17、议IGP:ClassFull(有类别) vs ClassLess(无类别)RIPv1 RIPv2 EIGRP OSPF IS-ISDistanceVector(距离矢量) vs LinkState(链路状态) 按核心算法区分RIPv1 RIPv2 OSPF IS-ISEIGRP(ADV)EGP:(BGPv4)路由失效计时器180秒 rip收到一条路由条目放到路由表中多长时间没有更新置为possibly down抑制计时器180秒(防环)不连续的子网flush-timer刷新计时器240秒 路由条目多久会被删除做完一个IGP协议后可以使用R1#show ip protocols 查看协议修改ri

18、p协议的计时器的周期R1(config)#router ripR1(config-router)#timers basic 25 150 150 200查看一下show ip protocolsrip的13个高级特性:手动汇总(基于接口的汇总 基于进程的汇总)ripv2只支持链路级别的汇总(链路级别)手工汇总是在控制层面的发送路由条目的出接口上部署在R2上创建四个环回网段172.16.8.0/24172.16.9.0/24172.16.10.0/24172.16.11.0/24R2(config)#router ripR2(config-router)#network 172.16.0.0 宣

19、告主类网络号R2(config)#inter f0/1R2(config-if)#ip summary-address rip 172.16.8.0 255.255.252.0汇总路由消失的条件:属于该汇总路由下的所有明细路由都down掉手工汇总:路由条目是连续的 总的个数为2 的倍数 度量值172.16.8.0/24 8172.16.9.0/24 4172.16.10.0/24 2172.16.11.0/24 6取度量值最小的自动汇总比手工汇总优先级高 建议关闭自动汇总自动汇总的路由是主类网络号路由重分发:来自一个协议所获悉的路由通过另外一种路由获悉方式通告给其他路由器,这里介绍4种情况1.

20、边界路由器只有一条链路连接运营商R2(config)#ip route 0.0.0.0 0.0.0.0 e0/0 24.1.1.3R2(config)#router ripR2(config-router)#redistribute static2.只关注出站接口,不指下一跳R2(config)#no ip route 0.0.0.0 0.0.0.0 f0/0 24.1.1.3R2(config)#router ripR2(config-router)#no redistribute staticR2(config)#ip route 0.0.0.0 0.0.0.0 fastEthernet

21、0/0R2(config)#router rip R2(config-router)#network 0.0.0.0network 0.0.0.0(把本机上所有拥有IP地址的接口宣告进rip进程当本机上拥有一条只关注出站接口的全零的静态路由时依然会宣告进rip域)3.在边缘路由器上使用全局配置模式指定外网接口所属的主类网络号R2(config)#no ip route 0.0.0.0 0.0.0.0 fastEthernet 0/0R2(config)#ip default-network 24.0.0.04.R2(config)#router ripR2(config-router)#def

22、ault-information originate当使用模拟器没有出现实验结果时把rip no掉重做默认rip v2发送组播更新手动指定rip发送单播更新R3(config)#router ripR3(config-router)#neighbor 13.1.1.1首先定义ACL抓路由R3(config)#access-list 10 permit 3.3.3.0 0.0.0.0R3(config)#router ripR3(config-router)#offset-list 10 out 2 fastEthernet 0/010 是访问控制列表 2 度量值R1(config-router

23、)#offset-list 0 in 20表示所有路由条目 不指定接口表示所有接口3.EIGRP协议分类:1.范围 IGP协议rip最大支持15跳 eigrp最大支持100跳(允许100三层设备互联)2.按核心算法 高级距离矢量型协议 ADV如何判断是距离矢量还是链路状态协议依据:传递路由条目就是距离矢量;传递链路状态通告就是链路状态协议3.无类协议 发送路由更新携带掩码信息 支持VLSM(可变长子网掩码) CIDR(无类别域间路由)rip使用的组播地址224.0.0.9 eigrp使用的组播地址224.0.0.10eigrp的三张表邻居表:EIGRP度量值:带宽 延迟 可靠度 负载 eigr

24、p进程号 90区分本地多个eigrp进程 建立邻接关系既支持宣告主类网络号又支持精确宣告但是在asa防火墙上做eigrp精确宣告使用正码255.255.255.255反码的0表示绝对匹配1代表任意R1(config)#router eigrp 90R1(config-router)#no auto-summaryR1(config-router)#eigrp router-id 1.1.1.1R1(config-router)#network 1.0.0.0 R1(config-router)#network 12.1.1.1 0.0.0.0查看协议show ip protocolseigrp

25、协议的show命令R1# show ip eigrp interfacesR1#show ip eigrp neighbors 查看邻居表R2#show ip eigrp neighbors detailRID router id 手工创建RIDR3(config)#router eigrp 90R3(config-router)#eigrp router-id 3.3.3.3计算度量值R1#show inter s1/1Serial1/1 is up, line protocol is up Hardware is M4T Internet address is 12.1.1.1/24 MT

26、U 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec,R2#show inter f0/1FastEthernet0/1 is up, line protocol is up Hardware is i82543 (Livengood), address is ca02.0b6c.0006 (bia ca02.0b6c.0006) Internet address is 23.1.1.2/24 MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,1544Kbit/s 2000+100=2100(107/154

27、4)+2100)*256=度量值EIGRP计算路由的metric使用的带宽如何提取提取控制层面路由条目流向所有入接口的带宽取最小值延迟如何提取提取控制层面路由条目流向的入接口的延迟的总和4.EIGRP协议下放一条缺省路由4种方法 类似于rip协议1.单链路连接运营商 路由重分发R1(config)#ip route 0.0.0.0 0.0.0.0 f0/0 14.1.1.4R1(config)#router eigrp 90R1(config-router)#redistribute static2.R1(config)#ip route 0.0.0.0 0.0.0.0 f0/0R1(conf

28、ig)#router eigrp 90R1(config-router)#network 0.0.0.03.R1(config)#ip default-network 14.0.0.0R1(config)#ip route 14.0.0.0 255.0.0.0 f0/0R1(config)#router eigrp 90R1(config-router)#network 14.0.0.04.路由聚合在接口f0/1上配置R1(config)#interface f0/1R1(config-if)#ip summary-address eigrp 90 0.0.0.0 0.0.0.0show ip

29、 route中如果有Gateway of last resort is 12.1.1.1 to network 0.0.0.0 配置了网关EIGRP高级特性:1 汇总:手工汇总精确宣告 使用反码在R1上创建四个环回口192.168.8.0/24192.168.9.0/24192.168.10.0/24192.168.11.0/24R1(config)#router eigrp 90R1(config-router)#network 192.168.8.0 0.0.3.255R1(config)#inter f0/1R1(config-if)#ip summary-address eigrp 9

30、0 192.168.8.0 255.255.252.0如何受到DEX路由条目no掉宣告的路由R1(config-router)#redistribute connected修改手工汇总的管理距离 leak-map放行一些汇总路由内的一些明细路由R1(config-if)#ip summary-address eigrp 100 192.168.8.0 255.255.252.0 ? <1-255> Administrative distance leak-map Allow dynamic prefixes based on the leak-mapR1(config-if)#ip

31、 summary-address eigrp 100 192.168.8.0 255.255.252.0 leak-map TESTleak-map TEST调用route-map 调用ACLR1(config)#route-map TEST permit 10 创建route-mapR1config)#access-list 10 permit 192.168.8.0 0.0.1.0ACL抓取路由条目 192.168.8.0 192.168.9.0创建完ACL再在route-map中匹配R1(config)#route-map TEST permit 10R1(config-route-map)#match ip address 10实验结果:既有汇总路由又有明细路由D 192.168.8.0/22 90/158720 via 23.1.1.2, 00:11:26, FastEthernet0/0D EX 192.168.8.0/24 170/158720 via 23.1.1.2, 00:03:29, FastEth

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论