石光上林 发表于 2015-9-20 19:42:18

HG8247H與韓國DASAN V8272相容問題

本帖最后由 石光上林 于 2015-9-20 21:56 编辑

大家好,第一次來在這個版上發問,多多包涵

簡述一下問題,目前華為在台灣有報關進口與批量販售GPON系統給區域有線電視運營商

這邊拿到幾台HG8247H,韌體為V300R013C10SPC126

因為中華電信(為台灣全區的電信運營商,前國營電信局)提供的終端設備,品質檢驗不理想

因此想要將此款軟體成熟,且網路社群支援度很高的HG8247H連上中華電信的OLT

目前測試已經可以過驗證的型號為DASAN V8272,OLT具體軟件版本不明,目前情況是HG8247H可以telecomadmin設定WAN的VLAN但上不了網,有換過route mode和bridge也一樣,VID為4082或是4081

但透過中華電信OLT管理單位得知,V8272的UNI接口有兩套profile,一種說是base on PPTP, 一種是based on VID。

但由於V8272用戶數量不是很大,該管理員不會太多查測操作,亦不確定現在套用的是哪一種UNI腳本,也不會置換

只知道HG8247H透過clone GPON SN, password之後已經activated。


想請問,這方面我應該從那些log去判斷;交叉比對?

原本中華電信發下的ONU為DASAN H640G,可以透過telnet方式進入CLI,亦可root登入linux shell

目前狀況為TCON與gemport已經可以看到配置,但無法上網

上來請教各位先進,下一步該如何做?

附上我找到的HG8247H guide,以及簡單的CLI

http://yun.baidu.com/share/link?shareid=2757845530&uk=2605331150


http://yun.baidu.com/share/link?shareid=3479086525&uk=2605331150

石光上林 发表于 2015-9-23 15:50:03

補上OMCI狀態 希望有大神能相助

會再繼續嘗試判斷其他LOG

WAP>omcicmd show flow 0


============================================================
+++++++++++++++++++++++ AniPort +++++++++++++++++++++++
============================================================

GlobalMapMode: 0
AniPortObjNum: 2

success!
WAP>AniPortEntry:


******************************
********* Index:0 **********
******************************
PortID: 33025
BridgeID: 1
ForwardOper: 0
VlanNum: 0
VlanEntry:
MapGemID: 65535
UntagMapGemID: 128
TagFrameOption: 0
PbitMap:

Pbit GemID
--------------
0 128
1 129
2 130
3 131
4 132
5 133
6 134
7 135

FlowEntry:

Index FlowID BridgeID GemID MapMode UniPort Vlan Pri UniType Status Trans Pir(0x) Sir(0x)
------------------------------------------------------------------------------------------------------
0 0 1 128 2 255 65535 0 0 1 0 00000000 00000000
1 1 1 129 2 255 65535 1 0 1 0 00000000 00000000
2 2 1 130 2 255 65535 2 0 1 0 00000000 00000000
3 3 1 131 2 255 65535 3 0 1 0 00000000 00000000
4 4 1 132 2 255 65535 4 0 1 0 00000000 00000000
5 5 1 133 2 255 65535 5 0 1 0 00000000 00000000
6 6 1 134 2 255 65535 6 0 1 0 00000000 00000000
7 7 1 135 2 255 65535 7 0 1 0 00000000 00000000
8 8 1 128 11 255 65535 255 0 1 0 00000000 00000000


******************************
********* Index:1 **********
******************************
PortID: 65281
BridgeID: 1
ForwardOper: 0
VlanNum: 0
VlanEntry:
MapGemID: 4095
UntagMapGemID: 65535
TagFrameOption: 0
PbitMap:

Pbit GemID
--------------
0 65535
1 65535
2 65535
3 65535
4 65535
5 65535
6 65535
7 65535

FlowEntry:

Index FlowID BridgeID GemID MapMode UniPort Vlan Pri UniType Status Trans Pir(0x) Sir(0x)
------------------------------------------------------------------------------------------------------
0 0 1 4095 2 255 65535 0 0 2 0 00000000 00000000
1 0 1 4095 2 255 65535 1 0 2 0 00000000 00000000
2 0 1 4095 2 255 65535 2 0 2 0 00000000 00000000
3 0 1 4095 2 255 65535 3 0 2 0 00000000 00000000
4 0 1 4095 2 255 65535 4 0 2 0 00000000 00000000
5 0 1 4095 2 255 65535 5 0 2 0 00000000 00000000
6 0 1 4095 2 255 65535 6 0 2 0 00000000 00000000
7 0 1 4095 2 255 65535 7 0 2 0 00000000 00000000
8 0 1 4095 11 255 65535 255 0 2 0 00000000 00000000



============================================================
+++++++++++++++++++++++ UniPort +++++++++++++++++++++++
============================================================

UniPortObjNum: 4
UniPortEntry:

Index PortID BridgeID UniPort UniType
-----------------------------------------
0 257 1 1 0
1 258 1 2 0
2 259 1 3 0
3 260 1 4 0



============================================================
+++++++++++++++++++++++ Gemport +++++++++++++++++++++++
============================================================

GemportObj Num: 10
GemportEntry:

GemID TcontID PqUp PqDn GemType Loopback PirUp CirUp PbsUp CbsUp PirDn CirDn PbsDn CbsDn
-----------------------------------------------------------------------------------------------------
128 0 32775 8 0 0 268431360 268431360 -1610653696 -1610653696 0 0 0 0
129 0 32774 7 0 0 0 0 0 0 0 0 0 0
130 0 32773 6 0 0 0 0 0 0 0 0 0 0
131 0 32772 5 0 0 0 0 0 0 0 0 0 0
132 0 32771 4 0 0 136000 136000 1360000 1360000 0 0 0 0
133 0 32770 3 0 0 0 0 0 0 0 0 0 0
134 0 32769 2 0 0 0 0 0 0 0 0 0 0
135 0 32768 0 0 0 0 0 0 0 0 0 0 0
4095 0 65535 0 2 0 0 0 0 0 0 0 0 0
4094 0 65534 0 1 0 0 0 0 0 0 0 0 0



============================================================
+++++++++++++++++++++++ FlowCfg +++++++++++++++++++++++
============================================================

FlowCfg Num: 0



============================================================
+++++++++++++++++++++++ FlowID +++++++++++++++++++++++
============================================================

0 1 2 3 4 5 6 7 8



WAP>omcicmd pm show 65535 65535

