28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

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

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

Next, define a rule for the IKE SA. This recipe creates the rule named ike-rule. The<br />

rule in this recipe has two set term commands that are similar in syntax to a policy or<br />

firewall then statement. The first command sends matching packets to the remote<br />

end point of the IPSec tunnel (here, 10.0.15.2), and the second command associates<br />

the IKE policy with the SA so that matching packets can be sent across the IPSec tunnel.<br />

The final command in the IKE SA rule, set match-direction, specifies a match<br />

direction for marking which traffic to encrypt or decrypt. This statement is a bit confusing<br />

in the IPSec configuration because all IKE-enabled IPSec VPNs are bidirectional<br />

by default. However, you need to issue either this command or the set matchdirection<br />

command. The IKE SA rule is effectively a firewall filter, directing traffic<br />

into and out of the IPSec tunnel, so you don’t need to configure a separate firewall<br />

filter as you do when configuring the ES PIC.<br />

Next, configure IPSec. You do this by creating a service set that defines IPSec-specific<br />

information. (You can configure multiple services on a single AS PIC, each in its own<br />

service set.) The service set in this recipe is called ipsec-dynamic. The first command<br />

associates the IKE SA rule with IPSec, and the second command defines the address<br />

of the local end of the IPSec security tunnel. The last two commands configure the<br />

logical interfaces that participate in the IPSec services. The set next-hop-service<br />

inside-service-interface command configures the inward-facing interfaces, and the<br />

set next-hop-service outside-service-interface command configures the interface<br />

that faces the remote IPSec site. You configure these interfaces at the [edit<br />

interfaces] level. The final part of the IPSec configuration is to define an IPSec proposal<br />

and policy. This recipe uses the default values (see Table 3-1), so no configuration<br />

commands are required.<br />

For IPSec to work, you need to configure the interfaces on the AS PIC, which are services<br />

(sp-) interfaces. For J-series routers, configure the sp-0/0/0 interface. You also<br />

configure the physical interface that carries the IPSec tunnel.<br />

For the services interface, you configure logical interfaces. Each service interface has<br />

three logical interfaces. The first, unit 0, has no special configuration. You just set it<br />

to support IPv4 traffic (family inet). The other two logical interfaces handle the<br />

IPSec traffic. The first one, unit 1 in this recipe, is for inward-facing traffic (servicedomain<br />

inside); it is the logical interface you include in the set next-hop-service<br />

inside-service-interface command. The second logical interface, unit 2, is for<br />

outward-facing traffic; it is the one you include in the service outside-serviceinterface<br />

command.<br />

This recipe uses the so-0/0/1 interface to carry the IPSec tunnel.<br />

To direct traffic from the local domain into the IPSec tunnel, include the services<br />

interface when configuring the IGP. This recipe uses OSPF and adds the services<br />

interface with the set interface sp-1/2/1 command.<br />

118 | Chapter 3: IPSec<br />

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

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

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

Saved successfully!

Ooh no, something went wrong!