Cisco IOS-XRvの実行環境 |
Dynalconf HOME |
Cisco IOS-XRvと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 up echo -n 0 > /sys/devices/virtual/net/$IFACE/bridge/multicast_snooping ---> snoopingを無効にしないと、IPv6 Multicast(Neighbor Discovery等)がフィルタリングされる場合がある
qemu-system-x86_64 \ -enable-kvm \ -daemonize \ -display none \ -m 3072 \ -drive file=iosxrv_6.1.2.qcow2,if=ide,index=0,media=disk,format=qcow2 \ -serial telnet:192.168.100.100:3000,server,nowait \ -device e1000,netdev=net0,mac=52:54:61:12:34:56 \ -netdev socket,id=net0,udp=192.168.100.100:21001,localaddr=192.168.100.100:20001 \ -device e1000,netdev=net1,mac=52:54:61:12:34:57 \ -netdev bridge,id=net1,br=br10200 \ -device e1000,netdev=net2,mac=52:54:61:12:34:58 \ -netdev bridge,id=net2,br=br10201 \ -device e1000,netdev=net3,mac=52:54:61:12:34:59 \ -netdev bridge,id=net3,br=br10202
[[Router R1]] model = 7200 F0/0 = VSW1 1 #VLAN200 XRv1 G0/0/0/0 [[Router R2]] model = 7200 F0/0 = VSW1 2 #VLAN201 XRv1 G0/0/0/1 [[Router R3]] model = 7200 F0/0 = VSW1 3 #VLAN202 XRv1 G0/0/0/2 [[ETHSW VSW1]] 1 = access 200 2 = access 201 3 = access 202 4 = dot1q 1 NIO_gen_eth:br2
interface GigabitEthernet0/0/0/0 ipv4 address 192.168.200.1 255.255.255.0 interface GigabitEthernet0/0/0/1 ipv4 address 192.168.201.1 255.255.255.0 interface GigabitEthernet0/0/0/2 ipv4 address 192.168.202.1 255.255.255.0
qemu-system-x86_64 \ -enable-kvm \ -daemonize \ -display none \ -m 3072 \ -drive file=iosxrv_6.1.2.qcow2,if=ide,index=0,media=disk,format=qcow2 \ -serial telnet:192.168.100.100:3000,server,nowait \ -device e1000,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 \ -device e1000,netdev=net1,mac=52:54:60:12:34:57 \ -netdev bridge,id=net1,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 GigabitEthernet0/0/0/0.200 encapsulation dot1q 200 ipv4 address 192.168.200.1 255.255.255.0 interface GigabitEthernet0/0/0/0.201 encapsulation dot1q 201 ipv4 address 192.168.201.1 255.255.255.0 interface GigabitEthernet0/0/0/0.202 encapsulation dot1q 202 ipv4 address 192.168.202.1 255.255.255.0
allow br10200 allow br10201 allow br10202 allow br2
/sys/devices/virtual/net/(brif)/bridge/multicast_snooping2台のIOS-XRvをブリッジインタフェースにトランク接続した場合、2台のIOS-XRv間でIPv6グローバルユニキャストアドレスを 使用した通信ができなくなる。
### 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.12.1.tar.xz tar xvJf qemu-2.12.1.tar.xz cd qemu-2.12.1 ./configure make make install reboot
qemu-img convert -f vmdk -O qcow2 iosxrv-demo.vmdk iosxrv_6.1.2.qcow2
-device e1000,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 |