How to configute an ip address in Qemu Microcore GNS 3

Here we are going to see how to configure ip address ,default gateway ,,hostname, checking routing table ,and checking ip address on ethernet qemu microcore linux image


Steps:

Step 1: Create topology like this






Step 2: Configure ip address to router interfaces by entering the command

In R1 Router


R1(config)#interface fastEthernet 1/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit


R1(config)#interface fastEthernet 1/1
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit



Step 3:Now go to one of the qemu host and configure ip address,default gateway using this command

In Qemu 1,to add ip address and default gateway give this command


tc@box:~$
tc@box:~$ sudo su
root@box:~#ifconfig eth0 10.0.0.10 netmask 255.0.0.0 up
root@box:~#route add default gw 10.0.0.1



To check ip address in an ethernet,give this command



root@box:~#ifconfig eth0



To check routing table of Qemu enter this command



root@box:~#route


Configuring Hostname


root@box:~#hostname PC1
root@PC1:~#
root@PC1:~#




Do this also in Qemu 2





Step 4:Now check the connectivity between your host and router by pinging default gateway that is your router interface ip address



root@PC1:~#ping 10.0.0.1

Then ping host in other network

root@PC1:~#ping 20.0.0.10

Stop  by pressing Ctrl+C






Written by