Date: Sat, 5 Mar 2011 23:10:19 +0300 From: Sergey Kandaurov <pluknet@gmail.com> To: fredrik danerklint <fredan@fredan.se> Cc: FreeBSD Net <freebsd-net@freebsd.org> Subject: Re: ifconfig lo1 down Message-ID: <AANLkTimq703bJA0dg=y%2B0vHF-1vSMjYnM5jR7eoinVR9@mail.gmail.com> In-Reply-To: <201103051943.41917.fredan@fredan.se> References: <201103051943.41917.fredan@fredan.se>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5 March 2011 21:43, fredrik danerklint <fredan@fredan.se> wrote: > Hi, > > I would like to know what is the differents between ip4 and ip6 for this > command. > > First: > > #ifconfig lo1 > lo1: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 > =A0 =A0 =A0 =A0options=3D3<RXCSUM,TXCSUM> > =A0 =A0 =A0 =A0inet xx.xx.xx.2 netmask 0xffffffff > =A0 =A0 =A0 =A0inet6 2a03:xxxx:xxxx::xxxx:xx02 prefixlen 128 > =A0 =A0 =A0 =A0nd6 options=3D3<PERFORMNUD,ACCEPT_RTADV> > > $ ping xx.xx.xx.2 > PING xx.xx.xx.2 (xx.xx.xx.2): 56 data bytes > 64 bytes from xx.xx.xx.2: icmp_seq=3D0 ttl=3D64 time=3D0.012 ms > 64 bytes from xx.xx.xx.2: icmp_seq=3D1 ttl=3D64 time=3D0.010 ms > ^C > > and > > $ ping6 2a03:xxxx:xxxx::xxxx:xx02 > PING6(56=3D40+8+8 bytes) 2a03:xxxx:xxxx::xxxx:xx02 --> 2a03:xxxx:xxxx::xx= xx:xx02 > 16 bytes from 2a03:xxxx:xxxx::xxxx:xx02, icmp_seq=3D0 hlim=3D64 time=3D0.= 053 ms > 16 bytes from 2a03:xxxx:xxxx::xxxx:xx02, icmp_seq=3D1 hlim=3D64 time=3D0.= 032 ms > ^C > > Now we run this command: > > # ifconfig lo1 down > > and trying to ping again: > > $ ping xx.xx.xx.2 > PING xx.xx.xx.2 (xx.xx.xx.2): 56 data bytes > ping: sendto: No route to host > ping: sendto: No route to host > ping: sendto: No route to host > ^C > --- xx.xx.xx.2 ping statistics --- > 3 packets transmitted, 0 packets received, 100.0% packet loss > > works as expected (and this is what I want) but this command, however: > > $ ping6 2a03:xxxx:xxxx::xxxx:xx02 > PING6(56=3D40+8+8 bytes) 2a03:xxxx:xxxx::xxxx:xx02 --> 2a03:xxxx:xxxx::xx= xx:xx02 > 16 bytes from 2a03:xxxx:xxxx::xxxx:xx02, icmp_seq=3D0 hlim=3D64 time=3D0.= 048 ms > 16 bytes from 2a03:xxxx:xxxx::xxxx:xx02, icmp_seq=3D1 hlim=3D64 time=3D0.= 033 ms > 16 bytes from 2a03:xxxx:xxxx::xxxx:xx02, icmp_seq=3D2 hlim=3D64 time=3D0.= 032 ms > ^C > --- 2a03:xxxx:xxxx::xxxx:xx02 ping6 statistics --- > 3 packets transmitted, 3 packets received, 0.0% packet loss > round-trip min/avg/max/std-dev =3D 0.032/0.038/0.048/0.007 ms > > My question is why is it not the same behavior of ip6 as of ip4? > That's how forwarding works/differs for ipv4 and ipv6. You should be able to ping xx.xx.xx.2 again after adding static route. Something like route add xx.xx.xx.2 -iface -lo1. I can only say for the moment that from my observation ipv4 "routes to itse= lf" exist as far as interface is up, and ipv6 routes don't depend on if iface i= s up. You can check this with netstat -r for both addresses with iface up and dow= n. --=20 wbr, pluknet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimq703bJA0dg=y%2B0vHF-1vSMjYnM5jR7eoinVR9>