Some time ago a friend had pocketed someOpenWRTA series of tutorials,Told some OP advanced usage,Of course,In this regard, I would lose a slightly raised。but,Recent quarters because of poor network quality(Mainly no QoS annoying)So I dug out my box eating ash under therg100a-aa,What poor fellow had not the memory that,I was just poor 30M。
But that's okay,Despite the memory of the,OPQoSStandard Chartered,But there is at least,Just read at his SOHO-class Cisco 100,Unfortunately, I sold 150。
Because the actual needs,I'm here to write about how to use the OP to open a two-。
Plugin how there will always be a key drive all kinds of problems,so,Routing or recommend using SSH,Use CLI to configure your router。
All right,Chatter,We do。
The environment
First talk about my network environment,Due to graduate soon,Classmates have had to practice the,Dorm buddies and I both,NET does not expire or have two,Are 10M Telecom PPPoE;
Have just had arg100a,Brush out OP,Found a new bag to make do,Used to doQoS and load balancing。
Brushing machine
I bought this when it was brushed well OP,Of course,rg100aCan't brush Pack,I find from the Internet for a long time,Found two relatively easy bag,A fully functional old,One is relatively new for custom--I'm free,Try to compile a better package for everyone。
2013.5.22RG100A_DB120 firmware update,Increase NTFS automatically mount、Open shared writing..
2014On October 10, DB120/RG100,HG255D,703,720,741,841Version firmware. Without the CFE
Download brush bag just uploaded Flash Web configuration page in a,Brush well wait for reboot OK。
So these two bag, I'll not here,One hand is too much bad upload,That said on the other hand I was stealing something。I put on their respective forums page links out。
1、Division of VLAN
To configure multiple lines,Light dividing VLAN is not enough,Also need a virtual NIC。At first I thought that as long as the partition a VLAN to a different network interface would be nice,But it turns out this is wrong。Of course the first WAN port or VLAN is needed,You need to follow the normal Internet access Division of VLAN Division。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
root@OpenWrt:~# cat /etc/config/network config switch 'eth1' option reset '1' option enable_vlan '1' option enable '1' config switch_vlan option device 'eth1' option vlan '0' option ports '1 2 3 5' //注意看你机器的命令格式,可能稍有不同, //你要根据情况来稍加改动 config switch_vlan option device 'eth1' option vlan '1' option ports '0 5' config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option ifname 'eth1.0' option proto 'static' option ipaddr '192.168.2.1' option netmask '255.255.255.0' option nat '1' |
2、Virtual network adapter
Virtual add a second network card to another Wan dial-up。
You can be configured in the Web interface,Also can be configured in the CLI,Anyway, the command is the same as the。
If you use the CLI,Content is the,I also posted,Easy copy。
1 2 3 4 5 6 7 |
root@OpenWrt:~# cat /etc/rc.local # Put your custom commands here that should be executed once # the system init finished. By default this file does nothing. ip link add link br-lan eth2 type macvlan ifconfig eth2 hw ether 36:37:38:39:40:50 ifconfig eth2 up |
Depending on your network card serial number,Adding a network card named eth2,Then give it an arbitrarily different MAC address and default startup。
3、Add WAN port
Restart the order after its entry into force, we will be able to add the router WAN port,One is the default,Another is that we add a virtual network adapter。Watch command,Locate the file that you want to edit,In the append command:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
root@OpenWrt:~# cat /etc/config/network //其他内容略 config interface 'wan' option ifname 'eth1.1' option _orig_ifname 'eth1.1' option _orig_bridge 'false' option macaddr '给一个任意不同的mac地址注意要小写' option proto 'pppoe'//选择协议为pppoe,下同 option password '宽带密码' option username '宽带地址' config interface 'wan100' option ifname 'eth2' option proto 'pppoe' option password '宽带密码' option username '宽带地址' |
4、Firewall configuration
Configure the WAN port is not enough,In addition to the default Wan,You also need to add extra wan100 to the Wan,Otherwise fail to achieve dual-Wan。
This step you can by editing the wan100 interface properties on the Web page in the "firewall" section directly designated as "Wan",Or you can breath directly on the CLI complete,Here is modify location
1 2 3 4 5 6 7 8 9 10 11 |
root@OpenWrt:~# cat /etc/config/firewall config zone option name 'wan' option input 'REJECT' option output 'ACCEPT' option forward 'REJECT' option masq '1' option mtu_fix '1' //注意下边这句,将wan100加入其中。 option network 'wan wan100' //上下其他内容略…… |
5、Insert line
Such,Two WAN ports configured。WAN port you plug in a network cable,Configure PPPoE password,Another Internet cable into any LAN port,Configure PPPoE account password,So that the two lines have been able to dial,of course,May be on the system status page you can see a。
6、Load Balancing
Here we no longer do introduce,Routing using N-wan software,Check open in a,But add the WAN port back to his or her own information only,Name to write on。
7、QoS
QoS residue on the OP force,But better than nothing,Routing uses a relatively well-known emong's QoS,KET is a placebo effect can't make out the,Anyway, remember to see units,Should generally be kbit,Actually kilobits。
This is easy to understand,It happens to correspond to the speed of your bandwidth, not,You are 1M of bandwidth,That 1024kbit,10M,Is 10240kbit。
Further reading:
WAN(PPPoE,Single line,Multi line multi,MAC clone,Wireless WAN,3G WAN)
Original article written by LogStudio:R0uter's Blog » rg100a use OpenWRT open multi-line multi-dial plus Mac address cloning
Reproduced Please keep the source and description link:https://www.logcg.com/archives/854.html
Comments