Help with Detached networks and bridges (and wifi)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
darth_tater
DD-WRT User


Joined: 11 Nov 2007
Posts: 55

PostPosted: Tue Jun 15, 2010 18:07    Post subject: Help with Detached networks and bridges (and wifi) Reply with quote
Hey all. Ill try to keep this as simple as i can.

I have a WHR-HP-54G acting as a gateway.

I need to create two separate VLANS. Both of which *must* be separate and one of which *must* include wifi.


ports 1-3 are VLAN 0

ports WAN are VLAN 1

ports 4 + wifi are VLAN 2


How can i create a bridge for port 4 and WIFI
How can i create a bridge for ports 1-3?

Thanks for your help!
Sponsor
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Jun 15, 2010 20:12    Post subject: Reply with quote
The wiki has lots of guides that explain how.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
darth_tater
DD-WRT User


Joined: 11 Nov 2007
Posts: 55

PostPosted: Tue Jun 15, 2010 21:35    Post subject: Reply with quote
I know. Ive been using the guide on the wiki. I searched around, but the search on these forums is crap.

Ive tried google as well, but i cant find any instructions on how to use the GUI to make bridges.

Every time i try to create a new bridge the changes don't stick through the GUI.

I can try creating one through the command line, but how will i know which ethX devices correspond to which port?

its a 10/100 router, so the ports are going to range from 0-5, but which ones are lan/wan/wifi?
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Jun 15, 2010 22:04    Post subject: Reply with quote
It seems that you don't understand the interfaces which is probably causing the rest of your trouble. By default this router should have the WAN port in vlan1, the 4 LAN ports in vlan0, the wireless is its own interface (run nvram get wl0_ifname to find out the interface name), and a bridge br0 with vlan0 and the wireless interface in it.

Creating bridges works perfectly fine from the GUI if you're using any build from the last year, but you should really need to anyways unless you're trunking to another device. Instead of moving port 4 to vlan2 and bridging it with the wifi, you can just leave it in vlan0 which is already bridged with the wifi. Just move ports 1-3 to vlan2 on the VLAN page, save, and reboot.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
darth_tater
DD-WRT User


Joined: 11 Nov 2007
Posts: 55

PostPosted: Wed Jun 16, 2010 1:58    Post subject: Reply with quote
phuzi0n wrote:
Instead of moving port 4 to vlan2 and bridging it with the wifi, you can just leave it in vlan0 which is already bridged with the wifi. Just move ports 1-3 to vlan2 on the VLAN page, save, and reboot.


Ok, ill give that a try.

And i am positive that i have the iptables rules correct, but can you double check these?

iptables -I FORWARD -i br0 -o vlan2 -j DROP
iptables -I FORWARD -i vlan2 -o br0 -j DROP

Where vlan2 is the private network with ports 1,2,3 and br0 is the bridge between vlan 0 (port 4) and the WiFi radio.

Those two iptables rules drop all packets that intended to hop subnets, yes?

Thanks for all your help!
darth_tater
DD-WRT User


Joined: 11 Nov 2007
Posts: 55

PostPosted: Wed Jun 16, 2010 2:50    Post subject: Reply with quote
I tried testing out those iptable rules... and i have a question.

I plug my router into port 4 (vlan0) which put it in the 192.168.13.X/24 network.

But why can i also access 192.12.34.1 (the router's *other* ip for vlan2)

Shouldn't my iptables rule drop all packets coming from one interface and attempting to go to the other?

Whats up?

Thanks for sticking with me!


Last edited by darth_tater on Wed Jun 16, 2010 3:02; edited 1 time in total
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Wed Jun 16, 2010 6:47    Post subject: Reply with quote
Both IP's are assigned to the router itself and although the IP is associated with a certain interface, the traffic never actually goes out the interface to reach any of the router's own addresses. If you really wanted to deny access to a subnet including the router's own IP for an interface, you would specify a destination (-d) instead of an out interface (-o).
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
darth_tater
DD-WRT User


Joined: 11 Nov 2007
Posts: 55

PostPosted: Wed Jun 16, 2010 15:50    Post subject: Reply with quote
That's what i thought.

Thanks for clearing that up.

The reason i ask is because the people i'm setting this up for will want to "check" that theses rules work. I looked up the man page for iptables and verified the two rules; i trust that they will work. But the people i'm setting this up for might not.

If they decide to do the same 'check' i did, i'll need to have an explanation ready.

Thanks so much phuzi0n!

PS: I'm with team CoCo as well Smile
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum