28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

networks, it does not scale well. As the network size increases, having IPSec dynamically<br />

configure SAs is a better option (see Recipe 3.2).<br />

The SA is bidirectional, so the same encryption and authentication keys are used on<br />

incoming and outgoing traffic through the IPSec tunnel. To use different keys in each<br />

direction, use the set direction inbound and set direction outbound commands.<br />

To start, define the SA. Because you have two routers acting as the security gateways<br />

between your two sites, you use tunnel mode. For the other SA parameters, this<br />

example chooses to use both the AH and ESP protocols (specified with the protocol<br />

bundle statement), HMAC-SHA1-96 authentication, DES-CBC encryption, and a SPI<br />

value of 400. The auxiliary SPI is needed because we are using both AH and ESP.<br />

Both security gateway routers must have the same SA configuration.<br />

Next, you create a firewall filter to accept traffic returning from the remote site and<br />

you apply it to the ES interface. You need to set up similar firewall filters on the<br />

remote security gateway router.<br />

Finally, you configure the router interfaces. On the ES interface facing the remote<br />

security gateway router, configure the tunnel on the logical unit, and for the IPv4<br />

protocol family, associate the SA and apply the traffic-out-of-ipsec-tunnel filter.<br />

Set up the remote router in a similar fashion.<br />

Use the following command to verify that the SA is active:<br />

aviva@router1> show ipsec security-associations detail<br />

Security association: site1-site2, Interface family: Up<br />

Local gateway: 10.0.12.33, Remote gateway: 10.0.97.62<br />

Local identity: ipv4_subnet(any:0,[0..7]=0.0.0.0/0)<br />

Remote identity: ipv4_subnet(any:0,[0..7]=0.0.0.0/0)<br />

Direction: inbound, SPI: 400, AUX-SPI: 400<br />

Mode: tunnel, Type: manual, State: Installed<br />

Protocol: BUNDLE, Authentication: hmac-sha1-96, Encryption: des-cbc<br />

Anti-replay service: Disabled<br />

Direction: outbound, SPI: 400, AUX-SPI: 400<br />

Mode: tunnel, Type: manual, State: Installed<br />

Protocol: BUNDLE, Authentication: hmac-sha1-96, Encryption: des-cbc<br />

Anti-replay service: Disabled<br />

The first line shows that the SA is active (Up), and you see that the inbound and outbound<br />

SAs are installed. This command also shows the configured SA parameters.<br />

You can check the status of the IPSec tunnel with the ping and traceroute commands.<br />

You should be able to ping a system at the remote site:<br />

aviva@router1> ping 10.0.97.2<br />

PING 10.0.97.2 (10.0.97.2): 56 data bytes<br />

64 bytes from 10.0.97.2: icmp_seq=0 ttl=253 time=0.939 ms<br />

64 bytes from 10.0.97.2: icmp_seq=1 ttl=253 time=0.886 ms<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.<br />

Configuring IPSec | 109

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

Saved successfully!

Ooh no, something went wrong!