Me(129)(VIDEO STAT) doesn't create any instance!

-------------------------------------------------------
Me(267)(GEM Port PM History Data) has 10 instances
-------------------------------------------------------
Instance ID(0x0080), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 965 55 965
8 0 0 0
-------------------------------------------------------
Instance ID(0x0081), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 245 0 245
8 0 0 0
-------------------------------------------------------
Instance ID(0x0082), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
-------------------------------------------------------
Instance ID(0x0083), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
-------------------------------------------------------
Instance ID(0x0084), Interval end time(5), Time(1442963825)
-----------------------------
success!
WAP>--------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 600 0 600
8 0 0 0
-------------------------------------------------------
Instance ID(0x0085), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
-------------------------------------------------------
Instance ID(0x0086), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
-------------------------------------------------------
Instance ID(0x0087), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 16 0 16
8 0 0 0
-------------------------------------------------------
Instance ID(0x0fff), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 821894 138156 821894
6 22424221 3769575 22424221
7 0 0 0
8 0 0 0
-------------------------------------------------------
Instance ID(0x0ffe), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 72 15 72
6 99 21 99
7 0 0 0
8 0 0 0
-------------------------------------------------------
-------------------------------------------------------
Me(341)(GEM Port CTP PM History Data) has 10 instances
-------------------------------------------------------
Instance ID(0x0080), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 604 42 604
4 0 0 0
5 0 0 0
6 965 55 965
7 0 0 0
-------------------------------------------------------
Instance ID(0x0081), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 175 0 175
4 0 0 0
5 0 0 0
6 245 0 245
7 0 0 0
-------------------------------------------------------
Instance ID(0x0082), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
-------------------------------------------------------
Instance ID(0x0083), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
-------------------------------------------------------
Instance ID(0x0084), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 295 0 295
4 0 0 0
5 0 0 0
6 600 0 600
7 0 0 0
-------------------------------------------------------
Instance ID(0x0085), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
-------------------------------------------------------
Instance ID(0x0086), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
-------------------------------------------------------
Instance ID(0x0087), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 6 0 6
4 0 0 0
5 0 0 0
6 16 0 16
7 0 0 0
-------------------------------------------------------
Instance ID(0x0fff), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 821894 138156 821894
5 22424221 3769575 22424221
6 0 0 0
7 0 0 0
-------------------------------------------------------
Instance ID(0x0ffe), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 72 15 72
5 99 21 99
6 0 0 0
7 0 0 0
-------------------------------------------------------
Me(312)(FEC PM history data) doesn't create any instance!

Me(24)(Ethernet PM History Data) doesn't create any instance!

Me(89)(Ethernet PM History Data2) doesn't create any instance!

Me(296)(Ethernet PM3 history data) doesn't create any instance!

Me(351)(Ethernet PM4 history data) doesn't create any instance!

-------------------------------------------------------
Me(321)(Ethernet PM downstream) has 4 instances
-------------------------------------------------------
Instance ID(0x0101), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 5663016 170951 5663016
5 8711 784 8711
6 166 73 166
7 1652 669 1652
8 0 0 0
9 0 0 0
10 0 0 0
11 1844 17 1844
12 2214 342 2214
13 990 273 990
14 87 35 87
15 330 117 330
16 3246 0 3246
-------------------------------------------------------
Instance ID(0x0102), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 7902472 1176845 7902472
5 32454 4155 32454
6 1119 36 1119
7 1547 218 1547
8 0 0 0
9 0 0 0
10 0 0 0
11 9759 1018 9759
12 14777 1669 14777
13 991 161 991
14 3550 893 3550
15 495 31 495
16 2882 383 2882
-------------------------------------------------------
Instance ID(0x0103), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 2488094 148173 2488094
5 9083 616 9083
6 2442 109 2442
7 6641 507 6641
8 0 0 0
9 0 0 0
10 0 0 0
11 319 47 319
12 4031 136 4031
13 1526 301 1526
14 797 33 797
15 2266 99 2266
16 144 0 144
-------------------------------------------------------
Instance ID(0x0104), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 64 0 64
5 1 0 1
6 0 0 0
7 1 0 1
8 0 0 0
9 0 0 0
10 0 0 0
11 1 0 1
12 0 0 0
13 0 0 0
14 0 0 0
15 0 0 0
16 0 0 0
-------------------------------------------------------
-------------------------------------------------------
Me(322)(Ethernet PM upstream) has 4 instances
-------------------------------------------------------
Instance ID(0x0101), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 683299 16476 683299
5 6154 215 6154
6 1013 172 1013
7 278 28 278
8 0 0 0
9 0 0 0
10 0 0 0
11 4822 187 4822
12 605 0 605
13 198 28 198
14 23 0 23
15 505 0 505
16 1 0 1
-------------------------------------------------------
Instance ID(0x0102), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 18133493 1766460 18133493
5 37153 4357 37153
6 2195 73 2195
7 6842 479 6842
8 0 0 0
9 0 0 0
10 0 0 0
11 7877 1689 7877
12 11037 926 11037
13 2012 348 2012
14 3743 298 3743
15 4318 280 4318
16 8166 816 8166
-------------------------------------------------------
Instance ID(0x0103), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
9 0 0 0
10 0 0 0
11 0 0 0
12 0 0 0
13 0 0 0
14 0 0 0
15 0 0 0
16 0 0 0
-------------------------------------------------------
Instance ID(0x0104), Interval end time(5), Time(1442963825)
-------------------------------------------------------
AttrID CurValue HisValue LastPointValue
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
9 0 0 0
10 0 0 0
11 0 0 0
12 0 0 0
13 0 0 0
14 0 0 0
15 0 0 0
16 0 0 0
-------------------------------------------------------
Me(334)(Ethernet frame extended PM) doesn't create any instance!

Me(52)(MAC Bridge Port PM History Data) doesn't create any instance!

Me(51)(MAC Bridge PM History Data) doesn't create any instance!

Me(140)(Call control PM history data) doesn't create any instance!

Me(144)(RTP monitoring data) doesn't create any instance!

Me(151)(SIP agent monitoring data) doesn't create any instance!

Me(152)(SIP call initiation performance) doesn't create any instance!

石光上林 发表于 2015-9-25 09:51:59

石光上林 发表于 2015-9-23 15:50
補上OMCI狀態 希望有大神能相助

會再繼續嘗試判斷其他LOG


放上原本光貓 H640G的init sh
#!/bin/sh
set -x
#echo ">>> BOARD_MAC" $BOARD_MAC                        
echo ">>> Bridge is:" $bridge

