欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

EIGRP的配置

程序员文章站 2024-02-17 10:02:46
...

基本配置

Router(config)#router eigrp 50
Router(config-router)#network 172.16.0.0
Router(config-router)#network 10.1.1.1
Router(config-router)#network 10.1.2.1
Router(config-router)#network 10.1.3.1
Router(config-router)#network 10.1.4.1

其它命令

查看邻居关系

Router#sh ip eigrp 50 neighbors
EIGRP-IPv4 Neighbors for AS(50)
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   172.16.1.6              Et0/1             14 00:16:30    9   200  0  22
0   172.16.1.1              Et0/0             12 00:16:54    5   200  0  20

确认路由

Router#sh ip route
Codes: L - local, C - connected, S - static, 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
       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, + - replicated route

Gateway of last resort is not set

      10.0.0.0/24 is subnetted, 4 subnets
D        10.1.1.0 [90/409600] via 172.16.1.1, 00:11:04, Ethernet0/0
D        10.1.2.0 [90/409600] via 172.16.1.1, 00:11:04, Ethernet0/0
D        10.1.3.0 [90/409600] via 172.16.1.1, 00:11:04, Ethernet0/0
D        10.1.4.0 [90/409600] via 172.16.1.1, 00:11:04, Ethernet0/0
      131.131.0.0/16 is variably subnetted, 2 subnets, 2 masks
C        131.131.131.0/24 is directly connected, Loopback0
L        131.131.131.131/32 is directly connected, Loopback0
      172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
C        172.16.1.0/30 is directly connected, Ethernet0/0
L        172.16.1.2/32 is directly connected, Ethernet0/0
C        172.16.1.4/30 is directly connected, Ethernet0/1
L        172.16.1.5/32 is directly connected, Ethernet0/1
D     192.168.0.0/24 [90/409600] via 172.16.1.6, 00:16:53, Ethernet0/1
D     192.168.1.0/24 [90/409600] via 172.16.1.6, 00:16:52, Ethernet0/1
D     192.168.2.0/24 [90/409600] via 172.16.1.6, 00:16:50, Ethernet0/1
D     192.168.3.0/24 [90/409600] via 172.16.1.6, 00:16:49, Ethernet0/1

只看EIGRP路由

Router#sh ip route eigrp
Codes: L - local, C - connected, S - static, 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
       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, + - replicated route

Gateway of last resort is not set

      10.0.0.0/24 is subnetted, 4 subnets
D        10.1.1.0 [90/409600] via 172.16.1.1, 00:12:31, Ethernet0/0
D        10.1.2.0 [90/409600] via 172.16.1.1, 00:12:31, Ethernet0/0
D        10.1.3.0 [90/409600] via 172.16.1.1, 00:12:31, Ethernet0/0
D        10.1.4.0 [90/409600] via 172.16.1.1, 00:12:31, Ethernet0/0
D     192.168.0.0/24 [90/409600] via 172.16.1.6, 00:18:20, Ethernet0/1
D     192.168.1.0/24 [90/409600] via 172.16.1.6, 00:18:18, Ethernet0/1
D     192.168.2.0/24 [90/409600] via 172.16.1.6, 00:18:16, Ethernet0/1
D     192.168.3.0/24 [90/409600] via 172.16.1.6, 00:18:14, Ethernet0/1

关闭自动汇总

Router(config)#router eigrp 50
Router(config-router)#no au
Router(config-router)#no auto-summary

手工汇总

Router(config)#int e0/1
Router(config-if)#ip summary-address eigrp 50 192.168.0.0 255.255.252.0