What's new

Third WAN

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

ligeza

Regular Contributor
Is it possible to use LAN2 as third WAN? I know that it isn't possible with GUI but if it could be done with scripts I would like to do it with your little help.
 
In what way do you intend to use it?

It should be possible using vlans, but I haven't looked into how vlans are used even with just two WANs so I can't give you any more details.

(I've just managed to understand how the vlans are used with one WAN...)

What is the output of robocfg show? This will show what vlans are configured in the switch.

And the output of cat /proc/net/vlan/config will show what vlans are configured in the router kernel.
 
I have more then two internet connections. In Tomato firmware there is possibility to have up to 4 WANs, but I prefer Merlin.
I could make fourth vlan, but how to connect it with the port on router and made it to discover IP from DHCP.

Code:
robocfg vlan 1 ports "3 4 5t"
robocfg vlan 4 ports "2 5t"

And I wonder if the rest of it is doable.

Code:
admin@Asus:/tmp/home/root# robocfg show
Switch: enabled
Port 0: 1000FD enabled stp: none vlan: 2 jumbo: off mac: d4:61:2e:92:b5:4b
Port 1: 1000FD enabled stp: none vlan: 3 jumbo: off mac: d0:65:ca:b3:38:aa
Port 2:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
Port 3:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
Port 4: 1000FD enabled stp: none vlan: 1 jumbo: off mac: 00:08:9b:e3:45:c7
Port 8:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
VLANs: BCM5301x enabled mac_check mac_hash
   1: vlan1: 2 3 4 5t
   2: vlan2: 0 5t
   3: vlan3: 1 5t
  56: vlan56: 0 1 5t 7t
  57: vlan57: 1 2 3t 4t 5 8u
  58: vlan58: 2 4t 5t 7
  59: vlan59: 1t 2 4t 5t
  60: vlan60: 3 4 8u
  61: vlan61: 1 2t 3t 4 7t
  62: vlan62: 3 7 8u

Code:
cat /proc/net/vlan/config
VLAN Dev name     | VLAN ID
Name-Type: VLAN_NAME_TYPE_PLUS_VID_NO_PAD
vlan1          | 1  | eth0
vlan2          | 2  | eth0
vlan3          | 3  | eth0
admin@Asus:/tmp/home/root#
 
I have more then two internet connections.
But that does not answer the question I asked:)

Do you want to perform load balancing? Probably won't work very well (since it doesn't work very well with two WANs).

Different routes for different addresses? Sure, no problem.


My intention of asking the questions was to find out how the router normallt does when using LAN1 as an additional WAN port. What you would need to do is just mimic that for yet another LAN port.

Note that setting up vlans in the switch (using robocfg) is just like creating a virtual switch (isolated from the rest of the network). The you need to make virtual network interfaces to connect the router to the vlan.

Does ifconfig show all vlans as interfaces?
 
Do you want to perform load balancing? Probably won't work very well (since it doesn't work very well with two WANs).

Does ifconfig show all vlans as interfaces?

I made a simple PHP script to select which internet connection I want to use. So if I see if another person in my home is watching some VOD or the Wan is overloaded, I'm switching to another internet connection. Max I get from each WANs is about 3-5mbit/s. To switch between WANs I use "ip rule".

Code:
admin@Asus:/tmp/home/root# ifconfig
br0        Link encap:Ethernet  HWaddr 40:16:7E:59:65:10
           inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
           UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
           RX packets:1409095 errors:0 dropped:0 overruns:0 frame:0
           TX packets:997260 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:779452980 (743.3 MiB)  TX bytes:236784552 (225.8 MiB)

eth0       Link encap:Ethernet  HWaddr 40:16:7E:59:65:10
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:17446310 errors:0 dropped:0 overruns:0 frame:0
           TX packets:18384406 errors:1 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:410864770 (391.8 MiB)  TX bytes:3885812064 (3.6 GiB)
           Interrupt:179 Base address:0x4000

eth1       Link encap:Ethernet  HWaddr 40:16:7E:59:65:10
           UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
           Interrupt:163

eth2       Link encap:Ethernet  HWaddr 40:16:7E:59:65:14
           UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
           RX packets:10492445 errors:0 dropped:0 overruns:0 frame:988657
           TX packets:9534114 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:1933261237 (1.7 GiB)  TX bytes:2652096833 (2.4 GiB)
           Interrupt:169

lo         Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
           RX packets:10752 errors:0 dropped:0 overruns:0 frame:0
           TX packets:10752 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:2152741 (2.0 MiB)  TX bytes:2152741 (2.0 MiB)

vlan1      Link encap:Ethernet  HWaddr 40:16:7E:59:65:10
           UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
           RX packets:5205360 errors:0 dropped:0 overruns:0 frame:0
           TX packets:6827576 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:2792290361 (2.5 GiB)  TX bytes:6061953207 (5.6 GiB)

vlan2      Link encap:Ethernet  HWaddr 40:16:7E:59:65:10
           inet addr:192.168.8.100  Bcast:192.168.8.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:4566938 errors:0 dropped:0 overruns:0 frame:0
           TX packets:2913955 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:4456464009 (4.1 GiB)  TX bytes:401529759 (382.9 MiB)

vlan3      Link encap:Ethernet  HWaddr 40:16:7E:59:65:10
           inet addr:192.168.7.220  Bcast:192.168.7.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:7674008 errors:0 dropped:0 overruns:0 frame:0
           TX packets:3867362 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:10256124937 (9.5 GiB)  TX bytes:346723254 (330.6 MiB)

admin@Asus:/tmp/home/root#
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top