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

VLAN problem

Discussion in 'Tomato Firmware' started by xoy74, Jul 12, 2017.

  1. xoy74

    xoy74 Reformed Router Member

    I have a fiber internet connection going into a Tomato router (Shibby's variant).
    The setup is simple: fiber going into a media converter, and from there Ethernet into the WAN port of the Tomato router (Linksys EA6900). The ISP (Bell Canada) requires the WAN to be tagged on VLAN 35. The WAN connection is PPPoE. This router works as expected.
    I am trying to add a second router to the mix because I need two public IP addresses. The ISP allows 3 PPPoE sessions, so that's not an issue. The second router is a Linksys EA2500, also flashed with Shibby's build.
    One way to do this would be to add a switch between the media converter and the WAN ports of the two routers, but I am trying to avoid adding that. So I am trying to connect it to the main router through just one Ethernet cable, with both the WAN and the LAN going through it.
    So I tried to make one of the LAN ports on the main router part of both VLANs, and connect it to the WAN port of the second router which is also part of both VLANs. See the attached photo.
    I tried in one case to have both VLANs tagged (on both routers) and in another case to have the WAN VLAN tagged and the LAN one untagged.
    In both cases the LAN connection works (the routers can ping each other) but the WAN on the second router is not able to establish a PPPoE connections.
    Any idea what I am doing wrong ?

    Attached Files:

  2. btaroli

    btaroli Serious Server Member

    Question: Are the IP addresses you're using from the ISP on the same subnet? Are you enabling NAT on the first router? If yes, then I don't think there's a way to get this to do what you're attempting.

    You'd somehow need to get the LAN port on the same bridge as the WAN port.

    Maybe with MultiWAN? But I think it'll expect the second WAN to be connect to a port on the first router (from a modem or bridge CPE), not daisy chained to a second router...

    Maybe someone else has an idea, but I think you're needing a switch here.

    Sent from my iPhone using Tapatalk Pro
  3. xoy74

    xoy74 Reformed Router Member

    With my ISP, the WAN must be configured for PPPoE, so I am not assigning an IP address to them.
    The first router does NAT, but I am hoping that by enabling VLANs I can just carry both the WAN and LAN over the same Ethernet cable.
  4. tsanga

    tsanga Addicted to LI Member

    There have been a few of us on this forum who described an issue with combining tagged VLAN and untagged (default VLAN) traffic in the same port.

    This used to work for me on an older version of Tomato but no longer works. As soon as you tag one, the default untagged traffic is blocked.

    You may be experiencing the same issue. Sorry, nobody has a solution yet.

    Sent from my iPhone using Tapatalk
  5. osilo_

    osilo_ New Member Member

    Do you have another switch you can place in between to verify this setup? If not, you could turn off DHCP on one of the routers and use the LAN ports to verify your ISP. Test their work, just in case. Past that, I suspect it may be a firewall issue. I don't know how to help with that though. :( Tomato uses iptables
  6. Sean B.

    Sean B. LI Guru Member

    In shibby source, you could change line 1219 of file tomato-arm/release/src-rt-6.x.4708/linux/linux-2.6.36/config_base

    -# CONFIG_MACVLAN is not set
    And run a build. You could then add a virtual adapter with its own MAC address linked off your WAN interface

    ip link add link eth0 wan2 type macvlan
    ifconfig wan2 hw ether aa:bb:cc:22:33:44
    Able to run a second PPPoE connection via the virtual adapter. A few additions to the routing table etc and done. Sense the new PPPoE link and its virtual adapter will obviously be placed on it's own bridge and vlan'd separately from your other link, if more ports are needed simply add only one of the LAN ports to the bridge for the new link and tie that port into a 4/8/10 etc port switch. Unless you need the full performance of both routers.
  7. rkantos

    rkantos New Member Member

    I'm also looking for a similar setup where the use of macvlan is required. Can someone share experiences using macvlan?
  8. rkantos

    rkantos New Member Member

    Well I tried compiling from Shibby's and Kille72's sources, but was unable to get very far. The option was recognized by the compiler and was fine.. However the compile always with:

    make[5]: arm-brcm-linux-uclibcgnueabi-gcc: Command not found
    I tried with Debian 9, Ubuntu 16.04 32bit and Debian 7 32bit..

    Pretty much tried all of these how-tos but with the same result. Will update URLs once I get permission to post them.. By searching from Google, one should be able to find them too..


    Does someone have a working setup for compiling these, and if you do could you spin one ea6700z with the option listed above?
  9. Sean B.

    Sean B. LI Guru Member

    That error implies to me you did not properly create the symlink from /opt/brcm-arm to the source's toolchain.
  10. rkantos

    rkantos New Member Member

    ..And you would be correct. :)

    However I got this far following.. (after also changing automake-1.11 for automake-1.15)

    arm-brcm-linux-uclibcgnueabi-ld -EL -r  -T /home/tomato/ea6900/release/src-rt-6.x.4708/linux/linux-2.6.36/scripts/module-common.lds --build-id  -o sound/usb/caiaq/snd-usb-caiaq.ko sou$
      arm-brcm-linux-uclibcgnueabi-gcc -Wp,-MD,sound/usb/misc/.snd-ua101.mod.o.d  -nostdinc -isystem /home/tomato/ea6900/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-$
      arm-brcm-linux-uclibcgnueabi-ld -EL -r  -T /home/tomato/ea6900/release/src-rt-6.x.4708/linux/linux-2.6.36/scripts/module-common.lds --build-id  -o sound/usb/misc/snd-ua101.ko sound/us$
      arm-brcm-linux-uclibcgnueabi-gcc -Wp,-MD,sound/usb/.snd-usb-audio.mod.o.d  -nostdinc -isystem /home/tomato/ea6900/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4$
      arm-brcm-linux-uclibcgnueabi-ld -EL -r  -T /home/tomato/ea6900/release/src-rt-6.x.4708/linux/linux-2.6.36/scripts/module-common.lds --build-id  -o sound/usb/snd-usb-audio.ko sound/usb$
      arm-brcm-linux-uclibcgnueabi-gcc -Wp,-MD,sound/usb/.snd-usbmidi-lib.mod.o.d  -nostdinc -isystem /home/tomato/ea6900/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc$
      arm-brcm-linux-uclibcgnueabi-ld -EL -r  -T /home/tomato/ea6900/release/src-rt-6.x.4708/linux/linux-2.6.36/scripts/module-common.lds --build-id  -o sound/usb/snd-usbmidi-lib.ko sound/u$
    make -f /home/tomato/ea6900/release/src-rt-6.x.4708/linux/linux-2.6.36/scripts/Makefile.fwinst obj=firmware __fw_modbuild
    make[5]: Leaving directory `/home/tomato/ea6900/release/src-rt-6.x.4708/linux/linux-2.6.36'
    Preserve the debug versions of these and strip for release
    make[4]: Target `all' not remade because of errors.
    make[4]: Leaving directory `/home/tomato/ea6900/release/src-rt-6.x.4708/router'
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/home/tomato/ea6900/release/src-rt-6.x.4708'
    make[2]: *** [bin] Error 2
    make[2]: Leaving directory `/home/tomato/ea6900/release/src-rt-6.x.4708'
    make[1]: *** [z] Error 2
    make[1]: Leaving directory `/home/tomato/ea6900/release/src-rt-6.x.4708'
    make: *** [ea6700z] Error 2
    Also.. I'm using Tomato-ARM by Kille72, so I understand it is going a bit offtopic
  11. Sean B.

    Sean B. LI Guru Member

    That error doesn't give much information. I would suggest re verifying all required packages are installed, and that only the correct versions of the packages are installed ( if other versions are present on the build system, remove them ). Then, if using git for the source, run:

    git reset --hard
    followed by:

    git status
    If status reports any files that are modified, delete them. Then run the reset command again, followed by the status command again. Verify the status command reports no differences, make only the changes you're attempting to implement, and try the build again. Do not attempt to run another build after one has already failed without completely clearing the source tree. Do not rely on "make clean" or "make distclean", I cannot emphasize enough to reset the source tree completely.

    If you describe in a clear, organized fashion exactly what your steps have been to configure your build system, I'll review them and inform you if there's any potential issues.

    **NOTE** I use Linux Mint 17.3 as my build system.

    P.S.: I would suggest starting your own thread to continue discussing this issue.
    Last edited: Feb 18, 2018
    rkantos likes this.
  12. john9527

    john9527 Network Guru Member

    Do a search backward in the build log for 'error' (any case). Sometimes the actual error can be back over 100 lines from when the compile exits.
    rkantos likes this.
  13. rkantos

    rkantos New Member Member

    Last edited: Feb 20, 2018
  14. rkantos

    rkantos New Member Member

    Ok, I think I got at least as far as having a firmware compiled and installed on my EA6900 with macvlan enabled.. How will I be able to get an IP from the ISP with this method? I've tried using udhcpc to get an IP to all devices of my self created bridge (br5, vlan5 and wan2), but they don't get one assigned to any of them.

    What I've tried:

    ip link add link eth0 wan2 type macvlan
    ifconfig wan2 hw ether C0:56:27:BE:28:D0
    brctl addbr br5
    brctl addif br5 vlan5 wan2
    ifconfig br5 up
    ifconfig vlan5 up
    ifconfig wan2 up
    udhcpc vlan5

    I've also tried using a device in port2 tagged with vlan5 to get the IP address directly to the computer, without success. I've confirmed vlan-tagging works fine, by virtue of another subnet.

    edit: this is how I've tried udhcpc:
    udhcpc -i vlan5 -b -s dhcpc-event -x hostname:ea6900 -O 33 -O 121 -O 249 -m -p /var/run/udhcpc-wan2.pid
    udhcpc: started, v1.25.1
    udhcpc: sending discover
    udhcpc: sending discover
    udhcpc: sending discover
    udhcpc: no lease, forking to background
    Last edited: Feb 23, 2018

Share This Page