Difference between revisions of "GNS3 Network Emulator"

From Ever changing code
Jump to navigation Jump to search
Line 49: Line 49:
* Remote host: 127.0.0.1 - host operation system where VPCS is installed
* Remote host: 127.0.0.1 - host operation system where VPCS is installed
* Remote port: 20000 - VPCS1 is listening on UDP 20000 on the host operation system
* Remote port: 20000 - VPCS1 is listening on UDP 20000 on the host operation system
= GNS3 emulator odds =
We need to remember that GNS3 is a graphic interface on top of Dynamips emulating Cisco 7200 hardware. Therefore we need to remember about all odds:
* there is no emulation of Layer1 therefore a link connection need to be hard coded as AUTO SPEED/AUTO DETECT do not work
* to create/delete a connection it may require to power off a device


= Issues =
= Issues =

Revision as of 20:25, 10 August 2014

Notes

Gns3 > Edit > Preferences > Dynamips

  • Enable ghost IOS support - memory mapping allows loaded images in RAM to be shared between other routers

Connect to Router console

GNS3 (dynamips hypervisor) is listening on IP 127.0.0.1 ports starting from 2501. Therefore to emulate AUX serial connection we need to telnet 127.0.0.1 port_number. See an example below:

piotr@piotr-x:~$ telnet 127.0.0.1 2504
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Connected to Dynamips VM "R3" (ID 3, type c7200) - AUX port
Press ENTER to get the prompt.

Configure VPC

Run vpcs in a terminal, then using 1, 2 ... 10 switch between virtual PCs. Use ? at the end of the command for help.

Configure static IP address/mask in CIDR notation and GW

VPCS[1]> ip 10.0.10.10 10.0.10.1 24
Checking for duplicate address...
PC1 : 10.0.10.10 255.255.255.0 gateway 10.0.10.1

Show current IP configuration

VPCS[2]> show ip all
NAME   IP/MASK              GATEWAY           MAC                DNS
VPCS1  10.0.10.10/24        10.0.10.1         00:50:79:66:68:00  
VPCS2  192.168.1.100/24     192.168.1.254     00:50:79:66:68:01  
VPCS3  0.0.0.0/0            0.0.0.0           00:50:79:66:68:02  

Show all info including lport (listen on port)

VPCS[2]> show 
NAME   IP/MASK              GATEWAY           MAC                LPORT  RHOST:PORT
VPCS1  10.0.10.10/24        10.0.10.1         00:50:79:66:68:00  20000  127.0.0.1:30000
       fe80::250:79ff:fe66:6800/64
VPCS2  192.168.1.100/24     192.168.1.254     00:50:79:66:68:01  20001  127.0.0.1:30001
       fe80::250:79ff:fe66:6801/64
VPCS3  0.0.0.0/0            0.0.0.0           00:50:79:66:68:02  20002  127.0.0.1:30002
       fe80::250:79ff:fe66:6802/64

Configure GNS3 - host

In GNS3 you need to add a Host (cloud group device) to your topology. Then right click to configure. Go to NIO UDP tab. To establish connection with VPCS1 select:

       GNS3            VPCS1
    local port       remote port                    
         |                |
nio_udp:30000:127.0.0.1:20000
                 |
            remote host

Explained from point of view of GNS3 (host device on the topology)

  • Local port: 30000 - gns3's host device listens on UDP 30000 port
  • Remote host: 127.0.0.1 - host operation system where VPCS is installed
  • Remote port: 20000 - VPCS1 is listening on UDP 20000 on the host operation system

GNS3 emulator odds

We need to remember that GNS3 is a graphic interface on top of Dynamips emulating Cisco 7200 hardware. Therefore we need to remember about all odds:

  • there is no emulation of Layer1 therefore a link connection need to be hard coded as AUTO SPEED/AUTO DETECT do not work
  • to create/delete a connection it may require to power off a device

Issues

Cannot cloase New Project window in Ubuntu 14.04

wmctrl can close a window based on a substring or exact match of the window title wmctrl -c 'substring' or wmctrl -F -c 'exact match'

sudo apt-get install wmctrl
wmctrl -l
0x03000002  0 piotr-x XdndCollectionWindowImp
0x03000007  0 piotr-x unity-launcher
0x03000011  0 piotr-x unity-panel
0x03000016  0 piotr-x unity-panel
0x0300001b  0 piotr-x unity-dash
0x0300001c  0 piotr-x Hud
0x0280000a  0 piotr-x Desktop
0x03200012  0 piotr-x GNS3
0x0320001d  0 piotr-x New Project
0x0320002a  0 piotr-x New Project
0x03200098  0 piotr-x New Project
0x0400000b  0 piotr-x piotr@piotr-x: ~
wmctrl -c 'New'
Cannot find New Project window in Ubuntu multiple screen setup

A: Show all desktops overview and drag the windows in physical view of the main screen. Usually your laptop screen is smaller than an external monitor causing that a part of the screen is only logical and does not have a physical screen size.