当前位置: 首页 > news >正文

EIGRP综合实验解析

实验要求
1.R1为ISP,只能配置IP地址
2.R1与R2之间为PPP封装,使用CHAP认证,R1为主认证方
3.R2-R8地址为172.16.0.0/16
4.R4的S1/1口带宽为800K。R4到R2环回为非等开销负载均衡
5.保证更新安全,减少路由条目数量
6.R6到达R8环回通过R7进行
7.R2-R8均可访问R1环回
8.R1telnet R2实际登录到R8
在这里插入图片描述
实验拓扑
在这里插入图片描述
本实验使用GNS3进行实验仿真
实验步骤
地址规划
在这里插入图片描述
第一步:ppp认证(R1与R2之间)
R1

R1(config)#interface s1/1
R1(config-if)#encapsulation ppp---选择接口封装模式
R1(config-if)#ppp authentication chap---chap认证 
R1(config-if)#exit
R1(config)#username ccnp password cisco123

R2

R2(config)#username r1 password cisco123
R2(config)#interface s1/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp chap password cisco123
R2(config-if)#ppp chap hostname ccnp

第二步 :ip 配置
R1

R1(config)#interface s1/1
R1(config-if)#ip address 12.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#interface loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.0

R2

R2(config)#interface s1/0
R2(config-if)#ip address 12.1.1.2 255.255.255.0
R2(config-if)#no shutdow
R2(config)#interface f0/0
R2(config-if)#ip address 172.16.0.1 255.255.255.248
R2(config-if)#no shutdown 
R2(config)#interface loopback 0
R2(config-if)#ip address 172.16.1.1 255.255.255.224

R3

R3(config)#interface f0/0
R3(config-if)#ip address 172.16.0.2 255.255.255.248
R3(config-if)#no shutdown 
R3(config)#interface s1/1
R3(config-if)#ip address 172.16.2.1 255.255.255.252
R3(config-if)#no shutdown 
R3(config)#interface loopback 0
R3(config-if)#ip address 172.16.1.33 255.255.255.240
R3(config)#interface loopback 1
R3(config-if)#ip address 172.16.1.49 255.255.255.240

R4

R4(config)#interface s1/0
R4(config-if)#ip address 172.16.2.2 255.255.255.252
R4(config-if)#no shutdown 
R4(config)#interface s1/1
R4(config-if)#ip address 172.16.2.5 255.255.255.252
R4(config-if)#no shutdown
R4(config)#interface loopback 0
R4(config-if)#ip address 172.16.1.65 255.255.255.240
R4(config)#interface loopback 1
R4(config-if)#ip address 172.16.1.81 255.255.255.240

R5

R5(config)#interface f0/0
R5(config-if)#ip address 172.16.0.3 255.255.255.248
R5(config-if)#no shutdown 
R5(config)#interface s1/0
R5(config-if)#ip address 172.16.2.6 255.255.255.252
R5(config-if)#no shutdown 
R5(config)#interface s1/1
R5(config-if)#ip address 172.16.2.9 255.255.255.252
R5(config-if)#no shutdown 
R5(config)#interface loopback 0
R5(config-if)#ip address 172.16.1.97 255.255.255.240
R5(config)#interface loopback 1
R5(config-if)#ip address 172.16.1.113 255.255.255.240

R6

R6(config)#interface s1/0
R6(config-if)#ip address 172.16.2.10 255.255.255.252
R6(config-if)#no shutdown 
R6(config)#interface s1/1
R6(config-if)#ip address 172.16.2.13 255.255.255.252
R6(config-if)#no shutdown
R6(config)#interface s1/2
R6(config-if)#ip address 172.16.2.22 255.255.255.252
R6(config-if)#no shutdown
R6(config)#interface loopback 0
R6(config-if)#ip address 172.16.1.129 255.255.255.240
R6(config)#interface loopback 1
R6(config-if)#ip address 172.16.1.145 255.255.255.240R7
R7(config)#interface s1/0
R7(config-if)#ip address 172.16.2.14 255.255.255.252
R7(config-if)#no shutdown 
R7(config)#interface s1/1
R7(config-if)#ip address 172.16.2.17 255.255.255.252
R7(config-if)#no shutdown 
R7(config)#interface loopback 0
R7(config-if)#ip address 172.16.1.161 255.255.255.240
R7(config)#interface loopback 1
R7(config-if)#ip address 172.16.1.177 255.255.255.240