ifconfig br0 down
source /bl/bin/bldrvcfg.sh

cd /bl/bin

./drv_load
/sbin/insmod /bl/bin/GateMakerPro_GPL.ko
/sbin/insmod /bl/bin/GateMakerPro.ko

if [ "$dmm" = "1" ]
then
/sbin/insmod /bl/bin/dmm.ko
fi

./blsend.exe sessioninit $PPID
echo ">>> Session [$PPID] is started"
echo $PPID > /tmp/shell_pid

usleep 100

#>>>>>>>>>>> fi_bl_software_init()
./blsend.exe send $PPID /api/common/si gpon 5
usleep 100
./blsend.exe send $PPID /api/bridge/sem QSGMII enable RGMII SGMII
usleep 100

# ---------------------------
# Flow configuration
# ---------------------------

if [ "$gpon" = "1" ]                                                            
then
echo ">>>>>>>>>>> GPON <<<<<<<<<<<<<<<<<"

#>>>>>>>>>>> modify emac configuration
./blsend.exe send $PPID /api/bridge/ce 0 enable
./blsend.exe send $PPID /api/bridge/ce 1 enable
./blsend.exe send $PPID /api/bridge/ce 2 enable
./blsend.exe send $PPID /api/bridge/ce 3 enable

WAN_IF_NAME="wan1"
echo ">>> ONT serial number:   " $serial_number
echo ">>> ONT password:      " $password
echo ">>> TCONT allocation id: " $tcont_alloc_id
echo ">>> Downstream GEM port: " $ds_gem_port_id
echo ">>> Upstream GEM port:   " $us_gem_port_id

./blsend.exe send $PPID /api/common/dpi
usleep 100

if [ "$ponwiz" = "1" ]
then
echo ">>>>>>>>>>>>>>>Data path init<<<<<<<<<<<<<<<<<"
else
./blsend.exe send $PPID /api/gpon_iw/csn $serial_number
usleep 100
./blsend.exe send $PPID /api/gpon_iw/cpsw $password
./blsend.exe send $PPID /api/gpon_iw/pla standby
./blsend.exe send $PPID /stack/gls
fi
./blsend.exe send $PPID /api/common/gsv
usleep 100
./blsend.exe send $PPID /cfg/v
usleep 100       

if [ "$ponwiz" = "1" ]
then
echo ">>> GEM and Ethernet Flow configuration is owned by OMCI"
else
./blsend.exe send $PPID /api/gpon_iw/ct 1 $tcont_alloc_id priority_queue
./blsend.exe send $PPID /api/wan/cupq 1 0 0 256
./blsend.exe send $PPID /api/gpon_iw/cugf $us_gem_flow_id $us_gem_port_id 1 0 flow_based 0 0 true
./blsend.exe send $PPID /api/gpon_iw/cdgf $ds_gem_flow_id $ds_gem_port_id disable low ethernet true flow_based 0
./blsend.exe send $PPID /api/wan/cdef 0 0 lan_1
./blsend.exe send $PPID /api/wan/cuef 1 0
fi

./blsend.exe send $PPID /api/bridge/ceq 0 0 128
./blsend.exe send $PPID /api/bridge/ceq 1 0 128
./blsend.exe send $PPID /api/bridge/ceq 2 0 128
./blsend.exe send $PPID /api/bridge/ceq 3 0 128
./blsend.exe send $PPID /api/bridge/ceq 1 0 128
./blsend.exe send $PPID /api/bridge/ceq 2 0 128
./blsend.exe send $PPID /api/bridge/ceq 3 0 128
./blsend.exe send $PPID /api/bridge/ceq 0 1 128
./blsend.exe send $PPID /api/bridge/ceq 1 1 128
./blsend.exe send $PPID /api/bridge/ceq 2 1 128
./blsend.exe send $PPID /api/bridge/ceq 3 1 128

./blsend.exe send $PPID /api/bridge/ceq 0 2 128
./blsend.exe send $PPID /api/bridge/ceq 1 2 128
./blsend.exe send $PPID /api/bridge/ceq 2 2 128
./blsend.exe send $PPID /api/bridge/ceq 3 2 128
./blsend.exe send $PPID /api/bridge/ceq 0 3 128
./blsend.exe send $PPID /api/bridge/ceq 1 3 128
./blsend.exe send $PPID /api/bridge/ceq 2 3 128
./blsend.exe send $PPID /api/bridge/ceq 3 3 128
./blsend.exe send $PPID /api/bridge/ceq 0 4 128
./blsend.exe send $PPID /api/bridge/ceq 1 4 128
./blsend.exe send $PPID /api/bridge/ceq 2 4 128
./blsend.exe send $PPID /api/bridge/ceq 3 4 128
./blsend.exe send $PPID /api/bridge/ceq 0 5 128
./blsend.exe send $PPID /api/bridge/ceq 1 5 128
./blsend.exe send $PPID /api/bridge/ceq 2 5 128
./blsend.exe send $PPID /api/bridge/ceq 3 5 128
./blsend.exe send $PPID /api/bridge/ceq 0 6 128
./blsend.exe send $PPID /api/bridge/ceq 1 6 128
./blsend.exe send $PPID /api/bridge/ceq 2 6 128
./blsend.exe send $PPID /api/bridge/ceq 3 6 128
./blsend.exe send $PPID /api/bridge/ceq 0 7 128
./blsend.exe send $PPID /api/bridge/ceq 1 7 128
./blsend.exe send $PPID /api/bridge/ceq 2 7 128
./blsend.exe send $PPID /api/bridge/ceq 3 7 128

./blsend.exe send $PPID /api/bridge/cp2lq lan_0 0 0
./blsend.exe send $PPID /api/bridge/cp2lq lan_0 1 1
./blsend.exe send $PPID /api/bridge/cp2lq lan_0 2 2
./blsend.exe send $PPID /api/bridge/cp2lq lan_0 3 3
./blsend.exe send $PPID /api/bridge/cp2lq lan_0 4 4
./blsend.exe send $PPID /api/bridge/cp2lq lan_0 5 5
./blsend.exe send $PPID /api/bridge/cp2lq lan_0 6 6
./blsend.exe send $PPID /api/bridge/cp2lq lan_0 7 7
./blsend.exe send $PPID /api/bridge/cp2lq lan_1 0 0
./blsend.exe send $PPID /api/bridge/cp2lq lan_1 1 1
./blsend.exe send $PPID /api/bridge/cp2lq lan_1 2 2
./blsend.exe send $PPID /api/bridge/cp2lq lan_1 3 3
./blsend.exe send $PPID /api/bridge/cp2lq lan_1 4 4
./blsend.exe send $PPID /api/bridge/cp2lq lan_1 5 5
./blsend.exe send $PPID /api/bridge/cp2lq lan_1 6 6
./blsend.exe send $PPID /api/bridge/cp2lq lan_1 7 7

./blsend.exe send $PPID /api/bridge/cp2lq lan_2 0 0
./blsend.exe send $PPID /api/bridge/cp2lq lan_2 1 1
./blsend.exe send $PPID /api/bridge/cp2lq lan_2 2 2
./blsend.exe send $PPID /api/bridge/cp2lq lan_2 3 3
./blsend.exe send $PPID /api/bridge/cp2lq lan_2 4 4
./blsend.exe send $PPID /api/bridge/cp2lq lan_2 5 5
./blsend.exe send $PPID /api/bridge/cp2lq lan_2 6 6
./blsend.exe send $PPID /api/bridge/cp2lq lan_2 7 7

./blsend.exe send $PPID /api/bridge/cp2lq lan_3 0 0
./blsend.exe send $PPID /api/bridge/cp2lq lan_3 1 1
./blsend.exe send $PPID /api/bridge/cp2lq lan_3 2 2
./blsend.exe send $PPID /api/bridge/cp2lq lan_3 3 3
./blsend.exe send $PPID /api/bridge/cp2lq lan_3 4 4
./blsend.exe send $PPID /api/bridge/cp2lq lan_3 5 5
./blsend.exe send $PPID /api/bridge/cp2lq lan_3 6 6
./blsend.exe send $PPID /api/bridge/cp2lq lan_3 7 7

insmod /bl/bin/lilac_net_dev.ko param_board="cherry" lan_rx_queue_id=3 wan_rx_queue_id=5

insmod /bl/bin/iphost_net_dev.ko
ifconfig gpon0 192.168.1.133 up

echo ">>> BRG driver initialization"
/bl/bin/bldrv.sh start

if [ "$dmm" = "1" ]
then
/sbin/insmod /bl/bin/spf.ko
fi

#interfaces configuration - must be changed per setup
echo ">>>> Bringing up IF:br0"
ifconfig br0 0.0.0.0

else

#>>>>>>>>>>> UBB <<<<<<<<<<<<<<<<<<<<<

WAN_IF_NAME="wan1"

#>>>>>>>>>>> modify emac configuration
./blsend.exe send $PPID /api/bridge/ce 0 enable
./blsend.exe send $PPID /api/bridge/ce 1 enable
./blsend.exe send $PPID /api/bridge/ce 2 enable
./blsend.exe send $PPID /api/bridge/ce 3 enable

if [ "$ponwiz" = "1" ]
then
echo ">>>>"
else
./blsend.exe send $PPID /api/common/dpi
fi

#>>>>>>>>>>> Configure the threshold for an EMAC TX priority queue: emac_id queue_id pri
./blsend.exe send $PPID /api/bridge/ceq 1 0 128
./blsend.exe send $PPID /api/bridge/ceq 2 0 128
./blsend.exe send $PPID /api/bridge/ceq 3 0 128
./blsend.exe send $PPID /api/bridge/ceq 4 0 128
insmod /bl/bin/lilac_net_dev.ko param_board="cherry" lan_rx_queue_id=3 wan_rx_queue_id=5

fi # end of UBB block

if [ "$bridge" = "1" ]
then
# Configure bridge port actions
if [ $gpon = "1" ]
then
      ./blsend.exe send $PPID /api/bridge/mbpc lan_0 true true forward_to_cpu forward_to_cpu
fi
./blsend.exe send $PPID /api/bridge/mbpc lan_1 true true forward forward
./blsend.exe send $PPID /api/bridge/mbpc lan_2 true true forward forward
./blsend.exe send $PPID /api/bridge/mbpc lan_3 true true forward forward
./blsend.exe send $PPID /api/bridge/mbpc pci true true forward forward
fi
./blsend.exe send $PPID /api/bridge/mbpc wan_routed false true forward forward
./blsend.exe send $PPID /api/bridge/mbpc wan_bridged false true forward forward

if [ $gpon = "1" ]
then
    ifconfig br0 0.0.0.0
fi
ifconfig eth1 0.0.0.0 up
ifconfig eth2 0.0.0.0 up
ifconfig eth3 0.0.0.0 up

#interfaces configuration - must be changed per setup
echo ">>>> Bringing up interface IF:$WAN_IF_NAME"
ifconfig $WAN_IF_NAME 0.0.0.0

#Set filters for ARP                                    

./blsend.exe send $PPID /api/common/cefc lan_0 arp trap
./blsend.exe send $PPID /api/common/cefc lan_1 arp trap
./blsend.exe send $PPID /api/common/cefc lan_2 arp trap
./blsend.exe send $PPID /api/common/cefc lan_3 arp trap
./blsend.exe send $PPID /api/common/cefc pci   arp trap
./blsend.exe send $PPID /api/common/cefc wan_bridge arp trap

# Set filters for DHCP
./blsend.exe send $PPID /api/common/cdf lan enable
./blsend.exe send $PPID /api/common/cdf wan enable

# Set broadcast filters
./blsend.exe send $PPID /api/common/cbpf lan_1 enable trap
./blsend.exe send $PPID /api/common/cbpf lan_2 enable trap
./blsend.exe send $PPID /api/common/cbpf lan_3 enable trap
./blsend.exe send $PPID /api/common/cbpf lan_4 enable trap
./blsend.exe send $PPID /api/common/cbpf pci enable trap
./blsend.exe send $PPID /api/common/cbpf wan_bridge_and_wan_iptv enable trap

# Default untagged flows
if [ $gpon = "1" ]
then
if [ $disable_emac0 -eq 0 ]
then
./blsend.exe send $PPID /api/common/cbpf lan_0 enable trap
fi
else
   #>>>>>>>Maps an upstream Ethernet flow to the GPON interworking: Eth Flow, Method, tci_
./blsend.exe send $PPID /api/gpon_iw/muef2gi 1 flow 0 $us_gem_flow_id
#>>>>>>>Maps a downstream Ethernet flow to a destination"
./blsend.exe send $PPID /api/wan/mdefts 0 wan_0
fi

./blsend.exe send $PPID /api/common/ccrtcq wan_dhcp 5
./blsend.exe send $PPID /api/common/ccrtcq wan_icmpv6 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_user_defined_0 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_user_defined_1 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_user_defined_2 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_user_defined_3 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_pppoe_discovery 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_pppoe_session 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_ipoev4 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_ipoev6 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_arp 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_1588 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_802_1x 5
./blsend.exe send $PPID /api/common/ccrtcq wan_etype_v801_1ag_cfm 5
./blsend.exe send $PPID /api/common/ccrtcq wan_ip_fragment 5
./blsend.exe send $PPID /api/common/ccrtcq wan_ttl_expired 5
./blsend.exe send $PPID /api/common/ccrtcq wan_tcp_flags 5
./blsend.exe send $PPID /api/common/ccrtcq wan_ip_header_error 5
./blsend.exe send $PPID /api/common/ccrtcq wan_connection_miss 5
./blsend.exe send $PPID /api/common/ccrtcq wan_firewall_match 5
./blsend.exe send $PPID /api/common/ccrtcq wan_arp_table_miss 5
./blsend.exe send $PPID /api/common/ccrtcq wan_l4_protocol_icmpv4 5
./blsend.exe send $PPID /api/common/ccrtcq wan_l4_protocol_esp 5
./blsend.exe send $PPID /api/common/ccrtcq wan_l4_protocol_gre 5

./blsend.exe send $PPID /api/common/ccrtcq wan_l4_protocol_ah 5
./blsend.exe send $PPID /api/common/ccrtcq wan_l4_protocol_0 5
./blsend.exe send $PPID /api/common/ccrtcq wan_l4_protocol_1 5
./blsend.exe send $PPID /api/common/ccrtcq wan_l4_protocol_2 5
./blsend.exe send $PPID /api/common/ccrtcq wan_l4_protocol_3 5
./blsend.exe send $PPID /api/common/ccrtcq wan_connection_trap_0 5
./blsend.exe send $PPID /api/common/ccrtcq wan_connection_trap_1 5
./blsend.exe send $PPID /api/common/ccrtcq wan_connection_trap_2 5
./blsend.exe send $PPID /api/common/ccrtcq wan_connection_trap_3 5
./blsend.exe send $PPID /api/common/ccrtcq wan_connection_trap_4 5
./blsend.exe send $PPID /api/common/ccrtcq wan_connection_trap_5 5
./blsend.exe send $PPID /api/common/ccrtcq wan_connection_trap_6 5
./blsend.exe send $PPID /api/common/ccrtcq wan_connection_trap_7 5
./blsend.exe send $PPID /api/common/ccrtcq lan_eth_flow 5
./blsend.exe send $PPID /api/common/ccrtcq wan_eth_flow 5
./blsend.exe send $PPID /api/common/ccrtcq wan_mac_trap_0 5
./blsend.exe send $PPID /api/common/ccrtcq wan_mac_trap_1 5
./blsend.exe send $PPID /api/common/ccrtcq wan_mac_trap_2 5
./blsend.exe send $PPID /api/common/ccrtcq wan_mac_trap_3 5
./blsend.exe send $PPID /api/common/ccrtcq wan_unknown_sa 5
./blsend.exe send $PPID /api/common/ccrtcq wan_unknown_da 5
./blsend.exe send $PPID /api/common/ccrtcq wan_broadcast 5
./blsend.exe send $PPID /api/common/ccrtcq wan_multicast 5
./blsend.exe send $PPID /api/common/ccrtcq wan_igmp 5
./blsend.exe send $PPID /api/common/ccrtcq wan_sa_moved 5

#upstream trap reasons configuration

./blsend.exe send $PPID /api/common/ccrtcq lan_dhcp 3
./blsend.exe send $PPID /api/common/ccrtcq lan_icmpv6 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_user_defined_0 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_user_defined_1 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_user_defined_2 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_user_defined_3 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_pppoe_discovery 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_pppoe_session 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_ipoev4 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_ipoev6 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_arp 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_1588 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_802_1x 3
./blsend.exe send $PPID /api/common/ccrtcq lan_etype_v801_1ag_cfm 3
./blsend.exe send $PPID /api/common/ccrtcq lan_mac_trap_0 3
./blsend.exe send $PPID /api/common/ccrtcq lan_mac_trap_1 3
./blsend.exe send $PPID /api/common/ccrtcq lan_mac_trap_2 3
./blsend.exe send $PPID /api/common/ccrtcq lan_mac_trap_3 3
./blsend.exe send $PPID /api/common/ccrtcq lan_local_ip 3
./blsend.exe send $PPID /api/common/ccrtcq lan_ip_fragment 3
./blsend.exe send $PPID /api/common/ccrtcq lan_ttl_expired 3
./blsend.exe send $PPID /api/common/ccrtcq lan_tcp_flags 3
./blsend.exe send $PPID /api/common/ccrtcq lan_non_tcp_udp 3
./blsend.exe send $PPID /api/common/ccrtcq lan_ip_header_error 3
./blsend.exe send $PPID /api/common/ccrtcq lan_connection_miss 3
./blsend.exe send $PPID /api/common/ccrtcq lan_arp_table_miss 3
./blsend.exe send $PPID /api/common/ccrtcq lan_connection_trap_0 3
./blsend.exe send $PPID /api/common/ccrtcq lan_connection_trap_1 3
./blsend.exe send $PPID /api/common/ccrtcq lan_connection_trap_2 3
./blsend.exe send $PPID /api/common/ccrtcq lan_connection_trap_3 3
./blsend.exe send $PPID /api/common/ccrtcq lan_connection_trap_4 3
./blsend.exe send $PPID /api/common/ccrtcq lan_connection_trap_5 3
./blsend.exe send $PPID /api/common/ccrtcq lan_connection_trap_6 3
./blsend.exe send $PPID /api/common/ccrtcq lan_connection_trap_7 3
./blsend.exe send $PPID /api/common/ccrtcq lan_unknown_sa 3
./blsend.exe send $PPID /api/common/ccrtcq lan_unknown_da 3
./blsend.exe send $PPID /api/common/ccrtcq lan_broadcast 3
./blsend.exe send $PPID /api/common/ccrtcq lan_multicast 3
./blsend.exe send $PPID /api/common/ccrtcq lan_igmp 3
./blsend.exe send $PPID /api/common/ccrtcq lan_sa_moved 3

