R1配置:interface Loopback1
ip address 192.168.1.1 255.255.255.0
no keepalive
!
interface Tunnel1
ip address 1.1.1.2 255.255.255.252
ip nhrp authentication cisco
ip nhrp map multicast 172.0.1.1
ip nhrp map 1.1.1.1 172.0.1.1
ip nhrp network-id 10000
ip nhrp holdtime 60
ip nhrp nhs 1.1.1.1
tunnel source 172.0.0.1
tunnel destination 172.0.1.1
tunnel key 10000
!
interface FastEthernet0
no ip address
speed auto
!
interface Serial0
ip address 172.0.0.1 255.255.255.0
no keepalive
clockrate 2000000
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.0.0.2
ip route 192.168.2.0 255.255.255.0 Tunnel1
no ip http server
R2配置:
interface Ethernet0
ip address 172.0.1.2 255.255.255.0
no ip directed-broadcast
no keepalive
!
interface Ethernet1
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0
ip address 172.0.0.2 255.255.255.0
no ip directed-broadcast
no ip mroute-cache
no keepalive
!
interface Serial1
no ip address
no ip directed-broadcast
shutdown
!
ip classless
ip route 192.168.1.0 255.255.255.0 172.0.0.1
ip route 192.168.2.0 255.255.255.0 172.0.1.1
!
R3配置:
interface Tunnel1
ip address 1.1.1.1 255.255.255.252
no ip redirects
ip nhrp authentication cisco
ip nhrp map multicast dynamic
ip nhrp network-id 10000
ip nhrp holdtime 60
tunnel source 172.0.1.1
tunnel mode gre multipoint
tunnel key 10000
!
interface Loopback1
ip address 192.168.2.2 255.255.255.0
!
interface FastEthernet0
ip address 172.0.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1
no ip address
duplex auto
speed auto
!
interface BRI0
no ip address
encapsulation hdlc
shutdown
!
interface FastEthernet2
!
interface FastEthernet3
!
interface FastEthernet4
!
interface FastEthernet5
!
interface FastEthernet6
!
interface FastEthernet7
!
interface FastEthernet8
!
interface FastEthernet9
!
interface Vlan1
no ip address
!
ip route 0.0.0.0 0.0.0.0 172.0.1.2
ip route 192.168.1.0 255.255.255.0 Tunnel1
!