How to setup VLANs per interfaces on Linksys WRT 1900 acs OpenWRT (Chaos Calmer 15.05.1)Setting up VLANs on...

Why Normality assumption in linear regression

Eww, those bytes are gross

How would one buy a used TIE Fighter or X-Wing?

Why Smart Plugs don't require setting port forwarding on router and how to accomplish this with NodeMCU (ESP8266)

What's the most convenient time of year to end the world?

Checking for the existence of multiple directories

How to deal with an incendiary email that was recalled

Citing paywalled articles accessed via illegal web sharing

Pre-1980's science fiction short story: alien disguised as a woman shot by a gangster, has tentacles coming out of her breasts when remaking her body

Strange Sign on Lab Door

Why does a metal block make a shrill sound but not a wooden block upon hammering?

Can a person refuse a presidential pardon?

What is better: yes / no radio, or simple checkbox?

Solving Fredholm Equation of the second kind

Should I write a companion book/blog?

Are there neural networks with very few nodes that decently solve non-trivial problems?

How can animals be objects of ethics without being subjects as well?

We are very unlucky in my court

Parsing a string of key-value pairs as a dictionary

Can a dragon be stuck looking like a human?

Show that the following sequence converges. Please Critique my proof.

Can an insurance company drop you after receiving a bill and refusing to pay?

insert EOF statement before the last line of file

What is this metal M-shaped device for?



How to setup VLANs per interfaces on Linksys WRT 1900 acs OpenWRT (Chaos Calmer 15.05.1)


Setting up VLANs on WRT1900ac v1 Lede (Version 17.01.04)cannot connect to OpenWrt router via switchOpenWrt: how to give wlan clients @ 10.x Internet access via gateway @ 192.168.1.254OpenWRT: basic network configurationVLAN Debian server interface configuration fileOpenWRT OpenVPN LAN accessHow to debug OpenWRT Chaos Calmer 15.05 configuration files?TP-link TL-WR841N OpenWRT cannot connect to internetOpenVPN in openWRT - connection to the VPN succeeds, can ping LAN, can't ping outside (destination port unreachable)OpenWRT configurate router to communicate to GUEST WLAN from client LAN ports but not from master LANOpenWRT DDNS setup - can't access from outside of LAN













2















OS: OpenWRT, Chaos Calmer 15.05.1 (stable release with luci GUI)
Router: Linksys WRT 1900ACS (2x1.6Ghz, 512MB of RAM)



Problem: I am trying to set up separate VLANs per LAN interfaces (LAN ports). Strange but I cannot see any switch options in "luci" --> Networks; menu doesn't exist.



I tried to modify /etc/config/network by adding config switch for switch0, but I am losing access to my router after every /etc/init.d/network reload.



What I am trying to achieve:



Lan Port 1 --> VLAN 1;
Lan Port 2 --> VLAN 2;
Lan Port 3 --> VLAN 3;
Lan Port 4 --> VLAN 3;
Wireless --> VLAN 4;


Default /etc/config/network looks like below:



config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd61:03fe:3974::/48'

config interface 'lan'
option ifname 'eth1'
option force_link '1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'


I tried adding switch into configuration after reviewing OpenWRT wiki with no luck.



My switch device name:



root@OpenWrt:~# swconfig list
Found: switch0 - 10.mvsw61xx


I would appreciate any input.