if [ "$dmm" = "1" ]
then
./blsend.exe send $PPID /api/wan/cdefpbcmvid 127 127
else
./blsend.exe send $PPID /api/wan/cdefpbcmgem_vid 127 127
fi

# Enable multicast
./blsend.exe send $PPID /api/common/cmpf wan_bridge enable trap

source /bl/bin/addbr.sh
insmod /bl/bin/lilac_br_fp.ko
source /bl/bin/start_onuapp.sh


石光上林 发表于 2015-9-25 09:52:57

石光上林 发表于 2015-9-25 09:51
放上原本光貓 H640G的init sh
#!/bin/sh
set -x


估計是原broadlight的晶片 線已經被BCM收購

#!/bin/sh -eu
SCRIPT_DBG=0

source /bl/bin/blrgwcfg.sh;

function check100 {
if [ $SCRIPT_DBG -eq 1 ]
then
    echo "Continue?"
    read RESPONSE
    case $RESPONSE in
        *y) RETCODE=1 ;;
    *n) RETCODE=0 ;;
*) echo "Exiting..."                              
    exit 0                                                      
    ;;                                                               
esac
else
    usleep 10
fi
}

echo ">>> LAN_IP" $LAN_IP
echo ">>> LAN_NET_MASK" $LAN_NET_MASK
echo ">>> WAN_IP" $WAN_IP
echo ">>> WAN_NET_MASK" $WAN_NET_MASK
echo ">>> FIREWALL is:"$firewall_mode
echo ">>> VPN Passthrough is:" $vpn_passthrough_mode

ifconfig br0 down

cd /bl/bin
./drv_load
check100
/sbin/insmod /bl/bin/GateMakerPro_GPL.ko
/sbin/insmod /bl/bin/GateMakerPro.ko
check100
$bl_send sessioninit $PPID
echo ">>> Session [$PPID] is started"
check100

#>>>>>>>>>>> bl_api_sw_init() and bl_api_data_path_init()

if [ $wan_mode_gpon -eq 1 ]
then
    echo ">>>>>>>>>>> GPON <<<<<<<<<<<<<<<<<"
    #source ./lilac_gpon_init.sh
else
    echo ">>>>>>>>>>> GBE <<<<<<<<<<<<<<<<<<<"
    #source ./lilac_gbe_init.sh
fi

if [ $srt_create -eq 1 ]
then
    srt_file="/bl/bin/srt_log.txt"
    echo ">>>>>>>>>>>SRT Create saved to $srt_file"
    $bl_send send $PPID /application/ch/UT/srtc srt_file
    check100
fi

LAN_IFS="lan_0"
#LAN_IFS="lan_0 lan_1 lan_2 lan_3"
WAN_IF_NAME="wan1"
BR_IF_NAME="br0"
BR_IF_NAMES="br0"
#BR_IF_NAMES="eth0 eth1 eth2 eth3"

if [ $wifi = "1" ]                              
then
    export legacy_no_local_switching=0
    # B7715
    if [ $ipv6_mode = "1" ]
    then
        echo "Wifi does not work with IPv6, set \$ipv6_mode=0 in blrgwcfg.sh"
        exit
    fi
    if [ $wifi_ssid = "BL" ]
    then
        echo "Change SSID, set \$wifi_ssid in blrgwcfg.sh"
        exit
    fi

    WIFI_IF_NAMES=
    export WIFI_NUM_INTERFACES=$(($wifi_ssid_per_band * ($wifi_dualband+1)-1))
    echo ">>>>>>>>>> $WIFI_NUM_INTERFACES set to $WIFI_NUM_INTERFACES"
    for i in `seq 0 $WIFI_NUM_INTERFACES`
    do
        LAN_IFS="$LAN_IFS wifi_$i"
        if [ $fast_path_mode = "1" ]
        then
          WIFI_IF_NAMES="$WIFI_IF_NAMES wifi_fp$i ath$i"
        else
          WIFI_IF_NAMES="$WIFI_IF_NAMES ath$i"
        fi
    done
fi

echo ">>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"                              
echo ">>>>>>>>>>> COMMON INIT PART <<<<<<<<<<<<<"                              
echo ">>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"

#############################################################                        
# Bridge port configuration                                                      
#############################################################
bridge=0
if [ $bridge_mode = "1" ]                                          
then
    echo ">>>>>>>>>> BRIDGE MODE"
    echo "Loading Net Dev with ram_board=cherry lan_rx_q_id="$lan_rx_q" wan_rx_q_id="$wan_rx_q
    insmod /bl/bin/lilac_net_dev.ko param_board=$board_type param_process_mode=$process_mode lan_rx_queue_id=$lan_rx_q wan_rx_queue_id=$wan_rx_q lan_mac_change=0
    check100
    for i in $LAN_IFS wan_bridged; do
        echo ">>>> cuv2efdf i$ wan_bridge 1 1"
        $bl_send send $PPID /api/wan/cuv2efdf $i wan_bridge 1 1
        check100
        echo ">>>>>>>>>> Modifiy bridge port configuration: $i sa_lookup da_lookup TRUE"
        if [[ $i == wifi* ]]; then i="pci"; fi
        $bl_send send $PPID /api/bridge/mbpc $i true true forward_to_cpu forward_to_cpu
        check100
    done
    check100
    # map reason WAN unknown SA      
    $bl_send send $PPID /api/common/ccrtcq wan_unknown_sa $wan_rx_q
    check100                     
    # map reason WAN unknown DA
    $bl_send send $PPID /api/common/ccrtcq wan_unknown_da $wan_rx_q
    check100
    # map reason LAN moved SA
    $bl_send send $PPID /api/common/ccrtcq lan_sa_moved $lan_rx_q
    check100
    # map reason WAN moved DA
    $bl_send send $PPID /api/common/ccrtcq wan_sa_moved $wan_rx_q
    check100

    echo ">>>> Bridge Mode - Bridge configuration"
    echo ">>>Maps a downstream Ethernet flow to a destination"
    $bl_send send $PPID /api/wan/mdefts 0 wan_bridge                           
    check100                                                                  

    BR_IF_NAMES="$WAN_IF_NAME $BR_IF_NAMES"
    BR_NET_MASK=$WAN_NET_MASK
    BR_IP=$WAN_IP
    bridge=1
