PDA

Bekijk de volledige versie : How to start dhcp on a separate vlan



asle_500g
23-11-2007, 08:32
I have a 500gp that I have been operating in access point mode. (Firmware latest by Oleg -pmon_ver=CFE, 3.91.7.0boot_local=1.9.2.7-8 ) I have now separated one of the lan ports into a separate vlan to be used as an open network that is only allowed access to the internet and not the rest of my internal lan. However I have some problems. My freshly created vlan is vlan2. I will also set up some firewall rules but for now I have disabled the firewall via the web interface. Can anyone help me?
Files:


[admin@ap root]$ cat /usr/local/sbin/post-boot
#!/bin/sh
dropbear
robocfg vlan 2 ports "1 5t" vlan 0 ports "2 3 4 5t"
vconfig add eth0 2
ifconfig vlan2 192.168.2.1 broadcast 192.168.2.255 netmask 255.255.255.0 up
dnsmasq -C /tmp/local/dnsmasq.conf


[admin@ap root]$ cat /tmp/local/dnsmasq.conf
user=nobody
resolv-file=/tmp/resolv.conf
no-poll
interface=vlan2
dhcp-leasefile=/tmp/dnsmasq.log
dhcp-range=vlan2,192.168.2.2,192.168.2.254,86400
dhcp-authoritative


vlan2 Link encap:Ethernet HWaddr 00:1B:FC:91:85:B0
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::21b:fcff:fe91:85b0/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3895 (3.8 KiB) TX bytes:82 (82.0 B)