CCNA EIGRP路由协议的配置

简介:
EIGRP 路由协议的配置


概念:
1.邻居表:直连路由器的地址和与之相连的接口
2.拓扑表:
  a.路由状态:P(被动) A(活动)
  b.可行距离(FD):到目的地的最小度量(metric)
  c.报告距离(AD):邻居到达目的网络的开销
  d.等价负载均衡:到达同意目的地的两条链路FD值相同时
  e.后继路由:主路由的一下跳地址所在路由器(R12是R11的后继路由)
  f.可行后继路由:AD2<FD1,即有可行后继路由,主路由发生故障后,可行后继路由马上取而代之
  g.不可行后继路由:AD2>FD1,当主路由链路发生故障后,需重新计算路由。
3.路由表:只显示托普表中的最佳路由,即后继路由
4.命令
  router eigrp 100   100为自治域系统(AS)号
  no auto-summery    关闭自动汇总
  network 192.168.1.254 0.0.0.0  
  network 接口IP地址  通配符  
  .......
5.查看邻居表、拓扑表、路由表
  show ip eigrp nei
  show ip eigrp topolopy
  show ip route

实验
1. 拓扑图


2.配置
R1 上的 show  run
R1#show run
Building configuration...
 
Current configuration : 745 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
no ip domain-lookup
!
!
interface FastEthernet0/0
 ip address 172.16.12.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 172.16.14.1 255.255.255.0
 duplex auto
 speed auto
!
interface Ethernet1/0
 ip address 10.10.1.254 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router eigrp 100
 network 10.10.1.254 0.0.0.0
 network 172.16.12.1 0.0.0.0
 network 172.16.14.1 0.0.0.0
 no auto-summary
!
ip classless
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 4
 login
!
!
end
 
 
R2 上的  show run
R2#show run
Building configuration...
 
Current configuration : 709 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
no ip domain-lookup
!
!!
interface Loopback0
 ip address 172.16.55.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 172.16.12.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 172.16.23.2 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router eigrp 100
 network 172.16.12.0 0.0.0.255
 network 172.16.23.0 0.0.0.255
 no auto-summary
!
ip classless
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 4
 login
!
!
!
end
 
 
R3 上的 show run
R2#show run
Building configuration...
 
Current configuration : 709 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
no ip domain-lookup
!
!
interface Loopback0
 ip address 172.16.55.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 172.16.12.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 172.16.23.2 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router eigrp 100
 network 172.16.12.0 0.0.0.255
 network 172.16.23.0 0.0.0.255
 network 172.16.0.0
 no auto-summary
!
ip classless
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 4
 login
!
!
end
 
 
R4 上的 show run
R4#show run
Building configuration...
 
Current configuration : 625 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R4
!
!
no ip domain-lookup
!
!
interface FastEthernet0/0
 ip address 172.16.14.4 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 172.16.34.4 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router eigrp 100
 network 172.16.14.4 0.0.0.0
 network 172.16.34.4 0.0.0.0
 no auto-summary
!
ip classless
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 4
 login
!
!
end
 
 
3. 在各路由器上查看邻居表、拓扑表、路由表

R1#
R1#show ip eigrp nei
IP-EIGRP neighbors for process 100
H   Address         Interface      Hold Uptime    SRTT   RTO   Q   Seq
                                   (sec)          (ms)        Cnt  Num
0   172.16.14.4     Fa0/1          14   00:37:13  40     1000  0   33
1   172.16.12.2     Fa0/0          12   00:11:34  40     1000  0   42
 
R1#show ip eigrp top
IP-EIGRP Topology Table for AS 100
 
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - Reply status
 
P 10.10.1.0/24, 1 successors, FD is 281600
         via Connected, Ethernet1/0
P 172.16.14.0/24, 1 successors, FD is 28160
         via Connected, FastEthernet0/1
P 172.16.23.0/24, 1 successors, FD is 30720
         via 172.16.12.2 (30720/28160), FastEthernet0/0
P 172.16.34.0/24, 1 successors, FD is 30720
         via 172.16.14.4 (30720/28160), FastEthernet0/1
P 192.168.1.0/24, 2 successors, FD is 286720
         via 172.16.14.4 (286720/284160), FastEthernet0/1
         via 172.16.12.2 (286720/284160), FastEthernet0/0