R8

R8(config)#interface s1/0
R8(config-if)#ip address 172.16.2.18 255.255.255.252
R8(config-if)#no shutdown 
R8(config)#interface s1
R8(config-if)#ip address 172.16.2.21 255.255.255.252
R8(config-if)#no shutdown
R8(config)#interface loopback 0
R8(config-if)#ip address 172.16.1.193 255.255.255.240
R8(config)#interface loopback 1
R8(config-if)#ip address 172.16.1.209 255.255.255.240

第三步:启动EIGRP路由协议
eigrp可以直接宣告主类,也可以使用反掩码进行精确的匹配
这里直接进行主类宣告

R2(config)#router eigrp 90
R2(config-router)#no auto-summary 
R2(config-router)#network 172.16.0.0

其他路由器若要进行宣告主类和R2命令完全一致,但也可逐条宣告
第四步:减少路由条目,路由汇总
在传出路由的所有接口均需配置

R3(config)#interface f0/0
R3(config-if)#ip summary-address eigrp 90 172.16.1.32 255.255.255.224
R3(config)#interface s1/1
R3(config-if)#ip summary-address eigrp 90 172.16.1.32 255.255.255.224

R4

R4(config)#interface s1/0
R4(config-if)#ip summary-address eigrp 90 172.16.1.64 255.255.255.224
R4(config)#interface s1/1
R4(config-if)#ip summary-address eigrp 90 172.16.1.64 255.255.255.224

R5

R5(config)#interface s1/0
R5(config-if)#ip summary-address eigrp 90 172.16.1.96 255.255.255.224
R5(config)#interface s1/1
R5(config-if)#ip summary-address eigrp 90 172.16.1.96 255.255.255.224
R5(config)#interface fastEthernet 0/0
R5(config-if)#ip summary-address eigrp 90 172.16.1.96 255.255.255.224

R6

R6(config)#interface s1/0
R6(config-if)#ip summary-address eigrp 90 172.16.1.128 255.255.255.224
R6(config)#interface s1/1
R6(config-if)#ip summary-address eigrp 90 172.16.1.128 255.255.255.224
R6(config)#interface s1/2
R6(config-if)#ip summary-address eigrp 90 172.16.1.128 255.255.255.224

R7

R7(config)#interface s1/0
R7(config-if)#ip summary-address eigrp 90 172.16.1.160 255.255.255.224
R7(config)#interface s1/1
R7(config-if)#ip summary-address eigrp 90 172.16.1.160 255.255.255.224

R8

R8(config)#interface s1/0
R8(config-if)#ip summary-address eigrp 90 172.16.1.192 255.255.255.224
R8(config)#interface s1/2
R8(config-if)#ip summary-address eigrp 90 172.16.1.192 255.255.255.224

此时所有环回都是/27位汇总路由—查看R2的eigrp路由表
汇总后EIGRP会自动产生空接口防环路由

R2#sho ip route eigrp 90172.16.0.0/16 is variably subnetted, 14 subnets, 3 masks

D 172.16.1.160/27 [90/2812416] via 172.16.0.3, 00:01:58, FastEthernet0/0
D 172.16.1.128/27 [90/2300416] via 172.16.0.3, 00:03:10, FastEthernet0/0
D 172.16.1.192/27 [90/2812416] via 172.16.0.3, 00:00:39, FastEthernet0/0
D 172.16.1.32/27 [90/156160] via 172.16.0.2, 00:07:24, FastEthernet0/0
D 172.16.2.20/30 [90/2684416] via 172.16.0.3, 00:07:15, FastEthernet0/0
D 172.16.2.16/30 [90/3196416] via 172.16.0.3, 00:07:15, FastEthernet0/0
D 172.16.2.12/30 [90/2684416] via 172.16.0.3, 00:07:15, FastEthernet0/0
D 172.16.2.8/30 [90/2172416] via 172.16.0.3, 00:07:15, FastEthernet0/0
D 172.16.2.4/30 [90/2172416] via 172.16.0.3, 00:07:15, FastEthernet0/0
D 172.16.2.0/30 [90/2172416] via 172.16.0.2, 00:07:24, FastEthernet0/0
D 172.16.1.96/27 [90/156160] via 172.16.0.3, 00:04:04, FastEthernet0/0
D 172.16.1.64/27 [90/2300416] via 172.16.0.3, 00:05:20, FastEthernet0/0
[90/2300416] via 172.16.0.2, 00:05:20, FastEthernet0/0
第五步:安全认证

R2(config)#key chain ccnp
R2(config-keychain)#key 1
R2(config-keychain-key)#key-string cisco123
R2(config)#interface f0/0
R2(config-if)#ip authentication key-chain eigrp 90 ccnp
R2(config-if)#ip authentication mode eigrp 90 md5 
R3(config)#key chain ccnp 
R3(config-keychain)#key 1
R3(config-keychain-key)#key-string cisco123
R3(config)#interface f0/0
R3(config-if)#ip authentication key-chain eigrp 90 ccnp
R3(config-if)#ip authentication mode eigrp 90 md5

这里演示R2-R3之间的认证其他路由器之间与之相同
第六步:实现R4的S1/1口带宽为800k,R4到R2环回为非等开销负载均衡
查看R4路由表到R2环回路由
D 172.16.0.0/29 [90/2172416] via 172.16.2.6, 00:04:00, Serial1/1
[90/2172416] via 172.16.2.1, 00:04:00, Serial1/0
查看R4拓扑表中到达R2环回
P 172.16.0.0/29, 2 successors, FD is 2172416
via 172.16.2.1 (2172416/28160), Serial1/0
via 172.16.2.6 (2172416/28160), Serial1/1
更改接口带宽

R4(config)#interface s1/1---进入接口
R4(config-if)#bandwidth 800---修改带宽

此时路由表
D 172.16.0.0/29 [90/2172416] via 172.16.2.1, 00:00:16, Serial1/0
拓扑表
P 172.16.0.0/29, 1 successors, FD is 2172416
via 172.16.2.1 (2172416/28160), Serial1/0
via 172.16.2.6 (3714560/28160), Serial1/1
实现非等开销

R4(config)#router eigrp 90
R4(config-router)#variance 2---修改差异值

注:默认eigrp协议的差异值为1;
差异值=备份路径的FD/最佳路径的FD=结果向上求整
修改差异值实现非等开销负载均衡

此时路由表
D 172.16.0.0/29 [90/3714560] via 172.16.2.6, 00:02:11, Serial1/1
[90/2172416] via 172.16.2.1, 00:02:11, Serial1/0
拓扑表
P 172.16.0.0/29, 1 successors, FD is 2172416
via 172.16.2.1 (2172416/28160), Serial1/0
via 172.16.2.6 (3714560/28160), Serial1/1
第七步:R6到R8环回通过R7
①先查看R6通过两个路径到达R8环回的度量

R6#show ip eigrp topology all-links ---查看所有的路由信息(包括不优路径)

P 172.16.1.192/27, 1 successors, FD is 2297856, serno 68
via 172.16.2.21 (2297856/128256), Serial1/2
via 172.16.2.14 (2809856/2297856), Serial1/1
可以看到度量分别为2297856和2809856
若无法查看可通过公式进行计算,eigrp为符合度量
注:复合度量:多参数运算所得
Formula with default K values (K1 = 1, K2 = 0, K3 = 1, K4 = 0, K5 = 0):
K5为0:
Metric = [K1 * BW + ((K2 * BW) / (256 – load)) + K3 * delay]
K5大于0:
Metric = [K1 * BW + ((K2 * BW) / (256 – load)) + K3 * delay]* [K5 / (reliability + K4)]:
默认K值下度量=带宽+延时
带宽=(10^7/整段路径最小带宽)*256
延时=(整段路径控制层面入口延时总和/10)*256

256为放大因子----兼容igrp协议 变大数值便于比较

R2#show interfaces s1/1---可以查看带宽延时

Serial1/1 is administratively down, line protocol is down
Hardware is M4T
MTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec,
②在控制层面修改度量

R6(config)#access-list 1 permit 172.16.1.192 0.0.0.31--抓取R8环回流量
R6(config)#router eigrp 90
R6(config-router)#offset-list 1 in 513000 serial 1/2--加大度量值

注:不能加太大,要让原来路径可以成为备份
此时拓扑表可以看出路径切换成功
P 172.16.1.192/27, 1 successors, FD is 2809856
via 172.16.2.14 (2809856/2297856), Serial1/1
via 172.16.2.21 (2810856/128256), Serial1/2
第八步:R2-R8可以访问R1环回
思路:缺省+NAT
①缺省

