Multi Link Aggregation between vEOS and FreeBSD on GNS3
Posted on 2014/09/12(Fri) 23:40 in technical
Summary
先日VirtualBoxで使えるようにしたvEOSは、仮想環境でも MLAG(multi link aggregation) が使えるゾ!
仮想環境で冗長化の構成コンフィグテストが出来るなんて!
これでコミュ障の僕も「書式チェックしたいからマシンタイム貸してください」なんて言わなくてもコンフィグテストが出来るってことかな?
やったね!だけどVirtualBoxのインタフェースが死なないから冗長化切り替えの試験は出来ないよ。何それ死ぬの?死なないことで死ぬ。
図にするとこんな感じ。(1回このアイコン使ってみたかったので描いたけど、これスゲー疲れる)
とにかく、雰囲気掴むために構築構築ゥ!
事前知識
前回の VirtualBoxでAristaのvEOSを使えるようにする を読んで、とりあえず動かせるようになっていてください。
あと、空気のようにGNS3を使うので GNS3を使った基本的な設定に関する諸作法について書かれたページ も適当に流し読みしておくと良いです。
環境構成図
vEOSが2台とBSDRPが2台。
それぞれたすき掛けの配線をして、これをLAGで繋ぐ。
登場人物:
vEOS-01 : vEOS-4.14.2F + Aboot-veos-serial-2.0.8 on VirtualBox vEOS-02 : vEOS-4.14.2F + Aboot-veos-serial-2.0.8 on VirtualBox node01 : BSDRP 1.51 on VirtualBox node02 : BSDRP 1.51 on VirtualBox VirtualBox: 4.3.12 GNS3: 0.8.7
Configuration
EOSの設定は、とりあえず EOS System Configuration Guide(PDF) に従います。
コピペで貼り付けレッツゴー。
vEOS-01
ena conf t hostname vEOS01 vlan 4094 trunk group mlag01 int vlan 4094 ip add 10.0.0.1/30 no autostate exit no spanning-tree vlan 4094 int ethernet 3-4 channel-group 1001 mode active int port-channel 1001 switchport mode trunk switchport trunk group mlag01 exit mlag configuration local-interface vlan 4094 peer-address 10.0.0.2 peer-link port-channel 1001 domain-id example heartbeat-interval 1000 no shut int ethernet 1 channel-group 1 mode active int port-channel 1 mlag 1 int ethernet 2 channel-group 2 mode active int port-channel 2 mlag 2 end write
vEOS-02
ena conf t hostname vEOS02 vlan 4094 trunk group mlag01 int vlan 4094 ip add 10.0.0.2/30 no autostate exit no spanning-tree vlan 4094 int ethernet 3-4 channel-group 1001 mode active int port-channel 1001 switchport mode trunk switchport trunk group mlag01 exit mlag configuration local-interface vlan 4094 peer-address 10.0.0.1 peer-link port-channel 1001 domain-id example heartbeat-interval 1000 no shut int ethernet 1 channel-group 1 mode active int port-channel 1 mlag 1 int ethernet 2 channel-group 2 mode active int port-channel 2 mlag 2 end write
node01
hostname node01 ifconfig em1 up ifconfig em2 up ifconfig lagg0 create ifconfig lagg0 laggproto lacp laggport em1 laggport em2 192.168.0.1/24 up
node02
hostname node02 ifconfig em1 up ifconfig em2 up ifconfig lagg0 create ifconfig lagg0 laggproto lacp laggport em1 laggport em2 192.168.0.2/24 up
確認
!危険!
VirtualBoxのネットワーク構成だと、各インタフェースはDownさせても片側がUpしているので、まともに冗長化されません。
BFDとかEtherOAMがあれば話は別だと思うのですが、用意できなかったので今回は雰囲気を掴むだけにしておきます。敗北。
見かけ上Link Aggregationが使えていることだけ確認して、満足することにします。
vEOS-01
vEOS01#show lacp neighbor State: A = Active, P = Passive; S=ShortTimeout, L=LongTimeout; G = Aggregable, I = Individual; s+=InSync, s-=OutOfSync; C = Collecting, X = state machine expired, D = Distributing, d = default neighbor state | Partner Port Status | Sys-id Port# State OperKey PortPri ------ ----------|------------------------- ------- --------- --------- ------- Port Channel Port-Channel1*: Et1 Bundled | 8000,08-00-27-7d-44-7b 2 ALGs+CD 0x00eb 32768 Port Channel Port-Channel2*: Et2 Bundled | 8000,08-00-27-2e-c0-82 2 ALGs+CD 0x00eb 32768 Port Channel Port-Channel1001: Et3 Bundled | 8000,08-00-27-37-e4-de 3 ALGs+CD 0x03e9 32768 Et4 Bundled | 8000,08-00-27-37-e4-de 4 ALGs+CD 0x03e9 32768 * - Only local interfaces for MLAGs are displayed. Connect to the peer to see the state for peer interfaces. vEOS01#show port-channel summary Flags ------------------------ ---------------------------- ------------------------- a - LACP Active p - LACP Passive * - static fallback F - Fallback enabled f - Fallback configured ^ - individual fallback U - In Use D - Down + - In-Sync - - Out-of-Sync i - incompatible with agg P - bundled in Po s - suspended G - Aggregable I - Individual S - ShortTimeout w - wait for agg Number of channels in use: 3 Number of aggregators:3 Port-Channel Protocol Ports ------------------ -------------- ------------------ Po1(U) LACP(a) Et1(PG+) PEt1(P) Po2(U) LACP(a) Et2(PG+) PEt2(P) Po1001(U) LACP(a) Et3(PG+) Et4(PG+) vEOS01#show mlag MLAG Configuration: domain-id : example local-interface : Vlan4094 peer-address : 10.0.0.2 peer-link : Port-Channel1001 MLAG Status: state : Active negotiation status : Connected peer-link status : Up local-int status : Up system-id : 0a:00:27:37:e4:de MLAG Ports: Disabled : 0 Configured : 0 Inactive : 0 Active-partial : 0 Active-full : 2
vEOS-02
vEOS02#show lacp neighbor State: A = Active, P = Passive; S=ShortTimeout, L=LongTimeout; G = Aggregable, I = Individual; s+=InSync, s-=OutOfSync; C = Collecting, X = state machine expired, D = Distributing, d = default neighbor state | Partner Port Status | Sys-id Port# State OperKey PortPri ------ ----------|------------------------- ------- --------- --------- ------- Port Channel Port-Channel1*: Et1 Bundled | 8000,08-00-27-7d-44-7b 3 ALGs+CD 0x00eb 32768 Port Channel Port-Channel2*: Et2 Bundled | 8000,08-00-27-2e-c0-82 3 ALGs+CD 0x00eb 32768 Port Channel Port-Channel1001: Et3 Bundled | 8000,08-00-27-76-db-38 3 ALGs+CD 0x03e9 32768 Et4 Bundled | 8000,08-00-27-76-db-38 4 ALGs+CD 0x03e9 32768 * - Only local interfaces for MLAGs are displayed. Connect to the peer to see the state for peer interfaces. vEOS02#show port-channel summary Flags ------------------------ ---------------------------- ------------------------- a - LACP Active p - LACP Passive * - static fallback F - Fallback enabled f - Fallback configured ^ - individual fallback U - In Use D - Down + - In-Sync - - Out-of-Sync i - incompatible with agg P - bundled in Po s - suspended G - Aggregable I - Individual S - ShortTimeout w - wait for agg Number of channels in use: 3 Number of aggregators:3 Port-Channel Protocol Ports ------------------ -------------- ------------------ Po1(U) LACP(a) Et1(PG+) PEt1(P) Po2(U) LACP(a) Et2(PG+) PEt2(P) Po1001(U) LACP(a) Et3(PG+) Et4(PG+) vEOS02#show mlag MLAG Configuration: domain-id : example local-interface : Vlan4094 peer-address : 10.0.0.1 peer-link : Port-Channel1001 MLAG Status: state : Active negotiation status : Connected peer-link status : Up local-int status : Up system-id : 0a:00:27:37:e4:de MLAG Ports: Disabled : 0 Configured : 0 Inactive : 0 Active-partial : 0 Active-full : 2
node01
[root@node01]~# ifconfig lagg0 lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 08:00:27:7d:44:7b inet6 fe80::a00:27ff:fe7d:447b%lagg0 prefixlen 64 scopeid 0x7 inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> media: Ethernet autoselect status: active laggproto lacp lagghash l2,l3,l4 laggport: em2 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> laggport: em1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
node02
[root@node02]~# ifconfig lagg0 lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 08:00:27:2e:c0:82 inet6 fe80::a00:27ff:fe2e:c082%lagg0 prefixlen 64 scopeid 0x7 inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> media: Ethernet autoselect status: active laggproto lacp lagghash l2,l3,l4 laggport: em2 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> laggport: em1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
もちろんping飛びます。
[root@node01]~# ping -i 0.1 -c 10 192.168.0.2 PING 192.168.0.2 (192.168.0.2): 56 data bytes 64 bytes from 192.168.0.2: icmp_seq=0 ttl=64 time=30.975 ms 64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=29.126 ms 64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=33.841 ms 64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=21.386 ms 64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=40.020 ms 64 bytes from 192.168.0.2: icmp_seq=5 ttl=64 time=35.863 ms 64 bytes from 192.168.0.2: icmp_seq=6 ttl=64 time=27.248 ms 64 bytes from 192.168.0.2: icmp_seq=7 ttl=64 time=42.182 ms 64 bytes from 192.168.0.2: icmp_seq=8 ttl=64 time=44.155 ms 64 bytes from 192.168.0.2: icmp_seq=9 ttl=64 time=76.637 ms --- 192.168.0.2 ping statistics --- 10 packets transmitted, 10 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 21.386/38.143/76.637/14.469 ms
おしまい
筐体間Link Aggregationが使える、非常に希少な仮想環境です。
ですが、如何せん仮想化に伴う問題の方が多いので、雰囲気に浸る位しかやれること無いです。と言う現状が悲しい。
ただまぁ、色々試せるので、普段手を出しにくいコンフィグに触れてみるいい機会だと思います、まる。
おしまい。