Development issues regarding the cerowrt test router project
 help / color / mirror / Atom feed
From: David Lang <david@lang.hm>
To: Dave Taht <dave.taht@gmail.com>
Cc: cerowrt-devel@lists.bufferbloat.net
Subject: Re: [Cerowrt-devel] breaking off a port off the vlan correctly?
Date: Sat, 5 Jan 2013 17:54:07 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1301051741050.28008@nftneq.ynat.uz> (raw)
In-Reply-To: <CAA93jw4euTA_7RaVkr3Y2JYv1n1LtGqS433i8PKV0fkUGsRsag@mail.gmail.com>

On Thu, 3 Jan 2013, Dave Taht wrote:

> One of the things I've long ignored, despite the popularity of it, is
> vlan stuff.
>
> I care, like everything else, it's just not currently a high priority
> for me to deal with high rate vlan traffic.
>
> But: I just had a need to connect two entirely separate networks
> together. Being me I just slammed a routed dreamplug between the two
> lans (which just worked five minutes after I compiled babeld and
> turned off getting default gateways from dhcp), but it seems saner to
> just remap one of the ports on a wndr3800 to be its own ethernet
> device (and keep hacking BQL onto the dreamplug, which is what I have
> it for)
>
> current config:
>
> default gw box <-> cerowrt <-> dreamplug <-> other network
>
> desired config:
>
> default gw box <-> cerowrt <-> dedicated port <-> other network
>
> However, in trying to do that, several ways, I made bricks.

I've used VLANs a bit on my 3700 and 3800 routers.

First thing is that the switch in these routers needs special handling to deal 
with VLAN numbers >15, Depending on your build you may or may not have that 
support compiled in.

To do this, you will want to have the eth0 interface configured to use VLANs, in 
the default openwrt this is already the case with eth0.1 being defined.

define a new interface (eth0.2 for example)

Then configure the switch to put VLAN 2 on a particular port.

Unless you have a managed switch connected to that port, you want it to be 
untagged on that port

As an example, here is the config of the 3800 I'm using right now

remember that the logical number of the switch ports is backwards from the 
physical number (I like to use ports 1/4 on one vlan and 2/3 on a different one 
so that I don't have to keep track)

Let me know if you need more help on this.

David Lang

/etc/config/networks

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

config interface 'lan'
         option type 'bridge'
         option proto 'static'
         option ipaddr '192.168.255.1'
         option netmask '255.255.255.0'
         option _orig_ifname 'wlan0 wlan1'
         option _orig_bridge 'true'
         option ifname 'eth0.1'

config switch
         option name 'rtl8366s'
         option reset '1'
         option blinkrate '2'
         option enable_vlan '1'
         option enable_vlan4k '1'

config switch_vlan
         option device 'rtl8366s'
         option vlan '1'
         option ports '0 2 3 5t'

config switch_port
         option device 'rtl8366s'
         option port '1'
         option led '6'

config switch_port
         option device 'rtl8366s'
         option port '2'
         option led '9'

config switch_port
         option device 'rtl8366s'
         option port '5'
         option led '2'

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

config interface 'wwan'
         option proto 'dhcp'

config switch_vlan
         option device 'rtl8366s'
         option vlan '2'
         option ports '1 5t'

config interface 'lan2'
         option proto 'static'
         option ifname 'eth0.2'
         option ipaddr '192.168.254.1'
         option netmask '255.255.255.0'


      parent reply	other threads:[~2013-01-06  1:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 20:31 Dave Taht
2013-01-03 21:17 ` William Katsak
2013-01-04  1:58 ` Michael Richardson
2013-01-06  1:54 ` David Lang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cerowrt-devel.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1301051741050.28008@nftneq.ynat.uz \
    --to=david@lang.hm \
    --cc=cerowrt-devel@lists.bufferbloat.net \
    --cc=dave.taht@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox