Difference between revisions of "WRT54GL Linksys Routers"

From HeadBackup
Jump to navigationJump to search
Line 1: Line 1:
 +
== Introduction ==
 
Things I have done with a WRT54GL router running ddwrt custom firmware:
 
Things I have done with a WRT54GL router running ddwrt custom firmware:
  
Line 9: Line 10:
  
 
* Multiple wireless networks on the same router with different SSIDs and different vlan tags
 
* Multiple wireless networks on the same router with different SSIDs and different vlan tags
 +
 +
== Details ==
 +
 +
=== Adding a third vlan and network ===
 +
These steps assume you already have two other vlans configured.
 +
 +
==== Add ports to the new vlan ====
 +
<pre>
 +
nvram set vlan4ports="0t 5t"
 +
nvram commit
 +
</pre>
 +
==== Create a startup script to load firewall rules and configure the interface ===
 +
<pre>
 +
echo '
 +
#!/bin/ash
 +
PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"
 +
iptables -I FORWARD -i br0 -o vlan4 -j ACCEPT
 +
iptables -I FORWARD -i vlan4 -o br0 -j ACCEPT
 +
iptables -I FORWARD -i vlan4 -o vlan1 -j ACCEPT
 +
iptables -I INPUT -i vlan4 -j ACCEPT 
 +
ip addr add 10.7.1.7/24 brd + dev vlan4
 +
ifconfig vlan4 up
 +
' > /jffs/etc/config/vlan4.startup 
 +
chmod 750 /jffs/etc/config/vlan4.startup
 +
</pre>

Revision as of 18:25, 22 June 2010

Introduction

Things I have done with a WRT54GL router running ddwrt custom firmware:

  • Single router with 2 subnets each with seperate vlan, IP block, DHCP server, and firewall rules.
  • VLAN trunking
  • QoS traffic prioritization based on IP address
  • WPA encrypted wireless point to multipoint bridging

Things I may implement in the future:

  • Multiple wireless networks on the same router with different SSIDs and different vlan tags

Details

Adding a third vlan and network

These steps assume you already have two other vlans configured.

Add ports to the new vlan

nvram set vlan4ports="0t 5t"
nvram commit

= Create a startup script to load firewall rules and configure the interface

echo '
#!/bin/ash
PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"
iptables -I FORWARD -i br0 -o vlan4 -j ACCEPT
iptables -I FORWARD -i vlan4 -o br0 -j ACCEPT
iptables -I FORWARD -i vlan4 -o vlan1 -j ACCEPT 
iptables -I INPUT -i vlan4 -j ACCEPT  
ip addr add 10.7.1.7/24 brd + dev vlan4 
ifconfig vlan4 up
' > /jffs/etc/config/vlan4.startup  
chmod 750 /jffs/etc/config/vlan4.startup