Showing posts with label gns3. Show all posts
Showing posts with label gns3. Show all posts

Tuesday, 4 March 2014

Cisco ASA 8.4 on GNS3 in Linux

Best recommendation would be to test the qemu image before moving it into GNS3.

To find the location of the binaries:

user@pc:~ > which qemu-img
/usr/bin/qemu-img

then

user@pc:~/Cisco/ASA_842 > /usr/bin/qemu-system-i386 -name ASA1 -m 1024 -kernel ./asa842-vmlinuz -initrd ./asa842-initrd.gz -append "ide_generic.probe_mask=0x01 ide_core.chs=0.0:980,16,32 auto nousb console=ttyS0,9600 bigphysarea=65536 ide1=noprobe no-hlt" -netdev user,id=mynet0 -netdev user,id=mynet1 -netdev user,id=mynet2 -netdev user,id=mynet3 -netdev user,id=mynet4 -netdev user,id=mynet5 -device e1000,mac=00:00:ab:1a:f2:00,netdev=mynet0 -device e1000,mac=00:00:ab:df:12:01,netdev=mynet1 -device e1000,mac=00:00:ab:7e:73:02,netdev=mynet2 -device e1000,mac=00:00:ab:1c:9d:03,netdev=mynet3 -device e1000,mac=00:00:ab:db:25:04,netdev=mynet4 -device e1000,mac=00:00:ab:69:d8:05,netdev=mynet5 -serial telnet:127.0.0.1:4444,server,nowait -vnc none -vga none -icount auto -hdachs 980,16,32 -cpu coreduo -nographic

and then log into the ASA router virtual image with : telnet localhost 4444

if working as expected configure Qemu in GNS3:

and then the ASA:

Qemu options : -vnc none -vga none -icount auto -hdachs 980,16,32 -cpu coreduo -nographic
Kernel Cmd Line : ide_generic.probe_mask=0x01 ide_core.chs=0.0:980,16,32 auto nousb console=ttyS0,9600 bigphysarea=65536 ide1=noprobe no-hlt


If you want to run multiple ASA's configure the options accordingly e.g.
Qemu options : -vnc :2 none -vga none -icount auto -hdachs 980,16,32 -cpu coreduo -nographic

Monday, 3 March 2014

Add Loopbacks in Linux MInt for GNS3

This is a quick howto to connect a gns3 simulation to the physical pc to allow testing from the pc or configure access to the internet.


run gns3 as root "sudo gns3"
place a cloud onto your topology
configure the NIO TAP to use tap0

on linux:

first install the necessary tools

sudo apt-get install uml-utilities
sudo apt-get install bridge-utils
then

sudo tunctl -t tap0
sudo ifconfig tap0 10.200.200.1 netmask 255.255.255.252 up

then configure the router:
R1>enable
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface FastEthernet 0/0
R1(config-if)#ip address 10.200.200.2 255.255.255.252
R1(config-if)#no shutdown
Add a default route so that the router knows where to forward the internet traffic.
R1(config)#ip route 0.0.0.0 0.0.0.0 10.200.200.1

Try pinging the linux pc and the router from each other and you should get a reply.


to forward the traffic to the internet:


iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

iptables -A FORWARD -i tap0 -j ACCEPT

echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward