User Tools

Site Tools


использование_эмуляторов_оборудования_cisco_в_unix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
использование_эмуляторов_оборудования_cisco_в_unix [2010/09/07 12:59]
val
использование_эмуляторов_оборудования_cisco_в_unix [2013/05/22 13:50] (current)
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] 
-        [[ROUTER ​GATE]]+        [[ROUTER ​router.corpX.un]]
         image = c7200-is-mz.123-21.bin         image = c7200-is-mz.123-21.bin
         ram = 160         ram = 160
- +        npe = npe-400 
-       F0/0 = NIO_gen_eth:​em0              ​for FreeBSD +        ​ 
-       F0/0 = NIO_linux_eth:​eth0           for Linux +        F1/0 = NIO_linux_eth:​eth1 
-#  F1/0 = NIO_linux_eth:​vlan2 ​         for Linux+        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
 </​code><​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 45: Line 52:
 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>​ 
-hostname dynamips.corpX.un 
- 
-interface FastEthernet0/​0 
- 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>​
  
-===== Примеры конфигураций =====+===== Примеры ​dynagen ​конфигураций =====
  
 ==== Цепочка роутеров ==== ==== Цепочка роутеров ====
 <​code>​ <​code>​
-[gate:~] # cat simple1.net+[hostX:~] # cat simple1.dng
 [localhost] [localhost]
  
-    [[7200]] +    [[ROUTER R1]] 
-    image = 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
     ​     ​
Line 87: Line 74:
 </​code>​ </​code>​
  
-==== Соединение с qemu (FreeBSD) ==== 
-<​code>​ 
-[gate:~] # cat qemulab.net ​ 
-[localhost] 
-        [[7200]] 
-        image = c7200-is-mz.122-13.T10.bin 
-        ram = 96 
- 
-        [[ROUTER R13]] 
-        F0/0 = NIO_gen_eth:​fxp0 
-        F1/0 = NIO_gen_eth:​tap0 
-</​code>​ 
  
 ==== Соединение роутеров,​ работающих на разных системах ==== ==== Соединение роутеров,​ работающих на разных системах ====
 <​code>​ <​code>​
-[gate:~] # cat distrlab.net +[hostX:~] # cat distrlab.dng 
 [172.16.1.X] [172.16.1.X]
-        [[7200]] +        [[ROUTER R1]] 
-        image = c7200-is-mz.122-13.T10.bin+        image = c7200-is-mz.123-21.bin
         ram = 96         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
Line 114: Line 88:
 [172.16.1.Y] [172.16.1.Y]
 workingdir = /root workingdir = /root
-        [[7200]] +        [[ROUTER R2]] 
-        image = 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>​
использование_эмуляторов_оборудования_cisco_в_unix.1283849955.txt.gz · Last modified: 2013/05/22 13:50 (external edit)