P 172.16.55.0/24, 1 successors, FD is 156160
         via 172.16.12.2 (156160/128256), FastEthernet0/0
P 172.16.12.0/24, 1 successors, FD is 28160
         via Connected, FastEthernet0/0
R1#
R1#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
 
     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.1.0 is directly connected, Ethernet1/0
     172.16.0.0/24 is subnetted, 5 subnets
C       172.16.12.0 is directly connected, FastEthernet0/0
C       172.16.14.0 is directly connected, FastEthernet0/1
D       172.16.23.0 [90/30720] via 172.16.12.2, 00:11:56, FastEthernet0/0
D       172.16.34.0 [90/30720] via 172.16.14.4, 00:37:16, FastEthernet0/1
D       172.16.55.0 [90/156160] via 172.16.12.2, 00:11:56, FastEthernet0/0
D    192.168.1.0/24 [90/286720] via 172.16.14.4, 00:37:16, FastEthernet0/1
                    [90/286720] via 172.16.12.2, 00:11:56, FastEthernet0/0
R1#
 
R2#show ip eigrp nei
IP-EIGRP neighbors for process 100
H   Address         Interface      Hold Uptime    SRTT   RTO   Q   Seq
                                   (sec)          (ms)        Cnt  Num
0   172.16.12.1     Fa0/0          12   00:25:57  40     1000  0   45
1   172.16.23.3     Fa0/1          12   00:25:45  40     1000  0   40

R2#show ip eigrp top
IP-EIGRP Topology Table for AS 100

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - Reply status

P 172.16.12.0/24, 1 successors, FD is 28160
         via Connected, FastEthernet0/0
P 10.10.1.0/24, 1 successors, FD is 284160
         via 172.16.12.1 (284160/281600), FastEthernet0/0
P 172.16.14.0/24, 1 successors, FD is 30720
         via 172.16.12.1 (30720/28160), FastEthernet0/0
P 172.16.23.0/24, 1 successors, FD is 28160
         via Connected, FastEthernet0/1
P 172.16.34.0/24, 1 successors, FD is 30720
         via 172.16.23.3 (30720/28160), FastEthernet0/1
P 192.168.1.0/24, 1 successors, FD is 284160
         via 172.16.23.3 (284160/281600), FastEthernet0/1
R2#
R2#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

     10.0.0.0/24 is subnetted, 1 subnets
D       10.10.1.0 [90/284160] via 172.16.12.1, 00:26:08, FastEthernet0/0
     172.16.0.0/24 is subnetted, 5 subnets
C       172.16.12.0 is directly connected, FastEthernet0/0
D       172.16.14.0 [90/30720] via 172.16.12.1, 00:26:08, FastEthernet0/0
C       172.16.23.0 is directly connected, FastEthernet0/1
D       172.16.34.0 [90/30720] via 172.16.23.3, 00:25:57, FastEthernet0/1
C       172.16.55.0 is directly connected, Loopback0
D    192.168.1.0/24 [90/284160] via 172.16.23.3, 00:25:57, FastEthernet0/1
R2#
 
R3#
R3#show ip eigrp nei
IP-EIGRP neighbors for process 100
H   Address         Interface      Hold Uptime    SRTT   RTO   Q   Seq
                                   (sec)          (ms)        Cnt  Num
0   172.16.23.2     Fa0/0          13   00:42:47  40     1000  0   41
1   172.16.34.4     Fa0/1          13   00:40:25  40     1000  0   32
 
R3#show ip eigrp top
IP-EIGRP Topology Table for AS 100
 
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - Reply status
 
P 172.16.23.0/24, 1 successors, FD is 28160
         via Connected, FastEthernet0/0
P 10.10.1.0/24, 2 successors, FD is 286720
         via 172.16.34.4 (286720/284160), FastEthernet0/1
         via 172.16.23.2 (286720/284160), FastEthernet0/0
P 172.16.14.0/24, 1 successors, FD is 30720
         via 172.16.34.4 (30720/28160), FastEthernet0/1
P 172.16.34.0/24, 1 successors, FD is 28160
         via Connected, FastEthernet0/1
P 192.168.1.0/24, 1 successors, FD is 281600
         via Connected, Ethernet1/0
P 172.16.55.0/24, 1 successors, FD is 156160
         via 172.16.23.2 (156160/128256), FastEthernet0/0
