# hide a particular nic from NetworkManager [SOLVED]

## ggeeoo

Short version: is there a way to make NetworkManager ignore a particular network interface?

Long version:

I recently upgraded hal from 0.5.11-r9 to 0.5.12_rc1-r8. Before the upgrade, hal would only show one wired nic, namely the wired ethernet (eth0). Now it also includes the tap nic that I use for my virtual machines (vnet0). In fact it selects vnet0 by default instead of eth0. As a result I have no internet connectivity (since eth0 is down). If I select eth0 then internet connectivity is restored but also vnet0 is brought down which kill the virtual LAN for the VMs. Of course I can easily fix that by doing a "ifconfig vnet0 X.Y.Z.W/24" but this is very annoying. So my question is whether I can NetworkManager ignore vnet0.Last edited by ggeeoo on Fri Oct 09, 2009 6:00 pm; edited 1 time in total

----------

## d2_racing

Are you sure that you cannot change that inside an option ?

I know that with Wicd have that kind of option for sure.

----------

## ggeeoo

No, I haven't seen such an option in NetworkManager.

----------

## d2_racing

You should try Wicd then.

----------

## ggeeoo

I examined the sources of net-misc/networkmanager-0.6.6 and I found out that NetworkManager tries to manage all network interfaces that hal reports as having either net.80203 or net.80211 in their info.capabilities. These are the devices returned by

```

hal-find-by-capability --capability net.80203

hal-find-by-capability --capability net.80211

```

with net.80203 corresponding to ethernet nic's and net.80211 to wi-fi ones.

The problem is that sys-apps/hal-0.5.12_rc1-r8 considers tap interfaces as having the capability net.80203 whereas sys-apps/hal-0.5.11-r9 excludes these devices completely.

I guess one way around this problem is to create an fdi file in /etc/hal/fdi/policy/ that would modify the info.capabilities property of the tap interface or remove the tap from hal altogether (I don't know if the latter is possible though).

----------

## d2_racing

In fact, can you try that and post the result ?

----------

## ggeeoo

So here's my solution. I created the following fdi file in /etc/hal/fdi/policy/:

```

<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">

   <device>

      <match key="net.interface" string="vnet0">

         <remove key="info.capabilities" type="strlist">net.80203</remove>

         <merge key="info.category" type="string">net</merge>

      </match>

   </device>

</deviceinfo>

```

This tells hal to remove the capability net.80203 from vnet0 as well as to change the info.category to "net". Now vnet0 does not appear to be an ethernet nic anymore and NetworkManager skips it.

I don't know if this trick is required for >=NetworkManager-0.7.0. Maybe these versions are smarter and exclude tap network interfaces automatically.

----------

