Simple vpn-small case of GRE Principle

Source: Internet
Author: User

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


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.