1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can VLAN GUI port order be corrected?

Discussion in 'Tomato Firmware' started by psy-q, Jun 22, 2014.

  1. psy-q

    psy-q Reformed Router Member

    Is it possible to alter the VLAN GUI so the port order shows correctly? I have a fresh firmware install and my NVRAM has been cleared (thorough).

    Here are the physical port states. This is correct. Port 4 is for my IPTV and is on VLAN2. Everything works perfectly.
    [​IMG]

    The NVRAM shows like this (also correct):
    # nvram show | grep vlan.ports
    vlan0ports=
    vlan1ports=1t 2t 3t 8*
    vlan2ports=4 8
    vlan3ports=8
    vlan4ports=8
    vlan5ports=0 1t 2t 3t 8
    vlan6ports=
    vlan7ports=
    vlan8ports=
    vlan9ports=

    However, this is what my VLAN configuration looks. Port 1 should be Port 4.
    [​IMG]

    I see a lot of "use Invert Ports Order under Ethernet Ports State - Configuration to fix it" all over the forums. That only changes the visual representation of the port state. It doesn't change the VLAN page (which is the issue).

    RT-N66U w/ Shibby 120 K26AC AIO
     
  2. psy-q

    psy-q Reformed Router Member

    Is this an uncommon issue? I'd be surprised if only a few people have had this come up. Is it a device specific thing?

    Seems like it's just a simple Javascript/CSS issue
     
  3. tvlz

    tvlz Addicted to LI Member

    I think the RT-N66 & RT-AC66 share the same boardtype, fix it for one & the other one is now wrong
     
  4. psy-q

    psy-q Reformed Router Member

    umm... you mean DON'T share the same board type right?

    I guess I'll have to start digging into the guts for the GUI and see if I can hack something together.
     
  5. psy-q

    psy-q Reformed Router Member

    So under advanced-vlan.asp The following line:

    Code:
    case '0x04ef':  // WRT320N/E2000
    case '0x04cf':  // WRT610Nv2/E3000, RT-N16, WNR3500L
    case '0xf5b2':  // RT-N66
    COL_P0N = '4';
    COL_P1N = '3';
    COL_P2N = '2';
    COL_P3N = '1';
    COL_P4N = '0';
    break;
    
    should read

    Code:
    case '0xf5b2':  // RT-N66
    COL_P0N = '1';
    COL_P1N = '2';
    COL_P2N = '3';
    COL_P3N = '4';
    COL_P4N = '0';
    break;
    
    or something to that effect. I've confirmed the boardtype is correct.
    Now I just have to figure out how to change it...
     
  6. tvlz

    tvlz Addicted to LI Member

    No, I mean they share the same boardtype(0xF5B2) but the ports have a different order.
    It can be fixed by finding some difference between the two or changing how the vlan port order is figured out (I thought about using the "t_model_name", but never got around changing it)
     
  7. psy-q

    psy-q Reformed Router Member

    Ohhhhhh... now I know what you meant by that. Dang, I see the issue
     
  8. psy-q

    psy-q Reformed Router Member

    This is really a GUI thing. If we could simply manually edit the names of the ports we could easily fix it.

    Good for knowing what is plugged into what in the GUI as well.
     
  9. tvlz

    tvlz Addicted to LI Member

    All changes are welcome, nice thing about have sources available:)
     
  10. psy-q

    psy-q Reformed Router Member

    Although I can see the issue and what is needed to fix it, my programming skills are WOEFULLY inadequate to make the necessary table changes.

    Maybe I'll hack away at it in my spare time. How hard could it be? :confused:
     
  11. psy-q

    psy-q Reformed Router Member

    Would this work? The RT-AC66 has a completely different boardrev

    Code:
    case '0x04ef':  // WRT320N/E2000
    case '0x04cf':  // WRT610Nv2/E3000, RT-N16, WNR3500L
    case '0xf5b2':  // RT-AC66
    COL_P0N = '4';
    COL_P1N = '3';
    COL_P2N = '2';
    COL_P3N = '1';
    COL_P4N = '0';
    break;
    if ((nvram['boardrev'] == '0x1100') { //RT-N66
    }
    COL_P0N = '1';
    COL_P1N = '2';
    COL_P2N = '3';
    COL_P3N = '4';
    COL_P4N = '0';
    break;
    
     
    Last edited: Jun 24, 2014
  12. Siff

    Siff Serious Server Member

    Or make the "Invert Ports Order" check-box work for the VLAN as well? Automatic detection is great, but I would guess that if somebody wants to invert the order of the ports on their Overview page that he/she will want to have the same (inverted) order on the VLAN page, right?

    P.S. I'm not using the VLAN (yet), so my appologies if this is stupid suggestion!
     
    Last edited: Jun 25, 2014
  13. rs232

    rs232 Network Guru Member

  14. psy-q

    psy-q Reformed Router Member

    Unfortunately it's not always just a matter of inverting the order. Some units have all kinds of weird port orders.
     
  15. psy-q

    psy-q Reformed Router Member

  16. rs232

    rs232 Network Guru Member

    You misunderstood my post. Of course it's fixable and perhaps even easy. My point is: nobody has given priority to this. So unless you're willing to write the code to solve it yourself, do sit and wait for the mod developer (might or might not happen) to solve this low priority issue.
     
  17. tvlz

    tvlz Addicted to LI Member

    Give this a try, copy to usb drive & load new advanced-vlan.asp
    Code:
    mount -o bind /mnt/sda1/advanced-vlan.asp /www/advanced-vlan.asp
    you may want to add to "run after mounting" on usb page to survive reboot.
     
    shibby20 and rs232 like this.
  18. rs232

    rs232 Network Guru Member

    Thanks for this! I tried to run it on a Netgear 3500L and noticed that it's not included in the any of the cases. The board type for this device is: 0x04CF
     
  19. shibby20

    shibby20 Network Guru Member

    @tvlz i really like this solution:

     
  20. tvlz

    tvlz Addicted to LI Member

    This is a replacement of advanced-vlan.asp (MIPSR2 & ARM Routers) using the Router Model name to setup the Vlan GUI to match the way the router case ports are numbered.

    If you get "Unknown Port Mapping Using Default" warning at the top of the page or if you discover that the port mapping is incorrect for your router, check the GIT Repo for routers with known port mapping, if not listed go to the "How to fix Vlan Port Order:" section to get it added.

    If it is on list but you still have the "Unknown Port Mapping Using Default" warning, you need to follow the steps below.

    Recommended Method: Use USB Drive

    1)Download new advanced-vlan file for your firmware type.
    2)Rename file to advanced-vlan.asp
    3)Copy to usb drive.
    4)Add to "run after mounting" section on usb page(http://192.168.1.1/nas-usb.asp).
    Code:
    mount -o bind /mnt/sda1/advanced-vlan.asp /www/advanced-vlan.asp
    5)Unmount & Mount USB Drive or Reboot, to load the new advanced-vlan.asp file.

    Alternate Method: No Usb port on router

    1)Download new advanced-vlan file for your firmware type.
    2)Rename file to advanced-vlan.asp
    3)Copy(use winscp) the new advanced-vlan.asp file into /tmp/var/wwwext
    4)Run on Tools-System Commands http://192.168.1.1/tools-shell.asp page, to load the new advanced-vlan.asp file.
    Code:
    mount -o bind /tmp/var/wwwext/advanced-vlan.asp /www/advanced-vlan.asp
    NOTE: Step 3&4 needs to be redone everytime the router reboots, with this method the new advanced-vlan.asp file won't survive a reboot.

    How to fix Vlan Port Order:

    This is where your help is needed, to get all required & correct port order info for supported routers(No Mipsr1 or K2.4 routers)

    I need you to do the post the following,
    If router name is shown as "Broadcom ..." in the warning (you see something like this "Broadcom 21/0x058e/45/0x1153/0x710") at the top of the page your router is not currently supported, to get it supported you need to search for/start a new topic(Router Brand/Model Support?) with all of the info above plus:

    Looking at the front, tip the router forwards(the front is now on the table, back is pointing up) that would be "the back of the router case "left -> right viewed from the front"

    Git:
    https://bitbucket.org/tvlz/tvlz-advanced-vlan
     
    Last edited: Dec 2, 2016 at 3:20 PM
  21. psy-q

    psy-q Reformed Router Member

    Woo, nice tvlz. That totally works. I came up with something similar, but yours covers far more.

    advanced-vlan.asp is going to become a scary page over time with all the board type checks. Especially with all the new hardware we've been seeing this year. For now I just hope that can get integrated into some releases.
     
  22. psy-q

    psy-q Reformed Router Member

    Shibby, couldn't you use your TomatoAnon project to harvest vlan port and boardtype information? Maybe you already do that? Sure would save a mountain of work. I'm willing to help make all the information database friendly.
     
  23. dc361

    dc361 LI Guru Member

    I think that it is a bit much to try and put every board / rev in the tomato advanced-vlan.asp page - the file would be out of date every time a router is added to the supported device list.

    How many options are there for the order of the ports? Two, three or four? If that is the case put a select box on the page to pick the order to display the ports and then either add a link or recommend that people check an external web-page to see which choice is valid for their router.

    Make sense? DC
     
    Last edited: Jul 1, 2014
  24. TyShawn

    TyShawn Reformed Router Member

    Could you add a screen shot for this new page please
     
  25. tvlz

    tvlz Addicted to LI Member

    Someday, maybe after more routers are added
    Not worth the trouble, the vlan port info is needed only one time, just to verify port order.
     
  26. tvlz

    tvlz Addicted to LI Member

    Not adding any K2.4 routers, so that cuts down the number
    If this is added to a firmware release, when a router is added the needed info would be added too
    4
    Checkboxes don't really work - Look at how many people ask about the "invert port order" checkbox
     
  27. tvlz

    tvlz Addicted to LI Member

    Is one really needed, it's just a simple message on the top of the page?

    Can't you just try it, so I can get the needed info?
     
  28. TyShawn

    TyShawn Reformed Router Member

    Not at all I misread with this mod did. I haven't flashed to Tomato just yet on my 7000, but I could on my E4200 and test it out.
     
  29. psy-q

    psy-q Reformed Router Member

    Swapping it to t_model_name is definitely the way to go. That's how it works on the Overview screen and I've never seen it wrong. The different vlan configurations could be entered as variables to keep the code size down. There doesn't seem to be a good way to avoid having a database of all the different hardware setups with a project that supports as much hardware as Tomato.

    Ideally we'd have a different advanced-vlan.asp for each build that only supports the hardware it was setup for. That's up to the project leaders though.

    For now there seems to be enough memory and processing power out there to just deal with the slightly bloated advanced-vlan.asp
     
  30. tvlz

    tvlz Addicted to LI Member

    Updated to include almost all the K2.6 & Arm routers listed on Tomatoanon( NOT with the correct case port order, still need that) to "bloat" the file size - was 35.7k now 36.8k, that's about where it should stay for awhile.

    Now back to getting the correct port info, please:D
     
  31. rs232

    rs232 Network Guru Member

    First of all: thanks
    Secondly: May I stress not to leave the 2.4 builds behind?
    You will be surprised how many 2.4 installation there are out there.
     
  32. mw333

    mw333 Serious Server Member

    Having the GUI display the "correct" port # regardless of how the vendor decided to wire them up is a nice touch. But one can ask is it really necessary. After you get over the initial shock that it doesn't work, it only takes a couple config/reboots to figure out what they are. I wrote it down so I would remember if I need to set it up again.

    For the RT-N16 and RT-N66U I really didn't have to write it down (1=4 and reverse order, wan is where is should be). However, for the f7d4301, I needed to write down (1=3 and reverse order).

    The code is easy. It's the testing all the models/revs - that's the hard part.
     
  33. tvlz

    tvlz Addicted to LI Member

    Simple reason, Shibby is going to stop making them AFAIK, if you compile your own K2.4 version just replace file with older copy & it will work like it did before.
     
  34. tvlz

    tvlz Addicted to LI Member

    Why should anybody have to, port 1 should be port 1, no config required!

    Not hard if people would post the info needed, pretty simple right:rolleyes:
    Router: xxxx
    Vlan1ports:x x x x
    Case numbers: x x x x
     
  35. psy-q

    psy-q Reformed Router Member

    Valid argument. Of course we're all experienced enough to be able to identify the issue and work around it (better be if we're messing with VLAN :rolleyes:).

    Being user friendly is a huge advantage, especially for a community driven projects like Tomato. Incorrect GUI looks sloppy and can turn people away, or create assumptions that something is wrong with the software.

    Look what ease of use did for Apple... not that I condone breaking basic functions and alienating power users for profit :cool:
     
  36. mw333

    mw333 Serious Server Member

    The trunk is plugged into physical port 1.

    vlan.JPG
     
  37. tvlz

    tvlz Addicted to LI Member

    Updated to include only verified models, all others commented out.

    For RT-N16 ?? you don't say, if so fixed.

    Text Only Please, easier for me, thanks
     
  38. mw333

    mw333 Serious Server Member

    Some say a picture is worth a thousand words. That is for both RT-N16 and RT-N66U.
     
  39. psy-q

    psy-q Reformed Router Member

    Yay! the changes made it into Shibby 121.
     
  40. Bobby J

    Bobby J Reformed Router Member

    I have two routers running Shibby v120. The following are the outputs of the # nvram show | grep vlan.ports command. Unfortunately, I have no idea what that means or how to interpret the results. I could not figure out how to set the VLAN on the Asus RT-N10P. I assume it was due to the weird port numbering.

    Is the following the kind of detail information you need? If not, let me know and I can provide additional information. Also, why are the VLANs numbered 1 & 2 for the E3000, but 0 & 1 for teh RT-N10P? Can you help me figure out which port really matches 1, 2, 3, etc. on the case?

    Sorry for all the questions, but I'm not super technical, but would like to learn. Thanks for your help.

    1) Model: Linksys E3000
    Port Numbers: 1-2-3-4-WAN-USB (Left-Right viewed from front)
    new_vlan1ports=1 2 3 4 8*
    new_vlan2ports=0 8
    vlan1ports=1 2 3 4 8*
    vlan2ports=0 8

    2) Model: Asus RT-N10P
    Port Numbers: WAN-1-2-3-4 (Left-Right viewed from front)
    vlan0ports=3 2 1 0 5*
    vlan1ports=4 5
     
    Last edited: Jul 19, 2014
  41. psy-q

    psy-q Reformed Router Member

    tvlz, looks like the last update you did removed the information for the RT-N66U. When I flashed Shibby's latest build it was broken again.
     
  42. tvlz

    tvlz Addicted to LI Member

    After you flashed it reverted to using what's in Shibby's firmware, you need to redo the mount bind again.
    Until the changes are added to the firmware, it's something you'll have to do after every flash.

    Updated with more changes
     
  43. psy-q

    psy-q Reformed Router Member

    according to Shibby's changelog he did add it.

    Code:
    [RELEASE] 121
    All version:
    - add web module for ip6tables (fixed problem with access restriction)
    - libcurl update to 7.37
    - transmission upgrade to 2.84
    K26RT-N and/or K26RT-AC
    - fix VLAN order for RT-N66U – thx @tvlz
    - fix VLAN/VID mapping
    - fix support of Tenda N60 – please read INSTALATION-N60.txt first!
    K26-ARM
    - fix 3G modem support for ARM
    - add RT-N18U suport
    - ET driver upgrade – may fix high ping issue
    - fix QoS for ARM
    - fix Webmon for ARM
    - add GRO CONTROL (should stabilize and speed-up dl/ul speed from Samba) – thx RMerlin
    but it's not working right. It doesn't look like the layout for the RT-N66U is in your update anymore.
     
  44. Bobby J

    Bobby J Reformed Router Member

    tvlz,
    did you happen to see my post? did you incorporate changes for my routers into your latest file? if yes, then how would i use the file if my router doesn't have a usb port, e.g. Asus RT-N10P? Is it possible to correct the port order without the file, but with commands? if so, are there steps listed somewhere how to do it? thanks in advance.
     
  45. tvlz

    tvlz Addicted to LI Member

    psy-q,
    Compare Shibby's advanced-vlan file with the browser's "view page source" vs mine, I think you will need to redo the setup again, I don't know about Shibby changes, waiting for sources for v121

    Bobby J,
    Added instructions for routers with no usb ports
     
  46. psy-q

    psy-q Reformed Router Member

    In the previous version you fixed it with this line:
    Code:
    switch(nvram['boardtype']) {
      case '0xf5b2':  // RT-N66
        COL_P0N = '4';
        COL_P1N = '3';
        COL_P2N = '2';
        COL_P3N = '1';
        COL_P4N = '0';
        break;
    
    This is pulled out of your latest version:
    Code:
    switch(nvram['t_model_name']) { //Added by Tvlz, June 2014
        case 'vlan-testid0':
        case 'Belkin Share N300 (F7D3302/F7D7302) v1':
        case 'Belkin Play N600 (F7D4302/F7D8302) v1':
        case 'D-Link Dir-620 C1':
    //    case 'FiberHome HG320':
        case 'Linksys E800 v1.0':
        case 'Linksys E900 v1.0':
        case 'Linksys E1200 v1.0':
        case 'Linksys E1200 v2.0':
        case 'Linksys E1500 v1.0':
        case 'Linksys E1550 v1.0':
        case 'Linksys E2500 v1.0':
        case 'Linksys E2500 v1/v2/v3':
        case 'Linksys E3200 v1.0':
        case 'Linksys E4200 v1.0':
        //ARM Routers
        case 'Asus RT-AC56U':
            COL_P0N = '0';
            COL_P1N = '1';
            COL_P2N = '2';
            COL_P3N = '3';
            COL_P4N = '4';
        break;
        case 'vlan-testid1':
        case 'Asus RT-N10U':
        case 'Asus RT-N16':
        case 'Asus RT-N66U':
        case 'Belkin N F5D8235-4 v3':
    //    case 'Buffalo WZR-D1100H':
    //    case 'Buffalo WZR-D1800H':
    //    case 'Catchtech CW-5358U':
        case 'Cisco M10 v1.0':
        case 'Cisco M10 v2.0':
        case 'D-Link DIR-865L':
        case 'Linksys M20':
        case 'Linksys E1000 v1':
        case 'Linksys E1000 v2.0':
        case 'Linksys E1000 v2.1':
        case 'Linksys E2000':
        case 'Linksys E3000':
    //    case 'Linksys WRT310N':
        case 'Linksys WRT320N':
        case 'Linksys WRT610N v2':
        case 'Tenda N6':
        //ARM Routers
            COL_P0N = '1';
            COL_P1N = '2';
            COL_P2N = '3';
            COL_P3N = '4';
            COL_P4N = '0';
        break;
        case 'vlan-testid2':
        case 'Asus RT-N10P':
        case 'Asus RT-N12':
        case 'Asus RT-N12 B1':
        case 'Asus RT-N15U':
        case 'Asus RT-N53':
        case 'Asus RT-N53A1':
        case 'Belkin Share Max N300 (F7D3301/F7D7301) v1':
        case 'Belkin Play Max / N600 HD (F7D4301/F7D8301) v1':
        //ARM Routers
            COL_P0N = '3';
            COL_P1N = '2';
            COL_P2N = '1';
            COL_P3N = '0';
            COL_P4N = '4';
        break;
        case 'vlan-testid3':
        case 'Asus RT-AC66U':
    //    case 'ChinaNet RG200E-CA':
        case 'Netgear WNR2000 v2':
        case 'Netgear WNR3500L/U/v2':
        case 'Netgear WNR3500L v2':
    //    case 'Tenda N60':
        //ARM Routers
        case 'Asus RT-AC68R/U':
    //    case 'Netgear R7000':
            COL_P0N = '4';
            COL_P1N = '3';
            COL_P2N = '2';
            COL_P3N = '1';
            COL_P4N = '0';
        break;
        default:
            COL_P0N = '1';
            COL_P1N = '2';
            COL_P2N = '3';
            COL_P3N = '4';
            COL_P4N = '0';
            unknown_router = '1';
            break;
    
    See how RT-N66U doesn't have any correction. Am I reading it correctly?
     
  47. LastSilmaril

    LastSilmaril Networkin' Nut Member

    Stuck this into JFFS; it'll hold until my next upgrade. Thanks tvlz.
     
  48. tvlz

    tvlz Addicted to LI Member

    No, it's a still there, search by model name, & correct according to this post (by you BTW)

    Check on the usb page to make sure the usb drive is still mounted as "sda1" it may have changed when you flashed.
     
  49. Bobby J

    Bobby J Reformed Router Member

    tvlz,
    Were you able to figure out if the changes to the advanced-vlan.asp file made it into v121? If not, is there a plan to incorporate the changes into a future release so that we don't have incorporate it after flashing?
     
  50. ChefJoe

    ChefJoe Connected Client Member

    tvlz, the W1801R/w1800r by tenda (which uses all the same broadcom chips as the AC66U) seems to have the correct port order in the gui now (ie - things plugged into port 1 appear as port 1 in the gui). I think your fix as currently incorporated in 131 works for that model as well.

    I also appreciate your fix to support VLAN's higher than 16 in the AC66 branch here. http://www.linksysinfo.org/index.php?threads/rt-ac66u-and-vlan-35-not-working.71517/ My remaining issue is one where the Tenda's gui doesn't give tagging checkboxes like that poster's AC66U screenshot shows.

    Attached is my vlan page on the W1800R where no tagging boxes appear and the bolded bit is added in the "notes" menu further down the page - Tagged - Enable 802.1Q tagging of ethernet frames on a particular port/VLAN (unknown support for this model...contact the developper (Victek))".

    I'm a little intimidated about proposing my own command line edits because I made my first W1800r unresponsive/bricked after one too many firmware flashes trying other non-shibby firmwares to see if tagging could be enabled. I didn't recognize the slow reboot/flash had returned. If it is just adding a t so running "grep set vlan2ports=0t 8, nvram commit, reboot" would be sufficient to test out tagging on the WAN, please just let me know before I make a new thread.

    [​IMG]
     
    Last edited: Oct 10, 2015
  51. tvlz

    tvlz Addicted to LI Member

    Thanks for the screenshot, it explains what I thought you were saying.

    The Shibby build you are using doesn't have the Tenda 1800R (boardtype 0x05D8) listed as supporting "trunk_vlan_supported" that's why the checkbox is greyed out.

    If you were using the replacement advanced_vlan.asp file it would have told you the router wasn't known to be correct.

    I updated my replacement advanced_vlan.asp file based on your info, it should now work.
     
    ChefJoe likes this.
  52. ChefJoe

    ChefJoe Connected Client Member

    Thanks for updating it from the default into the "known category" tvlz.

    It's been over a decade since my last intro C/Java programming classes (and that didn't cover guis) but I decided to hunker down and went through the RT-AC advanced-lan.asp source to eventually come to the same conclusions you did... because the boardtype wasn't recognized it was blocking me out. Also learned from your code that the AC66 and N66 share the board-type but not the port map. As the list of supported routers only has the AC66U/N66U and Tenda W1800r in this branch, I figured I'd dig further to see what made the tenda treated "special".

    boardtype=0x05D8
    t_model_name=Tenda W1800R

    Code:
    switch(nvram['boardtype']) {
      case '0x0467':  // WRT54GL 1.x, WRT54GS 3.x/4.x
      case '0x048e':  // WL-520GU, WL-500G Premium v2
      case '0x04ef':  // WRT320N/E2000
      case '0x04cf':  // WRT610Nv2/E3000, RT-N16
      case '0xf52c':  // E4200v1, WNDR4000, WNDR3700v3
      case '0xf52e':  // R6300V1, WNDR4500, WNDR4500V2
      case '0xf5b2':  // RT-N66
        trunk_vlan_supported = 1;
        break;
      default:
        break;
    ....
    <script type='text/javascript'>
    if(!trunk_vlan_supported)
      W(' <i><b>(unknown support for this model...contact the developper (Victek))</i></b>');
    </script>
    .....
    <script type='text/javascript'>
    if(!port_vlan_supported)
      W('<i>This feature is not supported on this router.</i>');
    else {
      E('sesdiv').style.display = '';
      if(!trunk_vlan_supported)
        E('trunk_vlan_override').style.display = '';
    }
    Seeing the variable "trunk_vlan_support" might be the issue, I finally got an hint that the "Trunk VLAN support override (experimental)" that's given in the gui but has no description in the notes might be useful for me. Enabling that in the gui gave me the ability to tag on the wan port, which is exactly the missing setting I needed for the tenda.

    I'm not sure if this is conclusive enough to submit an edit to catch this boardtype in the next shibby release, but I'm posting using centurylink fiber which doesn't work without internet traffic going out on the WAN tagged for VLAN ID 201. Removing tagging disables my internet.

    I didn't mean to be so helpless in the main thread. If I recognized that toggling that experimental trunk override was going to unlock what I needed I would have done that so long ago (although it probably wouldn't have worked until you fixed the vlan over 16 support this summer).

    I'll give a shot to replacing the advanced-vlan file by placing it in the not-unpluggable jffs space.... reading through the original lets me appreciate the cleaned up version. I did notice the tvlz/Finney advanced-vlan starts with trunk_vlan_supported = 1, effectively bypassing any model checks related to that, I think.[​IMG]
     
    Last edited: Oct 11, 2015
  53. tvlz

    tvlz Addicted to LI Member

    Good that you got it working, looking at the source is always the best way to learn/see what's going on.
    That also works
    I did that, I figured that most/all the k2.6 routers supports trunking, so they didn't need to be checked.
     
  54. sac7000

    sac7000 Connected Client Member

    Many thanks to you ChefJoe and tvlz For support of VLAN W1800R, Now the tagged Internet and IPTV works for me. Ask SHIBBY THAT IT ADDED new advanced-vlan.asp TO the INSERTION - https://app.box.com/s/45a87641237557490213
    Sorry for my English I use translator
     
    ChefJoe likes this.
  55. Elite2k

    Elite2k New Member Member

    Hi guys sorry !! if this has been answered will this firmware work on the WNDR4000 and the WNDR3700v3 ??thanks
     
  56. Vladimir Drabkov

    Vladimir Drabkov Serious Server Member


    Asus RT-AC68R/U
    Tomato Firmware 1.28.0000 -132 K26ARM USB AIO-64K same problem.
    Got to create 4 VLAN, and port order mirrored in VLAN settings page. WAN is ok, but 1-4 in real live is 4-1 ports. Not big problem, but took half an hour to figure it...
     
  57. fbp_dk

    fbp_dk Network Guru Member

    Same problem here. netgear R7000 running latest advanced tomato, ports are opposite. So phyiscal port 1 is port 4 in the VLAN GUI
     
  58. tvlz

    tvlz Addicted to LI Member

    Can you follow these instructions, so I can confirm your findings & fix it.
     
  59. fbp_dk

    fbp_dk Network Guru Member

    what exactly should I do?
     
  60. tvlz

    tvlz Addicted to LI Member

  61. ptrakk

    ptrakk New Member Member

    this reply can be deleted.. i can't figure out how to. my mistake.
     
  62. shibby20

    shibby20 Network Guru Member

    @tvlz - i already applied your solution to incoming v134 :)
     
  63. tvlz

    tvlz Addicted to LI Member

    Thanks, shibby

    Just to get ahead of the next release(Shibby v134), a list of routers that have a known(correct?) vlan port mapping
    If your router is not on this list, you will get a !! unknown port mapping !! using default warning after the next release(Shibby v134).
    Follow instruction here to get it corrected now rather then later.
    Asus RT-AC56U
    D-Link DIR868L
    Cisco Linksys EA6500v2
    Cisco Linksys EA6700
    Asus RT-N18U
    Asus RT-AC68R/U
    Asus RT-AC68P
    Asus RT-AC68P/U B1
    Asus RT-AC3200
    Huawei WS880
    Linksys EA6900
    Netgear R7000
    Netgear R6250
    Netgear R6300v2
    Netgear R8000
    Xiaomi MiWiFi
    Belkin Share N300 (F7D3302/F7D7302) v1
    Belkin Play N600 (F7D4302/F7D8302) v1
    D-Link Dir-620 C1
    Linksys E800 v1.0
    Linksys E900 v1.0
    Linksys E1200 v1.0
    Linksys E1200 v2.0
    Linksys E1500 v1.0
    Linksys E1550 v1.0
    Linksys E2500 v1.0
    Linksys E2500 v1/v2/v3
    Linksys E3200 v1.0
    Linksys E4200 v1
    Asus RT-N10U
    Asus RT-N16
    Asus RT-N66U
    Belkin N F5D8235-4 v3
    Belkin Share Max N300 (F7D3301/F7D7301) v1
    Cisco M10 v1.0
    Cisco M10 v2.0
    D-Link DIR-865L
    Linksys M20
    Linksys E1000 v1
    Linksys E1000 v2.0
    Linksys E1000 v2.1
    Linksys E2000
    Linksys E3000
    Linksys WRT320N
    Linksys WRT610N v2
    Tenda N6
    Tenda N60
    Tenda W1800R
    Asus RT-N10P
    Asus RT-N12
    Asus RT-N12 B1
    Asus RT-N15U
    Asus RT-N53
    Asus RT-N53 A1
    Belkin Play Max / N600 HD (F7D4301/F7D8301) v1
    Asus RT-AC66U
    Netgear WNR2000 v2
    Netgear WNR3500L/U/v2
    Netgear WNR3500L v2
    Netcore NR235W': //NOT in Shibby Firmware
    Catchtech CW-5358U
    Netgear WNDR4500 V1
     
    Last edited: Jun 23, 2016
  64. shibby20

    shibby20 Network Guru Member

    i added also RT-AC3200 and R8000 port mapping.
     
  65. elxreaper

    elxreaper New Member Member

    @tvlz @shibby20
    I have a Linksys E4200 v1 and upgraded from 132 to 135 today. I now get a !! Unknown Port Mapping Using Default!! warning on the VLAN page that I did not get there before.

    Looking at that switch in advanced-vlan.asp... it seems to be checking for "Linksys E4200 v1.0", but when I execute "nvram get t_model_name" it outputs "Linksys E4200 v1". Could this be the problem?
     
  66. tvlz

    tvlz Addicted to LI Member

    Thanks,
    Linksys E4200 v1 fixed
     
  67. exogrove

    exogrove New Member Member

    I have a WL-500GPv2, Shibby Tomato version 135.
    I see a !! Unknown Port Mapping Using Default!! warning on the VLAN page
    Copy and paste the message below the warning:

    Include Router Brand/Model (Asus WL-500gP v2),
    Results from "robocfg show" - VLANs section only &
    Port Numbers on Router Case (Left -> Right viewed from Front).

    Thanks
     
  68. chchia

    chchia LI Guru Member

    Router Brand/Model (Xiaomi MiWiFi)

    robocfg show
    Code:
    root@PCB:/tmp/home/root# robocfg show
    Switch: enabled
    Port 0: 1000FD enabled stp: none vlan: 1 jumbo: off mac: 38:2c:4a:xx:xx:xx
    Port 1:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
    Port 2:  100FD enabled stp: none vlan: 1 jumbo: off mac: 00:a0:de:xx:xx:xx
    Port 3:   DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
    Port 4:  100FD enabled stp: none vlan: 2 jumbo: off mac: 00:00:5e:xx:xx:xx
    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: 0 2 5t
       2: vlan2: 4 5t
    1045: vlan1045: 2t 8t
    1046: vlan1046: 0t 1 3t 4t 5t 7t 8t
    1047: vlan1047: 0 2t 7 8t
    1099: vlan1099: 3t 4t 5t 7t 8u
    1100: vlan1100: 0 1 8t
    1101: vlan1101: 1 2t 5 7
    1102: vlan1102: 0t 5
    1103: vlan1103: 0t 2t 3
    this router have only 3 port, 1 WAN and 2 LAN.
    In above Port 0 and Port 2 are both LAN port.
    Port 4 is the WAN port.

    but in VLAN the port numbering is messed out.
    BaiduShurufa_2016-3-27_21-47-16.png

    thank you!
     
  69. tvlz

    tvlz Addicted to LI Member

    @exogrove
    It was not my intention to support the old K2.4 and Mipsr1 routers, I will see if @shibby20 will revert to the older Advanced-vlan file for those models in the next release.
    EDIT: yes he will


    @chchia
    Xiaomi MiWiFi is fixed
     
    Last edited: Mar 27, 2016
  70. chchia

    chchia LI Guru Member

    Dear tvlz, thank you! it works!
     
  71. exogrove

    exogrove New Member Member

  72. shibby20

    shibby20 Network Guru Member

    @tvlz - correct order for RT-N16u is the same as for 'vlan-testid3'

    I will change it in next release.

    and a little suggestion: maybe to will create some git repository for both advanced-VLAN.asp files (mips and ARM) to better see what did you change. This will help me a lot of work ;)
     
  73. tvlz

    tvlz Addicted to LI Member

    :(
    NO!
    Correct order for RT-N16u is the way I have it, checked on my RT-N16, it was already changed from the way you want to set it - posts #32 #36 - #38

    You also need to check the "invert lan ports" option because of the way the vlan ports are setup in "init.c" backward from the way they are "robocfg".

    I think the right way is to use what "robocfg" outputs, as that gets the info right from the switch.
    If "init.c" was changed then there would be no need for the "invert lan ports" option.

    I thought you might want a repo :)
    https://bitbucket.org/tvlz/tvlz-advanced-vlan
     
  74. shibby20

    shibby20 Network Guru Member

    i also checked on my RT-N16u.

    with order:
    COL_P0N = '1';
    COL_P1N = '2';
    COL_P2N = '3';
    COL_P3N = '4';
    COL_P4N = '0';

    when i remove LAN1 from br0 and add to new vlan (wan2 for example) then port LAN4 will be my new WAN2, not LAN1.

    After change order to:
    COL_P0N = '4';
    COL_P1N = '3';
    COL_P2N = '2';
    COL_P3N = '1';
    COL_P4N = '0';

    its now correct. when i promote LAN4 as my new WAN2, in deed port LAN4 will be my WAN2.

    Please check it yourself.

    But you have right with Ethernet state - order is inverted.
     
  75. tvlz

    tvlz Addicted to LI Member

    Unless your router casing is different?

    Here's the way mine is, the router case matches what "robocfg" reports, with the vlan port order as I have it.
    Router Case Numbering/Leds
    1 2 3 4 wan

    robocfg show
    VLANs: BCM53115 enabled mac_check mac_hash
    1: vlan1: 1 2 3 4 8t
    2: vlan2: 0 8t

    The problem your having is that the vlan1ports in "init.c" are setup backward from way robocfg reports it.

    EDIT: more proof that they are backward - Check the CFE, it has vlan1ports=1 2 3 4 8*

    Unable to check right now, but if you change vlan1ports=4 3 2 1 8* to vlan1ports=1 2 3 4 8* does it work?

    If it does from what I can see if you need to use the "Invert Port Order" option the routers vlan1ports in "init.c" are setup wrong.
     
    Last edited: Mar 30, 2016
  76. shibby20

    shibby20 Network Guru Member

    i`ll check it and let you know.
     
  77. shibby20

    shibby20 Network Guru Member

    so i changed vlan1ports definition in init.c to vlan1ports=1 2 3 4 8*.

    then remove port LAN1 from br0 and create vlan3 with port LAN1 as WAN2.

    after save changes still LAN4 will be my WAN2

    NVRAM
    robocfg
    Conclusion:
    LED/Port LAN2 = PC (robocfg Port 3)
    LED/Port LAN4 = WAN2 (robocfg Port 1)
    LED/Port WAN = WAN1 (robocfg Port 0)

    So the order is wrong
     
  78. shibby20

    shibby20 Network Guru Member

    strange... After nvram erase (v135) i`ve got:
    vlan1ports=4 3 2 1 8*
    vlan2ports=0 8

    but after uncheck LAN1 from br0 and save, i`ve got:
    vlan1ports=2 3 4 8*
    vlan2ports=0 8

    IMO should be 3 2 1 8*. So here is our problem with VLAN order.

    Solution: IMO vlan1ports in init.c should be set as 1 2 3 4 8* and vlan order in advanced-vlan.asp should be:
    COL_P0N = '4';
    COL_P1N = '3';
    COL_P2N = '2';
    COL_P3N = '1';
    COL_P4N = '0';

    Ethernet ports state -> inverted

    and now all it`s correct. i checked it on two RT-N16.
     
  79. tvlz

    tvlz Addicted to LI Member

    Sorry for the confusion :(
    The RT-N16 is my main router so I can't go changing things.

    Should of thought about this sooner, I checked ASUS sources (link1, link2) they should know the correct order better than anyone else.
    You are right about the port order.

    So if we set it back to how it was (same as Asus) with vlan1ports in init.c as 4 3 2 1 8* and set vlan order in advanced-vlan.asp
    to and check the invert ports state option
    COL_P0N = '4';
    COL_P1N = '3';
    COL_P2N = '2';
    COL_P3N = '1';
    COL_P4N = '0';

    Does it still work right?
    If so that what should be done, IMO

    Again sorry about wasting your time :(, I just knew I changed it once already
     
  80. shibby20

    shibby20 Network Guru Member

    right. So i will add changes to v136 :)

     
  81. tvlz

    tvlz Addicted to LI Member

    Leave the 'init.c' part as it was in previous versions, it's been right all along (Just ignore everything after post #72 - I was confused when I asked to change it)
    Code:
    case MODEL_RTN16:
    dirty |= check_nv("vlan1ports", "4 3 2 1 8*");
    dirty |= check_nv("vlan2ports", "0 8");
    break;
    One thing that can be changed in 'init.c' is to set the 'Invert Port Option' by default for the RT-N16
    nvram_set("lan_invert", "1");

    I updated my git repo with that change to advanced-vlan.
     
  82. val bete

    val bete Network Newbie Member

    config CW-5358U vlan
    [​IMG]

    after click save
    [​IMG]

    is this ok?
     
  83. tvlz

    tvlz Addicted to LI Member

  84. ChefJoe

    ChefJoe Connected Client Member

    I think that's commented out in the advanced-vlan so you'd best do what tvlz is asking to help it become supported. It may be that the GUI you're using isn't exactly right for your model (which would explain why your port 1 becomes associated with two vlans through the gui after clicking "save", something I thought the GUI in tomato didn't permit).


    // case 'Catchtech CW-5358U':
     
  85. Sean Rhodes

    Sean Rhodes Networkin' Nut Member

    Hi tvlz, I assume this means fixed but not implemented until 136 or above yes?
     
  86. tvlz

    tvlz Addicted to LI Member

    I made a version for the Advanced Tomato GUI that can tried
     
  87. Sean Rhodes

    Sean Rhodes Networkin' Nut Member

    Got it Thanks
     
  88. kevs85

    kevs85 New Member Member

    @tvlz

    Catchtech CW-5358U

    root@unknown:/tmp/home/root# nvram show | grep vlan0ports
    vlan0ports=1 2 3 4 5*
    root@unknown:/tmp/home/root# nvram show | grep vlan1ports
    vlan1ports=0 5
    root@unknown:/tmp/home/root#
    root@unknown:/tmp/home/root# nvram show | grep vlan2ports
    vlan2ports=1 5
    root@unknown:/tmp/home/root# nvram show | grep board
    boardflags2=0x0
    boardflags=0x710
    boardnum=1234
    boardpwrctl=0xc00
    boardrev=0x1100
    boardtype=0x0550
    sb/1/boardflags2=0x0
    sb/1/boardflags=0x710

    I hope you can support this router thanks.
     
  89. tvlz

    tvlz Addicted to LI Member

    What I need most is the info that you forgot to include.

    Port Numbers on Router Case (Left -> Right viewed from Front) <--Most Important
     
  90. kevs85

    kevs85 New Member Member

    Here's the picture of the router.
     

    Attached Files:

    • Top.jpg
      Top.jpg
      File size:
      53.7 KB
      Views:
      18
    • Back.jpg
      Back.jpg
      File size:
      40.3 KB
      Views:
      20
  91. SNR

    SNR Networkin' Nut Member

    This is only slightly off topic, but IMHO the requirement for describing port numbers "Left -> Right viewed from Front" adds to the confusion here...

    The "Ethernet Ports State" graphic in Shibby mod depicts actual "RJ45" 8P8C Ethernet jacks, complete with link and activity LEDs. So this is definitely a view of the back panel for most SOHO wireless routers.

    On the RT-N16, the labels on the blue LEDs on the front panel are in reverse order compared to the actual Ethernet jacks on the back. And the Ethernet jacks are labeled left-to-right as WAN LAN4 LAN3 LAN2 LAN1.

    So the LAN ports on the graphic in Shibby mod are in the wrong order for the RT-N16. This has been a problem for a long time and even the very latest v136 re-compiled on 4/20 still has this issue.

    I have cables plugged into the WAN, LAN1, and LAN2 ports on my RT-N16. Here is the default view in Shibby mod. Note that the two right-most ports are correctly portrayed as in use -- but the order of the LAN port labels is incorrectly reversed:

    upload_2016-5-14_1-36-7.png

    Here is the view after checking the "Invert Ports Order" checkbox. Note that the ports in use are correctly labeled LAN1 and LAN2 -- but these are incorrectly located on the left-most end of the LAN port group:

    upload_2016-5-14_1-37-12.png

    Here is how the graphic should look, with the ports properly labeled and portrayed as in use:

    upload_2016-5-14_1-37-46.png

    Not sure what the best solution is here... Does the "Ethernet Ports State" graphic need to be changed to look something more like the front panel of the "average" SOHO wireless router, whatever that might be? Or do we truly need editable port labels as some have suggested? Or does the "Invert Ports Order" checkbox simply need to be changed to only reverse the LAN port labels?

    BTW, here are the relevant nvram values:

    nvram show | grep board
    boardflags2=0x400
    boardflags=0x310
    boardnum=45
    boardrev=0x1218
    boardtype=0x04cf
    pci/1/1/boardflags2=0x0202
    pci/1/1/boardflags=0xa00
    sb/1/boardflags2=0x400
    sb/1/boardflags=0x310

    nvram show | grep version
    hardware_version=RT-N16-00-07-01-00
    os_version=1.28.0000 MIPSR2-136 K26 USB VPN

    nvram show | grep ports
    vlan1ports=1 2 3 4 8*
    vlan2ports=0 8

    CFE also has these strings:

    vlan1ports=1 2 3 4 8*
    vlan2ports=0 8u
     
  92. tvlz

    tvlz Addicted to LI Member

    @kevs85
    Updated, Catchtech CW-5358U
     
    kevs85 likes this.
  93. tvlz

    tvlz Addicted to LI Member

    How, that's exactly what I need "the port numbers on the router case "Left -> Right viewed from Front" to get the advanced-vlan page right.

    Would it be less confusing if I wanted "the port numbers on the router case "Right -> Left viewed from BACK"?

    I tried to use "robocfg" before I realized it always starts at port0 sometimes it's on the left, sometimes on right, leading to confusion when the port are inverted (see RT-N16 posts above) - no good for what I need.

    Shibby changed the port order in init.c (v136) based on that confusion, he should change it back.

    The "Ethernet Ports State" graphic is not something I have looked at.
     
  94. SNR

    SNR Networkin' Nut Member

    IMO yes, describing Ethernet ports on the back makes more sense than describing activity indicators on the front. Especially since the back is where the actual connections are made, and the "Ethernet Ports State" graphic is clearly trying to portray those ports. And it's even possible that some supported models don't have indicators on the front.

    IIRC the RT-N16 has light tubes internally which convey the activity from the ports on the back to the indicators on the front. So it makes sense on this model that the indicators are an exact mirror image of the ports. However, other models may have the indicator LEDs soldered to the front of the board, and in that case the indicator order could be entirely arbitrary. So front panel orientation seems to be potentially misleading.

    However I do appreciate that you've already collected much info based on front panel orientation, so it may be too late in the game to change your instructions without causing even more confusion! :eek:

    BTW, thanks for wading into this mess and assuming leadership! :)
     
  95. kevs85

    kevs85 New Member Member

    @tvlz

    Thanks. ;)
     
  96. kevs85

    kevs85 New Member Member

    Hello. I've tested your updated vlan fix but the problem is whenever i unchecked the Lan1 to be Wan2 it is still checked after reboot. But the UNKNOWN PORT MAP thing disappears.
     
  97. kevs85

    kevs85 New Member Member

    BTW My Catchtech CW-5358U

    robocfg show

    Port 0: 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
    Port 1: DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 2: DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 3: 100FD enabled stp: none vlan: 3 mac: 00:00:00:00:00:00
    Port 4: DOWN enabled stp: none vlan: 2 mac: 00:00:00:00:00:00
    Port 5: 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
    VLANs: BCM5325/535x enabled mac_check mac_hash
    0: vlan0: 1 2 3 4 5t
    1: vlan1: 0 5t
    2: vlan2: 4 5t
    3: vlan3: 3 5t
    4: vlan4:
    5: vlan5:
    6: vlan6:
    7: vlan7:
    8: vlan8:
    9: vlan9:
    10: vlan10:
    11: vlan11:
    12: vlan12:
    13: vlan13:
    14: vlan14:
    15: vlan15:
     
  98. tvlz

    tvlz Addicted to LI Member

    I never even considered that people would use the activity indicators on the front, I changed the wording to specify "the back of the router case "left -> right viewed from the front" as I prefer to look at the front of my router. :)

    I also have the "Ethernet Ports State" graphic lan labels setup as looking at them from the front, I know the wan port can be on the wrong side on different routers, but I look at the labels.

    Wonder if the graphics can be set to change if you "invert port order", something to look at?
     
  99. tvlz

    tvlz Addicted to LI Member

    I know this is a simple question but, did you make your changes then press "ok" and then "save" at the bottom of the page?
     
  100. kevs85

    kevs85 New Member Member

    Yes i did that. Also ive unchecked the Lan1 first before creating WAN2
     

Share This Page