From owner-freebsd-net@FreeBSD.ORG Wed Nov 5 16:48:52 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1719F16A4CE for ; Wed, 5 Nov 2003 16:48:52 -0800 (PST) Received: from swin.edu.au (c3p0.cc.swin.edu.au [136.186.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44B8043FDD for ; Wed, 5 Nov 2003 16:48:49 -0800 (PST) (envelope-from pvandenbergen@swin.edu.au) Received: from pvdbergen.caia.swin.edu.au (pvdbergen.caia.swin.edu.au [136.186.229.26]) by swin.edu.au (8.9.3p2-20030918/8.9.3) with ESMTP id LAA781537 for ; Thu, 6 Nov 2003 11:48:47 +1100 (EST) From: paul van den bergen To: freebsd-net@freebsd.org Date: Thu, 6 Nov 2003 11:48:46 +1100 User-Agent: KMail/1.5 References: <200310311414.15989.pvandenbergen@swin.edu.au> <200310310520.h9V5KI1j011235@intruder.kitchenlab.org> In-Reply-To: <200310310520.h9V5KI1j011235@intruder.kitchenlab.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200311061148.46923.pvandenbergen@swin.edu.au> Subject: Re: IPv6 routing (long) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2003 00:48:52 -0000 On Fri, 31 Oct 2003 04:20 pm, Bruce A. Mah wrote: > If memory serves me right, paul van den bergen wrote: > > I am attempting to set up some static ipv6 routes on my little network. > > > > example: > > > > box1 - fec0:0:0:1::1 -------- fec0:0:0:1::2 - box 2 (router) - > > fec0:0:0:2::1 -------- fec0:0:0:2::2 - box 3 > > > > I want to reach from box 1 to box 3 > > > > no route6d or anything... this is a really simple network. > > > > sysctl net.inet6.ip6.forwarding=1, net.inet6.ip6.accept_rtadv=0 on box 2 > > (the > > > > router) > > sysctl net.inet6.ip6.forwarding=0, net.inet6.ip6.accept_rtadv=1 on boxes > > 1 an d > > 3 (the hosts). > > > > route add -inet6 -net fec0:0:0:2:: -prefixlen 64 -host fec0:0:0:1::2 > > on box1 > > > > box2 can ping6 to box1 and box3 and vise versa. > > > > why can't box 1 ping6 box 3? What have I missed? > > Did you add a route on box3 so that it can reach box1? Remember that > ping6 requires two-way connectivity. Oh. I just realised that I didn't add a route on box3 to reach box1... thank you, I shall try that. nup, didn't help > You set net.inet6.ip6.accept_rtadv=1 on the end hosts...do you have > rtadvd running on box2 so that they actually acquire the routes? um... if I'm setting up static routes (e.g. no routing software oin box 2), isn't this pointless? see below... static routes. I imagine that if I do; on box1 route add -inet6 -net fec0:0:0:2:: -prefixlen 64 -host fec0:0:0:1::2 on box3 route add -inet6 -net fec0:0:0:1:: -prefixlen 64 -host fec0:0:0:2::1 and on box 2 sysctl net.inet6.ip6.forwarding=1 I shouldn't need anything else or rather, should I need something else? if I do the same experiment but with IPv4, I also do not get connectivity from box 1 to box 3, so obviously something is missing... what am I missing? additional questions: what is rtadvd and what role does it play? does it get activated by other daemons or is it to be explicitly called by the user? if I used routing software on box 2, what _else_ would I need to configure? is there a clash between sysctl settings for net.inet6.ip6.forwarding and net.inet6.ip6.accept_rtadvt? > You haven't really provided enough information to debug the problem. How > about the output of ifconfig(8) and the routing tables on all three > machines? > > Bruce. sorry, I should have done that. partly I didn't really know what was relevent... still don't, but here goes... note: network between box 1-2 = fec0:0:0:229 network between box 2-3 = fec0:0:0:10 netstat -rn output box1: Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 136.186.229.1 UGSc 2 2073 vr0 127.0.0.1 127.0.0.1 UH 2 18 lo0 136.186.229/24 link#1 UC 3 0 vr0 136.186.229.1 link#1 UHLW 1 0 vr0 136.186.229.26 00:08:74:df:70:3e UHLW 1 147 vr0 1108 192.168.2 link#1 UC 1 0 vr0 192.168.2.101 00:40:63:cb:56:e6 UHLW 0 2 vr0 300 Internet6: Destination Gateway Flags Netif Expire ::/96 ::1 UGRSc lo0 ::1 ::1 UH lo0 ::ffff:0.0.0.0/96 ::1 UGRSc lo0 fe80::/10 ::1 UGRSc lo0 fe80::%vr0/64 link#1 UC vr0 fe80::240:63ff:fecb:c3d1%vr0 00:40:63:cb:c3:d1 UHL lo0 fe80::%lo0/64 fe80::1%lo0 Uc lo0 fe80::1%lo0 link#8 UHL lo0 fec0:0:0:229:: 00:40:63:cb:c3:d1 UHL lo0 => fec0:0:0:229::/64 link#1 UC vr0 fec0::229:240:63ff:fecb:c3d1 00:40:63:cb:c3:d1 UHL lo0 ff01::%vr0/32 link#1 UC vr0 ff01::%lo0/32 ::1 UC lo0 ff02::/16 ::1 UGRS lo0 ff02::%vr0/32 link#1 UC vr0 ff02::%lo0/32 ::1 UC lo0 box2: Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 1 18 lo0 136.186.229/24 link#1 UC 2 0 vr0 136.186.229.26 00:08:74:df:70:3e UHLW 1 1951 vr0 1175 192.168.1 link#10 UC 1 0 wi0 192.168.1.104 00:09:7c:85:82:74 UHLW 0 36 wi0 543 192.168.2 link#1 UC 1 0 vr0 192.168.2.103 00:40:63:cb:c3:d1 UHLW 0 2 vr0 367 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%vr0/64 link#1 UC vr0 fe80::240:63ff:fecb:56e6%vr0 00:40:63:cb:56:e6 UHL lo0 fe80::%lo0/64 fe80::1%lo0 Uc lo0 fe80::1%lo0 link#8 UHL lo0 fe80::%wi0/64 link#10 UC wi0 fe80::230:abff:fe20:a24c%wi0 00:30:ab:20:a2:4c UHL lo0 fec0:0:0:10:: 00:30:ab:20:a2:4c UHL lo0 => fec0:0:0:10::/64 link#10 UC wi0 fec0::10:209:7cff:fe85:8274 00:09:7c:85:82:74 UHLW wi0 fec0::10:230:abff:fe20:a24c 00:30:ab:20:a2:4c UHL lo0 fec0:0:0:229:: 00:40:63:cb:56:e6 UHL lo0 => fec0:0:0:229::/64 link#1 UC vr0 fec0::229:240:63ff:fecb:56e6 00:40:63:cb:56:e6 UHL lo0 ff01::%vr0/32 link#1 UC vr0 ff01::%lo0/32 ::1 UC lo0 ff01::%wi0/32 link#10 UC wi0 ff02::%vr0/32 link#1 UC vr0 ff02::%lo0/32 ::1 UC lo0 ff02::%wi0/32 link#10 UC wi0 box3: Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 136.186.229.1 UGSc 2 2003 vr0 127.0.0.1 127.0.0.1 UH 2 18 lo0 136.186.229/24 link#1 UC 3 0 vr0 136.186.229.1 00:00:0c:07:ac:e5 UHLW 1 0 vr0 1061 136.186.229.26 00:08:74:df:70:3e UHLW 1 947 vr0 962 192.168.1 link#11 UC 1 0 an0 192.168.1.101 00:30:ab:20:a2:4c UHLW 0 27 an0 330 Internet6: Destination Gateway Flags Netif Expire ::/96 ::1 UGRSc lo0 ::1 link#5 UHL lo0 ::ffff:0.0.0.0/96 ::1 UGRSc lo0 fe80::/10 ::1 UGRSc lo0 fe80::%vr0/64 link#1 UC vr0 fe80::240:63ff:fecb:56eb%vr0 00:40:63:cb:56:eb UHL lo0 fe80::%lo0/64 fe80::1%lo0 Uc lo0 fe80::1%lo0 link#5 UHL lo0 fe80::%an0/64 link#11 UC an0 fe80::209:7cff:fe85:8274%an0 00:09:7c:85:82:74 UHL lo0 fec0:0:0:10:: 00:09:7c:85:82:74 UHL lo0 => fec0:0:0:10::/64 link#11 UC an0 fec0::10:209:7cff:fe85:8274 00:09:7c:85:82:74 UHL lo0 fec0::10:230:abff:fe20:a24c 00:30:ab:20:a2:4c UHLW an0 ff01::%vr0/32 link#1 UC vr0 ff01::%lo0/32 ::1 UC lo0 ff01::%an0/32 link#11 UC an0 ff02::/16 ::1 UGRS lo0 ff02::%vr0/32 link#1 UC vr0 ff02::%lo0/32 ::1 UC lo0 ff02::%an0/32 link#11 UC an0 ifconfig output. box1: vr0: flags=8843 mtu 1500 inet 136.186.229.57 netmask 0xffffff00 broadcast 136.186.229.255 inet6 fe80::240:63ff:fecb:c3d1%vr0 prefixlen 64 scopeid 0x1 inet6 fec0::229:240:63ff:fecb:c3d1 prefixlen 64 inet6 fec0:0:0:229:: prefixlen 64 anycast inet 192.168.2.103 netmask 0xffffff00 broadcast 192.168.2.255 ether 00:40:63:cb:c3:d1 media: Ethernet autoselect (100baseTX ) status: active lp0: flags=8810 mtu 1500 sl0: flags=c010 mtu 552 faith0: flags=8002 mtu 1500 gif0: flags=c010 mtu 1280 pflog0: flags=0<> mtu 33216 pfsync0: flags=0<> mtu 1896 lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8 ppp0: flags=8010 mtu 1500 box2 vr0: flags=8843 mtu 1500 inet 136.186.229.55 netmask 0xffffff00 broadcast 136.186.229.255 inet6 fe80::240:63ff:fecb:56e6%vr0 prefixlen 64 scopeid 0x1 inet6 fec0::229:240:63ff:fecb:56e6 prefixlen 64 inet6 fec0:0:0:229:: prefixlen 64 anycast inet 192.168.2.101 netmask 0xffffff00 broadcast 192.168.2.255 ether 00:40:63:cb:56:e6 media: Ethernet autoselect (100baseTX ) status: active lp0: flags=8810 mtu 1500 sl0: flags=c010 mtu 552 faith0: flags=8002 mtu 1500 gif0: flags=c010 mtu 1280 pflog0: flags=0<> mtu 33216 pfsync0: flags=0<> mtu 1896 lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8 ppp0: flags=8010 mtu 1500 wi0: flags=8843 mtu 1500 inet6 fe80::230:abff:fe20:a24c%wi0 prefixlen 64 scopeid 0xa inet6 fec0:0:0:10:: prefixlen 64 anycast inet6 fec0::10:230:abff:fe20:a24c prefixlen 64 inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:30:ab:20:a2:4c media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) status: associated ssid MAGIC 1:MAGIC stationname HomeNet channel 1 authmode OPEN powersavemode OFF powersavesleep 100 wepmode OFF weptxkey 1 box3 vr0: flags=8843 mtu 1500 inet 136.186.229.58 netmask 0xffffff00 broadcast 136.186.229.255 inet6 fe80::240:63ff:fecb:56eb%vr0 prefixlen 64 scopeid 0x1 ether 00:40:63:cb:56:eb media: Ethernet autoselect (100baseTX ) status: active lp0: flags=8810 mtu 1500 pflog0: flags=0<> mtu 33216 pfsync0: flags=0<> mtu 1896 lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 ppp0: flags=8010 mtu 1500 sl0: flags=c010 mtu 552 hif0: flags=8800 mtu 1280 faith0: flags=8002 mtu 1500 gif0: flags=c010 mtu 1280 an0: flags=8843 mtu 1500 inet6 fec0:0:0:10:: prefixlen 64 anycast inet6 fe80::209:7cff:fe85:8274%an0 prefixlen 64 scopeid 0xb inet6 fec0::10:209:7cff:fe85:8274 prefixlen 64 inet 192.168.1.104 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:09:7c:85:82:74 media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) status: associated ssid MAGIC 1:MAGIC stationname MobileNode channel 1 authmode OPEN powersavemode OFF powersavesleep 200 wepmode OFF weptxkey 1 note that there is an AP (linksys WAP 11 ver 2.2) connecting the two wifi cards. I can get the same connectivity using adhoc mode. sysctl settings... (culled to most interesting... or not clearly irrelevent anyway.) box1 net.inet.ip.forwarding: 0 net.inet.ip.redirect: 1 net.inet.ip.sourceroute: 0 net.inet.ip.accept_sourceroute: 0 net.inet.ip.fastforwarding: 0 net.inet.ip.keepfaith: 0 net.inet.ip.subnets_are_local: 0 net.inet.ip.sendsourcequench: 0 net.inet.ip.check_interface: 0 net.inet6.ip6.forwarding: 0 net.inet6.ip6.redirect: 1 net.inet6.ip6.accept_rtadv: 0 net.inet6.ip6.keepfaith: 0 net.inet6.ip6.dad_count: 1 net.inet6.ip6.use_deprecated: 1 net.inet6.ip6.rr_prune: 5 net.inet6.ip6.v6only: 0 net.inet6.ip6.use_tempaddr: 0 net.inet6.ip6.auto_linklocal: 1 net.inet6.ip6.prefer_tempaddr: 0 net.inet6.ip6.use_defaultzone: 0 box2 net.inet.ip.forwarding: 1 net.inet.ip.redirect: 1 net.inet.ip.sourceroute: 0 net.inet.ip.accept_sourceroute: 0 net.inet.ip.fastforwarding: 0 net.inet.ip.keepfaith: 0 net.inet.ip.subnets_are_local: 0 net.inet.ip.sendsourcequench: 0 net.inet.ip.check_interface: 0 net.inet6.ip6.forwarding: 1 net.inet6.ip6.redirect: 1 net.inet6.ip6.accept_rtadv: 0 net.inet6.ip6.keepfaith: 0 net.inet6.ip6.dad_count: 1 net.inet6.ip6.use_deprecated: 1 net.inet6.ip6.rr_prune: 5 net.inet6.ip6.v6only: 0 net.inet6.ip6.use_tempaddr: 0 net.inet6.ip6.auto_linklocal: 1 net.inet6.ip6.prefer_tempaddr: 0 net.inet6.ip6.use_defaultzone: 0 box3 net.inet.ip.forwarding: 0 net.inet.ip.redirect: 1 net.inet.ip.sourceroute: 0 net.inet.ip.accept_sourceroute: 0 net.inet.ip.fastforwarding: 0 net.inet.ip.keepfaith: 0 net.inet.ip.subnets_are_local: 0 net.inet.ip.sendsourcequench: 0 net.inet.ip.check_interface: 0 net.inet6.ip6.forwarding: 0 net.inet6.ip6.redirect: 1 net.inet6.ip6.accept_rtadv: 0 net.inet6.ip6.keepfaith: 0 net.inet6.ip6.dad_count: 1 net.inet6.ip6.use_deprecated: 1 net.inet6.ip6.rr_prune: 5 net.inet6.ip6.v6only: 0 net.inet6.ip6.use_tempaddr: 0 net.inet6.ip6.auto_linklocal: 1 net.inet6.ip6.prefer_tempaddr: 0 net.inet6.ip6.use_defaultzone: 0 kldstat outputs something like Id Refs Address Size Name 1 3 0xc0100000 4b1480 kernel 2 1 0xc140b000 7000 linprocfs.ko 3 1 0xc1497000 15000 linux.ko on all the boxes... i.e. no bridging. network maps: IPv6: box1 | vr0 | fec0::229:240:63ff:fecb:c3d1 | | fec0:0:0:229::/64 | | fec0::229:240:63ff:fecb:56e6 | vr0 | box2 | wi0 | fec0::10:230:abff:fe20:a24c | | fec0:0:0:10::/64 | | fec0::10:209:7cff:fe85:8274 | an0 | box3 IPv4: box1 | vr0 | 192.168.2.103 | | 192.168.2.0/24 | | 192.168.2.101 | vr0 | box2 | wi0 | 192.168.1.101 | | 192.168.1.0/24 | | 192.168.1.104 | an0 | box3 ping behaviour: box2.wi0 -> box3.an0 IPv4: ping 192.168.1.104 PING 192.168.1.104 (192.168.1.104): 56 data bytes 64 bytes from 192.168.1.104: icmp_seq=0 ttl=64 time=4.178 ms 64 bytes from 192.168.1.104: icmp_seq=1 ttl=64 time=4.201 ms 64 bytes from 192.168.1.104: icmp_seq=2 ttl=64 time=3.669 ms ^C --- 192.168.1.104 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 3.669/4.016/4.201/0.246 ms box2.vr0 -> box1.vr0 IPv4: ping 192.168.2.103 PING 192.168.2.103 (192.168.2.103): 56 data bytes 64 bytes from 192.168.2.103: icmp_seq=0 ttl=64 time=0.364 ms 64 bytes from 192.168.2.103: icmp_seq=1 ttl=64 time=0.157 ms 64 bytes from 192.168.2.103: icmp_seq=2 ttl=64 time=0.133 ms ^C --- 192.168.2.103 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.133/0.218/0.364/0.104 ms box1.vr0 -> box3.an0 ping 192.168.1.104 PING 192.168.1.104 (192.168.1.104): 56 data bytes ^C --- 192.168.1.104 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss IPv6: box2.wi0 -> box3.an0 ping6 fec0::10:209:7cff:fe85:8274 PING6(56=40+8+8 bytes) fec0::10:230:abff:fe20:a24c --> fec0::10:209:7cff:fe85:8274 16 bytes from fec0::10:209:7cff:fe85:8274, icmp_seq=0 hlim=64 time=3.546 ms 16 bytes from fec0::10:209:7cff:fe85:8274, icmp_seq=1 hlim=64 time=3.785 ms 16 bytes from fec0::10:209:7cff:fe85:8274, icmp_seq=2 hlim=64 time=4.368 ms ^C --- fec0::10:209:7cff:fe85:8274 ping6 statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 3.546/3.900/4.368/0.345 ms box2.vr0 -> box1.vr0 ping6 fec0::229:240:63ff:fecb:c3d1 PING6(56=40+8+8 bytes) fec0::229:240:63ff:fecb:56e6 --> fec0::229:240:63ff:fecb:c3d1 16 bytes from fec0::229:240:63ff:fecb:c3d1, icmp_seq=0 hlim=64 time=0.528 ms 16 bytes from fec0::229:240:63ff:fecb:c3d1, icmp_seq=1 hlim=64 time=0.228 ms 16 bytes from fec0::229:240:63ff:fecb:c3d1, icmp_seq=2 hlim=64 time=0.216 ms ^C --- fec0::229:240:63ff:fecb:c3d1 ping6 statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.216/0.324/0.528/0.144 ms box1.vr0 -> box3.an0 ping6 fec0::10:209:7cff:fe85:8274 ping6: UDP connect: No route to host AP setup screen (from lynx) SETUP This screen contains all of the AP's basic setup functions. Most users will be able to use the AP's default settings without making any changes. If you require help during configuration, please see the user guide. Firmware Version: 1.009 AP Name: MAGIC home AP_______ LAN IP Address: (MAC Address: 00-06-25-54-23-8E ) ( ) Obtain an IP Address Automatically (*) Specify an IP Address 192 . 168 . 1__ . 254 Subnet Mask: 255 . 255 . 255 . 0__ Gateway: 0__ . 0__ . 0__ . 0__ Wireless: (MAC Address: 00-06-25-53-3F-8C ) SSID: MAGIC_______________ Channel: [1_] (Domain: USA ) WEP: ( ) Mandatory (*) Disable [BUTTON] AP Mode: (*) Access Point ( ) Access Point Client Remote AP MAC Address _____________ ( ) Wireless Bridge Remote Bridge MAC Address _____________ ( ) Wireless Bridge - Point to MultiPoint When set to "Access Point Client", "Wireless Bridge" or "Wireless Bridge - Point to MultiPoint" mode, the device will only communicate with another WAP 11 ver. 2.2 or WAP 11. dstumbler view of the AP [ 1] MAGIC (00:06:25:54:23:8e) bn019:046:027 SSID: MAGIC BSSID:00:06:25:54:23:8e Mfg: N/A Channel: 1 11.0/100 Signal/Noise: 19/46/27 First Seen: 0:14:40 Last Seen: 0:15:24 022:049:027 ----------+++++++++ 021:048:027 ----------++++++++ 022:049:027 ----------+++++++++ 019:046:027 ----------+++++++ 022:049:027 ----------+++++++++ 021:048:027 ----------++++++++ 021:048:027 ----------++++++++ 021:048:027 ----------++++++++ 020:047:027 ----------++++++++ 021:048:027 ----------++++++++ 021:048:027 ----------++++++++ 020:047:027 ----------++++++++ 019:046:027 ----------+++++++ 021:048:027 ----------++++++++ 020:047:027 ----------++++++++ 021:048:027 ----------++++++++ 021:048:027 ----------++++++++ 021:048:027 ----------++++++++ 020:047:027 ----------++++++++ 022:049:027 ----------+++++++++ 022:049:027 ----------+++++++++ 019:046:027 ----------+++++++ 022:049:027 ----------+++++++++ 019:046:027 ----------+++++++ have tested this in adhoc mode and works just as described above, so that is not the problem... -- Dr Paul van den Bergen Centre for Advanced Internet Architectures caia.swin.edu.au pvandenbergen@swin.edu.au IM:bulwynkl2002 "And some run up hill and down dale, knapping the chucky stones to pieces wi' hammers, like so many road makers run daft. They say it is to see how the world was made." Sir Walter Scott, St. Ronan's Well 1824