20200210_jeffrey - silenceuncrio/diary GitHub Wiki
review
ไธ็ฆฎๆไบไธ็ญๆ M360P proscend ๅคๅฑค็ make ๅทฒ็ถๅๅฅฝไบ
ไพๅ proscend ๅ งๅฑค
ๅ proscend ๅ งๅฑคๅๅ ไฟฎๆน /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# mount m350.vmdk
mkdir -p /home/jeffrey/m350
sudo mount UUID="7e970ddc-986b-4246-bbcf-f6eb90ed93b5" /home/jeffrey/m350
# execute once is enough ?
# sudo chown -R jeffrey:jeffrey /home/jeffrey/m350
# mount m360.vmdk
mkdir -p /home/jeffrey/m360
sudo mount UUID="c0386d28-334c-4729-9e93-669b8515aa27" /home/jeffrey/m360
# execute once is enough ?
# sudo chown -R jeffrey:jeffrey /home/jeffrey/m360
exit 0
ๅฐ jubuntu ้้ๆฉ
็ผ็พ m360 ๆๆญฃๅธธ mount ่ตทไพ
่ชๅทฑไพๆ build-m360 container ๅซ่ตทไพ
docker container start build-m360
docker exec -it -u user build-m360 bash
ไธ้ฒ container ็่ตทๆๅผ
cd /home/user
source proenv.sh
ๅ้ฒ proscend ็ฎ้ๅ make distclean
cd proscend
make distclean
make menuconfig
make menuconfig
- Products/Vendor = M360P/2_PI
make clean ๅพๅ make
make clean
make
proscend ๅ งๅฑคไธไธๅญๅฐฑ build ๅฅฝไบ
ๆพไธ็ M360P ้้ uboot ไพๅ upgrade
M360 - P2 - BGP with MD5 ้ๅทฅ
ๅ ๆบๅไปฅไธ็ฐๅข
+-------+ +-------+
| | lan | |
| M360P +-------------------+-------------------+ M300 |
| | 192.168.1.11 192.168.1.13 | |
+-------+ +-------+
ๅทฒ็ขบๅฎๅ ฉ้็ bgp ่ฝๆญฃๅธธๅทฅไฝ
ๅ่ 20200121_jeffrey
่ฉฒๅคฉ็บไบ่ฉไผฐ่ฉฒๅทฅไฝ็ ๅฏ่ฝๆง ไปฅๅ ้่ฆๅทฅๆ ๆ goole ไบไธไธ
ๅ่ Adding MD5-enabled BGP Neighbors
ๅจ้ ็ฝฎ MD5 ๆ
M360P ่ M300 ๅๅบ็พไบ้ฏ่ชค
M360P
Router> enable
Router# configure terminal
Router(config)# router bgp 11
Router(config-router)# neighbor 192.168.1.13 password mypassword
% Error while applying TCP-Sig to session(s)
Router(config-router)#
M300
Router> enable
Router# configure terminal
Router(config)# router bgp 13
Router(config-router)# neighbor 192.168.1.11 password mypassword
% Error while applying TCP-Sig to session(s)
Router(config-router)#
ๅไธๅ็ฆฎๆ ่ป้ซ้ฑๆ winston ๆๆๅฐ bgp with md5 ้่ฆๆ้ไธๅ kernel ็้ธ้
ๅ ่ชๅทฑ google ไธไธ
- BGP MD5 on CentOS
- [quagga-dev 9104] MD5 issues on RHEL 5.4 - Error while applying TCP-SIG to session(s)...
M360P ไธ bgp ็ log
2019/11/05 01:43:18 BGP: BGPd 1.1.0 starting: vty@2605, bgp@<all>:179 pid 8016
2019/11/05 01:47:46 BGP: Vty connection from 127.0.0.1
2019/11/05 01:51:22 BGP: Terminating on signal
2019/11/05 01:51:22 BGP: VRF 0 is to be deleted.
2019/11/05 01:51:22 BGP: VRF 0 is to be disabled.
2019/11/05 01:59:00 BGP: BGPd 1.1.0 starting: vty@2605, bgp@<all>:179 pid 23369
2019/11/05 01:59:01 BGP: stream_read_try: read failed on fd 12: Connection reset by peer
2019/11/05 01:59:01 BGP: 192.168.1.13 [Error] bgp_read_packet error: Connection reset by peer
2019/11/05 01:59:11 BGP: stream_read_try: read failed on fd 12: Connection reset by peer
2019/11/05 01:59:11 BGP: 192.168.1.13 [Error] bgp_read_packet error: Connection reset by peer
2019/11/05 01:59:21 BGP: stream_read_try: read failed on fd 12: Connection reset by peer
2019/11/05 01:59:21 BGP: 192.168.1.13 [Error] bgp_read_packet error: Connection reset by peer
2019/11/05 01:59:31 BGP: stream_read_try: read failed on fd 12: Connection reset by peer
2019/11/05 01:59:31 BGP: 192.168.1.13 [Error] bgp_read_packet error: Connection reset by peer
2019/11/05 01:59:39 BGP: %ADJCHANGE: neighbor 192.168.1.13 Up
2019/11/05 02:00:09 BGP: Vty connection from 127.0.0.1
2019/11/05 02:13:13 BGP: Vty connection from 127.0.0.1
2019/11/05 02:16:00 BGP: %NOTIFICATION: sent to neighbor 192.168.1.13 6/6 (Cease/Other Configuration Change) 0 bytes
2019/11/05 02:16:00 BGP: Notification sent to neighbor 192.168.1.13: configuration change
2019/11/05 02:16:00 BGP: sockopt_tcp_signature: setsockopt(7): Protocol not available
2019/11/05 02:16:00 BGP: can't set TCP_MD5SIG option on socket 7: Protocol not available
2019/11/05 02:16:00 BGP: %ADJCHANGE: neighbor 192.168.1.13 Down
2019/11/05 02:16:02 BGP: sockopt_tcp_signature: setsockopt(12): Protocol not available
2019/11/05 02:16:02 BGP: can't set TCP_MD5SIG option on socket 12: Protocol not available
2019/11/05 02:16:02 BGP: sockopt_tcp_signature: setsockopt(12): Protocol not available
2019/11/05 02:16:02 BGP: can't set TCP_MD5SIG option on socket 12: Protocol not available
2019/11/05 02:16:02 BGP: stream_read_try: read failed on fd 12: Connection reset by peer
2019/11/05 02:16:02 BGP: 192.168.1.13 [Error] bgp_read_packet error: Connection reset by peer
2019/11/05 02:16:03 BGP: %ADJCHANGE: neighbor 192.168.1.13 Up
2019/11/05 02:16:39 BGP: %NOTIFICATION: received from neighbor 192.168.1.13 6/6 (Cease/Other Configuration Change) 0 bytes
2019/11/05 02:16:39 BGP: %ADJCHANGE: neighbor 192.168.1.13 Down BGP Notification received
2019/11/05 02:16:40 BGP: sockopt_tcp_signature: setsockopt(12): Protocol not available
2019/11/05 02:16:40 BGP: can't set TCP_MD5SIG option on socket 12: Protocol not available
2019/11/05 02:16:40 BGP: sockopt_tcp_signature: setsockopt(12): Protocol not available
2019/11/05 02:16:40 BGP: can't set TCP_MD5SIG option on socket 12: Protocol not available
2019/11/05 02:16:40 BGP: stream_read_try: read failed on fd 12: Connection reset by peer
2019/11/05 02:16:40 BGP: 192.168.1.13 [Error] bgp_read_packet error: Connection reset by peer
2019/11/05 02:16:42 BGP: %ADJCHANGE: neighbor 192.168.1.13 Up
้้ต็ log
2019/11/05 02:16:00 BGP: sockopt_tcp_signature: setsockopt(7): Protocol not available
2019/11/05 02:16:00 BGP: can't set TCP_MD5SIG option on socket 7: Protocol not available
ๅจ winston ็ๅนซๅฟไธ
ๅจไปฅไธ็้้ต่ๆพๅฐ CONFIG_TCP_MD5SIG
user@44e2d8d07479:~/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7621/linux-3.10.14$ cat .config | grep MD5
# CONFIG_TCP_MD5SIG is not set
CONFIG_CRYPTO_MD5=y
ๅ็ถ้่ชๅทฑไธ็ชๆธ็ดขๅพ
้้ make kener_menuconfig ๆพๅฐไบ
TCP: MD5 Signature Option support (RFC2385)
.config - Linux/mips 3.10.14 Kernel Configuration
> Networking support > Networking options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ Networking options โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Arrow keys navigate the menu. <Enter> selects submenus --->. โ
โ Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, โ
โ <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> โ
โ for Search. Legend: [*] built-in [ ] excluded <M> module < > โ
โ โโโโโ^(-)โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ [ ] PF_KEY MIGRATE โ โ
โ โ [*] TCP/IP networking โ โ
โ โ [*] IP: multicasting โ โ
โ โ [*] IP: advanced router โ โ
โ โ ... โ โ
โ โ [ ] TCP: advanced congestion control ---> โ โ
โ โ [ ] TCP: MD5 Signature Option support (RFC2385) โ โ
โ โ <*> The IPv6 protocol ---> โ โ
โ โโโโโโด(+)โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ <Select> < Exit > < Help > < Save > < Load > โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ไฟฎๆน m360p_kernel_defconfig-3.10 ๅฆไธ
diff --git a/m360p_kernel_defconfig-3.10 b/m360p_kernel_defconfig-3.10
index 26c2e6a..b6db2c5 100644
--- a/m360p_kernel_defconfig-3.10
+++ b/m360p_kernel_defconfig-3.10
@@ -502,6 +502,7 @@ CONFIG_SYS_SUPPORTS_MULTITHREADING=y
CONFIG_SYS_SUPPORTS_SCHED_SMT=y
CONFIG_SYS_SUPPORTS_SMP=y
# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_MD5SIG=y
# CONFIG_THIRD_IF_MT7615E is not set
CONFIG_THIRD_IF_NONE=y
CONFIG_TICK_CPU_ACCOUNTING=y
(END)
้ๆฐ compile kernel - refer to How to recompile the kernel only?
make target/linux/{clean,compile} V=s
้ฒ proscend ้ๆฐ็ข็ image
make clean
make
proscend ็ฎ้ make ๆ้ฏ
...
cp /home/user/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7621/vmlinux-mt7621.uImage image/mips_linux_kernel_image
cp: cannot stat โ/home/user/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7621/vmlinux-mt7621.uImageโ: No such file or directory
make: *** [sysupgrade_bin] Error 1
user@44e2d8d07479:~/proscend$
kernel ๆฒๆ install ?
user@44e2d8d07479:~$ make target/linux/install
make[1] target/linux/install
make[2] -C target/linux install
ๆฒ้ฏ
proscend ไธ image ๅทฒ้ ๅฉ็ข็
้้ uboot upgrade
ๅๅปๅไธๅฐ M360P
่ท jessy ๅไบไธๅฐ M360P
ๆญๅปบๆธฌ่ฉฆ็ฐๅขๅฆไธ
+-------+ +-------+
| | lan | |
| M360P +-------------------+-------------------+ M360P |
| | 192.168.1.11 192.168.1.13 | |
+-------+ +-------+
ๅ่ Adding MD5-enabled BGP Neighbors
้ ็ฝฎ MD5
็่ตทไพๆฏๅปบ่ตทไพไบ
Router# write
Configuration saved to /etc/quagga/bgpd.conf
Router#
Router# exit
Connection closed by foreign host
write ๅพๅพๅฐ็ /etc/quagga/bgpd.conf ๅฆไธ
ไปฅ M360P - 192.168.1.11 ็บไพ
!
! Zebra configuration saved from vty
! 2019/11/05 04:56:44
!
hostname Router
password zebra
log file /tmp/bgpd.log
!
router bgp 11
bgp router-id 192.168.1.11
redistribute kernel
redistribute connected
neighbor 192.168.1.13 remote-as 13
neighbor 192.168.1.13 password mypassword
neighbor 192.168.1.13 ebgp-multihop 255
!
address-family ipv6
exit-address-family
exit
!
line vty
!
ๅฏไปฅ็ผ็พ้ๅคๅบไพ็้้ต command
neighbor 192.168.1.13 password mypassword
่ฉฆ่ๅฉ็จ tcpdump ๆไธไบๅฐๅ ๅนซๅฉ่ชๅทฑไบ่งฃ ๆฒๆ MD5 ๅ ๆ MD5 ็ๅทฎๅฅๅฐๅบๆฏไป้บผ
ๅ่ ไฝฟ็จ wireshark ๆฅ็ tcpdump ็ๆๅ ็ปๆ
ๅคไบ neighbor 192.168.1.13 password mypassword ้ command ็ๅทฎๅฅ
ๅจๆผๅ ฉ้็ bgp neighbors ๅจ้ฒ่ก tcp 3 way handshake ๆ
TCP packets ๆๅคๅบไบไธๅ option
- TCP MD5 signature
็ดฐ็ฏๅฏไปฅๅ่ RFC 2385
- Protection of BGP Sessions via the TCP MD5 Signature Option
ariel ๆณจๆๅฐ m350 ไธ fontawesome ็ icon ๆ็ฐๅธธ
ๆ้่ฆไฟฎๆน็ๆฏ fa-compress ๅ fa-expand
- fa-compress to fa-compress-alt
- fa-expand to fa-expand-alt
ๅพ ไฟฎๆน็ fa-compress ๆไธ่
โ www git:(develop) โ grep -r fa-compress
app/feature/dualSim.html: <i class="fa fa-compress"></i> {{ 'CONNECT' | translate }}</button>
app/feature/dualSim_2apn.html: <i class="fa fa-compress"></i> {{ 'CONNECT' | translate }}</button>
app/feature/apn_config.html: <i class="fa fa-compress"></i> {{ 'CONNECT' | translate }}</button>
ๅพ ไฟฎๆน็ fa-expand ๆไธ่
ome/css/font-awesome.css:.fa-compress:before {
โ www git:(develop) โ grep -r fa-expand
app/feature/dualSim.html: <i class="fa fa-expand"></i> {{ 'DISCONNECT' | translate }}</button>
app/feature/dualSim_2apn.html: <i class="fa fa-expand"></i> {{ 'DISCONNECT' | translate }}</button>
app/feature/apn_config.html: <i class="fa fa-expand"></i> {{ 'DISCONNECT' | translate }}</button>
็ญ m360 ๅไธๆฎต่ฝๅไพไฟฎๆน
ariel ่กจ็คบ tty2tcp ้่ฆ porting web ui ๅฐ
- M300[release/v2.03]
- M350[develop]
ไธๆจฃๆฏ็ญ M360P ๅไธๆฎต่ฝ
M360P ๅ ๅไธๆฎต่ฝ
ๅฐฑไธๅไฟฎๆน็ญๅพ commit
diff --git a/m360p_kernel_defconfig-3.10 b/m360p_kernel_defconfig-3.10
index 26c2e6a..b6db2c5 100644
--- a/m360p_kernel_defconfig-3.10
+++ b/m360p_kernel_defconfig-3.10
@@ -502,6 +502,7 @@ CONFIG_SYS_SUPPORTS_MULTITHREADING=y
CONFIG_SYS_SUPPORTS_SCHED_SMT=y
CONFIG_SYS_SUPPORTS_SMP=y
# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_MD5SIG=y
# CONFIG_THIRD_IF_MT7615E is not set
CONFIG_THIRD_IF_NONE=y
CONFIG_TICK_CPU_ACCOUNTING=y
(END)
ๅๅฐ m350 ๅทฅไฝ - ไธๆจฃไฝฟ็จ jubuntu
m350[develop]
- Vendor/Products = CTCU/0_CTCU
ๅ ไฟฎ fontawesome ็ bug
diff --git a/proscend/prosrc/www/app/feature/apn_config.html b/proscend/prosrc/www/app/feature/apn_config.html
index 876df2d..9ef23a1 100644
--- a/proscend/prosrc/www/app/feature/apn_config.html
+++ b/proscend/prosrc/www/app/feature/apn_config.html
@@ -29,10 +29,10 @@
<div class="col-sm-3" ng-show="vm.whoAmI.level >= 2">
<button class="btn btn-primary" ng-show="vm.lte0_proto_state.npsts != 2 && vm.spinner==false"
data-toggle="modal" data-target="#modal_info" ng-click="vm.connect()">
- <i class="fa fa-compress"></i> {{ 'CONNECT' | translate }}</button>
+ <i class="fa fa-compress-alt"></i> {{ 'CONNECT' | translate }}</button>^M
<button class="btn btn-primary" ng-show="vm.lte0_proto_state.npsts == 2 && vm.spinner==false"
data-toggle="modal" data-target="#modal_info" ng-click="vm.disconnect()">
- <i class="fa fa-expand"></i> {{ 'DISCONNECT' | translate }}</button>
+ <i class="fa fa-expand-alt"></i> {{ 'DISCONNECT' | translate }}</button>^M
<button class="btn btn-primary" ng-show="vm.spinner == true">
<i class="fa fa-spinner fa-pulse fa-fw"></i></button>
diff --git a/proscend/prosrc/www/app/feature/dualSim.html b/proscend/prosrc/www/app/feature/dualSim.html
index 04c733c..aae0773 100644
--- a/proscend/prosrc/www/app/feature/dualSim.html
+++ b/proscend/prosrc/www/app/feature/dualSim.html
@@ -32,10 +32,10 @@
<div class="col-sm-4">
<button class="btn btn-primary" ng-show="vm.current_lte.npsts != 2 && vm.spinner==false"
data-toggle="modal" data-target="#modal_info" ng-click="vm.connect()">
- <i class="fa fa-compress"></i> {{ 'CONNECT' | translate }}</button>
+ <i class="fa fa-compress-alt"></i> {{ 'CONNECT' | translate }}</button>^M
<button class="btn btn-primary" ng-show="vm.current_lte.npsts == 2 && vm.spinner==false"
data-toggle="modal" data-target="#modal_info" ng-click="vm.disconnect()">
- <i class="fa fa-expand"></i> {{ 'DISCONNECT' | translate }}</button>
+ <i class="fa fa-expand-alt"></i> {{ 'DISCONNECT' | translate }}</button>^M
<button class="btn btn-primary" ng-show="vm.spinner == true">
<i class="fa fa-spinner fa-pulse fa-fw"></i></button>
diff --git a/proscend/prosrc/www/app/feature/dualSim_2apn.html b/proscend/prosrc/www/app/feature/dualSim_2apn.html
index 1faf100..a858279 100644
--- a/proscend/prosrc/www/app/feature/dualSim_2apn.html
+++ b/proscend/prosrc/www/app/feature/dualSim_2apn.html
@@ -29,10 +29,10 @@
<div class="col-sm-3">
<button class="btn btn-primary" ng-show="vm.lte0_proto_state.npsts != 2 && vm.spinner==false"
data-toggle="modal" data-target="#modal_info" ng-click="vm.connect()">
- <i class="fa fa-compress"></i> {{ 'CONNECT' | translate }}</button>
+ <i class="fa fa-compress-alt"></i> {{ 'CONNECT' | translate }}</button>^M
<button class="btn btn-primary" ng-show="vm.lte0_proto_state.npsts == 2 && vm.spinner==false"
data-toggle="modal" data-target="#modal_info" ng-click="vm.disconnect()">
- <i class="fa fa-expand"></i> {{ 'DISCONNECT' | translate }}</button>
+ <i class="fa fa-expand-alt"></i> {{ 'DISCONNECT' | translate }}</button>^M
<button class="btn btn-primary" ng-show="vm.spinner == true">
<i class="fa fa-spinner fa-pulse fa-fw"></i></button>
(END)
build image ๅฏฆ้่ฉฆ่ฉฆ
้้ web ๅ firmware upgrade
้้ๆฉๅพ็ผ็พ web ่ตทไธไพ
่ค่ฃฝ /tmp/icos/web/lighttpd.conf ไธฆไฟฎๆน server.port ๆนไพฟๆธฌ่ฉฆ
root@ICR-401:/home/admin# cp /tmp/icos/web/lighttpd.conf /tmp/
root@ICR-401:/home/admin# vi /tmp/lighttpd.conf
ๅท่กๅคฑๆ
root@ICR-401:/home/admin# lighttpd -f /tmp/lighttpd.conf
/usr/sbin/lighttpd: symbol 'getrandom': can't resolve symbol
ๅพๆฒ่ฆ้็้ฏ่ชค
ๅ ๅ้ๅฐไธๅๅฅฝ็้ป - ๅฉ็จ git checkout ๅฐไธ็ฆฎๆๅ็ commit
็ข็ image
้้ tftp upload firmware.img ๅพไพๅ firmware upgrade
web ้ๆฏไธๆจฃ่ตทไธไพ - /home/log/web.log ไธๅ็ๅทๆฐ
ไธ้ m350 ๆไธไธ้ป web ๆ่ตทไพ
ๆ้ๆฏ้้ web ไพๅ firmware upgrade
่ฉฆ่้้ uboot ไพๅ upgrade
็ผ็พ lighttpd ไธๆจฃ่ตทไธไพ
ๅ่ 20200206_jeffrey
ๆๆๅพไธๆฌกๅจ m350 ๅ็ commit ไฝฟ็จ็่ๆฌๆฉๆฏ jjbox ่ไธๆฏ jubuntu
็ฎๅๆท็ๆฏ jubuntu ้ ๆ็ๅ้ก
jubuntu ้ๆฉ
jjbox ้ๆฉ
้้ tftp ไพ upgrade jjbox ่ฃก็ image - firmware.img
็ตๆไธๆจฃ...
้้ uboot ไพ upgrade
ๅฅฝไบ... ๅฅๆช...
็ฎๅไฝฟ็จ jjbox
pull ๆๆฐ็ m350[develop]
ๅไฟฎๆญฃไธๆฌก fontawesome ็้ฏ่ชค
้้ web ไพๅ firmware upgrade
lighttpd ๆญฃๅธธๅทฅไฝ
ไฟฎๆญฃ fontawesome ็้ฏ่ชคไนๆญฃ็ขบ
ไธ code
m350[develop] - correct the icon name since we update Font Awesome from version 4.6.3 to 5.1
- fa-compress to fa-compress-alt
- fa-expand to fa-expand-alt
commit 9feb8529c673a673e356bf26161396c17256018c
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Mon Feb 10 17:46:26 2020 +0800
correct the icon name since we update Font Awesome from version 4.6.3 to 5.1
- fa-compress to fa-compress-alt
- fa-expand to fa-expand-alt
proscend/prosrc/www/app/feature/apn_config.html | 4 ++--
proscend/prosrc/www/app/feature/dualSim.html | 4 ++--
proscend/prosrc/www/app/feature/dualSim_2apn.html | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
jubuntu ไธ m350 ็ๅ้กๅพ ๆฅไธ้ๅฏไปฅๆพๅพ้ขไธ้ป
ๆๅคฉ็นผ็บๅฉ็จ jjbox ไพๅ m350 ็ tty2tcp web ui