
R01(config)#router igrp 1
R01(config-router)#network 1.0.0.0
R01(config-router)#network 12.0.0.0
R01(config-router)#network 13.0.0.0
R01(config-router)#end //*使用IGRP宣告1.0.0.0/24、12.0.0.0/24和13.0.0.0/24三个网段
%SYS-5-CONFIG_I: Configured from console by console
R01#show ip protocols
Routing Protocol is "igrp 1"
Sending updates every 90 seconds, next due in 62 seconds
Invalid after 270 seconds, hold down 280, flushed after 630
//*和RIP类似。具体的更新时间和丢弃路由时间
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
IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
//*IGRP的度量值和RIP不一样。RIP仅和路由经过的跳数有关,而IGRP要考虑五个参数:带宽、延迟、负载、可靠性、MTU
IGRP maximum hopcount 100
IGRP maximum metric variance 1
Redistributing: igrp 1
Routing for Networks:
1.0.0.0
12.0.0.0
13.0.0.0
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 100) //*IGRP的默认管理距离是100
R02(config)#router igrp
R02(config)#router igrp 1
R02(config-router)#network 2.0.0.0
R02(config-router)#network 12.0.0.0
R02(config-router)#end
//*以同样的方法将R02、R03的网段宣告
R03(config)#router igrp 1
R03(config-router)#network 3.0.0.0
R03(config-router)#network 13.0.0.0
R03(config-router)#end
//*查看下R01、R02、R03上的路由表
R01#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, * - candidate default
U - per-user static route, o - ODR
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
I 2.0.0.0/8 [100/8976] via 12.0.0.2, 00:00:23, Serial1/2
I 3.0.0.0/8 [100/8976] via 13.0.0.3, 00:00:40, Serial1/3
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial1/2
13.0.0.0/24 is subnetted, 1 subnets
C 13.0.0.0 is directly connected, Serial1/3
R02#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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
I 1.0.0.0/8 [100/8976] via 12.0.0.1, 00:00:26, Serial2/1
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
I 3.0.0.0/8 [100/10976] via 12.0.0.1, 00:00:26, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial2/1
I 13.0.0.0/8 [100/10476] via 12.0.0.1, 00:00:26, Serial2/1
R03#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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
I 1.0.0.0/8 [100/8976] via 13.0.0.1, 00:00:33, Serial3/1
I 2.0.0.0/8 [100/10976] via 13.0.0.1, 00:00:33, Serial3/1
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
I 12.0.0.0/8 [100/10476] via 13.0.0.1, 00:00:33, Serial3/1
13.0.0.0/24 is subnetted, 1 subnets
C 13.0.0.0 is directly connected, Serial3/1
//*OK!!!全网通^_^
R01#debug ip packet detail
IP packet debugging is on (detailed)
R01#clear ip route *
R01#
IP: s=12.0.0.1 (local), d=255.255.255.255 (Serial1/2), len 32, sending broad/multicast, proto=9
IP: s=13.0.0.1 (local), d=255.255.255.255 (Serial1/3), len 32, sending broad/multicast, proto=9
IP: s=1.1.1.1 (local), d=255.255.255.255 (Loopback0), len 32, sending broad/multicast, proto=9
IP: s=1.1.1.1 (Loopback0), d=255.255.255.255, len 32, unroutable, proto=9
IP: s=12.0.0.2 (Serial1/2), d=12.0.0.1 (Serial1/2), len 60, rcvd 3, proto=9
IP: s=13.0.0.3 (Serial1/3), d=13.0.0.1 (Serial1/3), len 60, rcvd 3, proto=9
IP: s=12.0.0.1 (local), d=255.255.255.255 (Serial1/2), len 74, sending broad/multicast, proto=9
IP: s=13.0.0.1 (local), d=255.255.255.255 (Serial1/3), len 74, sending broad/multicast, proto=9
IP: s=1.1.1.1 (local), d=255.255.255.255 (Loopback0), len 88, sending broad/multicast, proto=9
IP: s=1.1.1.1 (Loopback0), d=255.255.255.255, len 88, unroutable, proto=9
R01#u all
All possible debugging has been turned off
******************************************************************************
//*调试IGRP
******************************************************************************
R01#debug ip igrp events
IGRP event debugging is on
R01#clear ip route *
R01#
IGRP: broadcasting request on Serial1/2
IGRP: broadcasting request on Serial1/3
IGRP: broadcasting request on Loopback0
IGRP: received update from 12.0.0.2 on Serial1/2
IGRP: update contains 1 interior, 1 system, and 0 exterior routes.
IGRP: Total routes in update: 2
IGRP: received update from 13.0.0.3 on Serial1/3
IGRP: update contains 1 interior, 1 system, and 0 exterior routes.
IGRP: Total routes in update: 2
IGRP: edition is now 4
IGRP: sending update to 255.255.255.255 via Serial1/2 (12.0.0.1)
IGRP: update contains 0 interior, 3 system, and 0 exterior routes.
IGRP: Total routes in update: 3
IGRP: sending update to 255.255.255.255 via Serial1/3 (13.0.0.1)
IGRP: update contains 0 interior, 3 system, and 0 exterior routes.
IGRP: Total routes in update: 3
IGRP: sending update to 255.255.255.255 via Loopback0 (1.1.1.1)
IGRP: update contains 0 interior, 4 system, and 0 exterior routes.
IGRP: Total routes in update: 4
R01#u all
All possible debugging has been turned off
R01#debug ip igrp transactions
IGRP protocol debugging is on
R01#clear ip route *
R01#
IGRP: broadcasting request on Serial1/2
IGRP: broadcasting request on Serial1/3
IGRP: broadcasting request on Loopback0
IGRP: received update from 13.0.0.3 on Serial1/3
subnet 13.0.0.0, metric 10476 (neighbor 8476)
network 3.0.0.0, metric 8976 (neighbor 501)
IGRP: edition is now 5
IGRP: sending update to 255.255.255.255 via Serial1/2 (12.0.0.1)
network 1.0.0.0, metric=501
network 3.0.0.0, metric=8976
network 13.0.0.0, metric=8476
IGRP: sending update to 255.255.255.255 via Serial1/3 (13.0.0.1)
network 1.0.0.0, metric=501
network 12.0.0.0, metric=8476
IGRP: sending update to 255.255.255.255 via Loopback0 (1.1.1.1)
network 3.0.0.0, metric=8976
network 12.0.0.0, metric=8476
network 13.0.0.0, metric=8476
IGRP: received update from 12.0.0.2 on Serial1/2
subnet 12.0.0.0, metric 10476 (neighbor 8476)
network 2.0.0.0, metric 8976 (neighbor 501)
IGRP: edition is now 6
IGRP: sending update to 255.255.255.255 via Serial1/2 (12.0.0.1)
network 1.0.0.0, metric=501
network 3.0.0.0, metric=8976
network 13.0.0.0, metric=8476
IGRP: sending update to 255.255.255.255 via Serial1/3 (13.0.0.1)
network 1.0.0.0, metric=501
network 2.0.0.0, metric=8976
network 12.0.0.0, metric=8476
IGRP: sending update to 255.255.255.255 via Loopback0 (1.1.1.1)
network 2.0.0.0, metric=8976
network 3.0.0.0, metric=8976
network 12.0.0.0, metric=8476
network 13.0.0.0, metric=8476
IGRP: sending update to 255.255.255.255 via Serial1/2 (12.0.0.1)
network 1.0.0.0, metric=501
network 3.0.0.0, metric=8976
network 13.0.0.0, metric=8476
IGRP: sending update to 255.255.255.255 via Serial1/3 (13.0.0.1)
network 1.0.0.0, metric=501
network 2.0.0.0, metric=8976
network 12.0.0.0, metric=8476
IGRP: sending update to 255.255.255.255 via Loopback0 (1.1.1.1)
network 2.0.0.0, metric=8976
network 3.0.0.0, metric=8976
network 12.0.0.0, metric=8476
network 13.0.0.0, metric=8476
R01#u all
All possible debugging has been turned off
//*通过三个debug命令,可以看出IGRP和RIPv1一样,属于广播式更新。且更新时不带子网掩码,属有类更新协议
上一篇:没有了
下一篇:为什么要使用三层交换机及其好处


