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位了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章