eigrp的配置(1)

1、网络拓扑图如果下:

 

2、下面是各个路由器的基本的配置

  R1的配置:

Router>en
Router#conf t

Router(config)#host r1
r1(config)#
r1(config)#no ip domain-lookup
r1(config)#line console 0
r1(config-line)#logging synchronous
r1(config-line)#exec-timeout 0 0
r1(config-line)#end
r1#

r1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.


r1(config)#int loopback 0
r1(config-if)#ip addr 1.1.1.1 255.255.255.0
r1(config-if)#int s1/0
r1(config-if)#ip addr 148.1.1.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#clock rate 64000
r1(config-if)#
00:19:41: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
r1(config-if)#exit
r1(config)#no ip domain-lookup
r1(config)#line console 0
r1(config-line)#logging synchronous
r1(config-line)#exec-timeout 0 0
r1(config-line)#end
r1#
r1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

r1(config)#router eigrp 100

r1(config-router)#auto-summary

r1(config-router)#network 1.1.1.0 0.0.0.255
r1(config-router)#network 148.1.1.0 0.0.0.255
r1(config-router)#
00:24:45: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 148.1.1.2 (Serial1/0) is up: new adjacency
r1(config-router)#^Z
r1#

 

  R2的配置:

Router>en
Router#conf t

Router(config)#host r2
r2(config)#
r2(config)#
r2(config)#no ip domain-lookup
r2(config)#line console 0
r2(config-line)#logging synchronous
r2(config-line)#exec-timeout 0 0
r2(config-line)#end
r2#

r2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r2(config)#int s1/0

r2(config-if)#ip addr 148.1.1.2 255.255.255.0
r2(config-if)#no shut
r2(config-if)#int s1/1
00:20:33: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
r2(config-if)#int s1/1
r2(config-if)#
00:20:34: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
r2(config-if)#ip addr 192.1.1.2 255.255.255.0
r2(config-if)#cl
r2(config-if)#clock ra
r2(config-if)#clock rate 64000
r2(config-if)#no shut
r2(config-if)#
00:21:01: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
r2(config-if)#
00:21:02: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
r2(config-if)#
00:21:31: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
r2(config-if)#
00:21:41: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
r2(config-if)#exit
r2(config)#

r2(config)#router eigrp 100
r2(config-router)#net
r2(config-router)#network 148.1.1.0 0.0.0.255
r2(config-router)#net
r2(config-router)#network 192.1
00:24:32: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 148.1.1.1 (Serial1/0) is up: new adjacency
r2(config-router)#network 192.1.1.0 0.0.0.255
r2(config-router)#
00:25:45: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 192.1.1.3 (Serial1/1) is up: new adjacency
r2(config-router)#^Z
r2#

 

  R3的配置:

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host r3
r3(config)#
r3(config)#
r3(config)#no ip domain-lookup
r3(config)#line console 0
r3(config-line)#logging synchronous
r3(config-line)#exec-timeout 0 0
r3(config-line)#end
r3#

r3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r3(config)#int s1/0
r3(config-if)#ip addr 192.1.1.3 255.255.255.0
r3(config-if)#no shut
r3(config-if)#
00:21:41: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
r3(config-if)#
00:21:42: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
r3(config-if)#exit
r3(config)#rou
r3(config)#router ei
r3(config)#router eigrp 100
r3(config-router)#net
r3(config-router)#network 192.1.1.0 0.0.0.255
r3(config-router)#^Z
r3#

 

3、接下来进行自动汇总的关闭与进行手工汇总

 


(1)查看基本信息
r1#sh 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, 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

     1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       1.0.0.0/8 is a summary, 00:06:20, Null0
C       1.1.1.0/24 is directly connected, Loopback0
D    192.1.1.0/24 [90/2681856] via 148.1.1.2, 00:04:59, Serial1/0
     148.1.0.0/16 is variably subnetted, 2 subnets, 2 masks
C       148.1.1.0/24 is directly connected, Serial1/0
D       148.1.0.0/16 is a summary, 00:06:20, Null0

r1#sh ip protocols
Routing Protocol is "eigrp 100"
  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 
  EIGRP maximum hopcount 100 //最大路数是100跳
  EIGRP maximum metric variance 1  //负载均衡的差值为1
  Redistributing: eigrp 100
  Automatic network summarization is in effect
  Automatic address summarization:
    148.1.0.0/16 for Loopback0
      Summarizing with metric 2169856
    1.0.0.0/8 for Serial1/0
      Summarizing with metric 128256
  Maximum path: 4 
  Routing for Networks:
    1.1.1.0/24
    148.1.1.0/24
  Routing Information Sources:
    Gateway         Distance      Last Update
    (this router)         90      00:11:42
    148.1.1.2             90      00:10:21
  Distance: internal 90 external 170
 
  (2)关闭自动汇总
  r1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r1(config)#router eigrp 100
r1(config-router)#no auto-summary
01:37:10: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 148.1.1.2 (Serial1/0) is down: peer restarted
01:37:11: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 148.1.1.2 (Serial1/0) is up: new adjacency
r1(config-router)#^Z

r1#sh 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, 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

     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
D    192.1.1.0/24 [90/2681856] via 148.1.1.2, 00:01:55, Serial1/0
     148.1.0.0/24 is subnetted, 1 subnets
C       148.1.1.0 is directly connected, Serial1/0

r2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r2(config)#router eigrp 100
r2(config-router)#no auto-summary
r2(config-router)#end
01:36:53: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 148.1.1.1 (Serial1/0) is down: summary configured
01:36:53: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 192.1.1.3 (Serial1/1) is down: summary configured
01:39:34: %SYS-5-CONFIG_I: Configured from console by console
r2#sh 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, 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

     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 148.1.1.1, 00:02:40, Serial1/0
C    192.1.1.0/24 is directly connected, Serial1/1
     148.1.0.0/24 is subnetted, 1 subnets
C       148.1.1.0 is directly connected, Serial1/0

r3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r3(config)#router eigrp 100
r3(config-router)#no auto-summary
r3(config-router)#
01:37:31: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 192.1.1.2 (Serial1/0) is down: summary configured
01:37:32: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 192.1.1.2 (Serial1/0) is up: new adjacency
r3(config-router)#^Z
r3#
01:37:43: %SYS-5-CONFIG_I: Configured from console by console
r3#sh 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, 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

     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2809856] via 192.1.1.2, 00:00:37, Serial1/0
C    192.1.1.0/24 is directly connected, Serial1/0
D    148.1.0.0/16 [90/2681856] via 192.1.1.2, 00:00:37, Serial1/0

  (3)在r2中手工汇总
r2(config)#int s1/1
r2(config-if)#ip summary-address eigrp 100 148.1.0.0 255.255.0.0
r2(config-if)#
01:54:08: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 192.1.1.3 (Serial1/1) is down: summary configured
r2(config-if)#end
r2#
  (4)查看汇总后的路由
r2#sh 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, 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

     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/2297856] via 148.1.1.1, 00:17:28, Serial1/0
C    192.1.1.0/24 is directly connected, Serial1/1
     148.1.0.0/16 is variably subnetted, 2 subnets, 2 masks
C       148.1.1.0/24 is directly connected, Serial1/0
D       148.1.0.0/16 is a summary, 00:00:16, Null0  //路由汇总成了l6位了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值