Re: Configuration problem with IPv6 router (cannot forward src)

2012-06-08 Thread Matthew Seaman
On 07/06/2012 23:36, Bruce Cran wrote:
 I'm trying to set up a IPv6 router (running -current) on my home
 network. My ISP gives me a /128 via PPP and I have a /48 allocation,
 which I use to give em0 and tun0 public addresses in different subnets
 (tun0 is assigned the address via ppp.linkup).
 I've added all the IPv6 settings to rc.conf (ipv6_gateway_enable,
 ipv6_network_interfaces, rtadvd_enable etc.) and I can ping IPv6 sites
 from the router.

rtadvd can be limited to operate on a specific interface.  Try setting

rtadvd_interfaces=em0

in /etc/rc.conf

 The problem is that rtadvd continues advertising the default gateway as
 tun0's link-local address - and pinging from a machine on the network
 results in cannot forward src messages on the router (strangely,
 despite hisaddr being fe80::205:... in ppp.log, the kernel logs the
 address as fe80:f::205:...).

Try setting:

ipv6_default_interface=tun0

and possibly also

ipv6_defaultrouter=-interface tun0

I use a gif tunnel (IPv6 over IPv4) for my IPv6 connectivity -- no
native support for IPv6 in my ADSL router -- so not exactly equivalent
but pretty similar in many ways.

 Is there some extra configuration I've likely missed that's needed when
 using IPv6 via PPP?

Probably.  The good news is that once you've got it running the IPv6
support in FreeBSD is rock solid and works like a charm.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW





signature.asc
Description: OpenPGP digital signature


Re: Configuration problem with IPv6 router (cannot forward src)

2012-06-08 Thread Brandon Weisz
Make sure you are only advertising a /64 addr prefixlen in rtadvd.conf, 
and not the entire /48.



On 6/7/2012 4:36 PM, Bruce Cran wrote:
I'm trying to set up a IPv6 router (running -current) on my home 
network. My ISP gives me a /128 via PPP and I have a /48 allocation, 
which I use to give em0 and tun0 public addresses in different subnets 
(tun0 is assigned the address via ppp.linkup).
I've added all the IPv6 settings to rc.conf (ipv6_gateway_enable, 
ipv6_network_interfaces, rtadvd_enable etc.) and I can ping IPv6 sites 
from the router.


The problem is that rtadvd continues advertising the default gateway 
as tun0's link-local address - and pinging from a machine on the 
network results in cannot forward src messages on the router 
(strangely, despite hisaddr being fe80::205:... in ppp.log, the kernel 
logs the address as fe80:f::205:...).


Is there some extra configuration I've likely missed that's needed 
when using IPv6 via PPP?





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Configuration problem with IPv6 router (cannot forward src)

2012-06-08 Thread Bruce Cran

On 07/06/2012 23:56, Robert Bonomi wrote:

Please provide the output from these two commands:
ifconfig  -a
netstat -nr
on both the router and on an 'inside' machine. (identifying which is which:)

There is also a question of 'where' the /48 comes from -- and how
traffic to those addresses is being routed from the outside world.


The /48 came from my ISP, so it should be getting routed correctly.

ifconfig -a (with ral0/lo0 removed):

em0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=4219bRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO
ether [em0_MAC]
inet 192.168.2.1 netmask 0xff00 broadcast 192.168.2.255
inet6 fe80::[em0_MAC]%em0 prefixlen 64 scopeid 0x1
inet6 [prefix]:a::b prefixlen 64
nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
media: Ethernet autoselect (1000baseT full-duplex)
status: active
em1: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=4219bRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO
ether [em1_MAC]
inet6 fe80::[em1_MAC]%em1 prefixlen 64 scopeid 0x2
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
media: Ethernet autoselect (100baseTX full-duplex)
status: active
tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1492
options=8LINKSTATE
inet6 fe80::[em0_MAC]%tun0 prefixlen 64 scopeid 0xf
inet [MYADDR] -- [HISADDR] netmask 0xff00
inet6 [prefix]:c::b prefixlen 64
nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
Opened by PID 1092


Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif Expire
default[HISADDR]   UGS 0 2476   tun0
[MYADDR]   link#15UHS 00lo0
[HISADDR]   link#15UH  00   tun0
127.0.0.1  link#14UH  00lo0
192.168.2.0/24 link#1 U   0 3985em0
192.168.2.1link#1 UHS 00lo0

Internet6:
Destination   Gateway Flags  Netif Expire
::/96 ::1 UGRSlo0 =
default   fe80::[em0_MAC]%tun0   UGS tun0
::1   link#14 UH  lo0
:::0.0.0.0/96 ::1 UGRSlo0
[prefix]:c::/64   link#15 U  tun0
[prefix]:c::1 link#15 UHS lo0
[prefix]:a::/64   link#1 U   em0
[prefix]:a::1 link#1 UHS lo0
fe80::/10 ::1 UGRSlo0
fe80::%em0/64 link#1 U   em0
fe80::[em0_MAC]%em0  link#1UHS lo0
fe80::%em1/64 link#2 U   em1
fe80::[em1_MAC]%em1  link#2UHS lo0
fe80::%lo0/64 link#14 U   lo0
fe80::1%lo0   link#14 UHS lo0
fe80::%tun0/64link#15 US tun0
fe80::[em0_MAC]%tun0 link#15   UHS lo0
ff01::%em0/32 fe80::[em0_MAC]%em0  U em0
ff01::%em1/32 fe80::[em1_MAC]%em1  U em1
ff01::%lo0/32 ::1 U   lo0
ff01::%tun0/32fe80::[em0_MAC]%tun0 US tun0
ff02::/16 ::1 UGRSlo0
ff02::%em0/32 fe80::[em0_MAC]%em0  U em0
ff02::%em1/32 fe80::[em1_MAC]%em1  U em1
ff02::%lo0/32 ::1 U   lo0
ff02::%tun0/32fe80::[em0_MAC]%tun0 UGS tun0

