Point-to-Point interfaces and routing

JINMEI Tatuya / 神明達哉 jinmei at isl.rdc.toshiba.co.jp
Thu Oct 5 02:56:07 PDT 2006


>>>>> On Thu, 05 Oct 2006 00:46:15 +0300, 
>>>>> Alexander Motin <mav at alkar.net> said:

> I have found to myself strange behaviour and difference between routing 
> to IPs on ngX, tunX interfaces. I will be very grateful if somebody 
> explain me why it is working in such way or give me a link to some good 
> manual about this.

> I have 6.1-STABLE. Do preparations:
> Create two interfaces, ng0 (by ngctl) and tun0 (by running interactive ppp).
> Bring them down and then up with ifconfig.
> Now they looks like:
> ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> mtu 1500
>          inet6 fe80::211:2fff:fea9:7627%ng0 prefixlen 64 scopeid 0x4
> tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
>          inet6 fe80::211:2fff:fea9:7627%tun0 prefixlen 64 scopeid 0x3
>          Opened by PID 11956

> Questions:
> 1. If I look for the routing tables I see:
> fe80::211:2fff:fea9:7627%ng0  fe80::211:2fff:fea9:7627%ng0  UHL ng0
> fe80::211:2fff:fea9:7627%tun0 link#3                        UHL lo0

> So now I can ping ip on tun0, but can't on ng0. Why did they different 
> and what is right?

Which "version" of 6.1-STABLE are you using?  I guess this is due to a
bug that was fixed recently.  A fix was already MFC'ed to RELENG_6 on
September 29 (at rev. 1.51.2.10).

> 3. mpd ppp daemon on interface up event adds route for the local ip to 
> the lo0. Is it right way? And how in theory it must work for IPv6?

At least we don't have to do that for IPv6.  The kernel (IPv6 stack)
is designed to install the loopback route for any local address,
whether it's on a p2p interface or not.

					JINMEI, Tatuya
					Communication Platform Lab.
					Corporate R&D Center, Toshiba Corp.
					jinmei at isl.rdc.toshiba.co.jp


More information about the freebsd-net mailing list