vpn and tunnel concept with ip-in-ip tunnel configuration · ipip gre eoip l2tp pptp layer3 tunnel...

21
VPN and Tunnel concept with IP-in-IP tunnel configuration www.netrotik.com Armenia MUM 2017

Upload: others

Post on 15-Mar-2020

29 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

VPN and Tunnel concept with IP-in-IP tunnel configurationIP-in-IP tunnel configuration

www.netrotik.com

Armenia MUM 2017

Page 2: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Presenter Information

Amin Hamidi Younessi

MikroTik Certified Trainer

: amin.younessi

: amin.younessi: amin.younessi

: [email protected] , [email protected]

www.netrotik.com

Page 3: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Presentation topics:

• Fundamentals of VPN technology.

• Benefits of Tunnels.

• Types of Tunnels.

• IP-in-IP configuration between MikroTik and • IP-in-IP configuration between MikroTik and Cisco Routers.

www.netrotik.com

Page 4: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

What is VPN?

• Virtual Private Network.

• VPN transmits data by means of tunneling.

• Both tunnel endpoints need to support the same protocol.same protocol.

• Tunneling protocols are operate at either OSI layer 2 or layer3.

www.netrotik.com

Page 5: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Benefits of Tunnels

• Decrease cost.

• Scalability.

• Confidentiality.

• Authentication.• Authentication.

• Data Integrity.

• Anti-reply.

www.netrotik.com

Page 6: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Two Main Types of Tunnels

• Remote-access tunnels(as known as VPN)

• Site-to-site tunnels

www.netrotik.com

Page 7: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Remote access sample

Internet

Central Office:public: 100.1.1.20/24Local: 192.168.1.1/24PPTP Tunnel

www.netrotik.com

172.16.1.2/32

172.16.1.1/32

Page 8: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Site-to-site sample

Internet

GRE Tunnel

www.netrotik.com

PC1 PC2

R1 R2

GRE Tunnel

Page 9: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Types of Tunnels:

IPIP GRE EOIP L2TP PPTP

layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel

www.netrotik.com

layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel

4 for ipv4 and 41

for ipv6

IP protocol

number 47

IP protocol

number 47

1701 UDP 1723 TCP

Page 10: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

IP-in-IP Tunnel mechanism

• The IPIP tunnel is a simple protocol that encapsulates IP packets in IP to make a tunnel between two routers.

Outer IP Header Inner IP Header IP Payload

Page 11: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

GRE Tunnel mechanism

Outer IP Header Inner IP Header IP PayloadGRE Header

• The GRE header is variable in length, from 4 to 16 bytes, depending on

Sequence Number

Key

Checksum Reserved

C K S Reserved Ver Protocol

• The GRE header is variable in length, from 4 to 16 bytes, depending onwhich optional features have been enabled.

Page 12: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

IP-in-IP tunnel Scenario

Cisco-1841 MikroTik-hAP

LAN-Address:Fa0/0 : 192.168.1.1/24

Fa 0/1

LAN-Address:Ether1: 192.168.2.1/24

Public IP: 100.1.2.2/30 Public IP: 100.1.1.2/30

Ether2

IP-in-IP TunnelTunnel IP address:172.16.1.1/30

Tunnel IP address:172.16.1.2/30

Internet

www.netrotik.com

Fa0/0 : 192.168.1.1/24 Ether1: 192.168.2.1/24

IP: 192.168.2.2GW: 192.168.2.1

IP: 192.168.1.2GW:192.168.1.1

A B

Page 13: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Steps:

• Configuring the IP addresses

– MikroTik:

– Cisco:

www.netrotik.com

Page 14: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

• Add default route:

– MikroTik:

– Cisco:– Cisco:

www.netrotik.com

Page 15: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

• Source NAT for direct clients to the internet

– MikroTik :

– Cisco

www.netrotik.com

Page 16: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

• IPIP Tunnel configuration:

www.netrotik.com

Your public address

Your partner address Your public address

Your partner address

Page 17: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

• Setting IP address on tunnel interface

www.netrotik.com

Page 18: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

• Now it’s time to verifying connections

– ping pc A from pc B

– Trace route result from pc B

www.netrotik.com

Other side of tunnel

Page 19: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

• Look at Tunnel Traffic

www.netrotik.com

Page 20: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Summary

There is an increasing demand nowadays to connect to internal networks fromdistant locations. Employees often need to connect to internal private networksover the Internet (which is by nature insecure) from home, hotels, airports orfrom other external networks. Security becomes a major consideration whenstaff or business partners have constant access to internal networks fromstaff or business partners have constant access to internal networks frominsecure external locations.

VPN (Virtual Private Network) technology provides a way of protectinginformation being transmitted over the Internet, by allowing users to establish avirtual private “tunnel” to securely enter an internal network, accessingresources, data and communications via an insecure network such as theInternet.

www.netrotik.com

Page 21: VPN and Tunnel concept with IP-in-IP tunnel configuration · IPIP GRE EOIP L2TP PPTP layer3 tunnel layer 3 tunnel layer 2 tunnel layer 2 tunnel layer2 tunnel 4 for ipv4 and 41 for

Thank you

www.netrotik.com

Thank you