Archive for the ‘Cisco Dynamips Exams’ Category

A) What you need:
Minimum requirements are:
- Dynagen
- Dynamips
- Pemu Binaries
- A Linux host (either real host or inside vmware) to run pemu. Real host recommended for reasons of performance.
- The Linux could be any distro as long as tap interfaces are supported. I tested the lab on OpenSUSE 10.2. Python and pcap are also required for Dynagen and Dynamips.

B) Lab Layout:
The lab consists of five PIX firewalls, six Cisco routers and 2 switches. (Cisco 2660+NM-16ESW)
The lab diagram is attached. The first one is the physical layout and the second one is the logical layout I use. Since the routers are connected to the switches (not directly to the PIXes) you have flexibility in your lab; for example you could have four zones with 1 router in each zone (logical diagram) or have two zones and each zone with two routers.

C) Running Pemu:
I have placed all the Pemu files in /pemu and run the PIX instances as follows:
Quote:

cd /pemu
# Running PIX 1
sudo ./pemu -no-kqemu \
-net nic,vlan=10,macaddr=00:a0:00:01:00:aa -net tap,vlan=10,script=ifup,ifname=tap10 \
-net nic,vlan=11,macaddr=00:a0:00:01:01:aa -net tap,vlan=11,script=ifup,ifname=tap11 \
-net nic,vlan=12,macaddr=00:a0:00:01:02:aa -net tap,vlan=12,script=ifup,ifname=tap12 \
-net nic,vlan=13,macaddr=00:a0:00:01:03:aa -net tap,vlan=13,script=ifup,ifname=tap13 \
-net nic,vlan=14,macaddr=00:a0:00:01:04:aa -net tap,vlan=14,script=ifup,ifname=tap14 -serial telnet::2051,server,nowait -m 128 FLASH.1

Quote:

cd /pemu
# Running PIX 2
sudo ./pemu -no-kqemu \
-net nic,vlan=20,macaddr=00:a0:00:02:00:aa -net tap,vlan=20,script=ifup,ifname=tap20 \
-net nic,vlan=21,macaddr=00:a0:00:02:01:aa -net tap,vlan=21,script=ifup,ifname=tap21 \
-net nic,vlan=22,macaddr=00:a0:00:02:02:aa -net tap,vlan=22,script=ifup,ifname=tap22 \
-net nic,vlan=23,macaddr=00:a0:00:02:03:aa -net tap,vlan=23,script=ifup,ifname=tap23 \
-net nic,vlan=24,macaddr=00:a0:00:02:04:aa -net tap,vlan=24,script=ifup,ifname=tap24 -serial telnet::2052,server,nowait -m 128 FLASH.2

Since I wanted PIX-3 to be a layer 2 firewall, two interfaces would be anough:
Quote:

cd /pemu
# Running PIX 3
sudo ./pemu -no-kqemu \
-net nic,vlan=30,macaddr=00:a0:00:03:00:aa -net tap,vlan=30,script=ifup,ifname=tap30 \
-net nic,vlan=31,macaddr=00:a0:00:03:01:aa -net tap,vlan=31,script=ifup,ifname=tap31 -serial telnet::2053,server,nowait -m 128 FLASH.3

Quote:

cd /pemu
# Running PIX 4
sudo ./pemu -no-kqemu \
-net nic,vlan=40,macaddr=00:a0:00:04:00:aa -net tap,vlan=40,script=ifup,ifname=tap40 \
-net nic,vlan=41,macaddr=00:a0:00:04:01:aa -net tap,vlan=41,script=ifup,ifname=tap41 \
-net nic,vlan=42,macaddr=00:a0:00:04:02:aa -net tap,vlan=42,script=ifup,ifname=tap42 \
-net nic,vlan=43,macaddr=00:a0:00:04:03:aa -net tap,vlan=43,script=ifup,ifname=tap43 -serial telnet::2054,server,nowait -m 128 FLASH.4

Quote:

cd /pemu
# Running PIX 5
sudo ./pemu -no-kqemu \
-net nic,vlan=50,macaddr=00:a0:00:05:00:aa -net tap,vlan=50,script=ifup,ifname=tap50 \
-net nic,vlan=51,macaddr=00:a0:00:05:01:aa -net tap,vlan=51,script=ifup,ifname=tap51 \
-net nic,vlan=52,macaddr=00:a0:00:05:02:aa -net tap,vlan=52,script=ifup,ifname=tap52 \
-net nic,vlan=53,macaddr=00:a0:00:05:03:aa -net tap,vlan=53,script=ifup,ifname=tap53 -serial telnet::2055,server,nowait -m 128 FLASH.5

The tap interfaces have been numbered as tapXY where X is the PIX number (1-5) and Y is the interface number on the PIX. Ethernet 3 (Y=3) on PIX-2 (X=2) would be tap23.
Note that each instance of pemu, has a seprate FLASH file (FLASH.X) and unique MAC addresses” onclick=”tagshow(event)” class=”t_tag”>addresses have been used for the interfaces.

