This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
использование_эмуляторов_оборудования_cisco_в_unix [2010/04/13 16:21] val |
использование_эмуляторов_оборудования_cisco_в_unix [2010/11/16 14:03] val |
||
---|---|---|---|
Line 3: | Line 3: | ||
[[http://dynagen.org/tutorial.htm]] | [[http://dynagen.org/tutorial.htm]] | ||
- | ===== FreeBSD ===== | + | ===== Установка и запуск эмулятора ===== |
+ | |||
+ | ==== FreeBSD ==== | ||
<code> | <code> | ||
- | [gate:~] # pkg_add -r dynagen | + | [hostX:~] # pkg_add -r dynagen |
- | [gate:~] # rehash | + | [hostX:~] # rehash |
</code> | </code> | ||
- | ===== Ubuntu ===== | + | ==== Ubuntu ==== |
<code> | <code> | ||
- | root@gate:~# apt-get install dynagen | + | root@hostX:~# apt-get install dynagen |
</code> | </code> | ||
- | ===== FreeBSD/Ubuntu ===== | + | ==== FreeBSD/Ubuntu ==== |
<code> | <code> | ||
- | gate# dynamips -H 7200 & | + | hostX# dynamips -H 7200 & |
</code> | </code> | ||
- | ===== Превращение PC в Cisco router ===== | + | ===== Настройка и запуск маршрутизатора в эмуляторе ===== |
<code> | <code> | ||
- | gate# cat gate.net | + | [hostX:~] # cat router.dng |
</code><code> | </code><code> | ||
- | [localhost] #host with dynamips | + | [localhost] |
- | [[7200]] # port listen dynamips | + | [[ROUTER router.corpX.un]] |
- | image = c7200-is-mz.122-13.T10.bin | + | image = c7200-is-mz.123-21.bin |
ram = 160 | ram = 160 | ||
- | [[ROUTER GATE]] | + | F1/0 = NIO_linux_eth:eth1 |
- | F0/0 = NIO_gen_eth:em0 # for FreeBSD | + | F1/1 = NIO_linux_eth:eth0 |
- | F0/0 = NIO_linux_eth:eth1 # for Linux | + | # F1/0 = NIO_gen_eth:em1 # For physical interface in FreeBSD |
- | F1/0 = NIO_linux_eth:vlan2 # for Linux | + | # F1/0 = NIO_linux_eth:vlan2 # For vlan interface in Linux |
- | </code><code> | + | </code> |
- | gate# dynagen gate.net | + | hostX# dynagen router.dng |
</code><code> | </code><code> | ||
=> list | => list | ||
Name Type State Server Console | Name Type State Server Console | ||
- | GATE 7200 running localhost:7200 2000 | + | router.corpX.un 7200 running localhost:7200 2000 |
</code><code> | </code><code> | ||
=> shell telnet localhost 2000 | => shell telnet localhost 2000 | ||
Line 47: | Line 49: | ||
Would you like to enter the initial configuration dialog? [yes/no]: no | Would you like to enter the initial configuration dialog? [yes/no]: no | ||
</code><code> | </code><code> | ||
+ | Router> enable | ||
+ | |||
Router# show run | Router# show run | ||
- | </code><code> | + | </code> |
- | hostname gate.corpX.un | + | |
- | interface FastEthernet0/0 | + | ===== Примеры dynagen конфигураций ===== |
- | ip address 192.168.X.101 255.255.255.0 | + | |
- | no shut | + | |
- | !config for FreeBSD with dot1q (F0/0 = NIO_gen_eth:em0) | + | ==== Цепочка роутеров ==== |
- | !interface FastEthernet0/0.2 | + | |
- | ! encapsulation dot1Q 2 | + | |
- | ! ip address 192.168.100+X.101 255.255.255.0 | + | |
- | ! no shut | + | |
- | + | ||
- | !config for FreeBSD with dot1q (F1/0 = NIO_linux_eth:vlan2) | + | |
- | !interface FastEthernet1/0 | + | |
- | ! ip address 192.168.100+X.101 255.255.255.0 | + | |
- | ! no shut | + | |
- | + | ||
- | router ospf 100 | + | |
- | network 192.168.X.0 0.0.0.255 area 0 | + | |
- | redistribute connected subnets | + | |
- | </code> | + | |
- | + | ||
- | ===== Примеры конфигураций ===== | + | |
<code> | <code> | ||
- | [g13:/var/db/dynagen] # cat simple1.net | + | [hostX:~] # cat simple1.dng |
[localhost] | [localhost] | ||
- | [[7200]] | + | [[ROUTER R1]] |
- | image = /var/db/dynagen/c7200-is-mz.122-13.T10.bin | + | image = c7200-is-mz.123-21.bin |
npe = npe-400 | npe = npe-400 | ||
ram = 160 | ram = 160 | ||
| | ||
- | [[ROUTER R1]] | ||
s1/0 = R2 s1/0 | s1/0 = R2 s1/0 | ||
| | ||
[[router R2]] | [[router R2]] | ||
+ | </code> | ||
- | -------------------------------------- | ||
- | + | ==== Соединение роутеров, работающих на разных системах ==== | |
- | [g13:/var/db/dynagen] # cat qemulab.net | + | <code> |
- | [localhost] | + | [hostX:~] # cat distrlab.dng |
- | [[7200]] | + | [172.16.1.X] |
- | image = /var/db/dynagen/c7200-is-mz.122-13.T10.bin | + | [[ROUTER R1]] |
+ | image = c7200-is-mz.123-21.bin | ||
ram = 96 | ram = 96 | ||
- | [[ROUTER R13]] | ||
- | F0/0 = NIO_gen_eth:fxp0 | ||
- | F1/0 = NIO_gen_eth:tap0 | ||
- | |||
- | -------------------------------------- | ||
- | |||
- | |||
- | [g13:/var/db/dynagen] # cat distrlab.net | ||
- | [195.19.32.3] | ||
- | [[7200]] | ||
- | image = /var/db/dynagen/c7200-is-mz.122-13.T10.bin | ||
- | ram = 96 | ||
- | |||
- | [[ROUTER R1]] | ||
s1/0 = R2 s1/0 | s1/0 = R2 s1/0 | ||
F0/0 = NIO_gen_eth:fxp0 | F0/0 = NIO_gen_eth:fxp0 | ||
- | [195.19.32.6] | + | [172.16.1.Y] |
- | workingdir = /var/db/dynagen/ | + | workingdir = /root |
- | [[7200]] | + | [[ROUTER R2]] |
- | image = /var/db/dynagen/c7200-is-mz.122-13.T10.bin | + | image = c7200-is-mz.123-21.bin |
ram = 96 | ram = 96 | ||
- | [[ROUTER R2]] | ||
F0/0 = NIO_gen_eth:sis0 | F0/0 = NIO_gen_eth:sis0 | ||
- | |||
- | -------------------------------------- | ||
</code> | </code> | ||
- | |||
- |