第一步:配置R1 interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Tunnel1 ip address 10.0.0.1 255.255.255.0 tunnel source FastEthernet0/0 tunnel destination 23.0.0.3 ! interface FastEthernet0/0 ip address 12.0.0.1 255.255.255.0 ! router eigrp 1 network 12.0.0.0 no auto-summary ! router eigrp 11 network 1.0.0.0 network 10.0.0.0 no auto-summary //这里启用了2个eigrp进程,在第一个进程里没可以全部通告(直接通告直连的路由),不然1.1.1.1 去3.3.3.3走物理接口,而不是tunnel, R3上同理 第二步:配置R2 interface Loopback0 ip address 2.2.2.2 255.255.255.0 ! interface FastEthernet0/0 ip address 12.0.0.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 23.0.0.2 255.255.255.0 ! router eigrp 1 network 12.0.0.0 network 23.0.0.0 no auto-summary 第三步:配置R3 interface Loopback0 ip address 3.3.3.3 255.255.255.0 ! interface Tunnel1 ip address 10.0.0.2 255.255.255.0 tunnel source FastEthernet0/1 tunnel destination 12.0.0.1 ! interface FastEthernet0/1 ip address 23.0.0.3 255.255.255.0 duplex auto speed auto ! router eigrp 1 network 23.0.0.0 no auto-summary ! router eigrp 11 network 3.0.0.0 network 10.0.0.0 no auto-summary

*May 13 15:18:07.431: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to up *May 13 15:18:07.459: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 11: Neighbor 10.0.0.2 (Tunnel1) is up: new adjacency //从上面两句消息中,我们可以看到tunnel up了 第四步:测试,我们只在R1上进行测试 R1# sh ip route Codes: 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

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 3.0.0.0/24 is subnetted, 1 subnets D 3.3.3.0 [90/297372416] via 10.0.0.2, 00:21:00, Tunnel1 //下一跳去10.0.0.2 23.0.0.0/24 is subnetted, 1 subnets D 23.0.0.0 [90/30720] via 12.0.0.2, 00:29:41, FastEthernet0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.0.0.0 is directly connected, Tunnel1 12.0.0.0/24 is subnetted, 1 subnets C 12.0.0.0 is directly connected, FastEthernet0/0

R1#traceroute 3.3.3.3 so 1.1.1.1

Type escape sequence to abort. Tracing the route to 3.3.3.3

1 10.0.0.2 104 msec * 84 msec //这里我们可以看到从隧道里通过