There is no need to initialize the Ethernet1 interface before Ethernet0 in pemu (like what was required in pixemu).

-serial telnet::2051,server,nowait redirects the PIX console to a telnet server on TCP port 2051. Besides that it looks what you have seen with Dynamips/Dynagen, when connecting to the console via telnet, Ctrl+Z and Ctrl+C won’t stop the pixemu process. (although I prefer the telnet server since it allows me to remotely connect to the PIX console, this is the ONLY way I could prevent pixemu to stop when pressing Ctrl+Z)

The console port on each PIX in the lab is setup on telnet server on TCP port 205X:
Code:
telnet localhost 2051

As you could see, the script for all the tap interfaces is ifup (changed in pemu). This script looks for ifup.ini. You could assign ANY IP address to your tap interfaces since I don’t use the tap IPs in my lab. My ifup.ini looks like this:
Code:

tap10 10.1.0.100 255.255.255.0
tap11 10.1.1.100 255.255.255.0
tap12 10.1.2.100 255.255.255.0
tap13 10.1.3.100 255.255.255.0
tap14 10.1.4.100 255.255.255.0
tap20 10.2.0.100 255.255.255.0
tap21 10.2.1.100 255.255.255.0
tap22 10.2.2.100 255.255.255.0
tap23 10.2.3.100 255.255.255.0
tap24 10.2.4.100 255.255.255.0
tap30 10.3.0.100 255.255.255.0
tap31 10.3.1.100 255.255.255.0
tap40 10.4.0.100 255.255.255.0
tap41 10.4.1.100 255.255.255.0
tap42 10.4.2.100 255.255.255.0
tap43 10.4.3.100 255.255.255.0
tap50 10.5.0.100 255.255.255.0
tap51 10.5.1.100 255.255.255.0
tap52 10.5.2.100 255.255.255.0
tap53 10.5.3.100 255.255.255.0

D) Creating the Dynagen Network Configuration File:
My Dynagen configuration file comes bellow:
Quote:

autostart = false
# ***********************************************************************************************************************
#********************************************* Global Options for Instance 1 *****************************************
# ***********************************************************************************************************************
[localhost:7200]
debug = 0
#
ghostios = true
ghostsize = 128
idlemax = 1500
idlesleep = 30
model = 3660 # The default router model for all routers in this lab
console = 2000
#
workingdir = /windows/d/My Labs/pix-lab2
#
udp = 10000
#
# ***********************************************************************************************************************
# *************** This section specifies defaults for all routers on this Dynamips server. *****************
# ***********************************************************************************************************************
[[3660]]
image = /windows/d/My Labs/IOS/unzipped/c3660-jk9o3s-mz.123-21.extracted.bin
ram = 96 # Amount of Virtual RAM to allocate to each router instance.
rom = 4 # Size of ROM
nvram = 256 # Size of NVRAM
disk0 = 0 # Set size of PCMCIA ATA disk0
# disk1 = 64 # Set size of PCMCIA ATA disk1
cnfg = None
confreg = 0×2102
mmap = false # Set to false to use real memory rather than a disk file for router vitural memory. Conserves RAM at the expense of performance. Defaults to True

[[7200]]
image = /windows/d/My Labs/IOS/unzipped/c7200-jk9o3s-mz.123-22.extracted.bin
ram = 128 # Amount of Virtual RAM to allocate to each router instance.
rom = 4 # Size of ROM
nvram = 256 # Size of NVRAM
npe = npe-400
disk0 = 0 # Set size of PCMCIA ATA disk0
# disk1 = 64 # Set size of PCMCIA ATA disk1
cnfg = None
confreg = 0×2102 # Set the configuration register
mmap = false # Set to false to use real memory rather than a disk file for router vitural memory. Conserves RAM at the expense of performance. Defaults to True

# ***********************************************************************************************************************
# *************** Router Specific Configurations *****************
# ***********************************************************************************************************************
[[ROUTER R0]]
model = 3660
console = 2000
slot1 = NM-4T
F0/1 = NIO_linux_eth:eth1 # This is where your host (PC) connects to the lab.

[[ROUTER R1]]
model = 3660
console = 2001
slot1 = NM-4T
F0/1 = NIO_linux_eth:tap31

[[ROUTER R2]]
model = 3660
console = 2002
slot1 = NM-4T

[[ROUTER R3]]
model = 3660
console = 2003
slot1 = NM-4T

[[ROUTER R4]]
model = 3660
console = 2004
slot1 = NM-4T
F0/1 = NIO_linux_eth:tap30

[[ROUTER R5]]
model = 3660
console = 2005
slot1 = NM-4T

#*************************************************
#********** Ethernet Switches **********
#*************************************************

