What's new

ipv6 for guest network

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Peter Havekes

New Around Here
Hello,

I use a ipv6 tunnel, and get a /48 routed trough this tunnel. For my lan this works great.

I also have a guest wifi network active. Clients connecting to this network only get a ipv4 adress. How can I provide a ipv6 /64 network to the guest-network? I guess I need to tell dnsmasq to advertise on this interface, but I don't know how?

An hints would me appreciated.
 
I wasn't clear. I want to provide a sererate ipv4 and ipv6 subnet for the guest network. I seem to have figured it out myself:


/jffs/scripts/wan-start
Code:
#!/bin/sh
WANIP=$(/sbin/ifconfig eth0|grep 'inet addr'|cut -d':' -f2|awk '{print $1}')
brctl delif br0 wl0.1
brctl delif br0 wl1.1
brctl addbr br1
brctl addif br1 wl0.1
brctl addif br1 wl1.1
ifconfig br1 10.1.0.1 netmask 255.255.255.0 broadcast 10.1.0.255
ifconfig br1 add 2001:<your>:<guest>:<network>::1/64
iptables -t nat -I POSTROUTING -o eth0 -j SNAT --to $WANIP
iptables -I FORWARD -i br1 -m state --state NEW -j ACCEPT
iptables -I FORWARD -i br1 -o br0 -m state --state NEW -j ACCEPT
service restart_dnsmasq

/jffs/configs/dnsmasq.conf.add
Code:
interface=br1
dhcp-range=br1,10.1.0.10,10.1.0.254,255.255.255.0,86400s
dhcp-option=br1,3,10.1.0.1
dhcp-option=br1,6,8.8.8.8,8.8.4.4,0.0.0.0
dhcp-option=br1,15,guest.domein.name
dhcp-option=br1,44,10.1.0.1
dhcp-option=br1,252,"\n"
ra-param=br1,10,600
dhcp-range=br1,::,constructor:br1,ra-stateless,64,600
dhcp-option=br1,option6:23,[::]
dhcp-option=br1,option6:24,guest.domain.name
 
Hi Peter,

Thank you for sharing your snippets. I'm trying to get the same thing done, but haven't been lucky so far and some how I can't it to work neither with your scripts.

My setup is a little different I think. My R7000 is behind a ISP router in DMZ. My WAN IP on R7000 is 192.168.254.21. I'm using 192.168.1.0 for my LAN/Wireless. Using a 6to4 tunnel and also want to use my /64 for my guest network.

I've tried with your scripts, but then it caught my attention that my eth0 doesn't contain an 'inet addr', so I did some small changes, my version is as follows:
Code:
#!/bin/sh
IF=vlan2
WANIP=$(/sbin/ifconfig ${IF} | grep 'inet addr' | cut -d':' -f2 | awk '{print $1}')
brctl delif br0 wl0.1
brctl delif br0 wl1.1
brctl addbr br1
brctl addif br1 wl0.1
brctl addif br1 wl1.1
ifconfig br1 10.1.0.1 netmask 255.255.255.0 broadcast 10.1.0.255
ifconfig br1 add 2001:<my>:<guest>:<network>::1/64
iptables -t nat -I POSTROUTING -o ${IF} -j SNAT --to $WANIP
iptables -I FORWARD -i br1 -m state --state NEW -j ACCEPT
iptables -I FORWARD -i br1 -o br0 -m state --state NEW -j ACCEPT

The script did it's job, so I got my new bridge:
Code:
# brctl show
bridge name bridge id       STP enabled interfaces
br0     8000.e4f4c6180ba4   yes         vlan1
                                        eth1
                                        eth2
br1     8000.e6f4c6180ba5   no          wl0.1
                                        wl1.1

But after this I'm not able to join my guest network anymore.

What am I doing wrong?
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top