2022年10月3日星期一

exos 配置Link Aggregation/链路聚合

 

帳號管理
變更密碼

#configure account <Account>

建立帳號時,需具備Admin權限。(Switch 能支援最多到 16 個管理帳號)

#create account [admin | user] <Account>

看要給建立的帳號admin或user權限

查看帳號

#show accounts

刪除帳號

#delete account <Account>

網路IP管理
設定IP Address

#configure vlan <Vlan-Name> ipaddress <IP>/<subnet_mask>
#configure vlan "Default" ipaddress 192.168.20.200 255.255.255.0
#configure vlan "Default" ipaddress 192.168.20.200/24

設定IP 管理接口 Address

#configure vlan "mgmt" ipaddress 192.168.20.201 255.255.255.0
#configure vlan "mgmt" ipaddress 192.168.20.201/24

刪除IP Address

#unconfigure vlan <Vlan-Name> ipaddress
#unconfigure vlan "Default" ipaddress

檢視IP Address

#show ipconfig
show ipconfig default

檢視IP 管理端口 Address

#show ipconfig mgmt

开启ssh管理

#enable ssh2

設定一般路由

#configure iproute add <Destination-network> <Destination-mask> <Gateway-IP>
#configure iproute add 192.168.10.0 255.255.255.0 192.168.20.1
#configure iproute add 192.168.10.0/24 192.168.20.1

設定default路由

#configure iproute add default <Gateway-IP>
#configure iproute add default 192.168.20.1

刪除路由

#configure iproute delete <Destination-network> <Destination-mask> <Gateway-IP>
#configure iproute delete 192.168.10.0 255.255.255.0 192.168.20.1
#configure iproute delete 192.168.10.0/24 192.168.20.1

檢視路由

#show iproute

設定DNS

#configure dns-client add domain-suffix xyz_inc.com
#configure dns-client add name-server <DNS-IP>

刪除DNS

#configure dns-client delete domain-suffix xyz_inc.com
#configure dns-client delete name-server <DNS-IP>

Port管理
啟用Port

#enable ports <Port>

停用port

#disable ports <Port>

查看port資訊

#show ports {Port} information
不指定Port時,顯示所有port

查看port流量統計

#show ports {Port} statistics

查看port即時流量

#show ports {Port} utilization

VLAN管理
建立VLAN

#create vlan <Vlan-Name>
#configure vlan <Vlan-Name> tag <Vlan-ID>

刪除VLAN

#delete vlan <vlan-Name>

將Port加到VLAN中

#configure vlan <Vlan-Name> add ports <Port>
#configure vlan "default" add port 9

設定Port帶VLAN tag (Trunk Mode)

#configure vlan <Vlan-Name> add ports <Port> tag
#configure vlan "default" add ports 9 tag

將Port自VLAN中刪除

#configure vlan <Vlan-Name> deletes port <Port>
#configure vlan "default" deletes port 9

配置VLAN的L3 IP Address

#configure vlan "default" ipaddress 192.168.1.254/24

啟用L3路由功能

#enable ipforwarding

查看VLAN

#show vlan

要查看VLAN下有哪些Port成員,要用detail

#show vlan detail

系統管理
顯示Switch資訊

#show switch

顯示firmware資訊

#show version

變更Switch名稱

#configure snmp sysName <Host-Name>

查看執行過的指令

#history

查看log

#show log

條列Switch檔案

#ls

編輯檔案

#vi <File-Name>

複製檔案

#cp <Source File-Name> <Destination File-Name>

刪除檔案

#rm <File-Name>

透過tftp備份檔案

#tftp put <TFTP-Server-IP> vr "VR-Default" <File-Name>

透過tftp下載檔案

#tftp get <TFTP-Server-IP> vr "VR-Default" <File-Name>

儲存設定

#save

變更過設定,提示符號會多一個 * 號。
輸入save儲存後,* 號就會消失代表設定已寫入primary.cfg。

另存組態檔。

#save configuration {primary | secondary | <existing-config> | <new-config>}

若未輸入檔名,則會取代預設的primary.cfg設定檔;
若自行輸入檔名,系統會再詢問是否要將此檔案做為開機預設的組態檔。
儲存組態檔時,不用加副檔名,糸統會自行加上副檔名 cfg。

載入組態檔。

#use configruation <config-filename>

載入既有的組態檔會在重開機後生效,組態檔不用加副檔名 cfg。

查看運行中組態

#show configuration <Module>

重開機

#reboot

清空設定值

#unconfigure switch all

unconfigure switch all 這個指令會清空所有設定值,並重新開機,不過使用者密碼並不會隨著重設。
當重開機後,若偵測到有default.xsf這個檔案,它會優先讀取;若沒有這個檔案,則回復最初的出廠值。
利用這個特性,我們可以事先在default.xsf寫入所需要的設定值,並利用tftp上傳到Switch內。
一旦這台Switch發生異常時,可以下unconfigure switch all,並讓它自動抓取 default.xsf ,
以後就不用再做任何設定,簡單又方便。只要硬體沒問題,永保不死身。

reboot這個重開機指令,不會去抓default.xsf;只有unconfigure switch all才會去抓。

校時
在出狀況時,正確的時間設定有助於系統管理員於log中找到問題,
其重要性不可忽略!

XOS上時區與offset的設定指令如下,其中offset單位是分。

#configure timezone name <tz_name> <GMT_offset>

例如台北時區是+8小時,換算為480分,其設定如下。

#configure timezone name Taipei 480

至於與NTP伺服器校時,可用sntp (Simple Network Time Protocol),於固定週期內向NTP Server校時。

#enable sntp-client
#configure sntp-client update-interval 1200
#configure sntp-client [primary | secondary] <NTP_Server_IP>

若為封閉環境,且無NTP Server,可下達以下指令直接設定時間。

#configure time <month> <day> <year> <hour> <minute> <second>

而查看系統時間、時區,沒有特殊指令,需透過show switch來查看。

#show switch

Web管理
Extreme Swtich也支援透過web來進行管理,不過預設是停用的。
要啟用web管理,請先設定好管理IP,然後下達以下指令來開放http或https管理頁面。

#enable web http | https



Load-Sharing Group
將多port合併為一個group,以達到failover及load sharing效果。
Extreme最大支援16 port組成一個Group。

#enable sharing <Port> grouping <Port-List> {LACP}
#enable sharing <masterPort> grouping <Port-List> {LACP}

其中選用參數LACP為sharing group的組成協定。若未指定,預設為static。
與其它廠牌對接時,建議採用標準的 LACP (Link Aggregation Control Protocol)。
例如,將1,2,3,4 port組成一個LACP Group,指令如下。

#enable sharing 1 grouping 1,2,3,4 LACP

檢視Load-Sharing有以下幾個相關指令。

#show sharing
#show sharing detail
若檢視LACP相關資訊,則可下以下指令。
#show lacp

其中Actor指的是Extreme Switch自己,Partner指的是對接的另一頭Switch;
Sys-Pri指的是System Priority,Key指的是LACP的admin key,而Agg Count指的是群組成員數。
若是static group,其群組資訊不會出現在這喔!


增加Load-Sharing Group成員指令如下。

#configure sharing <Port> add ports <Port-List>
#configure sharing <masterPort> add ports <Port-List>

刪除Load-Sharing Group成員指令如下。

#configure sharing <Port> delete ports <Port-List>
#configure sharing <masterPort> delete ports <Port-List>

取消Load-Sharing Group指令如下。

#disable sharing <Port>

disable sharing masterPort
注意!若要變更sharing模式由LACP→Static,或是由Static→LACP,
只能取消原有sharing,再建立新的sharing模式。







enable sharing 1 grouping 1-4 algorithm address-based L3_L4 lacp 

enable sharing 5 grouping 5,6,7,8 algorithm address-based L3_L4 lacp

enable sharing 23 grouping 23-24 algorithm address-based L3_L4 lacp 

enable sharing 25 grouping 25-26 algorithm address-based L3_L4 lacp

save



disable sharing <MasterPort>



在PVE使用虚拟 USB 存储设备 + ARPL 引导 DSM

  部分内容来自: https://blog.myds.cloud/archives/synoboot-usb-image-in-pve-virtual-machine.html 虚拟机建好之后,打开配置文件 nano /etc/pve/qemu-server/100.conf ...