[[ROUTER SW1]]
model = 3660
console = 2011
mmap = true
slot1 = NM-16ESW

F1/0 = R0 F0/0
F1/1 = R1 F0/0
F1/2 = R2 F0/0
F1/3 = R3 F0/0

#***** PIX2 Interfaces *****
F1/5 = NIO_linux_eth:tap20
F1/6 = NIO_linux_eth:tap21
F1/7 = NIO_linux_eth:tap22
F1/8 = NIO_linux_eth:tap23
F1/9 = NIO_linux_eth:tap24

#***** PIX1 Interfaces *****
F1/10 = NIO_linux_eth:tap10
F1/11 = NIO_linux_eth:tap11
F1/12 = NIO_linux_eth:tap12
F1/13 = NIO_linux_eth:tap13
F1/14 = NIO_linux_eth:tap14

#
#
#
[[ROUTER SW2]]
model = 3660
console = 2012
mmap = true
slot1 = NM-16ESW

F1/4 = R4 F0/0
F1/5 = R5 F0/0

#***** PIX4 Interfaces *****
F1/0 = NIO_linux_eth:tap40
F1/1 = NIO_linux_eth:tap41
F1/2 = NIO_linux_eth:tap42
F1/3 = NIO_linux_eth:tap43

#***** PIX5 Interfaces *****
F1/10 = NIO_linux_eth:tap50
F1/11 = NIO_linux_eth:tap51
F1/12 = NIO_linux_eth:tap52
F1/13 = NIO_linux_eth:tap53
#
#
#

Note that FastEthernet0/1 on R0 (PC A in the Diagram) is connected to eth1 (my Ethernet interface). This is to connect your PC(Host) to the lab. Since I am using two 3660 Router with NM-16ESW as switches, there is no need for the bridge program. No troubles with libpcap0.8 anymore !
You could edit the config the connect the eth1 to some other place in your lab like PC B.

E) Run your Lab!
Assuming that pemu is still running, you have to run your lab:
Code:

sudo dynamips -H 7200
dynagen pix-lab2.net

NOTE:
Since dynagen uses the tap interfaces in the config, they have to exist before you reference them, meaning that you have to run pemu before running dynagen!. Also if you don’t want to run the entire lab, for example if you don’t want the Failover PIXes (PIX2 and PIX 4), you have to comment out the corresponding conigurations form the dynagen network file.

F) FAQ:
Q. I Want to use Windows as my Host PC, can i run pemu in Windows? (logic seems OK, and I have partially tested it, but need feedback)
A. No. So far a stable version of Win32 pemu doesn’t exist. But you could run Linux in VMware and run Pemu in the Linux and connect VMware to your rest of your lab running on Windows with Cygwin. You have to setup VMWARE to bridge the guest traffic to the real network and then, in dynagen, connect your real interface to a device (Router). Your Pemu instance would communicate with the rest of your lab like this:

Pemu <---|tap Interface|---> Linux Eth0 <---|VMware Bridged|---> Real Interface <------> Router Interface on Dynagen

For example, if you want to connect a Router in windows to your pemu in Linux(run in VMware), your configuration would be something like bellow:
Dynagen Configuration:
Code:

[[ROUTER R4]]
model = 7200
console = 2004
slot1 = PA-4T
s1/0 = F1 4
slot3 = PA-4E
E3/3 = NIO_gen_eth:\Device\NPF_{75DC075D-7777-4A4A-8888-C937F22BDCC3}

Running Pemu:
Code:

./pemu -no-kqemu \
-net nic,vlan=1,macaddr=00:a0:00:04:00:aa -net tap,vlan=1,script=ifup \
-net nic,vlan=2,macaddr=00:a0:00:04:01:aa -net tap,vlan=2,script=ifup \
-net nic,vlan=3,macaddr=00:a0:00:04:02:aa -net tap,vlan=3,script=ifup \
-net nic,vlan=4,macaddr=00:a0:00:04:03:aa -net tap,vlan=4,script=ifup -serial telnet::2054,server,nowait -m 128 FLASH

Ifup file:
Quote:

tap0 10.0.0.1 255.255.255.0
tap1 10.1.0.1 255.255.255.0
tap2 10.2.0.1 255.255.255.0
tap3 bridge eth0

Note that in Linux, you have to bridge, either with bridge (included in pemu) or bridge-utils, between the Eth0 and tap interface (like what you would do in a Linux host when you want to communicate between the host and the PIX), so you have to do double bridging to make this work!

13
Jun

Cisco ADSL PPPOE on dynamips

   Posted by: admin   in Cisco, Cisco Dynamips Exams

I have completed this lab on Dynamips 7200 simulator, the topology is as follow:

In fact, R1 and R2 is connected by their atm interface directly.1. CPE Configuration (R2)

