EIGRP的基本配置

EIGRP的基本配置

1、  实验目的:

通过本次的实验,我们可以掌握如下技能:

1)        在路由器上启用EIGRP路由进程

2)        启用参与路由协议的借口,并且通告网络

3)        EIGRP度量值的计算

4)        可行距离(FD)、通告距离(RD)、以及可行性条件(FC

5)        临界表、拓扑表及其路由表的含义

6)        查看和调试EIGRP路由协议相关信息

2、  实验拓扑图:

clip_image002

3、  实验步骤:

(1)       根据网络拓扑,配置各个接口地址

R1(config-if)#interface loopback 0

R1(config-if)#ip ad

R1(config-if)#ip address 1.1.1.1 255.255.255.0

R1(config-if)#no sh

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#interface serial 2/0

R1(config-if)#ip ad

R1(config-if)#ip address 192.168.1.1 255.255.255.252

R1(config-if)#cl

R1(config-if)#clock r

R1(config-if)#clock rate 128000

R1(config-if)#no sh

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#

 

 

Router>en

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#hos

Router(config)#hostname R2

R2(config)#int

R2(config)#interface s

R2(config)#interface serial 2/0

R2(config-if)#ip ad

R2(config-if)#ip address 192.168.1.2 255.255.255.252

R2(config-if)#no sh

R2(config-if)#no shutdown

 

%LINK-5-CHANGED: Interface Serial2/0, changed state to up

R2(config-if)#exit

R2(config)#int

R2(config)#interface se

R2(config)#interface serial 3/0

R2(config-if)#clock r

R2(config-if)#clock rate 128000

R2(config-if)#ip ad

R2(config-if)#ip address 192.168.2.1 255.255.255.252

R2(config-if)#no sh

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#

 

 

 

Router(config)#hostname R3

R3(config)#int

R3(config)#interface s

R3(config)#interface serial 3/0

R3(config-if)#ipa d

R3(config-if)#ip ad

R3(config-if)#ip address 192.168.2.2 255.255.255.252

R3(config-if)#no sh

R3(config-if)#no shutdown

R3(config)#interface s

R3(config)#interface serial 2/0

R3(config-if)#ip address 192.168.3.1 255.255.255.252

R3(config-if)#cl

R3(config-if)#clock r

R3(config-if)#clock rate 128000

R3(config-if)#no sh

R3(config-if)#no shutdown

 

R3(config-if)#exit

R3(config)#

 

 

R4(config-if)#interface loopback 0

R4(config-if)#ip ad

R4(config-if)#ip address 4.4.4.4 255.255.255.0

R4(config-if)#no sh

R4(config-if)#no shutdown

R4(config-if)#exit

R4(config)#inr

R4(config)#int

R4(config)#interface s

R4(config)#interface serial 2/0

R4(config-if)#ip ad

R4(config-if)#ip address 192.168.3.2 255.255.255.252

R4(config-if)#no shutdown

(2)       启用EIGRP路由协议,并将网络发布出去

R1(config)#router eigrp 1

R1(config-router)#no au

R1(config-router)#no auto-summary

R1(config-router)#network 1.1.1.0 0.0.0.255

R1(config-router)#network 192.168.1.0

R1(config-router)#

 

 

R2(config)#router eigrp 1

R2(config-router)#no auto-summary

R2(config-router)#network 192.168.1.0

R2(config-router)#network 192.168.2.0

R2(config-router)#

 

 

R3(config)#router eigrp 1

R3(config-router)#no auto-summary

R3(config-router)#network 192.168.2.0

R3(config-router)#network 192.168.2.0

R3(config-router)#net

R3(config-router)#network 192.168.3.0

R3(config-router)#

 

 

R4(config)#router eigrp 1

R4(config-router)#ne

R4(config-router)#network 4.4.4.0 0.0.0.255

R4(config-router)#network 192.168.3.0

R4(config-router)#

(3)       测试网络情况

查看路由表:

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

 

     1.0.0.0/24 is subnetted, 1 subnets

D       1.1.1.0 [90/20640000] via 192.168.1.1, 00:03:28, Serial2/0

D    4.0.0.0/8 [90/21152000] via 192.168.2.2, 00:01:56, Serial3/0

C    192.168.1.0/24 is directly connected, Serial2/0

C    192.168.2.0/24 is directly connected, Serial3/0

D    192.168.3.0/24 [90/21024000] via 192.168.2.2, 00:02:33, Serial3/0

R2#

   以上的输出可以看出,路由器R2通过EIGRP路由协议学习到了3条路由条目,管理距离是90。注意:EIGRP协议代码用字母“D”表示。

对于EIGRP度量值的计算,不妨以“D       1.1.1.0 [90/20640000] via 192.168.1.1, 00:03:28, Serial2/0”条目来说明。

