IPv6 router with static addresses assignment not works

2011-02-04 Thread Evgeniy Sudyr
Hi all:

I have problem with my ipv6 router (two NICs) running on 4.8. I have
external IP address /64 and routed by ISP /48 network through that IP.
I want to use static addressing in my internal network, so I've choose
one /64 subnet in my /48 network and assigned xx::1 to my internal
router and assigned xx::2 IP and xx::1 to client host in my internal
network.

1) I'm able to ping client host from router and vice versa.
2) Firewall permitting icmp6 and not blocks packets (I'm logging
blocked packets and checked with tcpdump on pflog0).
3) I'm able to reach external IPv6 hosts from router and I'm able to
ping router from remote ipv6 hosts. problem is that
4) I can't reach external hosts from my client host xx::2 (or any
other IP).  I don't see requests on router's internal interface, but
see it with tcpdump on client host.
5) When I'm trying to ping client host from external host I see on
client host that packets reach client host and sends response but that
responses not reach xx::1. Ipv6 forwarding is enabled 100%.

Does anybody have clue why it not works?

Magic happens when I'm starting rtadvd re0 -c /etc/rtadvd.conf (where
I have same network specified) - then it works :).

My NIC is re0 at pci1 dev 0 function 0 D-Link DGE-528T rev 0x10:
RTL8169/8110SB (0x1000), apic 2 int 20 (irq 12), address
00:1e:58:2b:f3:d8
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 3

# sysctl -a | grep inet6
net.inet6.ip6.forwarding=1
net.inet6.ip6.redirect=1
net.inet6.ip6.hlim=64
net.inet6.ip6.mrtproto=103
net.inet6.ip6.maxfragpackets=200
net.inet6.ip6.accept_rtadv=0
net.inet6.ip6.keepfaith=1
net.inet6.ip6.log_interval=5
net.inet6.ip6.hdrnestlimit=10
net.inet6.ip6.dad_count=1
net.inet6.ip6.auto_flowlabel=1
net.inet6.ip6.defmcasthlim=1
net.inet6.ip6.kame_version=OpenBSD-current
net.inet6.ip6.use_deprecated=1
net.inet6.ip6.rr_prune=5
net.inet6.ip6.v6only=1
net.inet6.ip6.maxfrags=200
net.inet6.ip6.mforwarding=0
net.inet6.ip6.multipath=0
net.inet6.ip6.multicast_mtudisc=0
net.inet6.ip6.neighborgcthresh=2048
net.inet6.ip6.maxifprefixes=16
net.inet6.ip6.maxifdefrouters=16
net.inet6.ip6.maxdynroutes=4096
net.inet6.ip6.dad_pending=0
net.inet6.icmp6.rediraccept=1
net.inet6.icmp6.redirtimeout=600
net.inet6.icmp6.nd6_prune=1
net.inet6.icmp6.nd6_delay=5
net.inet6.icmp6.nd6_umaxtries=3
net.inet6.icmp6.nd6_mmaxtries=3
net.inet6.icmp6.nd6_useloopback=1
net.inet6.icmp6.nodeinfo=1
net.inet6.icmp6.errppslimit=100
net.inet6.icmp6.nd6_maxnudhint=0
net.inet6.icmp6.mtudisc_hiwat=1280
net.inet6.icmp6.mtudisc_lowat=256
net.inet6.icmp6.nd6_debug=0
net.inet6.divert.recvspace=65636
net.inet6.divert.sendspace=65636

# uname -a
OpenBSD gateway 4.8 GENERIC.MP#335 amd64



-- 
--
With regards,
Eugene Sudyr



Re: IPv6 router with static addresses assignment not works

2011-02-04 Thread Evgeniy Sudyr
Joakim,

I set default gateway and it's present in routes list :). I've sorted
out and solved problem!!!

Unfortunatelly all of my office clients are Windows OSes which are too
USER FRIENDLY and it added Site-local route automatically :)

I was wondered to see this:

C:\Users\Evgeniy.Sudyrnetsh int ipv6 show route

Publish  Type  Met  PrefixIdx  Gateway/Interface Name
---    ---    ---  
No   Manual256  ::/0   11  fe80::218:e7ff:fefc:4a20
No   Manual256::/0   11
2aaa::::1b:1::1

 Where 2aaa::::1b:1::1 is statically set IPv6 default
gateway and fe80::218:e7ff:fefc:4a20 as automatically assigned IP
address with the same metric (I've used defaults and don't played with
it before).

With tcpdump I figured that it uses fe80::218:e7ff:fefc:4a20 as
default gateway all the time.

Obviously solution was to change metric value to something lower which
will be used instead fe80 router which is local address :).

To change route metric just simply use netsh or GUI :)

netsh int ipv6 set route ::/0 11 2aaa::::1b:1::1 0 100 no


Hope this will be useful for somebody else.

OpenBSD rocks!




On Sat, Feb 5, 2011 at 12:15 AM, Joakim Aronius joa...@aronius.com wrote:
 * Evgeniy Sudyr (eject.in...@gmail.com) wrote:
 Magic happens when I'm starting rtadvd re0 -c /etc/rtadvd.conf (where
 I have same network specified) - then it works :).


 Hi there Evgeniy,

 Problem is that when you statically configure the IP parameters you do not 
 set the default gateway so the client does not know where to send packets 
 outside the v6 LAN.

 In my machines I have a line like this in my hostname.if
 !/sbin/route add -inet6 default 2001:db8:cc17:5::1

 ..but now when I have a look it seems like since 4.8 it is supported to ad a 
 default gateway address to /etc/mygate in the same way as for IPv4. So if you 
 only have a default GW thats what you should do.

 /Joakim




-- 
--
With regards,
Eugene Sudyr