no ip routing
!
interface FastEthernet0/0
no ip address
bridge-group 1
!
interface ATM1/0
no ip address
bridge-group 1
pvc 2/200
encapsulation aal5snap
!
!
bridge 1 protocol ieee

2. R1 Configuration
Notes: The atm card on dynamips does not support pppoe, we use R4 to deal with pppoe packet. So ,R1 do only bridging.

no ip routing
!
interface FastEthernet0/0
no ip address
bridge-group 1
!
interface ATM1/0
no ip address
bridge-group 1
pvc 1/100
encapsulation aal5snap
!
!
bridge 1 protocol ieee

3. Aggregation Router Configuration (R4)

vpdn enable
!
vpdn-group 1
accept-dialin
protocol pppoe
virtual-template 1
!
username cisco password 0 cisco
!
interface Loopback0
ip address 10.0.0.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
pppoe enable
!
interface Virtual-Template1
ip unnumbered Loopback0
peer default ip address pool cisco
ppp authentication chap
!
ip local pool cisco 10.0.0.10 10.0.0.20

4. PPPOE client Configuration (R3)

vpdn enable
!
vpdn-group cisco
request-dialin
protocol pppoe
!
interface Ethernet0
no ip address
pppoe enable
pppoe-client dial-pool-number 1
!
interface Dialer0
ip address negotiated
ip nat outside
encapsulation ppp
dialer pool 1
dialer-group 1
ppp chap hostname cisco
ppp chap password 0 cisco
!
ip route 0.0.0.0 0.0.0.0 Dialer0

13
Jun

Cisco ADSL PPPOA on dynamips

   Posted by: admin   in Cisco, Cisco Dynamips Exams

I have completed this lab on Dynamips 7200 simulator, the topology is as follow:

In fact, R1 and R2 is connected by their atm interface directly.1. CPE Configuration (R2)

interface FastEthernet0/0
ip address 172.30.1.8 255.255.255.0
ip nat inside
duplex half
!
interface ATM1/0
no ip address
pvc 2/200
encapsulation aal5snap
protocol ppp dialer
dialer pool-member 1
!
interface Dialer0
ip address negotiated
encapsulation ppp
dialer pool 1
dialer-group 1
ppp chap hostname cisco
ppp chap password 0 cisco
ip nat outside
!
ip route 0.0.0.0 0.0.0.0 dialer0
!
access-list 10 permit ip 172.30.1.0 0.0.0.255
ip nat inside source list 10 interface dialer 0 overload

2. Aggregation Router Configuration (R1)

username cisco password 0 cisco
!
interface Loopback0
ip address 10.0.0.1 255.255.255.0
!
interface ATM1/0
no ip address
pvc 1/100
encapsulation aal5snap
protocol ppp Virtual-Template1
!
!
interface Virtual-Template1
ip unnumbered Loopback0
peer default ip address pool cisco
ppp authentication chap
!
ip local pool cisco 10.0.0.2 10.0.0.6

I have completed this lab on Dynamips 7200 simulator, the topology is as follow:

In fact, R1 and R2 is connected by their atm interface directly.

1. CPE Configuration (R2)

no ip routing
!
interface FastEthernet0/0
no ip address
bridge-group 1
!
interface ATM1/0
no ip address
bridge-group 1
pvc 2/200
encapsulation aal5snap
!
!
bridge 1 protocol ieee

2. Aggregation Router Configuration (R1)

bridge irb
!
interface Loopback0
ip address 202.1.1.1 255.255.255.0
!
interface ATM1/0
no ip address
bridge-group 1
pvc 1/100
encapsulation aal5snap
!
!
interface BVI1
ip address 172.30.1.8 255.255.255.0
!
bridge 1 protocol ieee
bridge 1 route ip

I have completed this lab on Dynamips 7200 simulator, the topology is as follow:

1. R1 ConfigurationHUB.

!Basic configuration
interface Serial1/2

ip address 11.1.1.1 255.255.255.0

!

interface Loopback0

ip address 10.11.1.1 255.255.255.0

ip ospf network point-to-point

!

ip route 0.0.0.0 0.0.0.0 11.1.1.2

!

! DMVPN GRE part
interface Tunnel0

ip address 192.168.1.1 255.255.255.0

no ip redirects

ip nhrp authentication cisco

ip nhrp map multicast dynamic

ip nhrp network-id 10000

tunnel source Serial1/2

tunnel mode gre multipoint

tunnel key 10000

!

! DMVPN OSPF part
router ospf 1

network 10.11.1.0 0.0.0.255 area 0

network 192.168.1.0 0.0.0.255 area 0

!

interface Tunnel0

ip ospf network broadcast

!

! DMVPN IPSec part
crypto keyring dmvpn-key

  pre-shared-key address 0.0.0.0 0.0.0.0 key dmvpncisco

!

crypto isakmp policy 10

encr 3des

authentication pre-share

group 2

!

crypto isakmp profile dmvpn-profile

   keyring dmvpn-key

   match identity address 0.0.0.0

