Использование эмуляторов оборудования Cisco в UNIX
Установка и запуск эмулятора
FreeBSD
[hostX:~] # pkg_add -r dynagen
[hostX:~] # rehash
Ubuntu
root@hostX:~# apt-get install dynagen
FreeBSD/Ubuntu
hostX# dynamips -H 7200 &
Настройка параметров оборудования и запуск маршрутизатора в эмуляторе
[hostX:~] # cat router.dng
[localhost]
[[ROUTER router.corpX.un]]
image = c7200-is-mz.123-21.bin
ram = 160
npe = npe-400
F1/0 = NIO_linux_eth:eth1
F1/1 = NIO_linux_eth:eth0
# F1/0 = NIO_gen_eth:em1 # For physical interface in FreeBSD
# F1/0 = NIO_linux_eth:vlan2 # For vlan interface in Linux
# F1/0 = NIO_gen_eth:vlan2 # For vlan interface in FreeBSD
hostX# dynagen router.dng
=> list
Name Type State Server Console
router.corpX.un 7200 running localhost:7200 2000
=> shell telnet localhost 2000
...
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: no
Router> enable
Router# show run
Примеры dynagen конфигураций
Цепочка роутеров
[hostX:~] # cat simple1.dng
[localhost]
[[ROUTER R1]]
image = c7200-is-mz.123-21.bin
npe = npe-400
ram = 160
s1/0 = R2 s1/0
[[router R2]]
Соединение роутеров, работающих на разных системах
[hostX:~] # cat distrlab.dng
[172.16.1.X]
[[ROUTER R1]]
image = c7200-is-mz.123-21.bin
ram = 96
s1/0 = R2 s1/0
F0/0 = NIO_gen_eth:fxp0
[172.16.1.Y]
workingdir = /root
[[ROUTER R2]]
image = c7200-is-mz.123-21.bin
ram = 96
F0/0 = NIO_gen_eth:sis0