else
    usleep 100
    echo ">>>>>>>>>> ROUTER MODE"
    echo "Loading Net Dev with ram_board=$board_type lan_rx__id="$lan_rx_q" wan_rx__id="$wan_rx_q
    insmod /bl/bin/lilac_net_dev.ko param_board=$board_type lan_rx_queue_id=$lan_rx_q wan_rx_queue_id=$wan_rx_q
    #insmod /bl/bin/lilac_net_dev.ko param_board=$board_type param_process_mode=$process_mode lan_rx_queue_id=$lan_rx_q wan_rx_queue_id=$wan_rx_q lan_mac_change=1 timer_timeout=10000
    check100

    echo ">>>cuvteftdf: dflt flws 4 the upstream VID-to-Eth mapping, for untagged pc"
    for i in $LAN_IFS; do
        $bl_send send $PPID        /api/wan/cuv2efdf $i wan_0 1 1
        check100
    done
    usleep 100

    echo ">>>> Configuring IF:$WAN_IF_NAME with IP:$WAN_IP Mask:$WAN_NET_MASK"
    ifconfig $WAN_IF_NAME $WAN_IP netmask $WAN_NET_MASK
    check100

    if [ $legacy_no_local_switching = "1" ]
    then
        local="false"
    else
        local="true"
    fi

    for i in $LAN_IFS; do
        echo ">>>>>>>>>> Modifiy bridge port configuration: port sa_lookup da_lookup $local"
        if [[ $i == wifi* ]]; then i="pci"; fi
        $bl_send send $PPID /api/bridge/mbpc $i $local $local forward_to_cpu forward_to_cpu
        check100
    done
    # no local-switching -> bridge does not learn ports = all traffic goes to cdef
    echo ">>>> mbpc wan_routed false false"
    $bl_send send $PPID /api/bridge/mbpc wan_routed false $local forward_to_cpu forward_to_cpu
    check100

    echo ">>>> Router Mode - Local bridge configuration"
    echo ">>>Maps a downstream Ethernet flow to a destination"
    $bl_send send $PPID /api/wan/mdefts 0 wan_0
    check100

    #interfaces configuration
    if [ $legacy_no_local_switching = "1" ]
    then
        echo ">>>> Configuring IF:br0 with IP:$LAN_IP Mask:$LAN_NET_MASK"
        ifconfig br0 $LAN_IP netmask $LAN_NET_MASK
        check100
        BR_IF_NAMES=br0
    else
        BR_NET_MASK=$LAN_NET_MASK
        BR_IP=$LAN_IP
        # do not enable bridge
        bridge=0
    fi
fi

#############################################################
# wifi configuration
#############################################################
if [ $wifi = "1" ]
then
    echo ">>>>>>>>>>> Loading WiFi <<<<<<<<<<<<<<<<<<<"
    source /wifi/init/apup

    if [ $fast_path_mode = "1" ]
    then
        echo ">>>>>>>>>>> Enabling WiFi fast path <<<<<<<<<<<<<<<<<<<"
        insmod /bl/bin/wifi_mw.ko packet_threshold=1024 number_of_queues=1
    fi

    BR_IF_NAMES="$BR_IF_NAMES $WIFI_IF_NAMES"
fi

if [ $bridge = "1" ]
then
    brctl addbr $BR_IF_NAME
    for i in $BR_IF_NAMES; do
        if [ $fast_path_mode == "1" -a ${i:0:3} == "ath" ]
        then
          continue
        else
          brctl addif $BR_IF_NAME $i
        fi
    done
    echo ">>>ifconfig "$BR_IF_NAME" "$BR_IP" netmask "$BR_NET_MASK
    ifconfig $BR_IF_NAME $BR_IP netmask $BR_NET_MASK
    insmod /bl/bin/lilac_br_fp.ko br_name=$BR_IF_NAME
    ifconfig $BR_IF_NAME up
fi

echo ">>>Bringing UP interfaces"
for i in $BR_IF_NAMES $WAN_IF_NAME; do
    ifconfig $i up
done
usleep 1

#############################################################
# Subnet configuration
#############################################################
$bl_send send $PPID /api/wan/cdefqmm 0 flow_based 0
check100

###################################################
# FILTERS Configuration
###################################################
# ETHERTYPE
###################################################
#Enable IP Filtering (Type 0x0806 - ARP)
$bl_send send $PPID /api/common/cefc wan_0 arp trap
check100
for i in $LAN_IFS; do
    if [[ $i == wifi* ]]; then i="pci"; fi
    $bl_send send $PPID /api/common/cefc $i arp trap
    check100
done

###################################################
#PPPoE configuration
if [ $pppoe = "1" ]
then
    #Enable filtering for Ethertype PPP                                             
    $bl_send send $PPID /api/common/cefc wan_0 pppoe_d trap
    check100
    $bl_send send $PPID /api/common/cefc wan_0 pppoe_s trap
    check100
else
    #Non PPPoE configuration                                    
    #>>>>>>>>>>> Configure the default router
    route add default gw $WAN_DEF_GW || true
fi
#end of PPPoE config
###################################################

###################################################
# BROADCAST
###################################################
echo ">>>Set Upstream broadcast filter on LAN 0"               
for i in $LAN_IFS; do
    if [[ $i == wifi* ]]; then i="pci"; fi
    $bl_send send $PPID /api/common/cbpf $i enable trap
    check100
done
echo ">>>Set Downstream broadcast filter on WAN 0"
$bl_send send $PPID /api/common/cbpf wan_0 enable trap
check100

###################################################
# IP L4 FILTERS
###################################################
echo ">>>Configure ICMP filter"
$bl_send send $PPID /api/router/cdil4pf icmpv4 enable 1
check100

###################################################
#VPN configuration
if [ $vpn_passthrough_mode = "1" ]
then
    #Configure VPN passthrough: 47 - GRE / 50 - ESP
    $bl_send send $PPID /api/router/cvpt enable 47
fi
###################################################

###################################################
if [ $ipv6_mode = "1" ]
then
    #Enable Upstream Multicast filter for the Neighbour Discovery, etc.
    for i in $LAN_IFS; do
        $bl_send send $PPID /api/common/cmpf $i enable trap
        check100
    done
    #Enable Downstream Multicast filter for the Neighbour Discovery, etc.
    $bl_send send $PPID /api/common/cmpf wan_0 enable trap      
    check100
    #Enable ICMPv6 Upstream
    $bl_send send $PPID /api/common/ci6f lan enable
    check100
    #Enable ICMPv6 Downstream                                          
    echo ">>> Enable ICMPv6 Downstream"
    $bl_send send $PPID /api/common/ci6f wan enable
    check100
    # map reason 84 lan_multicast to queue lan_rx_Q
    echo ">>> map reason 84" $bl_send send $PPID /api/common/ccrtcq lan_multicast $lan_rx_q
    $bl_send send $PPID /api/common/ccrtcq lan_multicast $lan_rx_q
    check100
    # map reason 1 lan ICMPv6 to queue lan_rx_Q
    echo ">>> map reason 1 lan ICMPv6" $bl_send send $PPID /api/common/ccrtcq lan_icmpv6 $lan_rx_q
    $bl_send send $PPID /api/common/ccrtcq lan_icmpv6 $lan_rx_q
    check100
    # map reason 37 wan ICMPv6 to queue wan_rx_Q
    $bl_send send $PPID /api/common/ccrtcq wan_icmpv6 $wan_rx_q
    check100
