Point-to-Point interfaces and routing



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@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Traffic NOT moving through the correct network interface?
    ... Kernel IP routing table ... loopback interface, but that's not part of this problem. ... Everything is done by the kernel. ... Policy based routing requires you ...
    (alt.os.linux)
  • Re: Fedora as Router - cannot get past gateway
    ... >> command so much, I am suprised any routing works at all. ... Are you using dhcp or is all config manual? ... > This is your interface to ISP? ... we all have that feeling when we can't get routing set up. ...
    (comp.os.linux.networking)
  • Re: Bind Problem - with multihomed
    ... You must add an entry to the routing table. ... See this excerpt under the "Multihoming" section from "Microsoft ... Stack Components and the TDI Interface" at ... to disjoint networks (networks that are separate from and unaware of ...
    (microsoft.public.win32.programmer.networks)
  • Re: problems pinging between FastEthernet and Ethernet interfaces
    ... I'm having some problems with a link between two Cisco routers. ... Ethernet interface. ... routing protocol will not matter. ... The best thing is to post the config of the relevant interfaces. ...
    (comp.dcom.sys.cisco)
  • intervlan routing and policy routing C3750 or C 4948
    ... routing) and for some vlans i need different gateways. ... interface Vlan10 ... route-map, 2) routing table. ... the packet will be routed according to the routing table (standard IOS ...
    (comp.dcom.sys.cisco)

Loading