第二階段DM×××使用動態協議實現分支站點之間內網直接通訊
這裏使用EIGRP協議,主要配置以下:
R1#sho run int tun 0
Building configuration...
Current configuration : 293 bytes
interface Tunnel0
ip address 10.1.1.1 255.255.255.0
no ip redirects
no ip next-hop-self eigrp 100 //距離矢量型協議會進行矢量疊加,這裏要禁止修改下一跳
no ip split-horizon eigrp 100 // 關閉水平分割
ip nhrp authentication 123
ip nhrp map multicast dynamic
ip nhrp network-id 100
tunnel source Ethernet0/0
tunnel mode gre multipoint
tunnel key 100
End
R1#sho ip nhrp
10.1.1.2/32 via 10.1.1.2
Tunnel0 created 00:22:57, expire 01:37:49
Type: dynamic, Flags: unique registered
NBMA address: 100.2.28.2
10.1.1.3/32 via 10.1.1.3
Tunnel0 created 00:22:58, expire 01:38:07
Type: dynamic, Flags: unique registered
NBMA address: 100.3.38.3
R1#sho ip route
Gateway of last resort is 100.1.18.8 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 100.1.18.8
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback0
L 1.1.1.1/32 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/27008000] via 10.1.1.2, 00:36:10, Tunnel0
3.0.0.0/24 is subnetted, 1 subnets
D 3.3.3.0 [90/27008000] via 10.1.1.3, 00:36:12, Tunnel0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Tunnel0
L 10.1.1.1/32 is directly connected, Tunnel0
100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 100.1.18.0/24 is directly connected, Ethernet0/0
L 100.1.18.1/32 is directly connected, Ethernet0/0socket
R2#sho run int tun 0
Building configuration...
Current configuration : 289 bytes
interface Tunnel0
ip address 10.1.1.2 255.255.255.0
no ip redirects
ip nhrp authentication 123
ip nhrp map 10.1.1.1 100.1.18.1
ip nhrp map multicast 100.1.18.1
ip nhrp network-id 100
ip nhrp nhs 10.1.1.1
tunnel source Ethernet0/0
tunnel mode gre multipoint
tunnel key 100
Endide
R2#sho ip nhrp
10.1.1.1/32 via 10.1.1.1
Tunnel0 created 00:22:21, never expire
Type: static, Flags: used
NBMA address: 100.1.18.1
10.1.1.2/32 via 10.1.1.2
Tunnel0 created 00:19:02, expire 01:40:57
Type: dynamic, Flags: router unique local
NBMA address: 100.2.28.2
(no-socket)
10.1.1.3/32 via 10.1.1.3
Tunnel0 created 00:19:02, expire 01:40:57
Type: dynamic, Flags: router
NBMA address: 100.3.38.3 oop
R2#sho ip route
Gateway of last resort is 100.2.28.8 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 100.2.28.8
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/27008000] via 10.1.1.1, 00:37:57, Tunnel0
2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 2.2.2.0/24 is directly connected, Loopback0
L 2.2.2.2/32 is directly connected, Loopback0
3.0.0.0/24 is subnetted, 1 subnets
D 3.3.3.0 [90/28288000] via 10.1.1.3, 00:37:57, Tunnel0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Tunnel0
L 10.1.1.2/32 is directly connected, Tunnel0
100.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 100.2.28.0/24 is directly connected, Ethernet0/0
L 100.2.28.2/32 is directly connected, Ethernet0/0學習
R3#sho run int tun 0
Building configuration...
Current configuration : 289 bytes
interface Tunnel0
ip address 10.1.1.3 255.255.255.0
no ip redirects
ip nhrp authentication 123
ip nhrp map 10.1.1.1 100.1.18.1
ip nhrp map multicast 100.1.18.1
ip nhrp network-id 100
ip nhrp nhs 10.1.1.1
tunnel source Ethernet0/0
tunnel mode gre multipoint
tunnel key 100
Endui
R3#sho ip nhrp
10.1.1.1/32 via 10.1.1.1
Tunnel0 created 00:25:06, never expire
Type: static, Flags: used
NBMA address: 100.1.18.1
10.1.1.2/32 via 10.1.1.2
Tunnel0 created 00:22:05, expire 01:37:54
Type: dynamic, Flags: router
NBMA address: 100.2.28.2
10.1.1.3/32 via 10.1.1.3
Tunnel0 created 00:22:05, expire 01:37:54
Type: dynamic, Flags: router unique local
NBMA address: 100.3
R3#sho ip route
Gateway of last resort is 100.3.38.8 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 100.3.38.8
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/27008000] via 10.1.1.1, 00:38:11, Tunnel0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/28288000] via 10.1.1.2, 00:38:09, Tunnel0
3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 3.3.3.0/24 is directly connected, Loopback0
L 3.3.3.3/32 is directly connected, Loopback0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Tunnel0
L 10.1.1.3/32 is directly connected, Tunnel0
100.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 100.3.38.0/24 is directly connected, Ethernet0/0
L 100.3.38.3/32 is directly connected, Ethernet0/0router
R8#sho ip route
100.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 100.1.18.0/24 is directly connected, Ethernet0/0
L 100.1.18.8/32 is directly connected, Ethernet0/0
C 100.2.28.0/24 is directly connected, Ethernet0/1
L 100.2.28.8/32 is directly connected, Ethernet0/1
C 100.3.38.0/24 is directly connected, Ethernet0/2
L 100.3.38.8/32 is directly connected, Ethernet0/2blog
R2#traceroute 3.3.3.3 source 2.2.2.2 numeric
Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
1 10.1.1.3 1 msec * 1 msec //spoke(或分支)之間一跳可達接口
R3#traceroute 2.2.2.2 source 3.3.3.3 numeric
Type escape sequence to abort.
Tracing the route to 2.2.2.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.1.1.2 1 msec * 1 msec ip
注意:
一、 no ip next-hop-self eigrp 100 //EIGRP是距離矢量型協議,路由在路由器傳遞過程當中
會進行矢量疊加(修改),從而讓spoke在收到其餘spoke傳遞的路由時下一跳指向hub,
全部想要spoke之間直接通訊必須關閉hub接口上的方向修改功能。
二、no ip split-horizon eigrp 100 //spoke路由會在tunnel接口進出,違背水平分割原理,
致使spoke之間無法學習對方路由。關閉則消除。ci