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
Next revision Both sides next revision
использование_эмуляторов_оборудования_cisco_в_unix [2010/04/13 16:44]
val
использование_эмуляторов_оборудования_cisco_в_unix [2011/01/31 17:43]
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
- +        npe = npe-400 
-        ​[[ROUTER GATE]] +         
-       F0/0 = NIO_gen_eth:​em0              ​for FreeBSD +        ​F1/0 = NIO_linux_eth:​eth1 
-       F0/0 = NIO_linux_eth:​eth1           for Linux +        F1/1 = NIO_linux_eth:​eth0 
-# F1/0 = NIO_linux_eth:​vlan2 ​          ​for Linux+#       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 46: Line 51:
 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 88: Line 73:
 </​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 115: Line 87:
 [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.txt · Last modified: 2013/05/22 13:50 (external edit)