!

crypto ipsec transform-set ccsp esp-3des esp-sha-hmac

mode transport

!

crypto ipsec profile dmvpn-ipsec-profile

set transform-set ccsp

set isakmp-profile dmvpn-profile

!

interface Tunnel0

tunnel protection ipsec profile dmvpn-ipsec-profile

!

!Configure EZVPN
aaa new-model

!

aaa authentication login vpn-login local

aaa authorization network vpn-author local

!

username wanglinlin password 0 cisco

!

ip local pool vpn-client-pool 10.20.1.1 10.20.1.200

access-list 101 permit ip 10.0.0.0 0.255.255.255 any

!

crypto isakmp client configuration group myvpnclient

key clientcisco

domain vpneasy.net

pool vpn-client-pool

acl 101

save-password

!

crypto isakmp profile ezvpn-profile

   match identity group myvpnclient

   client authentication list vpn-login

   isakmp authorization list vpn-author

   client configuration address respond

!

crypto ipsec transform-set ezvpn-tr esp-3des esp-sha-hmac

!

crypto dynamic-map ezvpn-dynamic-map 10

set transform-set ezvpn-tr

set isakmp-profile ezvpn-profile

reverse-route

!

crypto map ezvpn-map 10 ipsec-isakmp dynamic ezvpn-dynamic-map

!

interface Serial1/2

crypto map ezvpn-map

!

!Use RRI and routing redistribution to advertise the client route to the VPN network.
router ospf 1

redistribute static subnets

2. R2 and R3 Configuration.
Reference to “Cisco IPSec DMVPN on dynamips”.

20
May

Cisco IPSec DMVPN on dynamips

   Posted by: admin   in Cisco, Cisco Dynamips Exams

I have completed this lab on Dynamips 7200 simulator, the topology is as follow:

1. R1 ConfigurationHUB.

hostname r1!

interface Loopback0

  ip address 10.1.1.1 255.255.255.0

!

interface Serial0/0

  ip address 173.16.1.1 255.255.255.0

!

ip route 0.0.0.0 0.0.0.0 173.16.1.2

!

interface Tunnel0

  ip address 192.168.1.1 255.255.255.0

  ip nhrp authentication cisco

  ip nhrp map multicast dynamic

  ip nhrp network-id 10000

  tunnel source Serial0/0

  tunnel mode gre multipoint

  tunnel key 10000

!

router eigrp 100

  network 10.0.0.0

  network 192.168.1.0

  no auto-summary

!

interface Tunnel0

  no ip split-horizon eigrp 100

  no ip next-hop-self eigrp 100

!Modify EIGRP configuration for DMVPN.

2. R2 Configuration(Spoke).

hostname r2!

interface Loopback0

  ip address 10.2.2.1 255.255.255.0

!

interface Serial0/0

  ip address 173.16.2.1 255.255.255.0

!

ip route 0.0.0.0 0.0.0.0 173.16.2.2

!

interface Tunnel0

  ip address 192.168.1.2 255.255.255.0

  ip nhrp authentication cisco

  ip nhrp map multicast 173.16.1.1

  ip nhrp map 192.168.1.1 173.16.1.1

  ip nhrp network-id 10000

  ip nhrp nhs 192.168.1.1

  tunnel source Serial0/0

  tunnel mode gre multipoint

  tunnel key 10000

!

router eigrp 100

  network 10.0.0.0

  network 192.168.1.0

  no auto-summary

3. R3 Configuration(Spoke).

hostname r3!

interface Loopback0

  ip address 10.3.3.1 255.255.255.0

!

interface FastEthernet0/0

  ip address 173.16.3.1 255.255.255.0

!

ip route 0.0.0.0 0.0.0.0 173.16.3.2

!

interface Tunnel0

  ip address 192.168.1.3 255.255.255.0

  ip nhrp authentication cisco

  ip nhrp map multicast 173.16.1.1

  ip nhrp map 192.168.1.1 173.16.1.1

  ip nhrp network-id 10000

  ip nhrp nhs 192.168.1.1

  tunnel source FastEthernet0/0

  tunnel mode gre multipoint

  tunnel key 10000

!

router eigrp 100

  network 10.0.0.0

  network 192.168.1.0

  no auto-summary

4. Enable IPSec on R1 R2 and R3.

crypto isakmp policy 10encr 3des

hash sha

authentication pre-share

group 2

crypto isakmp key cisco1234 address 0.0.0.0 0.0.0.0       

!

crypto ipsec transform-set ccsp esp-3des esp-sha-hmac

mode transport

!

crypto ipsec profile cisco

set transform-set ccsp

!

interface Tunnel0

tunnel protection ipsec profile cisco

5. Use OSPF instead of EIGRP.

!If you want use OSPF as the routing protocol, you should do as follow:
!Hub router:
router ospf 1

network 10.0.0.0

