You are visiting:Home arrow Articles for Geeks arrow Latest arrow DD-WRT - Setting up a separate / isolated VLAN on Port 4 with DHCP Thursday, 20 November 2008
Google
Support Geek-Pages.com in making a small donation:
Main Menu
Home
Articles for Geeks
FAQs for Non-Geeks
Links
Kevan's Blog
Contact Us
Forum
Search
Login Form





Lost Password?
No account yet? Register
Submit article to:
DD-WRT - Setting up a separate / isolated VLAN on Port 4 with DHCP PDF Print E-mail
Written by Kevan   


1)  Install the v.23 dd-wrt SP1 final, SP2 beta or v.24 alpha version of firmware available HERE -- Instructions for installing DD-WRT are available HERE

2)  Telnet to your router and enter the username of root and your administrative password.

3)  Copy the following script and paste on the command line.  

 ------------------- Copy starting below this line. -------------------         

nvram set vlan0ports="1 2 3 5*"

nvram set vlan2ports="4 5*"

nvram set rc_startup='

#!/bin/ash

PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"

ifconfig vlan2 192.168.2.1 netmask 255.255.255.0

ifconfig vlan2 up

'

nvram set rc_firewall='

iptables -I INPUT -i vlan2 -j ACCEPT
iptables -I FORWARD -i vlan2 -o vlan1 -m state --state NEW -j ACCEPT
iptables -I FORWARD -i vlan2 -o ppp0 -m state --state NEW -j ACCEPT
iptables -I FORWARD -i br0 -o vlan2 -j logdrop

nvram commit


--------------- Stop here when selecting text to copy --------------------------

4) Back to the web management interface in DD-WRT.  Select the Setup tab and the select the VLAN sub-tab.

5) On port 4 de-select VLAN 0 and select VLAN 2. 

DD-WRT Sep VLANS

6)  Click the Save Settings button at the bottom of the page.