P 172.16.12.0/24, 1 successors, FD is 30720
         via 172.16.23.2 (30720/28160), FastEthernet0/0
R3#
R3#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
 
     10.0.0.0/24 is subnetted, 1 subnets
D       10.10.1.0 [90/286720] via 172.16.34.4, 00:40:37, FastEthernet0/1
                  [90/286720] via 172.16.23.2, 00:15:18, FastEthernet0/0
     172.16.0.0/24 is subnetted, 5 subnets
D       172.16.12.0 [90/30720] via 172.16.23.2, 00:15:19, FastEthernet0/0
D       172.16.14.0 [90/30720] via 172.16.34.4, 00:40:37, FastEthernet0/1
C       172.16.23.0 is directly connected, FastEthernet0/0
C       172.16.34.0 is directly connected, FastEthernet0/1
D       172.16.55.0 [90/156160] via 172.16.23.2, 00:27:28, FastEthernet0/0
C    192.168.1.0/24 is directly connected, Ethernet1/0
R3#
 
R4#show ip eigrp nei
IP-EIGRP neighbors for process 100
H   Address         Interface      Hold Uptime    SRTT   RTO   Q   Seq
                                   (sec)          (ms)        Cnt  Num
0   172.16.14.1     Fa0/0          10   00:42:01  40     1000  0   34
1   172.16.34.3     Fa0/1          12   00:41:40  40     1000  0   29
 
 
R4#show ip eigrp top
IP-EIGRP Topology Table for AS 100
 
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - Reply status
 
P 172.16.14.0/24, 1 successors, FD is 28160
         via Connected, FastEthernet0/0
P 10.10.1.0/24, 1 successors, FD is 284160
         via 172.16.14.1 (284160/281600), FastEthernet0/0
P 172.16.23.0/24, 1 successors, FD is 30720
         via 172.16.34.3 (30720/28160), FastEthernet0/1
P 172.16.34.0/24, 1 successors, FD is 28160
         via Connected, FastEthernet0/1
P 192.168.1.0/24, 1 successors, FD is 284160
         via 172.16.34.3 (284160/281600), FastEthernet0/1
P 172.16.55.0/24, 2 successors, FD is 158720
         via 172.16.34.3 (158720/156160), FastEthernet0/1
         via 172.16.14.1 (158720/156160), FastEthernet0/0
P 172.16.12.0/24, 1 successors, FD is 30720
         via 172.16.14.1 (30720/28160), FastEthernet0/0
R4#
R4#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
 
     10.0.0.0/24 is subnetted, 1 subnets
D       10.10.1.0 [90/284160] via 172.16.14.1, 00:42:12, FastEthernet0/0
     172.16.0.0/24 is subnetted, 5 subnets
D       172.16.12.0 [90/30720] via 172.16.14.1, 00:16:33, FastEthernet0/0
C       172.16.14.0 is directly connected, FastEthernet0/0
D       172.16.23.0 [90/30720] via 172.16.34.3, 00:41:52, FastEthernet0/1
C       172.16.34.0 is directly connected, FastEthernet0/1
D       172.16.55.0 [90/158720] via 172.16.34.3, 00:28:42, FastEthernet0/1
                    [90/158720] via 172.16.14.1, 00:16:32, FastEthernet0/0
D    192.168.1.0/24 [90/284160] via 172.16.34.3, 00:41:52, FastEthernet0/1
R4#
 
4. 验证路由配置结果

 
 


     本文转自kindIT 51CTO博客,原文链接:http://blog.51cto.com/kindit/1009273,如需转载请自行联系原作者



相关文章
|
4天前
|
存储 网络协议 算法
|
5月前
|
负载均衡 网络协议 算法
IP路由协议(RIP、IGRP、OSPF、IS-IS、BGP)
1、路由分类 路由产生方式: 直接路由:路由器会自动生成本路由器激活端口所在网段的路由条目 静态路由:网络管理员手工配置,静态路由信息在缺省的情况下私有的,不会传递给其他的路由器
|
网络协议 算法 数据库
|
网络协议 网络架构
OSPF路由协议基础(OSPF基本配置)
OSPF路由协议基础(OSPF基本配置)
541 0
OSPF路由协议基础(OSPF基本配置)
|
网络协议 Shell 网络架构
|
网络协议 网络架构
|
网络协议 网络架构
|
网络协议