Overview
Qemu image of Microcore Linux 2.10, is small linux image ready to be used in GNS3 and which includes ssh, iptables, iproute, tcpdump and IPv6 support. It is quite well integrated and doesn't require much tuning.Download Microcore Linux Qemu image
Microcore Linux 2.10 image can be downloaded separately from GNS3 web site.
Setup image for Qemu host
- Go to Edit | Preferences | Qemu | Qemu Host
- Setup new image with following properties
Identifier: Microcore Binary image: local path to linux-microcore-2.10.img Memory: 32 MB NIC: e1000 Qemu options: -no-acpi
- Press Save and just added image will appear into Qemu Host images list
Create topology and drop Qemu host on workspace
Here is the topology used in this tutorial. One directly connected subnet between host and router and one "remote" network in the Lo0 interface of R1 so that default route can be verified.
Add devices on workspace and connect link between them. If you want to get IP-addresses on the diagram use Add a note tool for that.
Start and Configure R1
Here are configurations of R1 used in this example.
Current configuration : 946 bytes!upgrade fpd autoversion 12.4service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname R1!boot-start-markerboot-end-marker!logging message-counter syslogenable password cisco!aaa new-model!!aaa authentication login SSH-LOGIN local!!aaa session-id commonip source-routeip cef!!!!ip domain name cisco.comno ipv6 cef!multilink bundle-name authenticated!!username cisco password 0 ciscoarchivelog confighidekeys!!interface Loopback0ip address 192.168.0.1 255.255.255.0!interface FastEthernet0/0ip address 10.10.10.1 255.255.255.0duplex half!ip forward-protocol ndno ip http serverno ip http secure-server!control-plane!gatekeepershutdown!!line con 0stopbits 1line aux 0stopbits 1line vty 0 4password ciscologin authentication SSH-LOGINtransport input telnet ssh!end
Remember to type crypto key generate command in config mode to get SSH enabled.
Start Qemu host and assign ip address and default gateway
- Start Qemu Host by right clicking and pressing Start button Qemu window will open
- Assign IP address for eth0 interface using command:
sudo su
ifconfig eth0 10.10.10.2 netmask 255.255.255.0 up
- To verify what ip address eth0 interface has use following command
ifconfig eth0
- You can also set hostname to host using hostname command:
hostname Qemu1
Try to reach directly connected network
- Try to ping router (10.10.10.1) stop by pressing CRTL + C.
Setup default gateway to reach remote networks
Try to ping the Loopback interface of R1. It's not answering because of host doesn't know any route to it. To see routing table in linux use route command. To add default route use again route command. After adding default route towards R1 you can reach remote networks.
Using telnet and SSH
You can use Qemu host as telnet and SSH client when connection to R1 for example.
Making IP-address and default gateway persistent
By default when added using ifconfig and route commands IP-address and default gateway do not remain during reboot.
- To make settings persistent do following:
sudo su
vi /opt/bootlocal.sh
- Add follwing lines to the file:
hostname Qemu1
ifconfig eth0 10.10.10.2/24
route add default gw 10.10.10.1
- Save file:
- Press Esc
- Type :wq!
- Run following command:
/usr/bin/filetool.sh backup
Now you can reboot the router and settings will remain.
Running multiple host simultaneously
Currently you can't run multiple Microcore host simultaneuosly. GNS3 Development team is trying to resolve this issue...
Happy simulations using Qemu! :)
No comments:
Post a Comment