12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Network Configuration—TunnelingTunnel ModeThere are a few steps involved in creating an IPSec tunnel between two hosts. Now,suppose you have two networks in two different places that are connected to theInternet and you now want to interconnect both sites using the IPSec tunnel.The first step is to create a simple tunnel between the two sites.The gif(4) virtual interface offers basic IP over IP tunneling which is compatiblewith both the IPv4 and IPv6 protocol stacks. A gif(4) interface can be deployed likea gre(4) interface, as described earlier in this chapter.For example, on Router A, you may use this setup:# ifconfig gif0 create# ifconfig gif0 tunnel 4.4.4.1 5.5.5.1# ifconfig gif0 192.168.4.1 192.168.5.1 netmask 255.255.255.0On the Router B, you should deploy the same configuration, but the source anddestination IP addresses should be swapped:# ifconfig gif0 create# ifconfig gif0 tunnel 5.5.5.1 4.4.4.1# ifconfig gif0 192.168.5.1 192.168.4.1 netmask 255.255.255.0The tunneling with the gif(4) interface without encryption should be up andrunning. You may verify this by using the ping utility and test the reach ability ofthe IP address on gif interface of the opposite site:# ping -o 192.168.5.1PING 192.168.5.1 (192.168.5.1): 56 data bytes64 bytes from 192.168.5.1: icmp_seq=0 ttl=64 time=7.200 ms[ 138 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!