R2(config)#ip route 0.0.0.0 0.0.0.0 12.1.1.1----手工静态路由
R2(config)#router eigrp 90
R2(config-router)#redistribute static ---重发布静态

注:EIGRP缺省路由产生
缺省路由

  1. 在边界路由器上所有连接内网的接口上进行汇总配置–汇总地址为0.0.0.0

    r1(config)#interface fastEthernet 0/0
    r1(config-if)#ip summary-address eigrp 90 0.0.0.0 0.0.0.0

边界还需要手工静态缺省指向isp

  1. 重发布静态路由
    先在边界路由器上静态缺省指向ISP,然后再将该路由重发布到eigrp协议

    r1(config)#router eigrp 90
    r1(config-router)#redistribute static

  2. 宣告缺省路由
    先在边界路由器上静态缺省指向ISP,然后再将该路由宣告到eigrp协议

    r1(config)#router eigrp 90
    r1(config-router)#network 0.0.0.0

不建议该配置,因为宣告了本地所有的接口

  1. default-network做法–建议边界路由器外网接口为主类网段地址时

  2. 边界路由器上配置
    r1(config)#ip default-network 12.0.0.0`(宣告边界路由器连接ISP的接口地址的主类段)

  3. eigrp协议中宣告该主类

    r1(config)#router eigrp 90
    r1(config-router)#network 12.0.0.0

  4. 该路由器上必须存在宣告的主类网段路由

    r1(config)#ip route 12.0.0.0 255.0.0.0 null 0

②.NAT

R2(config)#access-list 1 permit 172.16.0.0 0.0.255.255---抓取流量
R2(config)#ip nat inside source list 1 interface s1/0 overload --一对多NAT
R2(config)#interface s1/0
R2(config-if)#ip nat outside 
R2(config-if)#interface f0/0
R2(config-if)#ip nat inside

测试:

R8#ping 1.1.1.1Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/63/104 ms

第九步:实现R1telnetR2实际登录R8
①R8开启TELNET权限
R8(config)#username ccnp privilege 15 secret cisco123—设置登录用户名密码权限

R8(config)#line vty 0 4--进入线路
R8(config-line)#login local --调用本地

②端口映射

R2(config)#ip nat inside source static tcp 172.16.1.193 23 12.1.1.2 23

测试:
R1#telnet 12.1.1.2
Trying 12.1.1.2 … Open

User Access Verification

Username: ccnp
Password:
R8#
综上此次实验过程结束


http://www.taodudu.cc/news/show-7669512.html

相关文章:

  • CCNA 6 EIGRP
  • EIGRP总结
  • EIGRP回顾
  • 3.4.2 CSMA/CD协议
  • CSMA 简介
  • 以太网 CSMA-CD与CSMA-CA的区别与工作方式
  • 【基础】static搭配inline 味道更佳(explicit_bzero-rawmemchr)
  • bzero 和 memset 的区别
  • bzero()
  • ModuleNotFoundError: No module named ‘sklearn‘
  • 成功解决ModuleNotFoundError: No module named ‘torchtext.legacy‘
  • ModuleNotFoundError: No module named ‘selenium
  • No module named ‘pyautogui‘
  • No module named ‘dataclasses‘
  • 【python基础】python导包显示No module named XXX问题
  • 记录-centos7搭建DNS服务(named.servicenamed-chroot)全流程
  • linux启动named服务失败,处理service named start失败failed_dns
  • 解决No module named pip问题
  • JPA的@NamedQuery注解
  • 解决No module named tkinter
  • ModuleNotFoundError: No module named ‘sklearn‘解决方案
  • No module named torchcrf
  • No module named SimpleHTTPServer
  • No module named ‘cv2‘ 解决办法 (No module named ‘numpy‘ 等所有报错均可解决)
  • DNS域名解析服务--named使用
  • Linux名字服务器(named)简单配置
  • 图像处理基础--图像缩放(原理、C++代码)
  • 浏览器正在解析主机时间过长
  • 正在解析主机 nginx.org... 失败:域名解析暂时失败。 wget: 无法解析主机地址 “nginx.org”
  • wget: 无法解析主机地址