rtadvd.conf contains:

em0:\
 :addrs#1:addr=[prefix]:a:::prefixlen#64;tc=ether:raflags=o:

rc.conf contains:

ifconfig_em0= inet 192.168.2.1 netmask 255.255.255.0
ifconfig_em0_ipv6= inet6 [prefix]:a::b
ifconfig_em1=up
pf_enable=YES
gateway_enable=YES
ppp_enable=YES
ppp_nat=NO
ppp_goscomb_mode=ddial
ppp_goscomb_nat=NO
ppp_profile=isp
ipv6_gateway_enable=YES
ipv6_network_interfaces=em0 em1 tun0
dhcpd_enable=YES
dhcpd6_enable=NO
dhcpd_flags=-q
dhcpd6_flags=-q
dhcpd_conf=/usr/local/etc/dhcpd.conf
dhcpd6_conf=/usr/local/etc/dhcpd6.conf
dhcpd_ifaces=em0
dhcpd6_ifaces=em0
dhcpd_withumask=022
dhcpd6_withumask=022
dhcpd_chuser_enable=YES
dhcpd6_chuser_enable=YES
dhcpd_withuser=dhcpd
dhcpd6_withuser=dhcpd
dhcpd_withgroup=dhcpd
dhcpd6_withgroup=dhcpd
dhcpd_chroot_enable=YES
dhcpd6_chroot_enable=YES
dhcpd_devfs_enable=YES
dhcpd6_devfs_enable=YES
dhcpd_rootdir=/var/db/dhcpd
dhcpd6_rootdir=/var/db/dhcpd6
rtadvd_enable=NO
rtadvd_interfaces=em0

I've tried configuring a machine with a static configuration, bypassing 
any issues with rtadvd/dhcpd6 so I'm fairly sure the problem is on the 
router.


--
Bruce Cran

___
freebsd-questions@freebsd.org mailing list

Re: Configuration problem with IPv6 router (cannot forward src)

2012-06-08 Thread Bruce Cran

On 08/06/2012 06:59, Matthew Seaman wrote:

Probably.  The good news is that once you've got it running the IPv6
support in FreeBSD is rock solid and works like a charm.



It turns out that PF was being too helpful and trying to NAT for both 
IPv4 and IPv6 - adding 'inet' to the nat on $ext_if... line fixed it.


--
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Configuration problem with IPv6 router (cannot forward src)

2012-06-07 Thread Bruce Cran
I'm trying to set up a IPv6 router (running -current) on my home 
network. My ISP gives me a /128 via PPP and I have a /48 allocation, 
which I use to give em0 and tun0 public addresses in different subnets 
(tun0 is assigned the address via ppp.linkup).
I've added all the IPv6 settings to rc.conf (ipv6_gateway_enable, 
ipv6_network_interfaces, rtadvd_enable etc.) and I can ping IPv6 sites 
from the router.


The problem is that rtadvd continues advertising the default gateway as 
tun0's link-local address - and pinging from a machine on the network 
results in cannot forward src messages on the router (strangely, 
despite hisaddr being fe80::205:... in ppp.log, the kernel logs the 
address as fe80:f::205:...).


Is there some extra configuration I've likely missed that's needed when 
using IPv6 via PPP?


--
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Configuration problem with IPv6 router (cannot forward src)

2012-06-07 Thread Robert Bonomi

 From: Bruce Cran br...@cran.org.uk

 I'm trying to set up a IPv6 router (running -current) on my home 
 network. My ISP gives me a /128 via PPP and I have a /48 allocation, 
 which I use to give em0 and tun0 public addresses in different subnets 
 (tun0 is assigned the address via ppp.linkup).
 I've added all the IPv6 settings to rc.conf (ipv6_gateway_enable, 
 ipv6_network_interfaces, rtadvd_enable etc.) and I can ping IPv6 sites 
 from the router.

 The problem is that rtadvd continues advertising the default gateway as 
 tun0's link-local address - and pinging from a machine on the network 
 results in cannot forward src messages on the router (strangely, 
 despite hisaddr being fe80::205:... in ppp.log, the kernel logs the 
 address as fe80:f::205:...).

 Is there some extra configuration I've likely missed that's needed when 
 using IPv6 via PPP?

Please provide the output from these two commands:
   ifconfig  -a
   netstat -nr
on both the router and on an 'inside' machine. (identifying which is which :)

There is also a question of 'where' the /48 comes from -- and how 
traffic to those addresses is being routed from the outside world.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org