fi
#end of ipv6 config
###################################################   


###################################################
# Downstream TRAP reasons/filters configuration
###################################################

# map reason 86 WAN broadcast to queue wan_rx_Q
echo ">>> map reason 86 WAN broadcast" $bl_send send $PPID /api/common/ccrtcq 86 $wan_rx_q
$bl_send send $PPID /api/common/ccrtcq wan_broadcast $wan_rx_q
check100

# map reason 87 WAN multicast to queue wan_rx_Q
$bl_send send $PPID /api/common/ccrtcq wan_multicast $wan_rx_q
check100

# map reason 88 WAN IGMP to queue wan_rx_Q
$bl_send send $PPID /api/common/ccrtcq wan_igmp $wan_rx_q
check100

# map reason 42 WAN ethertype PPPoE-D
$bl_send send $PPID /api/common/ccrtcq wan_etype_pppoe_discovery $wan_rx_q
check100

# map reason 43 WAN ethertype PPPoE-S
$bl_send send $PPID /api/common/ccrtcq wan_etype_pppoe_session $wan_rx_q
check100

# map reason 46 WAN ethertype ARP
$bl_send send $PPID /api/common/ccrtcq wan_etype_arp $wan_rx_q
check100

# map reason 57 WAN l4 protocol ICMPv4
$bl_send send $PPID /api/common/ccrtcq wan_l4_protocol_icmpv4 $wan_rx_q
check100
# map reason 54 WAN connection miss
$bl_send send $PPID /api/common/ccrtcq wan_connection_miss $wan_rx_q
check100
# map reason 55 WAN firewall match
$bl_send send $PPID /api/common/ccrtcq wan_firewall_match $wan_rx_q
check100
# map reason 52 WAN TCP flags
$bl_send send $PPID /api/common/ccrtcq wan_tcp_flags $wan_rx_q
check100
# map reason 56 WAN ARP table miss
$bl_send send $PPID /api/common/ccrtcq wan_arp_table_miss $wan_rx_q
check100   
# map reason 51 WAN TTL expired
$bl_send send $PPID /api/common/ccrtcq wan_ttl_expired $wan_rx_q
check100

###################################################
# Upstream TRAP reasons/filters configuration
###################################################

# map reason 83 LAN broadcast
$bl_send send $PPID /api/common/ccrtcq lan_broadcast $lan_rx_q
check100
# map reason 79 LAN unknown SA
$bl_send send $PPID /api/common/ccrtcq lan_unknown_sa $lan_rx_q
check100
# map reason 80 LAN unknown DA
$bl_send send $PPID /api/common/ccrtcq lan_unknown_da $lan_rx_q
check100
# map reason 85 LAN IGMP
$bl_send send $PPID /api/common/ccrtcq lan_igmp $lan_rx_q
check100
# map reason 22 LAN non TCP UDP
$bl_send send $PPID /api/common/ccrtcq lan_non_tcp_udp $lan_rx_q
check100
# map reason 24 LAN connection miss
$bl_send send $PPID /api/common/ccrtcq lan_connection_miss $lan_rx_q
check100
# map reason 21 LAN TCP flags
$bl_send send $PPID /api/common/ccrtcq lan_tcp_flags $lan_rx_q
check100
# map reason 25 LAN ARP table miss
$bl_send send $PPID /api/common/ccrtcq lan_arp_table_miss $lan_rx_q
check100
# map reason 10 LAN ethertype ARP
$bl_send send $PPID /api/common/ccrtcq lan_etype_arp $lan_rx_q
check100
# map reason 8 LAN ethertype IPv4oE
$bl_send send $PPID /api/common/ccrtcq lan_etype_ipoev4 $lan_rx_q
check100
#network interfaces configuration - must be changed per setup

# map reason 26 LAN_CONNECTION_TRAP_1                                    
$bl_send send $PPID /api/common/ccrtcq lan_connection_trap_1 $lan_rx_q
check100                                                                        
# map reason 65 WAN_CONNECTION_TRAP_0                                    
$bl_send send $PPID /api/common/ccrtcq wan_connection_trap_0 $lan_rx_q
#$bl_send send $PPID /api/common/ccrtcq 66 $lan_rx_q
check100               

echo ">>>enable IP forwarding between interfaces"
echo 1 > /proc/sys/net/ipv4/ip_forward
if [ $ipv6_mode = "1" ]
then
    # Enable IPv6 forwarding
    echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
fi
#disable strict tcp window check for incoming tcp sequence numbers
echo 1 > /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal

if [ -n "${blrgwinit:-x}" ]
then
    echo ">>>Masquerading is applied later"
else
    if [ $bridge_mode = "0" ]
    then
        echo ">>>Applying Masquerading rule for iptables"
        iptables -t nat -A POSTROUTING -o wan1 -j MASQUERADE
        iptables -t nat -L -n
        iptables -L
    fi
fi

if [ $net_dev_dbg = "1" ]
then
    echo ">>> Net Dev DEBUG mode: ENABLED"
    echo 1 > /proc/sys/net/core/bl_netdev_log_on
    echo 1 > /proc/sys/net/core/bl_netdev_lan_rx_log                              
    echo 1 > /proc/sys/net/core/bl_netdev_lan_tx_log
    echo 1 > /proc/sys/net/core/bl_netdev_wan_rx_log
    echo 1 > /proc/sys/net/core/bl_netdev_wan_tx_log
    echo 1 > /proc/sys/net/core/bl_netdev_dbg_stop
fi

dmesg -n 5

echo ">>> lilac_common_init loaded successfully"
echo

eHeaven 发表于 2016-8-31 11:36:25

您好,请问你有HG8247H的固件吗,R013或其它的都可以?
页: [1]
查看完整版本: HG8247H與韓國DASAN V8272相容問題