dynamips/dyangen jail
Howto find out, if you are connected to Router, that is running inside a dynamips/dynagen enviroment, or sometime you are auditing a network, and you are not sure, if there are some virtual routers involved.
 
But there are some ways, to find it out. i try to compled this list in the future.
 
Here are some hints, to find this dynamips/danagen devices.

Used Hardware
because of limitations of the dynamips , you can only emulate some of the Hardware from cisco:
-> see dynamips/dynagen documentation:
=> conf localhost
=>(config-localhost:7200)
=>(config-localhost:7200)?

Documented commands (type help ):
========================================
1710  1751    2611    2621    2691  3725   atmsw  frsw  py
1720  1760    2611XM  2621XM  3620  3745   end    help  reset
1721  2610    2620    2650XM  3640  7200   ethsw  hist  router
1750  2610XM  2620XM  2651XM  3660  atmbr  exit   no    workingdir
 
1710 / 1720 / 1721 / 1750 / 1751 / 1760
2610 / 2610XM / 2611 / 2611XM / 2620 / 2620XM / 2621 / 2621XM / 2650XM / 2651XM / 2691
3620 / 3640 / 3660
3725 / 3745
7200
 
if "show version" and other command says you, the router, you are connected, is for example a 6k5, maybee it's true. and this is not a virtual system

Used Mac address
S1#sh arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  10.0.0.2                -   c401.0f2f.0000  ARPA   FastEthernet0/0
Other System: (same Dynamips)
T1#sh arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  10.0.0.1                -   c400.0f2f.0000  ARPA   FastEthernet0/0
and if you check the PID of the dynamips process, here it's 3887 -> 0xf2f
root@erde:~/ciscosim/mylab/3745# ps -ef | fgrep dynamips                                                                        
root      3887  3827 99 19:34 pts/2    02:17:37 dynamips -H 127.0.0.1:7200                                                         
i have do some other test's, and there is every time the same result with the dynamips process.
But, if you don't know the PID of dynamips Process, the are some other hints:
- Mac Address starts with a c4xx.xxxx.xxxx (cisco 3745)
- Mac Address starts with a caxx.xxxx.xxxx (cisco 7200)
- Mac Address starts with a ccxx.xxxx.xxxx (cisco 3600)
- Mac Address is not assignd to a vendor (see iana ethernet-numbers)
- If there are more the one router, one have cxx0.xxxx.xxxx and the othe one have cxx1.xxxx.xxxx
- maybe, if the enviroment restarts, there are ne mac addresses -> see PID
 
Warning, if you don't see a dynamips MAC Address, maybee there are changed with:
R2#sh interfaces fastEthernet 0/0                
FastEthernet0/0 is administratively down, line protocol is down 
  Hardware is DEC21140, address is ca02.1908.0000 (bia ca02.1908.0000)
.
---- some line deleted
.
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#interface fastEthernet 0/0
R2(config-if)#mac-address ?
  H.H.H  MAC address

R2(config-if)#mac-address dead.affe.beaf
R2(config-if)#exit
R2(config)#exit
R2#sh interfaces fastEthernet 0/0
FastEthernet0/0 is administratively down, line protocol is down 
  Hardware is DEC21140, address is dead.affe.beaf (bia ca02.1908.0000)
.
---- some line deleted
.

hardware Serial Numbers
if you are connectet to the router, you can check the SN Numbers of the System:
S1#sh inventory         
NAME: "3745 chassis", DESCR: "3745 chassis"
PID:                   , VID: 2.0, SN: XXXXXXXXXXX

NAME: "c3745 Motherboard with Fast Ethernet on Slot 0", DESCR: "c3745 Motherboard with Fast Ethernet"
PID:                   , VID: 2.0, SN: XXXXXXXXXXX

NAME: "One port Fastethernet TX on Slot 1", DESCR: "One port Fastethernet TX"
PID: NM-1FE-TX=        , VID: 1.0, SN: 7720321    

NAME: "One port Fastethernet TX on Slot 2", DESCR: "One port Fastethernet TX"
PID: NM-1FE-TX=        , VID: 1.0, SN: 7720321    

NAME: "16 Port 10BaseT/100BaseTX EtherSwitch on Slot 3", DESCR: "16 Port 10BaseT/100BaseTX EtherSwitch"
PID: NM-16ESW=         , VID: 1.0, SN: 00000000000
you see SN: XXXXXXXXXXX as chassis ID, tha means , there is no real chassis ID, because dynamips
the same cardtype in slot 1 and slot 2 have the same SN:(here: 7720321)
sh inventory raw
NAME: "Chassis", DESCR: "Cisco 7206VXR, 6-slot chassis"
PID: CISCO7206VXR      , VID:    , SN: 4294967295      

NAME: "I/O and CPU Slot 0", DESCR: "I/O and Processor Slot Container"
PID:                   , VID:    , SN:                               

NAME: "NPE400 0", DESCR: "Cisco 7200VXR Network Processing Engine NPE-400"
PID: NPE-400           , VID:    , SN: 11111111                           
or you see the SN: 4294967295 on the router. the NPE has every time SN: 11111111

Power and Temperature enviroment
the enviroment is every time the same: 22C/71F

show environment all
Power Supplies:
        Power Supply 1 is AC Power Supply. Unit is on.
        Power Supply 2 is AC Power Supply. Unit is on.

Temperature readings:
        I/O Cont Inlet   measured at 22C/71F
        I/O Cont Outlet  measured at 22C/71F
        NPE Inlet        measured at 22C/71F
        NPE Outlet       measured at 22C/71F

Voltage readings:
        +3.45 V       measured at +3.43 V
        +5.15 V       measured at +5.13 V
        +12.15 V      measured at +12.10 V
        -11.95 V      measured at -11.90 V

Envm stats saved 1 time(s) since reload


Hide Dynamips
Howto Hide the Dynmips Enviroment
 
Example: change Temperature on C7200
dev_c7200_iofpga.c
.
/* 4 temperature sensors in a C7200 */
#define C7200_TEMP_SENSORS  4
#define C7200_DEFAULT_TEMP  22   /* default temperature: 22°C */
.
change to :
.
/* 4 temperature sensors in a C7200 */
#define C7200_TEMP_SENSORS  4
#define C7200_DEFAULT_TEMP  25   /* changed default temperature: 22°C to 25°C */
.
 
Example: change Maschine ID on C7200 with NPE-300
Old Machine ID: 4294967295 -> 0xffff 0xffff
 
dev_c7200.c
/* NPE-300 */
static m_uint16_t eeprom_cpu_npe300_data[16] = {
   0x01AE, 0x0402, 0xffff, 0xffff, 0x490D, 0x5108, 0x0000, 0x0000,
   0x5000, 0x0000, 0x0012, 0x1000, 0x0000, 0xFFFF, 0xFFFF, 0xFF00,
};

New Machine ID: 2711724449 -> 0xa1a1 0xa1a1
  /* NPE-300 */
static m_uint16_t eeprom_cpu_npe300_data[16] = {
   0x01AE, 0x0402, 0xa1a1, 0xa1a1, 0x490D, 0x5108, 0x0000, 0x0000,
   0x5000, 0x0000, 0x0012, 0x1000, 0x0000, 0xFFFF, 0xFFFF, 0xFF00,
};
Important:
after any change in the sourcecode, you must rebuild and restart dynamips !

(c) 2009 by packetlevel.ch / last update: 26.12.2009