EIGRP度量值的计算公式是[K1*Bandwidth+(K2*Bandwidth)/(256-load)+K3*delay]*[K5/(reliability+K4)]*256

在默认的情况下,K1=K3=1K2=K4=K5=0

Band>所经由链路中的入口带宽的最小值。

Delay=所经由链路中入口的延迟之和/10

所以本路由条目的度量值应该是[10^7/128+(5000+20000)/10]*256=2064000和路由器计算的结果是一样的。

 

查看路由协议

R2#show ip protocols

 

Routing Protocol is "eigrp  1 "

  Outgoing update filter list for all interfaces is not set

  Incoming update filter list for all interfaces is not set

  Default networks flagged in outgoing updates 

  Default networks accepted from incoming updates

  EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

//显示计算度量值所用的K

  EIGRP maximum hopcount 100

//EIGRP支持的最大跳数

  EIGRP maximum metric variance 1

//variance默认值是1,即默认支持等价路径的负载均衡

Redistributing: eigrp 1

  Automatic network summarization is not in effect 

//显示自动汇总已经关闭,默认自动汇总的开启的

  Maximum path: 4

  Routing for Networks: 

     192.168.1.0

     192.168.2.0

  Routing Information Sources: 

    Gateway         Distance      Last Update

    192.168.1.1     90            821438    

    192.168.2.2     90            867625    

  Distance: internal 90 external 170

 

R2#

 

查看EIGRP邻居信息

R2#show ip eigrp neighbors

IP-EIGRP neighbors for process 1

H   Address         Interface      Hold Uptime    SRTT   RTO   Q   Seq

                                   (sec)          (ms)        Cnt  Num

0   192.168.1.1     Se2/0          11   00:17:49  40     1000  0   7

1   192.168.2.2     Se3/0          11   00:17:03  40     1000  0   9

 

R2#

以上可以显示了邻居的信息,有邻居接口地址,从邻接关系建立到目前的时间等信息。

 

Show ip eigrp toplogy

R2#show ip eigrp topology

IP-EIGRP Topology Table for AS 1

 

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

       r - Reply status

 

P 192.168.1.0/24, 1 successors, FD is 20512000

         via Connected, Serial2/0

P 1.1.1.0/24, 1 successors, FD is 20640000

         via 192.168.1.1 (20640000/128256), Serial2/0

P 192.168.2.0/24, 1 successors, FD is 20512000

         via Connected, Serial3/0

P 192.168.3.0/24, 1 successors, FD is 21024000

         via 192.168.2.2 (21024000/20512000), Serial3/0

P 4.0.0.0/8, 1 successors, FD is 21152000

         via 192.168.2.2 (21152000/20640000), Serial3/0

R2#

以上的输出可以看出每条路由条码的FDRD的值。

 

 

R1#show ip eigrp traffic

IP-EIGRP Traffic Statistics for process 1

  Hellos sent/received: 795/307

  Updates sent/received: 4/5

  Queries sent/received: 0/0

  Replies sent/received:  0/0

  Acks sent/received:  5/4

  Input queue high water mark 1, 0 drops

  SIA-Queries sent/received: 0/0

  SIA-Replies sent/received: 0/0

 

R1#

以上可以看出EIRP发送和接收到的数据包的统计情况。

 

(4)       注入默认路由

在路由器R1上使用“IP default-network”可以向EIGRP网络中注入一条默认路由,具体配置如下:

R1(config-if)#interface loopback 1

R1(config-if)#ip address 192.168.5.1 255.255.255.0

R1(config)#router eigrp 1

R1(config-router)#ne

R1(config-router)#network 192.168.5.0 0.0.0.255

R1(config-router)#exit

R1(config)#ip de

R1(config)#ip default-network 192.168.5.0

R1(config)#

 

查看R2的路由条目

R2#show ip ro

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 192.168.1.1 to network 192.168.5.0

 

     1.0.0.0/24 is subnetted, 1 subnets

D       1.1.1.0 [90/20640000] via 192.168.1.1, 00:29:13, Serial2/0

D    4.0.0.0/8 [90/21152000] via 192.168.2.2, 00:27:41, Serial3/0

C    192.168.1.0/24 is directly connected, Serial2/0

C    192.168.2.0/24 is directly connected, Serial3/0

D    192.168.3.0/24 [90/21024000] via 192.168.2.2, 00:28:18, Serial3/0

D*   192.168.5.0/24 [90/20640000] via 192.168.1.1, 00:00:56, Serial2/0

R2#

以上的输出表明R2已经收到了一条默认的路由,同样R3R4也同样可以收到。。

 

OK 实验到此结束!!!!!!!

你可能感兴趣的:(职场,休闲,EIGRP)