650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/060552O24-0.png "title =" simple vpn .png "/>
The IP address range 192.168.1.0 can be pinged to the IP address range 192.168.2.0.
R1:
Conf ter
Int f1/0
Ip add 12.1.1.1255.255.255.0
No shu
Exit
Int loo 0
Ip add 192.168.1.1255.255.255.0
No shu
Exit
Int tunnel1 // create a tunnel Port
Tunnel source 12.1.1.1 // set the tunnel source Address
Tunnel des 23.1.1.2 // set the destination tunnel address
Ip add 10.1.1.1 255.255.255.0 // set the tunnel ip Address
No shu
Exit
Ip route192.168.2.0 255.255.255.0 tunnel 1 // set a static route
Ip route 0.0.0.0 0.0.0.0 f1/0 // sets the default route for mutual access between the Internet
R2:
Conf ter
Int f1/0
Ip add 12.1.1.22.16255.255.0
No shu
Int f1/1
Ip add 23.1.1.1255.20.255.0
No shu
Exit
R3:
Conf ter
Int f1/0
Ip add 23.1.1.22.16255.255.0
No shu
Int loo 0
Ip add 192.168.2.1255.255.255.0
No shu
Exit
Int tunnel3
Tunnel source 23.1.1.2
Tunnel des 12.1.1.1
Ip add11.1.1.1 255.255.255.0
No shu
Exit
Ip route192.168.1.0 255.255.255.0 tunnel 3
Ip route 0.0.0.0 0.0.0.0 f1/0
Exit
R1 # ping 192.168.2.1source 192.168.1.1
Type escape sequenceto abort.
Sending 5, 100-byteICMP Echos to 192.168.2.1, timeout is 2 seconds:
Packet sent with asource address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 324/420/584 MS
R3 # ping 192.168.1.1source 192.168.2.1
Type escape sequenceto abort.
Sending 5, 100-byteICMP Echos to 192.168.1.1, timeout is 2 seconds:
Packet sent with asource address of 192.168.2.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 324/448/636 MS