Cisco CSR1000Vの実行環境 |
Dynalconf HOME |
Cisco CSR1000VとDynamips上で動作するルータとの間で通信可能とする環境を記載します。 Access Portを使った構成とTrunk Portを使った構成について記載します。
auto ens33 iface ens33 inet static address 192.168.100.100 netmask 255.255.255.0 gateway 192.168.100.1 dns-nameservers 192.168.100.1 auto ens34 iface ens34 inet static address 0.0.0.0 auto ens34.200 iface ens34.200 inet manual vlan-raw-device ens34 auto ens34.201 iface ens34.201 inet manual vlan-raw-device ens34 auto ens34.202 iface ens34.202 inet manual vlan-raw-device ens34 auto ens35 iface ens35 inet static address 0.0.0.0 auto br10200 iface br10200 inet manual bridge_ports ens34.200 auto br10201 iface br10201 inet manual bridge_ports ens34.201 auto br10202 iface br10202 inet manual bridge_ports ens34.202 auto br2 iface br2 inet manual bridge_ports ens35
qemu-img create -f qcow2 csr1000v-universalk9.16.03.06_1.qcow2 8g
qemu-system-x86_64 \ -enable-kvm \ -daemonize \ -display none \ -vnc :0 \ -m 3072 \ -cdrom csr1000v-universalk9.16.03.06.iso \ -drive file=csr1000v-universalk9.16.03.06_1.qcow2,if=ide,index=0,media=disk,format=qcow2 \ -serial telnet:192.168.100.100:3000,server,nowait \ -device vmxnet3,netdev=net0,mac=52:54:90:12:34:56 \ -netdev bridge,id=net0,br=br10200 \ -device vmxnet3,netdev=net1,mac=52:54:90:12:34:57 \ -netdev bridge,id=net1,br=br10201 \ -device vmxnet3,netdev=net2,mac=52:54:90:12:34:59 \ -netdev bridge,id=net2,br=br10202
platform console serial
qemu-system-x86_64 \ -enable-kvm \ -daemonize \ -display none \ -vnc :0 \ -m 3072 \ -drive file=csr1000v-universalk9.16.03.06_1.qcow2,if=ide,index=0,media=disk,format=qcow2 \ -serial telnet:192.168.100.100:3000,server,nowait \ -device vmxnet3,netdev=net0,mac=52:54:90:12:34:56 \ -netdev bridge,id=net0,br=br10200 \ -device vmxnet3,netdev=net1,mac=52:54:90:12:34:57 \ -netdev bridge,id=net1,br=br10201 \ -device vmxnet3,netdev=net2,mac=52:54:90:12:34:59 \ -netdev bridge,id=net2,br=br10202
[[Router R1]] model = 7200 F0/0 = VSW1 1 #VLAN200 CSR1000V Gi1 [[Router R2]] model = 7200 F0/0 = VSW1 2 #VLAN201 CSR1000V Gi2 [[Router R3]] model = 7200 F0/0 = VSW1 3 #VLAN202 CSR1000V Gi3 [[ETHSW VSW1]] 1 = access 200 2 = access 201 3 = access 202 4 = dot1q 1 NIO_gen_eth:br2
interface GigabitEthernet1 ip address 192.168.200.1 255.255.255.0 interface GigabitEthernet2 ip address 192.168.201.1 255.255.255.0 interface GigabitEthernet3 ip address 192.168.202.1 255.255.255.0
qemu-system-x86_64 \ -enable-kvm \ -daemonize \ -display none \ -vnc :0 \ -m 3072 \ -drive file=csr1000v-universalk9.16.03.06_2.qcow2,if=ide,index=0,media=disk,format=qcow2 \ -serial telnet:192.168.100.100:3000,server,nowait \ -device vmxnet3,netdev=net0,mac=52:54:91:12:34:56 \ -netdev bridge,id=net0,br=br2
[[Router R4]] model = 7200 F0/0 = VSW2 1 #Connect Trunk Port(R4 F0/0 encapsulation dot1q 200) [[Router R5]] model = 7200 F0/0 = VSW2 2 #Connect Trunk Port(R5 F0/0 encapsulation dot1q 201) [[Router R6]] model = 7200 F0/0 = VSW2 3 #Connect Trunk Port(R6 F0/0 encapsulation dot1q 202) [[ETHSW VSW2]] 1 = dot1q 1 2 = dot1q 1 3 = dot1q 1 4 = dot1q 1 NIO_gen_eth:br2
interface GigabitEthernet1.200 encapsulation dot1q 200 ip address 192.168.200.1 255.255.255.0 interface GigabitEthernet1.201 encapsulation dot1q 201 ip address 192.168.201.1 255.255.255.0 interface GigabitEthernet1.202 encapsulation dot1q 202 ip address 192.168.202.1 255.255.255.0
allow br10200 allow br10201 allow br10202 allow br2
### make apt install pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev ### make install apt install flex bison wget https://download.qemu.org/qemu-2.11.1.tar.xz tar xvJf qemu-2.11.1.tar.xz cd qemu-2.11.1 ./configure make make install reboot
qemu-img convert -f vmdk -O qcow2 csr1000v.vmdk csr1000v.qcow2
-device vmxnet3,netdev=net0,mac=52:54:60:12:34:56 \ -netdev socket,id=net0,udp=192.168.100.100:21000,localaddr=192.168.100.100:20000 \
NETMAP 1:0/0@HOSTA 101:0/0@HOSTA
iou2net.pl -p 101 -u 21000:192.168.100.100:20000
Dynalconf HOME |