share|improve this question





























    2















    OS: OpenWRT, Chaos Calmer 15.05.1 (stable release with luci GUI)
    Router: Linksys WRT 1900ACS (2x1.6Ghz, 512MB of RAM)



    Problem: I am trying to set up separate VLANs per LAN interfaces (LAN ports). Strange but I cannot see any switch options in "luci" --> Networks; menu doesn't exist.



    I tried to modify /etc/config/network by adding config switch for switch0, but I am losing access to my router after every /etc/init.d/network reload.



    What I am trying to achieve:



    Lan Port 1 --> VLAN 1;
    Lan Port 2 --> VLAN 2;
    Lan Port 3 --> VLAN 3;
    Lan Port 4 --> VLAN 3;
    Wireless --> VLAN 4;


    Default /etc/config/network looks like below:



    config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

    config globals 'globals'
    option ula_prefix 'fd61:03fe:3974::/48'

    config interface 'lan'
    option ifname 'eth1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

    config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'


    I tried adding switch into configuration after reviewing OpenWRT wiki with no luck.



    My switch device name:



    root@OpenWrt:~# swconfig list
    Found: switch0 - 10.mvsw61xx


    I would appreciate any input.










    share|improve this question



























      2












      2








      2


      2






      OS: OpenWRT, Chaos Calmer 15.05.1 (stable release with luci GUI)
      Router: Linksys WRT 1900ACS (2x1.6Ghz, 512MB of RAM)



      Problem: I am trying to set up separate VLANs per LAN interfaces (LAN ports). Strange but I cannot see any switch options in "luci" --> Networks; menu doesn't exist.



      I tried to modify /etc/config/network by adding config switch for switch0, but I am losing access to my router after every /etc/init.d/network reload.



      What I am trying to achieve:



      Lan Port 1 --> VLAN 1;
      Lan Port 2 --> VLAN 2;
      Lan Port 3 --> VLAN 3;
      Lan Port 4 --> VLAN 3;
      Wireless --> VLAN 4;


      Default /etc/config/network looks like below:



      config interface 'loopback'
      option ifname 'lo'
      option proto 'static'
      option ipaddr '127.0.0.1'
      option netmask '255.0.0.0'

      config globals 'globals'
      option ula_prefix 'fd61:03fe:3974::/48'

      config interface 'lan'
      option ifname 'eth1'
      option force_link '1'
      option type 'bridge'
      option proto 'static'
      option ipaddr '192.168.1.1'
      option netmask '255.255.255.0'
      option ip6assign '60'

      config interface 'wan'
      option ifname 'eth0'
      option proto 'dhcp'


      I tried adding switch into configuration after reviewing OpenWRT wiki with no luck.



      My switch device name:



      root@OpenWrt:~# swconfig list
      Found: switch0 - 10.mvsw61xx


      I would appreciate any input.










      share|improve this question
















      OS: OpenWRT, Chaos Calmer 15.05.1 (stable release with luci GUI)
      Router: Linksys WRT 1900ACS (2x1.6Ghz, 512MB of RAM)



      Problem: I am trying to set up separate VLANs per LAN interfaces (LAN ports). Strange but I cannot see any switch options in "luci" --> Networks; menu doesn't exist.



      I tried to modify /etc/config/network by adding config switch for switch0, but I am losing access to my router after every /etc/init.d/network reload.



      What I am trying to achieve:



      Lan Port 1 --> VLAN 1;
      Lan Port 2 --> VLAN 2;
      Lan Port 3 --> VLAN 3;
      Lan Port 4 --> VLAN 3;
      Wireless --> VLAN 4;


      Default /etc/config/network looks like below:



      config interface 'loopback'
      option ifname 'lo'
      option proto 'static'
      option ipaddr '127.0.0.1'
      option netmask '255.0.0.0'

      config globals 'globals'
      option ula_prefix 'fd61:03fe:3974::/48'

      config interface 'lan'
      option ifname 'eth1'
      option force_link '1'
      option type 'bridge'
      option proto 'static'
      option ipaddr '192.168.1.1'
      option netmask '255.255.255.0'
      option ip6assign '60'

      config interface 'wan'
      option ifname 'eth0'
      option proto 'dhcp'


      I tried adding switch into configuration after reviewing OpenWRT wiki with no luck.



      My switch device name:



      root@OpenWrt:~# swconfig list
      Found: switch0 - 10.mvsw61xx


      I would appreciate any input.







      openwrt vlan






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 17 at 20:23









      Hennes

      59.2k792142




      59.2k792142










      asked Apr 4 '16 at 18:21









      TomTom

      1114




      1114






















          2 Answers
          2






          active

          oldest

          votes


















          2














          Check out a solution and basic config example to get VLANs working on WRT1200AC using OpenWRT Chaos Calmer 15.05.1 here https://forum.openwrt.org/viewtopic.php?pid=332010#p332010



          BEWARE: The example is for WRT1200AC v1 / WRT1900AC v2 / WRT1900ACS v1.



          For WRT1900AC v1 entries for "eth0" and "eth1" need to be SWAPPED.



          See https://wiki.openwrt.org/toh/linksys/wrt1x00ac_series to identify your router model.



          As you noted, getting the config wrong leaves you highly likely to brick your router. So be careful! I made sure SSH login was possible via wireless before proceeding to change LAN port setup.



          From the forum link:



          You can easily brick your router if you don't set the interfaces exactly right, and it's not intuitive. You MUST set WAN port to use "eth0.(vlan_number)" eg: "eth0.100" and the other external ports to use "eth1.(vlan_number)" eg: "eth1.2", even though WAN and LAN ports share the same switch and same VLAN config.



          You must use the "t" tagged flag for the ports which the CPU connects to (5 on eth0 and 6 on eth1). So take careful note of the "5t" and "6t" in my example config below. Advice that is missing the essential "t" beside those entries did not work for me.



          Also for some reason I found WAN had to use a specially set VID of 100 (or any number that isn't 1, and doesn't conflict with your other vlan numbers), while the VLAN itself must still be set to 1. See the example below.



          Lastly, do NOT use Luci to configure the switch (eg: Network > Switch in the Luci inteface). You must edit /etc/config/network by hand to change the switch and VLAN definition. Luci will make a mess of switch and VLAN config. It autodetects the VLANs incorrectly when defining interface physical connections. It will try to call them all "eth0.1, eth0.2, eth0.3.." and so on, when in fact you must use "eth1.X" for all LAN ports and "eth0.X" for the WAN port. Using Luci's Network > Interface > (Interface Name) > Physical Settings config page is fine as long as you ignore the VLANs that Luci autodetects and type the correct ones using the "Custom Interface" box to define them the first time.



          If I failed to do any one of these things, all the ports became unusable. I found that as long as I had SSH access set up to be accessible via the wifi connection, I was able to recover from mistakes easily enough.



          My working config, with WAN and each LAN port on its own VLAN (Ports labelled as 3 and 4 on the back of the device are defined here but currently unassigned to any network):



          /etc/config/network:



          config switch
          option name 'switch0'
          option reset '1'
          option enable_vlan '1'

          #wan port
          config switch_vlan
          option device 'switch0'
          option vlan '1'
          option vid '100'
          option ports '4 5t'

          #port 1
          config switch_vlan
          option device 'switch0'
          option vlan '2'
          option vid '2'
          option ports '3 6t'

          #port 2
          config switch_vlan
          option device 'switch0'
          option vlan '3'
          option vid '3'
          option ports '2 6t'

          #port 3
          config switch_vlan
          option device 'switch0'
          option vlan '4'
          option vid '4'
          option ports '1 6t'

          #port 4
          config switch_vlan
          option device 'switch0'
          option vlan '5'
          option vid '5'
          option ports '0 6t'

          config interface 'loopback'
          option ifname 'lo'
          option proto 'static'
          option ipaddr '127.0.0.1'
          option netmask '255.0.0.0'

          config globals 'globals'
          option ula_prefix ' ( ...whatever your prefix is... ) '

          #Lan on switch port 1
          config interface 'lan'
          option force_link '1'
          option proto 'static'
          option netmask '255.255.255.0'
          option ipaddr '192.168.0.1'
          option ifname 'eth1.2'

          #Another local network on switch port 2
          config interface 'someothernetwork'
          option proto 'static'
          option ifname 'eth1.3'
          option ipaddr '192.168.8.1'
          option netmask '255.255.255.0'

          #WAN on the wan port
          config interface 'wan'
          option ifname 'eth0.100'
          option proto 'dhcp'

          #Wireless
          config interface 'wi'
          option type 'bridge'
          option _orig_ifname 'wlan0 wlan1'
          option _orig_bridge 'true'
          option proto 'static'
          option ipaddr '192.168.6.1'
          option netmask '255.255.255.0'





          share|improve this answer

































            0














            I am looking to implement a similar VLAN configuration for my Linksys WRT1900AC v2 router. Both the WRT1900AC(v2) and WRT1900ACS routers appear to use the same Marvell 88E6176 ethernet switch and the same switch port layout:




            • https://openwrt.org/toh/linksys/linksys_wrt1900ac#switch_ports_for_vlans

            • https://openwrt.org/toh/linksys/linksys_wrt1900acs#switch_ports_for_vlans


            As you mentioned, port 5 connects to eth0 (LAN) and port 6 connects to eth1 (WAN) interfaces.
            However, bc eth0 is connected to LAN ports and eth1 is connected to WAN ports in the VLAN configuration shouldn't:




            • LAN ports 0-3 be connected to port 5 ("5t"), and

            • WAN port 4 be connected to port 6 ("6t")?


            See my suggested updated configuration below.



            ...
            #wan port
            config switch_vlan
            option device 'switch0'
            option vlan '1'
            option vid '100'
            option ports '4 6t'

            #port 1
            config switch_vlan
            option device 'switch0'
            option vlan '2'
            option vid '2'
            option ports '3 5t'

            #port 2
            config switch_vlan
            option device 'switch0'
            option vlan '3'
            option vid '3'
            option ports '2 5t'

            #port 3
            config switch_vlan
            option device 'switch0'
            option vlan '4'
            option vid '4'
            option ports '1 5t'

            #port 4
            config switch_vlan
            option device 'switch0'
            option vlan '5'
            option vid '5'
            option ports '0 5t'
            ...




            share








            New contributor




            Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1061327%2fhow-to-setup-vlans-per-interfaces-on-linksys-wrt-1900-acs-openwrt-chaos-calmer%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              Check out a solution and basic config example to get VLANs working on WRT1200AC using OpenWRT Chaos Calmer 15.05.1 here https://forum.openwrt.org/viewtopic.php?pid=332010#p332010



              BEWARE: The example is for WRT1200AC v1 / WRT1900AC v2 / WRT1900ACS v1.



              For WRT1900AC v1 entries for "eth0" and "eth1" need to be SWAPPED.



              See https://wiki.openwrt.org/toh/linksys/wrt1x00ac_series to identify your router model.



              As you noted, getting the config wrong leaves you highly likely to brick your router. So be careful! I made sure SSH login was possible via wireless before proceeding to change LAN port setup.



              From the forum link:



              You can easily brick your router if you don't set the interfaces exactly right, and it's not intuitive. You MUST set WAN port to use "eth0.(vlan_number)" eg: "eth0.100" and the other external ports to use "eth1.(vlan_number)" eg: "eth1.2", even though WAN and LAN ports share the same switch and same VLAN config.



              You must use the "t" tagged flag for the ports which the CPU connects to (5 on eth0 and 6 on eth1). So take careful note of the "5t" and "6t" in my example config below. Advice that is missing the essential "t" beside those entries did not work for me.



              Also for some reason I found WAN had to use a specially set VID of 100 (or any number that isn't 1, and doesn't conflict with your other vlan numbers), while the VLAN itself must still be set to 1. See the example below.



              Lastly, do NOT use Luci to configure the switch (eg: Network > Switch in the Luci inteface). You must edit /etc/config/network by hand to change the switch and VLAN definition. Luci will make a mess of switch and VLAN config. It autodetects the VLANs incorrectly when defining interface physical connections. It will try to call them all "eth0.1, eth0.2, eth0.3.." and so on, when in fact you must use "eth1.X" for all LAN ports and "eth0.X" for the WAN port. Using Luci's Network > Interface > (Interface Name) > Physical Settings config page is fine as long as you ignore the VLANs that Luci autodetects and type the correct ones using the "Custom Interface" box to define them the first time.



              If I failed to do any one of these things, all the ports became unusable. I found that as long as I had SSH access set up to be accessible via the wifi connection, I was able to recover from mistakes easily enough.



              My working config, with WAN and each LAN port on its own VLAN (Ports labelled as 3 and 4 on the back of the device are defined here but currently unassigned to any network):



              /etc/config/network:



              config switch
              option name 'switch0'
              option reset '1'
              option enable_vlan '1'

              #wan port
              config switch_vlan
              option device 'switch0'
              option vlan '1'
              option vid '100'
              option ports '4 5t'

              #port 1
              config switch_vlan
              option device 'switch0'
              option vlan '2'
              option vid '2'
              option ports '3 6t'

              #port 2
              config switch_vlan
              option device 'switch0'
              option vlan '3'
              option vid '3'
              option ports '2 6t'

              #port 3
              config switch_vlan
              option device 'switch0'
              option vlan '4'
              option vid '4'
              option ports '1 6t'

              #port 4
              config switch_vlan
              option device 'switch0'
              option vlan '5'
              option vid '5'
              option ports '0 6t'

              config interface 'loopback'
              option ifname 'lo'
              option proto 'static'
              option ipaddr '127.0.0.1'
              option netmask '255.0.0.0'

              config globals 'globals'
              option ula_prefix ' ( ...whatever your prefix is... ) '

              #Lan on switch port 1
              config interface 'lan'
              option force_link '1'
              option proto 'static'
              option netmask '255.255.255.0'
              option ipaddr '192.168.0.1'
              option ifname 'eth1.2'

              #Another local network on switch port 2
              config interface 'someothernetwork'
              option proto 'static'
              option ifname 'eth1.3'
              option ipaddr '192.168.8.1'
              option netmask '255.255.255.0'

              #WAN on the wan port
              config interface 'wan'
              option ifname 'eth0.100'
              option proto 'dhcp'

              #Wireless
              config interface 'wi'
              option type 'bridge'
              option _orig_ifname 'wlan0 wlan1'
              option _orig_bridge 'true'
              option proto 'static'
              option ipaddr '192.168.6.1'
              option netmask '255.255.255.0'





              share|improve this answer






























                2














                Check out a solution and basic config example to get VLANs working on WRT1200AC using OpenWRT Chaos Calmer 15.05.1 here https://forum.openwrt.org/viewtopic.php?pid=332010#p332010



                BEWARE: The example is for WRT1200AC v1 / WRT1900AC v2 / WRT1900ACS v1.



                For WRT1900AC v1 entries for "eth0" and "eth1" need to be SWAPPED.



                See https://wiki.openwrt.org/toh/linksys/wrt1x00ac_series to identify your router model.



                As you noted, getting the config wrong leaves you highly likely to brick your router. So be careful! I made sure SSH login was possible via wireless before proceeding to change LAN port setup.



                From the forum link:



                You can easily brick your router if you don't set the interfaces exactly right, and it's not intuitive. You MUST set WAN port to use "eth0.(vlan_number)" eg: "eth0.100" and the other external ports to use "eth1.(vlan_number)" eg: "eth1.2", even though WAN and LAN ports share the same switch and same VLAN config.



                You must use the "t" tagged flag for the ports which the CPU connects to (5 on eth0 and 6 on eth1). So take careful note of the "5t" and "6t" in my example config below. Advice that is missing the essential "t" beside those entries did not work for me.



                Also for some reason I found WAN had to use a specially set VID of 100 (or any number that isn't 1, and doesn't conflict with your other vlan numbers), while the VLAN itself must still be set to 1. See the example below.



                Lastly, do NOT use Luci to configure the switch (eg: Network > Switch in the Luci inteface). You must edit /etc/config/network by hand to change the switch and VLAN definition. Luci will make a mess of switch and VLAN config. It autodetects the VLANs incorrectly when defining interface physical connections. It will try to call them all "eth0.1, eth0.2, eth0.3.." and so on, when in fact you must use "eth1.X" for all LAN ports and "eth0.X" for the WAN port. Using Luci's Network > Interface > (Interface Name) > Physical Settings config page is fine as long as you ignore the VLANs that Luci autodetects and type the correct ones using the "Custom Interface" box to define them the first time.



                If I failed to do any one of these things, all the ports became unusable. I found that as long as I had SSH access set up to be accessible via the wifi connection, I was able to recover from mistakes easily enough.



                My working config, with WAN and each LAN port on its own VLAN (Ports labelled as 3 and 4 on the back of the device are defined here but currently unassigned to any network):



                /etc/config/network:



                config switch
                option name 'switch0'
                option reset '1'
                option enable_vlan '1'

                #wan port
                config switch_vlan
                option device 'switch0'
                option vlan '1'
                option vid '100'
                option ports '4 5t'

                #port 1
                config switch_vlan
                option device 'switch0'
                option vlan '2'
                option vid '2'
                option ports '3 6t'

                #port 2
                config switch_vlan
                option device 'switch0'
                option vlan '3'
                option vid '3'
                option ports '2 6t'

                #port 3
                config switch_vlan
                option device 'switch0'
                option vlan '4'
                option vid '4'
                option ports '1 6t'

                #port 4
                config switch_vlan
                option device 'switch0'
                option vlan '5'
                option vid '5'
                option ports '0 6t'

                config interface 'loopback'
                option ifname 'lo'
                option proto 'static'
                option ipaddr '127.0.0.1'
                option netmask '255.0.0.0'

                config globals 'globals'
                option ula_prefix ' ( ...whatever your prefix is... ) '

                #Lan on switch port 1
                config interface 'lan'
                option force_link '1'
                option proto 'static'
                option netmask '255.255.255.0'
                option ipaddr '192.168.0.1'
                option ifname 'eth1.2'

                #Another local network on switch port 2
                config interface 'someothernetwork'
                option proto 'static'
                option ifname 'eth1.3'
                option ipaddr '192.168.8.1'
                option netmask '255.255.255.0'

                #WAN on the wan port
                config interface 'wan'
                option ifname 'eth0.100'
                option proto 'dhcp'

                #Wireless
                config interface 'wi'
                option type 'bridge'
                option _orig_ifname 'wlan0 wlan1'
                option _orig_bridge 'true'
                option proto 'static'
                option ipaddr '192.168.6.1'
                option netmask '255.255.255.0'





                share|improve this answer




























                  2












                  2








                  2







                  Check out a solution and basic config example to get VLANs working on WRT1200AC using OpenWRT Chaos Calmer 15.05.1 here https://forum.openwrt.org/viewtopic.php?pid=332010#p332010



                  BEWARE: The example is for WRT1200AC v1 / WRT1900AC v2 / WRT1900ACS v1.



                  For WRT1900AC v1 entries for "eth0" and "eth1" need to be SWAPPED.



                  See https://wiki.openwrt.org/toh/linksys/wrt1x00ac_series to identify your router model.



                  As you noted, getting the config wrong leaves you highly likely to brick your router. So be careful! I made sure SSH login was possible via wireless before proceeding to change LAN port setup.



                  From the forum link:



                  You can easily brick your router if you don't set the interfaces exactly right, and it's not intuitive. You MUST set WAN port to use "eth0.(vlan_number)" eg: "eth0.100" and the other external ports to use "eth1.(vlan_number)" eg: "eth1.2", even though WAN and LAN ports share the same switch and same VLAN config.



                  You must use the "t" tagged flag for the ports which the CPU connects to (5 on eth0 and 6 on eth1). So take careful note of the "5t" and "6t" in my example config below. Advice that is missing the essential "t" beside those entries did not work for me.



                  Also for some reason I found WAN had to use a specially set VID of 100 (or any number that isn't 1, and doesn't conflict with your other vlan numbers), while the VLAN itself must still be set to 1. See the example below.



                  Lastly, do NOT use Luci to configure the switch (eg: Network > Switch in the Luci inteface). You must edit /etc/config/network by hand to change the switch and VLAN definition. Luci will make a mess of switch and VLAN config. It autodetects the VLANs incorrectly when defining interface physical connections. It will try to call them all "eth0.1, eth0.2, eth0.3.." and so on, when in fact you must use "eth1.X" for all LAN ports and "eth0.X" for the WAN port. Using Luci's Network > Interface > (Interface Name) > Physical Settings config page is fine as long as you ignore the VLANs that Luci autodetects and type the correct ones using the "Custom Interface" box to define them the first time.



                  If I failed to do any one of these things, all the ports became unusable. I found that as long as I had SSH access set up to be accessible via the wifi connection, I was able to recover from mistakes easily enough.



                  My working config, with WAN and each LAN port on its own VLAN (Ports labelled as 3 and 4 on the back of the device are defined here but currently unassigned to any network):



                  /etc/config/network:



                  config switch
                  option name 'switch0'
                  option reset '1'
                  option enable_vlan '1'

                  #wan port
                  config switch_vlan
                  option device 'switch0'
                  option vlan '1'
                  option vid '100'
                  option ports '4 5t'

                  #port 1
                  config switch_vlan
                  option device 'switch0'
                  option vlan '2'
                  option vid '2'
                  option ports '3 6t'

                  #port 2
                  config switch_vlan
                  option device 'switch0'
                  option vlan '3'
                  option vid '3'
                  option ports '2 6t'

                  #port 3
                  config switch_vlan
                  option device 'switch0'
                  option vlan '4'
                  option vid '4'
                  option ports '1 6t'

                  #port 4
                  config switch_vlan
                  option device 'switch0'
                  option vlan '5'
                  option vid '5'
                  option ports '0 6t'

                  config interface 'loopback'
                  option ifname 'lo'
                  option proto 'static'
                  option ipaddr '127.0.0.1'
                  option netmask '255.0.0.0'

                  config globals 'globals'
                  option ula_prefix ' ( ...whatever your prefix is... ) '

                  #Lan on switch port 1
                  config interface 'lan'
                  option force_link '1'
                  option proto 'static'
                  option netmask '255.255.255.0'
                  option ipaddr '192.168.0.1'
                  option ifname 'eth1.2'

                  #Another local network on switch port 2
                  config interface 'someothernetwork'
                  option proto 'static'
                  option ifname 'eth1.3'
                  option ipaddr '192.168.8.1'
                  option netmask '255.255.255.0'

                  #WAN on the wan port
                  config interface 'wan'
                  option ifname 'eth0.100'
                  option proto 'dhcp'

                  #Wireless
                  config interface 'wi'
                  option type 'bridge'
                  option _orig_ifname 'wlan0 wlan1'
                  option _orig_bridge 'true'
                  option proto 'static'
                  option ipaddr '192.168.6.1'
                  option netmask '255.255.255.0'





                  share|improve this answer















                  Check out a solution and basic config example to get VLANs working on WRT1200AC using OpenWRT Chaos Calmer 15.05.1 here https://forum.openwrt.org/viewtopic.php?pid=332010#p332010



                  BEWARE: The example is for WRT1200AC v1 / WRT1900AC v2 / WRT1900ACS v1.



                  For WRT1900AC v1 entries for "eth0" and "eth1" need to be SWAPPED.



                  See https://wiki.openwrt.org/toh/linksys/wrt1x00ac_series to identify your router model.



                  As you noted, getting the config wrong leaves you highly likely to brick your router. So be careful! I made sure SSH login was possible via wireless before proceeding to change LAN port setup.



                  From the forum link:



                  You can easily brick your router if you don't set the interfaces exactly right, and it's not intuitive. You MUST set WAN port to use "eth0.(vlan_number)" eg: "eth0.100" and the other external ports to use "eth1.(vlan_number)" eg: "eth1.2", even though WAN and LAN ports share the same switch and same VLAN config.



                  You must use the "t" tagged flag for the ports which the CPU connects to (5 on eth0 and 6 on eth1). So take careful note of the "5t" and "6t" in my example config below. Advice that is missing the essential "t" beside those entries did not work for me.



                  Also for some reason I found WAN had to use a specially set VID of 100 (or any number that isn't 1, and doesn't conflict with your other vlan numbers), while the VLAN itself must still be set to 1. See the example below.



                  Lastly, do NOT use Luci to configure the switch (eg: Network > Switch in the Luci inteface). You must edit /etc/config/network by hand to change the switch and VLAN definition. Luci will make a mess of switch and VLAN config. It autodetects the VLANs incorrectly when defining interface physical connections. It will try to call them all "eth0.1, eth0.2, eth0.3.." and so on, when in fact you must use "eth1.X" for all LAN ports and "eth0.X" for the WAN port. Using Luci's Network > Interface > (Interface Name) > Physical Settings config page is fine as long as you ignore the VLANs that Luci autodetects and type the correct ones using the "Custom Interface" box to define them the first time.



                  If I failed to do any one of these things, all the ports became unusable. I found that as long as I had SSH access set up to be accessible via the wifi connection, I was able to recover from mistakes easily enough.



                  My working config, with WAN and each LAN port on its own VLAN (Ports labelled as 3 and 4 on the back of the device are defined here but currently unassigned to any network):



                  /etc/config/network:



                  config switch
                  option name 'switch0'
                  option reset '1'
                  option enable_vlan '1'

                  #wan port
                  config switch_vlan
                  option device 'switch0'
                  option vlan '1'
                  option vid '100'
                  option ports '4 5t'

                  #port 1
                  config switch_vlan
                  option device 'switch0'
                  option vlan '2'
                  option vid '2'
                  option ports '3 6t'

                  #port 2
                  config switch_vlan
                  option device 'switch0'
                  option vlan '3'
                  option vid '3'
                  option ports '2 6t'

                  #port 3
                  config switch_vlan
                  option device 'switch0'
                  option vlan '4'
                  option vid '4'
                  option ports '1 6t'

                  #port 4
                  config switch_vlan
                  option device 'switch0'
                  option vlan '5'
                  option vid '5'
                  option ports '0 6t'

                  config interface 'loopback'
                  option ifname 'lo'
                  option proto 'static'
                  option ipaddr '127.0.0.1'
                  option netmask '255.0.0.0'

                  config globals 'globals'
                  option ula_prefix ' ( ...whatever your prefix is... ) '

                  #Lan on switch port 1
                  config interface 'lan'
                  option force_link '1'
                  option proto 'static'
                  option netmask '255.255.255.0'
                  option ipaddr '192.168.0.1'
                  option ifname 'eth1.2'

                  #Another local network on switch port 2
                  config interface 'someothernetwork'
                  option proto 'static'
                  option ifname 'eth1.3'
                  option ipaddr '192.168.8.1'
                  option netmask '255.255.255.0'

                  #WAN on the wan port
                  config interface 'wan'
                  option ifname 'eth0.100'
                  option proto 'dhcp'

                  #Wireless
                  config interface 'wi'
                  option type 'bridge'
                  option _orig_ifname 'wlan0 wlan1'
                  option _orig_bridge 'true'
                  option proto 'static'
                  option ipaddr '192.168.6.1'
                  option netmask '255.255.255.0'






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jul 18 '16 at 8:51

























                  answered Jul 18 '16 at 4:50









                  AdrianQAdrianQ

                  213




                  213

























                      0














                      I am looking to implement a similar VLAN configuration for my Linksys WRT1900AC v2 router. Both the WRT1900AC(v2) and WRT1900ACS routers appear to use the same Marvell 88E6176 ethernet switch and the same switch port layout:




                      • https://openwrt.org/toh/linksys/linksys_wrt1900ac#switch_ports_for_vlans

                      • https://openwrt.org/toh/linksys/linksys_wrt1900acs#switch_ports_for_vlans


                      As you mentioned, port 5 connects to eth0 (LAN) and port 6 connects to eth1 (WAN) interfaces.
                      However, bc eth0 is connected to LAN ports and eth1 is connected to WAN ports in the VLAN configuration shouldn't:




                      • LAN ports 0-3 be connected to port 5 ("5t"), and

                      • WAN port 4 be connected to port 6 ("6t")?


                      See my suggested updated configuration below.



                      ...
                      #wan port
                      config switch_vlan
                      option device 'switch0'
                      option vlan '1'
                      option vid '100'
                      option ports '4 6t'

                      #port 1
                      config switch_vlan
                      option device 'switch0'
                      option vlan '2'
                      option vid '2'
                      option ports '3 5t'

                      #port 2
                      config switch_vlan
                      option device 'switch0'
                      option vlan '3'
                      option vid '3'
                      option ports '2 5t'

                      #port 3
                      config switch_vlan
                      option device 'switch0'
                      option vlan '4'
                      option vid '4'
                      option ports '1 5t'

                      #port 4
                      config switch_vlan
                      option device 'switch0'
                      option vlan '5'
                      option vid '5'
                      option ports '0 5t'
                      ...




                      share








                      New contributor




                      Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.

























                        0














                        I am looking to implement a similar VLAN configuration for my Linksys WRT1900AC v2 router. Both the WRT1900AC(v2) and WRT1900ACS routers appear to use the same Marvell 88E6176 ethernet switch and the same switch port layout:




                        • https://openwrt.org/toh/linksys/linksys_wrt1900ac#switch_ports_for_vlans

                        • https://openwrt.org/toh/linksys/linksys_wrt1900acs#switch_ports_for_vlans


                        As you mentioned, port 5 connects to eth0 (LAN) and port 6 connects to eth1 (WAN) interfaces.
                        However, bc eth0 is connected to LAN ports and eth1 is connected to WAN ports in the VLAN configuration shouldn't:




                        • LAN ports 0-3 be connected to port 5 ("5t"), and

                        • WAN port 4 be connected to port 6 ("6t")?


                        See my suggested updated configuration below.



                        ...
                        #wan port
                        config switch_vlan
                        option device 'switch0'
                        option vlan '1'
                        option vid '100'
                        option ports '4 6t'

                        #port 1
                        config switch_vlan
                        option device 'switch0'
                        option vlan '2'
                        option vid '2'
                        option ports '3 5t'

                        #port 2
                        config switch_vlan
                        option device 'switch0'
                        option vlan '3'
                        option vid '3'
                        option ports '2 5t'

                        #port 3
                        config switch_vlan
                        option device 'switch0'
                        option vlan '4'
                        option vid '4'
                        option ports '1 5t'

                        #port 4
                        config switch_vlan
                        option device 'switch0'
                        option vlan '5'
                        option vid '5'
                        option ports '0 5t'
                        ...




                        share








                        New contributor




                        Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.























                          0












                          0








                          0







                          I am looking to implement a similar VLAN configuration for my Linksys WRT1900AC v2 router. Both the WRT1900AC(v2) and WRT1900ACS routers appear to use the same Marvell 88E6176 ethernet switch and the same switch port layout:




                          • https://openwrt.org/toh/linksys/linksys_wrt1900ac#switch_ports_for_vlans

                          • https://openwrt.org/toh/linksys/linksys_wrt1900acs#switch_ports_for_vlans


                          As you mentioned, port 5 connects to eth0 (LAN) and port 6 connects to eth1 (WAN) interfaces.
                          However, bc eth0 is connected to LAN ports and eth1 is connected to WAN ports in the VLAN configuration shouldn't:




                          • LAN ports 0-3 be connected to port 5 ("5t"), and

                          • WAN port 4 be connected to port 6 ("6t")?


                          See my suggested updated configuration below.



                          ...
                          #wan port
                          config switch_vlan
                          option device 'switch0'
                          option vlan '1'
                          option vid '100'
                          option ports '4 6t'

                          #port 1
                          config switch_vlan
                          option device 'switch0'
                          option vlan '2'
                          option vid '2'
                          option ports '3 5t'

                          #port 2
                          config switch_vlan
                          option device 'switch0'
                          option vlan '3'
                          option vid '3'
                          option ports '2 5t'

                          #port 3
                          config switch_vlan
                          option device 'switch0'
                          option vlan '4'
                          option vid '4'
                          option ports '1 5t'

                          #port 4
                          config switch_vlan
                          option device 'switch0'
                          option vlan '5'
                          option vid '5'
                          option ports '0 5t'
                          ...




                          share








                          New contributor




                          Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          I am looking to implement a similar VLAN configuration for my Linksys WRT1900AC v2 router. Both the WRT1900AC(v2) and WRT1900ACS routers appear to use the same Marvell 88E6176 ethernet switch and the same switch port layout:




                          • https://openwrt.org/toh/linksys/linksys_wrt1900ac#switch_ports_for_vlans

                          • https://openwrt.org/toh/linksys/linksys_wrt1900acs#switch_ports_for_vlans


                          As you mentioned, port 5 connects to eth0 (LAN) and port 6 connects to eth1 (WAN) interfaces.
                          However, bc eth0 is connected to LAN ports and eth1 is connected to WAN ports in the VLAN configuration shouldn't:




                          • LAN ports 0-3 be connected to port 5 ("5t"), and

                          • WAN port 4 be connected to port 6 ("6t")?


                          See my suggested updated configuration below.



                          ...
                          #wan port
                          config switch_vlan
                          option device 'switch0'
                          option vlan '1'
                          option vid '100'
                          option ports '4 6t'

                          #port 1
                          config switch_vlan
                          option device 'switch0'
                          option vlan '2'
                          option vid '2'
                          option ports '3 5t'

                          #port 2
                          config switch_vlan
                          option device 'switch0'
                          option vlan '3'
                          option vid '3'
                          option ports '2 5t'

                          #port 3
                          config switch_vlan
                          option device 'switch0'
                          option vlan '4'
                          option vid '4'
                          option ports '1 5t'

                          #port 4
                          config switch_vlan
                          option device 'switch0'
                          option vlan '5'
                          option vid '5'
                          option ports '0 5t'
                          ...





                          share








                          New contributor




                          Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          share


                          share






                          New contributor




                          Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered 2 mins ago









                          MichaelMichael

                          1




                          1




                          New contributor




                          Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1061327%2fhow-to-setup-vlans-per-interfaces-on-linksys-wrt-1900-acs-openwrt-chaos-calmer%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

                              Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                              VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...