bpi:log20150607_raspbian_swconfig
差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
bpi:log20150607_raspbian_swconfig [2015-06-07 12:11] – 作成 tosihisa@netfort.gr.jp | bpi:log20150607_raspbian_swconfig [2015-06-07 12:34] (現在) – tosihisa@netfort.gr.jp | ||
---|---|---|---|
行 9: | 行 9: | ||
この swconfig を / | この swconfig を / | ||
+ | ===== 簡単な使い方 ===== | ||
+ | |||
+ | ==== 普通のイーサネットスイッチと同じにする ==== | ||
+ | |||
+ | 以下のスクリプトは,vlan を使って,普通のイーサネットスイッチと同じ状態にします. | ||
+ | |||
+ | <file shell vlan.sh> | ||
+ | #!/bin/sh | ||
+ | # The swconfig port number are: | ||
+ | # |2|1|0|4| | ||
+ | # (looking at front of ports) | ||
+ | swconfig dev switch0 set reset | ||
+ | swconfig dev switch0 set enable_vlan 1 | ||
+ | swconfig dev switch0 vlan 102 set ports '0 1 2 3 4 8' | ||
+ | swconfig dev switch0 port 0 set pvid 102 | ||
+ | swconfig dev switch0 port 1 set pvid 102 | ||
+ | swconfig dev switch0 port 2 set pvid 102 | ||
+ | swconfig dev switch0 port 3 set pvid 102 | ||
+ | swconfig dev switch0 port 4 set pvid 102 | ||
+ | swconfig dev switch0 set apply | ||
+ | </ | ||
+ | |||
+ | vlan を有効にして,全てのポートを vlan ID 102 に結びつけています.' | ||
+ | 例えば '0 1 2 3 4 8' を '0 2 3 4 8' とすると,1番ポートはどこにも結びつかず,切り離しと同じになります. | ||
+ | |||
+ | ==== 各ポートのイーサネット接続状態 ==== | ||
+ | |||
+ | 現在のイーサネットスイッチの接続状況を確認するには,以下の様にすると分かります. | ||
+ | |||
+ | < | ||
+ | pi@raspberrypi ~ $ for i in 0 1 2 3 4 5 6 7 8 ; do swconfig dev switch0 port $i get link ; done ; | ||
+ | port:0 link:down | ||
+ | port:1 link:up speed: | ||
+ | port:2 link:down | ||
+ | port:3 link:up speed: | ||
+ | port:4 link:up speed: | ||
+ | port:5 link:down | ||
+ | port:6 link:down | ||
+ | port:7 link:down | ||
+ | port:8 link:up speed: | ||
+ | pi@raspberrypi ~ $ | ||
+ | </ | ||
+ | |||
+ | ==== イーサネット各ポートの通信状態 ==== | ||
+ | |||
+ | 各ポートの通信状態を取得します.割と細かく出力していると思います. | ||
+ | |||
+ | < | ||
+ | pi@raspberrypi ~ $ swconfig dev switch0 show | ||
+ | Global attributes: | ||
+ | enable_vlan: | ||
+ | ports: 0x011f | ||
+ | reset_mib: ??? | ||
+ | enable_jumbo: | ||
+ | allow_vid_4095: | ||
+ | Port 0: | ||
+ | mib: TxOctets | ||
+ | TxDropPkts | ||
+ | TxBroadcastPkts | ||
+ | TxMulticastPkts | ||
+ | TxUnicastPkts | ||
+ | TxCollisions | ||
+ | TxSingleCollision | ||
+ | TxMultipleCollision : 0 | ||
+ | TxDeferredTransmit | ||
+ | TxLateCollision | ||
+ | TxExcessiveCollision: | ||
+ | TxPausePkts | ||
+ | RxOctets | ||
+ | RxUndersizePkts | ||
+ | RxPausePkts | ||
+ | Pkts64Octets | ||
+ | Pkts65to127Octets | ||
+ | Pkts128to255Octets | ||
+ | Pkts256to511Octets | ||
+ | Pkts512to1023Octets : 0 | ||
+ | Pkts1024to1522Octets: | ||
+ | RxOversizePkts | ||
+ | RxJabbers | ||
+ | RxAlignmentErrors | ||
+ | RxFCSErrors | ||
+ | RxGoodOctets | ||
+ | RxDropPkts | ||
+ | RxUnicastPkts | ||
+ | RxMulticastPkts | ||
+ | RxBroadcastPkts | ||
+ | RxSAChanges | ||
+ | RxFragments | ||
+ | RxJumboPkts | ||
+ | RxSymbolErrors | ||
+ | RxDiscarded | ||
+ | |||
+ | pvid: 102 | ||
+ | link: port:0 link:down | ||
+ | Port 1: | ||
+ | mib: TxOctets | ||
+ | TxDropPkts | ||
+ | TxBroadcastPkts | ||
+ | TxMulticastPkts | ||
+ | TxUnicastPkts | ||
+ | TxCollisions | ||
+ | TxSingleCollision | ||
+ | TxMultipleCollision : 0 | ||
+ | TxDeferredTransmit | ||
+ | TxLateCollision | ||
+ | TxExcessiveCollision: | ||
+ | TxPausePkts | ||
+ | RxOctets | ||
+ | RxUndersizePkts | ||
+ | RxPausePkts | ||
+ | Pkts64Octets | ||
+ | Pkts65to127Octets | ||
+ | Pkts128to255Octets | ||
+ | Pkts256to511Octets | ||
+ | Pkts512to1023Octets : 0 | ||
+ | Pkts1024to1522Octets: | ||
+ | RxOversizePkts | ||
+ | RxJabbers | ||
+ | RxAlignmentErrors | ||
+ | RxFCSErrors | ||
+ | RxGoodOctets | ||
+ | RxDropPkts | ||
+ | RxUnicastPkts | ||
+ | RxMulticastPkts | ||
+ | RxBroadcastPkts | ||
+ | RxSAChanges | ||
+ | RxFragments | ||
+ | RxJumboPkts | ||
+ | RxSymbolErrors | ||
+ | RxDiscarded | ||
+ | |||
+ | pvid: 102 | ||
+ | link: port:1 link:up speed: | ||
+ | Port 2: | ||
+ | mib: TxOctets | ||
+ | TxDropPkts | ||
+ | TxBroadcastPkts | ||
+ | TxMulticastPkts | ||
+ | TxUnicastPkts | ||
+ | TxCollisions | ||
+ | TxSingleCollision | ||
+ | TxMultipleCollision : 0 | ||
+ | TxDeferredTransmit | ||
+ | TxLateCollision | ||
+ | TxExcessiveCollision: | ||
+ | TxPausePkts | ||
+ | RxOctets | ||
+ | RxUndersizePkts | ||
+ | RxPausePkts | ||
+ | Pkts64Octets | ||
+ | Pkts65to127Octets | ||
+ | Pkts128to255Octets | ||
+ | Pkts256to511Octets | ||
+ | Pkts512to1023Octets : 0 | ||
+ | Pkts1024to1522Octets: | ||
+ | RxOversizePkts | ||
+ | RxJabbers | ||
+ | RxAlignmentErrors | ||
+ | RxFCSErrors | ||
+ | RxGoodOctets | ||
+ | RxDropPkts | ||
+ | RxUnicastPkts | ||
+ | RxMulticastPkts | ||
+ | RxBroadcastPkts | ||
+ | RxSAChanges | ||
+ | RxFragments | ||
+ | RxJumboPkts | ||
+ | RxSymbolErrors | ||
+ | RxDiscarded | ||
+ | |||
+ | pvid: 102 | ||
+ | link: port:2 link:down | ||
+ | Port 3: | ||
+ | mib: TxOctets | ||
+ | TxDropPkts | ||
+ | TxBroadcastPkts | ||
+ | TxMulticastPkts | ||
+ | TxUnicastPkts | ||
+ | TxCollisions | ||
+ | TxSingleCollision | ||
+ | TxMultipleCollision : 0 | ||
+ | TxDeferredTransmit | ||
+ | TxLateCollision | ||
+ | TxExcessiveCollision: | ||
+ | TxPausePkts | ||
+ | RxOctets | ||
+ | RxUndersizePkts | ||
+ | RxPausePkts | ||
+ | Pkts64Octets | ||
+ | Pkts65to127Octets | ||
+ | Pkts128to255Octets | ||
+ | Pkts256to511Octets | ||
+ | Pkts512to1023Octets : 450 | ||
+ | Pkts1024to1522Octets: | ||
+ | RxOversizePkts | ||
+ | RxJabbers | ||
+ | RxAlignmentErrors | ||
+ | RxFCSErrors | ||
+ | RxGoodOctets | ||
+ | RxDropPkts | ||
+ | RxUnicastPkts | ||
+ | RxMulticastPkts | ||
+ | RxBroadcastPkts | ||
+ | RxSAChanges | ||
+ | RxFragments | ||
+ | RxJumboPkts | ||
+ | RxSymbolErrors | ||
+ | RxDiscarded | ||
+ | |||
+ | pvid: 102 | ||
+ | link: port:3 link:up speed: | ||
+ | Port 4: | ||
+ | mib: TxOctets | ||
+ | TxDropPkts | ||
+ | TxBroadcastPkts | ||
+ | TxMulticastPkts | ||
+ | TxUnicastPkts | ||
+ | TxCollisions | ||
+ | TxSingleCollision | ||
+ | TxMultipleCollision : 0 | ||
+ | TxDeferredTransmit | ||
+ | TxLateCollision | ||
+ | TxExcessiveCollision: | ||
+ | TxPausePkts | ||
+ | RxOctets | ||
+ | RxUndersizePkts | ||
+ | RxPausePkts | ||
+ | Pkts64Octets | ||
+ | Pkts65to127Octets | ||
+ | Pkts128to255Octets | ||
+ | Pkts256to511Octets | ||
+ | Pkts512to1023Octets : 0 | ||
+ | Pkts1024to1522Octets: | ||
+ | RxOversizePkts | ||
+ | RxJabbers | ||
+ | RxAlignmentErrors | ||
+ | RxFCSErrors | ||
+ | RxGoodOctets | ||
+ | RxDropPkts | ||
+ | RxUnicastPkts | ||
+ | RxMulticastPkts | ||
+ | RxBroadcastPkts | ||
+ | RxSAChanges | ||
+ | RxFragments | ||
+ | RxJumboPkts | ||
+ | RxSymbolErrors | ||
+ | RxDiscarded | ||
+ | |||
+ | pvid: 102 | ||
+ | link: port:4 link:down | ||
+ | Port 5: | ||
+ | mib: ??? | ||
+ | pvid: 0 | ||
+ | link: port:5 link:down | ||
+ | Port 6: | ||
+ | mib: ??? | ||
+ | pvid: 0 | ||
+ | link: port:6 link:down | ||
+ | Port 7: | ||
+ | mib: ??? | ||
+ | pvid: 0 | ||
+ | link: port:7 link:down | ||
+ | Port 8: | ||
+ | mib: TxOctets | ||
+ | TxDropPkts | ||
+ | TxBroadcastPkts | ||
+ | TxMulticastPkts | ||
+ | TxUnicastPkts | ||
+ | TxCollisions | ||
+ | TxSingleCollision | ||
+ | TxMultipleCollision : 0 | ||
+ | TxDeferredTransmit | ||
+ | TxLateCollision | ||
+ | TxExcessiveCollision: | ||
+ | TxPausePkts | ||
+ | RxOctets | ||
+ | RxUndersizePkts | ||
+ | RxPausePkts | ||
+ | Pkts64Octets | ||
+ | Pkts65to127Octets | ||
+ | Pkts128to255Octets | ||
+ | Pkts256to511Octets | ||
+ | Pkts512to1023Octets : 411 | ||
+ | Pkts1024to1522Octets: | ||
+ | RxOversizePkts | ||
+ | RxJabbers | ||
+ | RxAlignmentErrors | ||
+ | RxFCSErrors | ||
+ | RxGoodOctets | ||
+ | RxDropPkts | ||
+ | RxUnicastPkts | ||
+ | RxMulticastPkts | ||
+ | RxBroadcastPkts | ||
+ | RxSAChanges | ||
+ | RxFragments | ||
+ | RxJumboPkts | ||
+ | RxSymbolErrors | ||
+ | RxDiscarded | ||
+ | |||
+ | pvid: 102 | ||
+ | link: port:8 link:up speed: | ||
+ | VLAN 102: | ||
+ | ports: 0 1 2 3 4 8 | ||
+ | pi@raspberrypi ~ $ | ||
+ | </ | ||
bpi/log20150607_raspbian_swconfig.1433679086.txt.gz · 最終更新: 2015-06-07 12:11 by tosihisa@netfort.gr.jp