network 192.168.1.0

!

interface tuunel 0

ip ospf network broadcast

!Spoke router:
router ospf 1

network 10.0.0.0

network 192.168.1.0

!

interface tuunel 0

ip ospf network broadcast

ip ospf priority 0

I have completed this lab on Dynamips 7200 simulator, the topology is as follow:

In the lab, both access link IP addresses are configured on R1 as IKE identities of R2. When R1 initiates IKE negotiation, the first peer IP address is used by IKE and becomes R2’s IKE identity for this peer. If this IKE SA times out during the negotiation, the second IP address becomes the IKE identity of the R2.

1. R1 Configuration.

 R1#sh run
version 12.4
!
crypto isakmp policy 10
 encr 3des
 authentication pre-share
 group 2
crypto isakmp key cisco1234 address 0.0.0.0 0.0.0.0
!
crypto ipsec transform-set ccsp esp-3des esp-sha-hmac
!
crypto map cisco 10 ipsec-isakmp
 set peer 13.1.1.1
 set peer 12.1.1.1
 set transform-set ccsp
 match address 101
!
interface Loopback0
 ip address 10.1.1.1 255.255.255.0
!
interface Serial1/0
 ip address 11.1.1.1 255.255.255.0
crypto map cisco
!
router ospf 1
network 11.1.1.0 0.0.0.255 area 0
!
ip route 10.2.2.0 255.255.255.0 11.1.1.2
!
access-list 101 permit ip 10.1.1.0 0.0.0.255 10.2.2.0 0.0.0.255
 

2. R2 Configuration.

 R2#sh run
version 12.4
!
crypto isakmp policy 10
 encr 3des
 authentication pre-share
 group 2
crypto isakmp key cisco1234 address 0.0.0.0 0.0.0.0
!
crypto ipsec transform-set ccsp esp-3des esp-sha-hmac
!
crypto map cisco 10 ipsec-isakmp
 set peer 11.1.1.1
 set transform-set ccsp
 match address 101
!
interface Loopback1
 ip address 10.2.2.1 255.255.255.0
!
interface Serial1/0
 ip address 12.1.1.1 255.255.255.0
crypto map cisco
!
interface Serial1/1
 ip address 13.1.1.1 255.255.255.0
 crypto map cisco
!
router ospf 1
 network 12.1.1.0 0.0.0.255 area 0
 network 13.1.1.0 0.0.0.255 area 0
!
ip route 10.1.1.0 255.255.255.0 11.1.1.1
!
access-list 101 permit ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255 

I have completed this lab on Dynamips 7200 simulator, the topology is as follow:

On this lab, the VPN-GW peers (HUB1 and HUB2) are on a common public Ethernet using HSRP. The HSRP configuration makes one of the VPN-GW routers active and places the other one in standby at any given time. From an IPSec perspective, the spoke has an IPSec peer relationship with the HSRP virtual IP address owned by the active HSRP router. With stateful failover, a control channel is used to replicate the same SA information to public interfaces of the peer that is serving as the standby HSRP node. The replication of SA information ensures that the standby HSRP router and standby IPSec peer have the necessary information to immediately assume the role of an active HSRP and active IPSec peer.1. HUB1 Configuration.

crypto isakmp policy 10  encr 3des

authentication pre-share

group 2

crypto isakmp key cisco1234 address 0.0.0.0 0.0.0.0

!

crypto ipsec transform-set ccsp esp-3des esp-sha-hmac

!

crypto map cisco 10 ipsec-isakmp

set peer 173.1.1.2

set transform-set ccsp

match address 101

!

interface FastEthernet0/0

ip address 16.1.1.1 255.255.255.0

duplex half

standby 10 ip 16.1.1.254

standby 10 priority 101

standby 10 preempt

standby 10 name ipsec-public

standby 10 track FastEthernet1/0

crypto map cisco redundancy ipsec-public stateful

standby delay reload 120

!

interface FastEthernet1/0

ip address 10.2.2.1 255.255.255.0

duplex half

standby 20 ip 10.2.2.254

standby 20 priority 101

standby 20 preempt

standby 20 name ipsec-private

standby 20 track FastEthernet0/0

standby delay reload 120

!

ip route 0.0.0.0 0.0.0.0 16.1.1.3

!

access-list 101 permit ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255

!

redundancy inter-device

scheme standby ipsec-private

!

ipc zone default

association 1

  no shutdown

  protocol sctp

   local-port 5000

     local-ip 10.2.2.1

   remote-port 5000

     remote-ip 10.2.2.2

2. HUB2 Configuration.

crypto isakmp policy 10  encr 3des

authentication pre-share

group 2

crypto isakmp key cisco1234 address 0.0.0.0 0.0.0.0

!

crypto ipsec transform-set ccsp esp-3des esp-sha-hmac

!

crypto map cisco 10 ipsec-isakmp

