Hello.

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?

When I am trying "route get -inet6 other_onlink_ip" I see:
%route get -inet6 fe80::211:2fff:fea9:aaaa%tun0
  interface: tun0
      flags: <UP,DONE,CLONING>
%route get -inet6 fe80::211:2fff:fea9:aaaa%ng0
  interface: ng0
      flags: <UP,DONE>

They are something different even here.

2. Add IPv4 addresses to both link:
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> mtu 1500
        inet 10.0.0.1 --> 10.0.0.2 netmask 0xffffffff
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet 10.0.1.1 --> 10.0.1.2 netmask 0xffffffff

Now I can ping neither 10.0.0.1 nor 10.0.1.1 because routing goes to my default. Why if it is my local ips?

If I add routes to 10.0.0.1 and 10.0.1.1 via lo0, I can ping them. Why now it works and is this right?

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?

--
Alexander Motin
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to