单边界多向路由重分布

R1的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
!
interface Loopback0
description Directly
ip address 1.1.1.1 255.255.255.0
!
interface Ethernet0/0
description RIP
ip address 192.168.12.1 255.255.255.0
half-duplex
!
interface Ethernet0/1
description EIGRP
ip address 192.168.13.1 255.255.255.0
half-duplex
!
interface Ethernet0/2
description OSPF
ip address 192.168.14.1 255.255.255.0
half-duplex
!
interface Ethernet0/3
description IS-IS
ip address 192.168.15.1 255.255.255.0
ip router isis
half-duplex
!
interface Serial1/0
description Default
ip address 202.100.100.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet2/0
description Static
ip address 172.168.1.1 255.255.255.0
duplex auto
speed auto
!--注②
router eigrp 1
redistribute connected
redistribute static
redistribute isis level-1-2 metric 1000 100 255 1 1500
redistribute rip metric 1000 100 255 1 1500
redistribute ospf 1 metric 1000 100 255 1 1500
network 192.168.13.0
no auto-summary
!--注③
router ospf 1
log-adjacency-changes
redistribute connected subnets
redistribute static subnets
redistribute isis level-1-2 subnets
redistribute rip subnets
redistribute eigrp 1 subnets
network 192.168.14.0 0.0.0.255 area 0
default-information originate
!--注④
router isis
net 49.0001.1111.1111.1111.00
redistribute connected
redistribute static ip
redistribute rip
redistribute eigrp 1
redistribute ospf 1
default-information originate
!--注①
router rip
version 2
redistribute connected metric 6
redistribute static
redistribute isis level-1-2 metric 5
redistribute eigrp 1 metric 3
redistribute ospf 1 metric 4
network 192.168.12.0
default-information originate
no auto-summary
!
ip route 0.0.0.0 0.0.0.0 202.100.100.2
ip route 172.168.100.0 255.255.255.0 172.168.1.2

注①:向R2的RIP协议注入静态路由、默认路由、直连路由、EIGRP、OSPF、ISIS,在向RIP区域重分布路由的时候,必须指定度量值,否则由于注入的路由度量值会变成无穷大而无法加入路由表,因此必须手工指定meric值,注意RIP的meric不能大于15,因为RIP最大跳数为16,可以通过“default-metric”设置默认种子度量值,只有重分布静态路由或默认路由可以不指定种子度量值。

注②:向R3的EIGRP路由协议注入静态路由、默认路由、直连路由、RIP、OSPF、ISIS,由于重分布到EIGRP的路由管理距离会变成无限大,所以必须手工分别设置带宽、延迟、可靠性、负载以及MTU的参数值。在“Redistribute”命令中用参数“metric”指定的种子度量值优先于在路由模式下使用“default-metric”命令设
定的默认的种子度量值。注意静态、默认、直连不需要指定metric值。

注③:向R4的OSPF路由协议注入静态路由、默认路由、直连路由、RIP、EIGRP、ISIS,重发布时管理距离为110且metric为20,当然也可以通过“metric-type”设置类型,或者“metric”参数设置外部路径成本。注意在向OSPF重发布是需要加上“subnets”,否则只重发布主类网。

注④:向R4的ISIS路由协议诸如静态路由、默认路由、直连路由、RIP、EIGRP、ISIS,重发布时管理距离为115且metric为10.当把其他路由协议重分发到ISIS中时,必须使用level-2类型,默认就是level-2。

R2的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
!
interface Loopback0
description RIP
ip address 2.2.2.2 255.255.255.0
!
interface Ethernet0/0
description RIP
ip address 192.168.12.2 255.255.255.0
half-duplex
!
router rip
version 2
network 2.0.0.0
network 192.168.12.0
no auto-summary

R3的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
!
interface Loopback0
description EIGRP
ip address 3.3.3.3 255.255.255.0
!
interface Ethernet0/1
description EIGRP
ip address 192.168.13.2 255.255.255.0
half-duplex
!
router eigrp 1
network 3.0.0.0
network 192.168.13.0
auto-summary

R4的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
!
interface Loopback0
description OSPF
ip address 4.4.4.4 255.255.255.0
!
interface Ethernet0/2
description OSPF
ip address 192.168.14.2 255.255.255.0
half-duplex
!
router ospf 1
log-adjacency-changes
network 4.4.4.0 0.0.0.255 area 0
network 192.168.14.0 0.0.0.255 area 0

R5的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
!
interface Loopback0
description IS-IS
ip address 5.5.5.5 255.255.255.0
ip router isis
!
interface Ethernet0/3
description IS-IS
ip address 192.168.15.2 255.255.255.0
ip router isis
half-duplex
!
router isis
net 49.0001.5555.5555.5555.00

Branch的配置:

1
2
3
4
5
6
7
8
9
10
!
interface Loopback0
ip address 172.168.100.1 255.255.255.0
!
interface FastEthernet2/0
ip address 172.168.1.2 255.255.255.0
duplex auto
speed auto
!
ip route 0.0.0.0 0.0.0.0 172.168.1.1

Internet的配置:

1
2
3
4
5
6
7
8
9
interface Loopback0
ip address 10.10.10.10 255.255.255.0
!
interface Serial1/0
ip address 202.100.100.2 255.255.255.0
serial restart-delay 0
clock rate 64000
!
ip route 0.0.0.0 0.0.0.0 202.100.100.1