set peer 173.1.1.2

set transform-set ccsp

match address 101

!

interface FastEthernet0/0

ip address 16.1.1.2 255.255.255.0

duplex half

standby 10 ip 16.1.1.254

standby 10 priority 101

standby 10 preempt

standby 10 name ipsec-public

standby 10 track FastEthernet1/0

crypto map cisco redundancy ipsec-public stateful

standby delay reload 120

!

interface FastEthernet1/0

ip address 10.2.2.2 255.255.255.0

duplex half

standby 20 ip 10.2.2.254

standby 20 priority 101

standby 20 preempt

standby 20 name ipsec-private

standby 20 track FastEthernet0/0

standby delay reload 120

!

ip route 0.0.0.0 0.0.0.0 16.1.1.3

!

access-list 101 permit ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255

!

redundancy inter-device

scheme standby ipsec-private

!

ipc zone default

association 1

  no shutdown

  protocol sctp

   local-port 5000

     local-ip 10.2.2.2

   remote-port 5000

     remote-ip 10.2.2.1

3. SPOKE Configuration.

crypto isakmp policy 10  encr 3des

authentication pre-share

group 2

crypto isakmp key cisco1234 address 0.0.0.0 0.0.0.0

!

crypto ipsec transform-set ccsp esp-3des esp-sha-hmac

!

crypto map cisco 10 ipsec-isakmp  

set peer 16.1.1.254

set transform-set ccsp

match address 101

!

interface Loopback0

ip address 10.1.1.1 255.255.255.0

!

interface FastEthernet0/0

ip address 173.16.1.2 255.255.255.0

crypto map cisco

!

ip route 10.2.2.0 255.255.255.0 173.16.1.1

!

access-list 101 permit ip 10.1.1.0 0.0.0.255 10.2.2.0 0.0.0.255

(Part 3:Cisco Secure Desktop)
 Continue discussion in part 1, the topology is as follow:

Cisco Secure Desktop (CSD) extends the security of SSL VPN technology. CSD provides a separate partition on a user’s workstation for session activity. This vault area is encrypted during sessions and completely removed at the end of an SSL VPN session.

1. Preparing for Cisco Web VPN. (the same as part 1 or part 2)
 
Because of the CSD is a plugin to Web VPN, so we must configure the WebVPN as part1 or part2.
 2. Installing and enabling CSD.
 

Copy the CSD image to dynamips 7200 disk0 via ftp, and then install CSD.
 c7206# copy ftp disk0:Address or name of remote host [10.10.1.2]?

Source filename [sslclient-win-1.1.2.169.pkg]? securedesktop-ios-3.1.1.45-k9.pkg

Destination filename [securedesktop-ios-3.1.1.45-k9.pkg]?

Accessing ftp://10.10.1.2/securedesktop-ios-3.1.1.45-k9.pkg…

Loading securedesktop-ios-3.1.1.45-k9.pkg !!!!!!!

[OK - 1697952/4096 bytes]

1697952 bytes copied in 76.704 secs (22136 bytes/sec)!

c7206(config)# webvpn install csd disk0:/securedesktop-ios-3.1.1.45-k9.pkg

SSLVPN Package Cisco-Secure-Desktop : installed successfully

!

c7206(config)# webvpn context mywebvpn-context1

c7206(config-webvpn-context)# csd enable

!enable CSD in default context policy.
  3. Configure CSD policy.
 All the CSD policy must configure in a special web page, we can not configure the CSD policy via CLI. Login “https://gataway_addr/csd_admin.html” to start the policy admin, the username is “admin”, and the password is enable password or enable secret of the router.Note: In my lab, the CSD admin address is “https://198.1.1.1/csd_admin.html”. The Cisco official documentation has an error, it says that the admin address is “https://gataway_addr/csd_admin”.

Select the webvpn context, in my lab, the context name is “mywebvpn-context1”.

The CSD admin home page, it is very similar witch Cisco VPN 3000 concentrator.

Locations let you deploy an appropriately secure environment to hosts that connect through the VPN. They let you increase security on hosts that you determine are likely to be insecure, and offer flexibility to clients you determine are secure. You can restrict user privileges when they connect from unknown computers.In my lab, I create two location: test1 and test2. The first location identify the user by the address of 198.1.1.2, if the user doesn’t match the condition, they will be set to the second location. The second location doesn’t have any condition, so all the user except 198.1.1.2 will match this condition.

Test1 condition is as follow:

Define the user’s privilege, by default, all the privilege is off.

Configure the general option, such as desktop switching and desktop timeout.Configure the virtual desktop settings, such as DOS-CMD restricting.

We can also define the favorites of Internet Explore of the virtual desktop.4. Feature test.
 
Login WebVPN , and then the WebVPN will start the CSD installing program.When the installation completes, the CSD interface is as follow:

The Cisco copyright info, aha, I like it.

