Warning: Declaration of Suffusion_MM_Walker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /homepages/5/d692508392/htdocs/clickandbuilds/l3switching/wp-content/themes/suffusion/library/suffusion-walkers.php on line 39
May 062012

All communication between H1 and H2 must be protected with IPsec.

Tasks to do

  • Classify interesting traffic
  • Create ISAKMP policy and shared key for Phase 1
  • Create IPsec Transform set for Phase 2
  • Create a crypto map and apply crypto map to interface

Step 1: The Traffic which has to be protected with IPsec must be classified with an ACL. We can now create an ACL which matches packets between the and networks.

R1(config)#ip access-list extended PROTECTED_TRAFFIC
R1(config-ext-nacl)# permit ip

Step 2: We have to create an ISAKMP Policy for the Phase 1. Here we define the DH group, encryption algorithm, authentication method, hashing method etc. There could be many policies configured, only the matching policy one on both sides will be used.

R1(config)#crypto isakmp policy 10
R1(config-isakmp)# encryption aes
R1(config-isakmp)# authentication pre-share
R1(config-isakmp)# group 2

As we are using a shared key for authentication, we have to define it.

R1(config)#crypto isakmp key cisco address

Step 3: Now we can configure the Transform set for IKE Phase 2. There could be many policies for Phase 2 transform set. When the routers find a match they use that particular transform set.

R1(config)#crypto ipsec transform-set TRANS1 esp-aes esp-sha-hmac

Step 4: Finally we can create a crypto map and apply it to an interface. A crypto map combines the ACL with the Transform set. Then at last the crypto map is applied to the interface.

R1(config)#crypto map INT_F0/0 10 ipsec-isakmp
% NOTE: This new crypto map will remain disabled until a peer
and a valid access list have been configured.

R1(config-crypto-map)# set peer
R1(config-crypto-map)# set transform-set TRANS1
R1(config-crypto-map)# match address PROTECTED_TRAFFIC

R1(config)#interface FastEthernet0/0
R1(config-if)# ip address
R1(config-if)# crypto map INT_F0/0

We could verify the status of the security associations. We could also see the packets which are protected with IPsec. The state QM_IDLE means Quick Mode is in idle which implies IPsec in operation.

R1#sh crypto isakmp sa
dst             src             state          conn-id slot status       QM_IDLE           1003    0 ACTIVE


R1#sh crypto ipsec sa

interface: FastEthernet0/0
    Crypto map tag: INT_F0/0, local addr

   protected vrf: (none)
   local  ident (addr/mask/prot/port): (
   remote ident (addr/mask/prot/port): (
   current_peer port 500
     PERMIT, flags={origin_is_acl,}
    #pkts encaps: 23, #pkts encrypt: 23, #pkts digest: 23
    #pkts decaps: 26, #pkts decrypt: 26, #pkts verify: 26
    #pkts compressed: 0, #pkts decompressed: 0
    #pkts not compressed: 0, #pkts compr. failed: 0
    #pkts not decompressed: 0, #pkts decompress failed: 0
    #send errors 3, #recv errors 0

     local crypto endpt.:, remote crypto endpt.:
     path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0
     current outbound spi: 0x0(0)

     inbound esp sas:

     inbound ah sas:

     inbound pcp sas:

     outbound esp sas:

     outbound ah sas:

     outbound pcp sas: