取得台灣IPv4列表
#fetch http://ftp.apnic.net/stats/apnic/delegated-apnic-latest
#netmask `cat delegated-apnic-latest | awk -F'|' '/TW\|ipv4/ {print $4":+"($5-1)}'` > tw_ip_range.txt
2018年6月25日 星期一
2018年5月30日 星期三
FreeBSD 11.1 安裝 Mellanox Connect-X2 (MNPA19-XTR) 10G 網卡
#更新 /usr/src
>svnlite checkout https://svn.freebsd.org/base/releng/11.1 /usr/src
>make
>make install
#編譯及安裝 mlxen 模組
>cd /usr/src/sys/modules/mlxen
>make
>make install
參考網站:https://frankchang.me/2017/05/02/Enable-Mellanox-Connect-X2-10G-NIC-in-FreeBSD-11/
>svnlite checkout https://svn.freebsd.org/base/releng/11.1 /usr/src
#編譯及安裝 mlx4 模組
>cd /usr/src/sys/modules/mlx4>make
>make install
#編譯及安裝 mlxen 模組
>cd /usr/src/sys/modules/mlxen
>make
>make install
#載入模組
>kldload mlx4
>kldload mlxen
#加入開機載入
>ee /boot/loader.conf
+ mlx4_load="YES"
+mlxen_load="YES"
#查看模組是否載入
>kldstat
7 2 0xffffffff82628000 3123c mlx4.ko
8 2 0xffffffff8265a000 103e1 linuxkpi.ko
9 1 0xffffffff8266b000 1240d mlxen.ko
#ifconfig 可以看到 mlxen0 這張網卡
mlxen0: flags=8802 metric 0 mtu 1500
options=ed07bb
ether 00:02:c9:51:f9:5a
hwaddr 00:02:c9:51:f9:5a
nd6 options=29
media: Ethernet autoselect
status: no carrier
freebsd 11.1 update /usr/src
今天在安裝光纖網卡時,遇到要重新編譯kernel,在更新/usr/src時發現跟以往不太相同,故筆記做個紀錄。
#更新/usr/src指令
>svnlite update /usr/src
#在此指令遇到錯誤訊息
'/usr/src' is not a working copy
#查了網站說明後改用以下指令,網址後面的11.1是目前系統版本,可用uname -r查看
>svnlite checkout https://svn.freebsd.org/base/releng/11.1 /usr/src
PS:
1.參考網站:https://www.freebsd.org/doc/handbook/makeworld.html#updating-src-obtaining-src
#更新/usr/src指令
>svnlite update /usr/src
#在此指令遇到錯誤訊息
'/usr/src' is not a working copy
#查了網站說明後改用以下指令,網址後面的11.1是目前系統版本,可用uname -r查看
>svnlite checkout https://svn.freebsd.org/base/releng/11.1 /usr/src
PS:
1.參考網站:https://www.freebsd.org/doc/handbook/makeworld.html#updating-src-obtaining-src
2.系統預設沒有安裝svn,我看有svnlite指令,執行後可達到相同功能
2018年4月25日 星期三
webssh2
#安裝git
>pkg install git
#安裝npm
>pkg install npm
#下載webssh2
>git clone https://github.com/billchurch/WebSSH2
>cd WebSSH2/app
#複製config.json
>cp config.json.example config.json
#安裝webssh2
>npm install --production
#啟動服務
>npm start
>pkg install git
#安裝npm
>pkg install npm
#下載webssh2
>git clone https://github.com/billchurch/WebSSH2
>cd WebSSH2/app
#複製config.json
>cp config.json.example config.json
#安裝webssh2
>npm install --production
#啟動服務
>npm start
2018年4月18日 星期三
arping
#功能
檢查該IP是否在線上
#安裝
pkg install arping
#同網段使用
arping 10.10.1.1
#不同網段無法使用
#不同網段使用
arping -i bridge0 10.10.2.1
#控制發送封包次數
arping -i bridge0 -c 1 10.10.2.1
檢查該IP是否在線上
#安裝
pkg install arping
#同網段使用
arping 10.10.1.1
#不同網段無法使用
#
#控制發送封包次數
arping -i bridge0 -c 1 10.10.2.1
訂閱:
文章 (Atom)