The virtual desktop is as follow.When you quit the virtual desktop, the CSD software will delete all the file and information in the virtual desktop, it is so cool!

Note : In CSD, I suggest do not enable SSL VPN split tunneling, if you enable this , the CSD looks meaningless.

(Part 2:SSL VPN)
Continue discussion in part 1, the topology is as follow:

 

The Cisco SSL VPN supports on working on full-tunnel mode. In full-tunnel mode, an SSL tunnel is used to move data to and from the internal networks at the network (IP) layer. When the user logs into the SSLVPN gateway, the SSL VPN client (SVC) is automatically downloaded and installed at the end user’s PC, and the tunnel connection is established. Once the connection is established, the user has full VPN access to the corporate network.1. Preparing for Cisco Web VPN. (the same as part 1)
c7206(config)# int fa0/0
c7206(config-if)# ip add 198.1.1.1 255.255.255.0

c7206(config-if)# no shutdown

c7206(config-if)# exit

!

c7206(config)# int fa1/0

c7206(config-if)# ip add 10.10.1.1 255.255.255.0

c7206(config-if)# no shutdown

c7206(config-if)# exit

!

c7206(config)# aaa new-model

c7206(config)# aaa authentication login default local

!define the default aaa authentication list, allow the administrator to login this router, this configuration is foreign to the Web VPN.
!

c7206(config)# aaa authentication login aaa-webvpn local

c7206(config)# username steve6307 password cisco

!define the WebVPN authentication list.
!

c7206(config)# webvpn gateway mygateway

c7206(config-webvpn-gateway)# ip address 198.1.1.1 port 443

c7206(config-webvpn-gateway)# inservice

!define the WebVPN gateway address and port, usually the port is 443.
!

c7206(config)# webvpn context mywebvpn-context1

c7206(config-webvpn-context)# gateway mygateway domain group1

c7206(config-webvpn-context)# aaa authentication list aaa-webvpn

c7206(config-webvpn-context)# inservice

!define a WebVPN context. You must select a gateway and a aaa authentication list for each context. The domain name is very important to the configuration, because the end user will select the context by this domain name in the future.
2. Configure Cisco SSL VPN.
First of all, format the dynamips 7200 router disk0.
c7206# format disk0:

Then, copy the SVC(SSL VPN Client) package to the 7200 disk0.
Note: the dynamips works on low efficiency, so I suggest to use FTP to copy the SVC.
c7206(config)# ip ftp username cisco

c7206(config)# ip ftp password cisco

!

c7206# copy ftp disk0:

Address or name of remote host []? 10.10.1.2

Source filename []? sslclient-win-1.1.2.169.pkg          

Destination filename [sslclient-win-1.1.2.169.pkg]?

Accessing ftp://10.10.1.2/sslclient-win-1.1.2.169.pkg…

Loading sslclient-win-1.1.2.169.pkg !!

[OK - 415090/4096 bytes]

415090 bytes copied in 22.900 secs (18126 bytes/sec)

Install the SVC.
c7206(config)# webvpn install svc disk0:/sslclient-win-1.1.2.169.pkg

SSLVPN Package SSL-VPN-Client : installed successfully

c7206(config)# ip local pool ssl-user 192.168.10.1 192.168.10.99

!define the SSL VPN user address pool.
!

c7206(config)# int loopback0

c7206(config-if)# ip address 192.168.10.254 255.255.255.0

c7206(config-if)# exit

!In Cisco IOS, if the SSL VPN user pool doesn’t have the save range with your inside network, you should define a loopback interface.
!In my lab, my inside network range is 10.10.1.0/24, and my address pool range is 192.168.10.1~99, so I need to define a loopback interface with the address 192.168.10.254.
!

c7206(config)# webvpn context mywebvpn-context1

c7206(config-webvpn-context)# policy group context1-policy

c7206(config-webvpn-group)# functions svc-enabled

c7206(config-webvpn-group)# svc address-pool ssl-user

c7206(config-webvpn-group)# exit

!define the group policy, allow the user to use the SSL VPN function.
!

c7206(config-webvpn-context)# default-group-policy context1-policy

!assign the policy as the default group policy.
3. Configure the SSL VPN split tunneling. (optional)
c7206(config)# webvpn context mywebvpn-context1

c7206(config-webvpn-context)# policy group context1-policy

c7206(config-webvpn-group)# svc split include 10.10.1.0 255.255.255.0

!In the split tunnel list, I configured the inside network range. This means the WebVPN service will notify the SSL VPN Client to modify there local routing table, and then the client can access inside network and Internet at the same time.
4. Feature test.
Login WebVPN , and then I saw the page as follow:

Then the WebVPN started the SVC install program.

 

After the installation, the SVC started successfully, and then I have unrestricted permission of the inside network accessing.

Now, I can see the SSL VPN Client info.

The Cisco copyright info is as follow, aha, this is so cool!