DIR-320上のMultiWAN

ネットワークで働いている私の友人の多くは彼らのプロバイダーについて不平を言っています。 実践が示すように、これはプロバイダーにあまり依存しません。 誰もがクラッシュし、最も不適切な瞬間に起こります。 個人的には、一度に複数のプロバイダーを接続しないのはいつも驚きました。 最新のインターネット価格。 バックアップチャネルを自分で接続することにしたとき、彼は問題に遭遇しました。 最小限の金銭的投資で自宅でインターネットを配布する方法は?



新しいファームウェアを使用すると、802.1Xプロトコルを使用して最初のプロバイダーのネットワークにログインできるため、DIR-320を自分用に長く望んでいました。 さらに、dd-wrtファームウェアまたは「Olegからのファームウェア」をアップロードできます。これらは基本的にLinuxに基づいています。 おそらく彼らの助けを借りて、デフォルトで1つのWANポートから2つを作成することは可能でしょうか? それができたことがわかった。



画像

解決策は未定です。



1.ファームウェアを変更します



まず、ファームウェアを入力する必要があります。 Olegからファームウェアを選択しました。 原則として、ASUS WL-500用のOlegのファームウェア。 このルーターは、フラッシュメモリが8 MBから4 MBに削減され、2番目のUSBポートがないAsus WL-500gP V2ルーターに類似しています。 ルータはBCM5354プロセッサで実行され、RAMの量は32 MB、フラッシュは4メガバイト、1つのUSBポート、1つの内部COMポートです。 このルーターの価格は、同じ機能を持つAsusルーターよりも安いです。 ファームウェアはhttp://code.google.com/p/wl500g/downloads/list?can=2&q=wl-500gpv2で入手できます 。 ボリュームのもう一方にはWL500gpv2-1.9.2.7-d-r2624.trxを選択しますが、DIRには収まりません。 Windows 7では、tftpクライアントを有効にします。[スタート]-> [コントロールパネル]-> [プログラム]-> [Windowsコンポーネントの有効化または無効化]-> [TFTPクライアント]の横にチェックマークを付けます-> [OK] Linuxの場合、標準の配布ツールを使用してtftpクライアントをインストールします。たとえば、ターミナルでコマンドを使用するUbuntuファミリの場合:



sudo apt-get install tftp







任意のテキストエディタでflashing.cmdファイルを作成し、このファイルをc:\ binフォルダーに保存します。このフォルダーには、ファームウェアをfirmware.binに名前変更したフォルダーがあります。 flashing.cmdファイルの内容:



@Echo Off

:BEGIN

ping -n 1 -w 1 192.168.0.1

If errorlevel 1 Goto BEGIN

If errorlevel 0 Goto FLASH

Goto END



:FLASH

Echo *** Start Flashing ****

tftp -i 192.168.0.1 put c:\bin\firmware.bin



:END








コンピューターのネットワークカードのアドレス192.168.0.2、マスク255.255.255.0を設定します。ゲートウェイとDNSを登録する必要はありません。 ネットワークケーブルをコンピューターのネットワークカードに接続し、ネットワークケーブルのもう一方の端をルーターのLANポートに挿入します。ルーターの電源は入れません。 コマンドラインSTART-> Run-> cmdを実行し、コマンドを実行してフォルダーC \:binに移動します。



C:\>cd c:\bin







リセットボタンを押したままにし、たとえばマッチで押して、ルーターの電源を入れると、すべてのインジケーターが点灯し、ケーブルが接続されているLANポートのインジケーターを除くインジケーターが消えるとすぐに、リセットボタンを放し、以前に起動したコマンドラインで以前に入力したコマンドをすぐに実行します:



C:\bin>flashing.cmd







ファームウェアプロセスを観察します。



192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot



WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .








192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot



WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .








192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .




192.168.0.1 32 :



.



Ping 192.168.0.1:

: = 1, = 0, = 1 (100% ),

<<>> <<>> <<>> <<>>

192.168.0.1 32 :



192.168.0.1: =32 =4 TTL=100



Ping 192.168.0.1:

: = 1, = 1, = 0 (0% ),

- :

= 4, = 4 , = 4

*** Start Flashing ****

: 3592480 11 s, 281134 /

C:\bin>



, (~1-2 ) . Reset , . Reset. . 192.168.1.1. IP ( WiFi) DHCP.



2. WAN

WAN, vlan1, vlan0. 1 LAN vlan2.



nvram set vlan0ports="2 3 4 5*"

nvram set vlan2ports="1 5"

nvram set vlan2hwname=et0

nvram set wan1_ifname=vlan1

nvram set wan2_ifname=vlan2

nvram commit

reboot








WAN.



3. 1 WAN

WAN PPPoE. . . , WAN. .



vi /tmp/local/root/options.wan0







i :



noauth refuse-eap

user 'Login_PPPoE'

password 'Pass_PPPoE'

nomppe nomppc

plugin rp-pppoe.so nic-vlan1

mru 1492 mtu 1492

maxfail 0

usepeerdns

persist

ipcp-accept-remote ipcp-accept-local noipdefault

ktune

default-asyncmap nopcomp noaccomp

novj nobsdcomp nodeflate

lcp-echo-interval 10

lcp-echo-failure 6

unit 0








Esc :wq (, w, q). Login_PPPoE Pass_PPPoE . :



pppd file /tmp/local/root/options.wan0 && sleep 15 && /sbin/udhcpc -b -i vlan1







ifconfig.



4. 2 WAN

, WAN 802.1x . wpa_supplicant roboswitch. 3 , . :



wgt wl500g.googlecode.com/files/wpa_supplicant-0.6.9-mipsel.tgz -P /tmp/local/tmp/

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/bin/wpa_supplicant.sh > /tmp/local/bin/wpa_supplicant.sh

chmod +x /tmp/local/bin/wpa_supplicant.sh

tar -xzf /tmp/local/tmp/wpa_supplicant-0.6.9-mipsel.tgz -O opt/sbin/wpa_supplicant > /tmp/local/sbin/wpa_supplicant

chmod +x /tmp/local/sbin/wpa_supplicant

vi /tmp/local/bin/wpa_supplicant.sh








wgt . i . VLAN=$(nvram get wan_ifname); export VLAN wan_ifname wan2_ifname. identity password. /opt/sbin/wpa_supplicant -i${IFNAME} -Droboswitch -c${CONF} -dd

/opt/sbin/wpa_supplicant /usr/local/sbin/wpa_supplicant -B . Esc :wq. :



flashfs save && flashfs commit && flashfs enable







/tmp/local/ /usr/local/. WAN :



/usr/local/bin/wpa_supplicant.sh && sleep 15 && /sbin/udhcpc -b -i vlan2







ifconfig.



5.

, 2 . 2 :



ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Load Balancing, :



ip route del default

ip route add default dev vlan1

ip route add default dev vlan2








6.

vi /tmp/local/sbin/post-boot







i.



#!/bin/sh

ifconfig vlan2 up

/usr/sbin/pppd file /tmp/ppp/options.wan0

sleep 15 && /sbin/udhcpc -b -i vlan1

/usr/local/bin/wpa_supplicant.sh

sleep 15 && /sbin/udhcpc -b -i vlan2

ip r add 10.152.1.0/24 dev vlan2

ip r add 31.29.0.0/16 dev vlan2








Esc :wq.



chmod +x /tmp/local/sbin/post-boot







!

PS , . DIR-320 usb-. . MultiWAN.tar . . options.wan0 wpa_supplicant.sh , . DIR-320 start.sh. .







All Articles