Re: How to configure a AX25 interface ?

On Wed, 2015-09-09 at 13:06 +0200, Jean-Christian de Rivaz wrote:
Le 09. 09. 15 10:19, Thomas Haller a écrit :
On Wed, 2015-09-09 at 07:28 +0200, Jean-Christian de Rivaz wrote:

I have successfully setup a AX25 interface and NM see it this
nmcli d
ax0      unknown   connected    ax0
eth2     ethernet  unavailable  --
ttyACM0  gsm       unavailable  --
lo       loopback  unmanaged    --
sit0     sit       unmanaged    --
wlan2    wifi      unmanaged    --

The ax0 interface have only a IP address (configured while
ifconfig ax0
ax0       Link encap:AMPR AX.25  HWaddr MENHIR-6
            inet addr:  Bcast:
            UP BROADCAST RUNNING  MTU:256  Metric:1
            RX packets:832 errors:14 dropped:0 overruns:0 frame:0
            TX packets:688 errors:0 dropped:0 overruns:0
            collisions:0 txqueuelen:10
            RX bytes:74961 (73.2 KiB)  TX bytes:89851 (87.7 KiB)

How can I configure NM to add a static default gateway and a
server when, and only when, NM have to use the ax0 interface ?
on a Debian Jessie system, so there is no /etc/sysconfig
The device ax0 was created and upped outside of NM's knowledge, so
created a temporary connection "ax0" to reflect that external
This is what you see as active in `nmcli d`.
You can modify and reuse this created connection, or create a
connection (possibly deleting the generated one).

Note that NM doesn't understand AX25 devices, but it should still
to do Layer3/IP configuration. In general such unknown devices is
treated as "generic".
If you look at the created connection
    `nmcli connection show ax0`
you should see that it's of connection.type=generic.

Basically, adjust the generic connection to have the settings you
See `man nm-settings` for possible options. Especially the "ipv4"

Many Thanks Tomas for the hint.

The solution I used was:
nmcli con mod ax0 ipv4.addresses ""
nmcli con mod ax0 ipv4.dns ""
nmcli connection reload

It created the appropriate file:

The originally created connection "ax0" was in memory only. By
modifying it, it got persisted to disk. So this is expected.

But even after a reboot, NM don't set the gateway, nor the default 
route, nor the DNS:

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref Use
Iface   U     0 0        0
wlan2   U     0 0        0

cat /etc/resolv.conf
# Generated by NetworkManager

Then the nmcli con show ax0 command return two 'ax0' settings:

After reboot, NM sees again that an external device ax0 was activated.
Again it will create a temporary, in-memory connection to reflect those

After doing that, it will look if you have a compatible persistent
connection that might be the one that got activated. Basically, it
compares the newly created one, with what to saved previously.

If it would determine, that you have a similar-enough connection, it
would delete the temporary connection and use the one that matched.

In your case, NM thinks they are different and hence keeps the second

But regardless of whether NM would match your persistent connection or
not, it would not modify your externally configured device
You must manually activate the connection you want:
  `nmcli connection up uuid 048db18b-0d5d-4f40-8ba1-ca492f888b1c`,
This will delete the just generated connection.

The first one correspond to the right settings, the second one 
correspond to the crude reality. Probably that the connection.uuid
a role here, but how to handle this properly ?

Note: I would love to create the ax0 connection using NM. In practice
it's just matter of calling the 'kissattach' command. I there a way
tell NM a command it must call to setup a new interface ?

No, that is unfortunately not possible.


Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]