![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifblRDfr9L24TSSz1r9kX0W3oEIy6xEWBI6w_3hzGhz0xNWYJYPGsYpk1v6m597j0PWla1jTZfYOVxcEWXHZD62nzpNLmgNGf4scHocIxCUXZJgPQYQteMNSYIVdHPPcHqoDb2Cl7Qe-u8/s400/Site-to-Site.jpg)
Router PE1:
PE1(config)#ip route 172.16.2.0 255.255.255.252 192.168.1.2
PE1(config)#ip route 2.2.2.2 255.255.255.255 192.168.1.2
PE1(config)#ip route 4.4.4.4 255.255.255.255 192.168.1.2
PE1(config)#ip route 3.3.3.3 255.255.255.255 172.16.1.2
Router PE2:
PE2(config)#ip route 172.16.1.0 255.255.255.252 192.168.1.1
PE2(config)#ip route 1.1.1.1 255.255.255.255 192.168.1.1
PE2(config)#ip route 3.3.3.3 255.255.255.255 192.168.1.1
PE2(config)#ip route 4.4.4.4 255.255.255.255 172.16.2.2
Router CE1:
CE1(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.1
Step 1 :
CE1(config)# crypto isakmp policy 10
CE1(config-isakmp)# encryption 3des
CE1(config-isakmp)# group 2
CE1(config-isakmp)# hash sha
CE1(config-isakmp)# authentication pre-share
CE1(config-isakmp)# lifetime 3600
CE1(config-isakmp)# exit
CE1(config)# crypto isakmp key hadi address 172.16.2.2
Step 2 :
CE1(config)# crypto ipsec transform-set CE2 esp-3des esp-sha-hmac
CE1(cfg-crypto-trans)# mode tunnel
CE1(cfg-crypto-trans)# exit
CE1(config)# crypto ipsec security-association lifetime seconds 1200
Step 3 :
CE1(config)# ip access-list extended control
CE1(config-ext-nacl) # permit ip 10.10.10.0 0.0.0.255 10.20.20.0 0.0.0.255
CE1(config-ext-nacl) # exit
Step 4 :
CE1(config)# crypto map vpn70 10 ipsec-isakmp
CE1(config-cryto-map)# set peer 172.16.2.2
CE1(config-cryto-map)# set transform-set CE2
CE1(config-cryto-map)# match address control
CE1(config-cryto-map)#exit
Step 5 :
CE1(config)# interface fastethernet 0/0
CE1(config-if)# crypto map vpn70
CE1(config-if)# exit
Step 6 :
In this example I skipped this step. If you want you can apply this.
Router CE2:
CE2(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.1
Step 1 :
CE2(config)# crypto isakmp policy 10
CE2(config-isakmp)# encryption 3des
CE2(config-isakmp)# group 2
CE2(config-isakmp)# hash sha
CE2(config-isakmp)# authentication pre-share
CE2(config-isakmp)# lifetime 3600
CE2(config-isakmp)# exit
CE2(config)# crypto isakmp key hadi address 172.16.1.2
Step 2 :
CE2(config)# crypto ipsec transform-set CE1 esp-3des esp-sha-hmac
CE2(cfg-crypto-trans)# mode tunnel
CE2(cfg-crypto-trans)# exit
CE2(config)# crypto ipsec security-association lifetime seconds 1200
Step 3 :
CE2(config)# ip access-list extended controlA
CE2(config-ext-nacl) # permit ip 20.20.20.0 0.0.0.255 10.10.10.0 0.0.0.255
CE2(config-ext-nacl) # exit
Step 4 :
CE2(config)# crypto map vpn90 10 ipsec-isakmp
CE2(config-cryto-map)# set peer 172.16.1.2
CE2(config-cryto-map)# set transform-set CE1
CE2(config-cryto-map)# match address controlA
CE2(config-cryto-map)#exit
Step 5 :
CE2(config)# interface fastethernet 0/0
CE2(config-if)# crypto map vpn90
CE2(config-if)# exit
Step 6 :
In this example I skipped this step. If you want you can apply this.
Verify the VPN Service :
To verify the VPN Service use following command in CE1 or CE2 Router.
show crypto ipsec sa
show crypto isakmp sa
show crypto session
show crypto map
debug crypto ipsec
debug crypto isakmp
and ping from WKS-1 to WKS-2 and WKS-2 to WKS-1.