* Bug in netlink monitor
@ 2022-10-25 11:18 George Shuklin
2022-10-26 8:34 ` Nicolas Dichtel
0 siblings, 1 reply; 4+ messages in thread
From: George Shuklin @ 2022-10-25 11:18 UTC (permalink / raw)
To: netdev
I found that if veth interface is created in a namespace using netns
option for ip, no events are logged in `ip monitor all-nsid`.
Steps to reproduce:
(console1)
ip monitor all-nsid
(console 2)
ip net add foobar
ip link add netns foobar type veth
Expected results:
Output in `ip monitor`. Actual result: no output, (but there are two new
veth interaces in foobar namespace).
Additional observation: namespace 'foobar' does not have id in output of
`ip net`:
# ip net
foobar
test (id: 0)
test2 (id: 1)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug in netlink monitor
2022-10-25 11:18 Bug in netlink monitor George Shuklin
@ 2022-10-26 8:34 ` Nicolas Dichtel
2022-10-26 12:41 ` George Shuklin
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dichtel @ 2022-10-26 8:34 UTC (permalink / raw)
To: George Shuklin, netdev
Le 25/10/2022 à 13:18, George Shuklin a écrit :
> I found that if veth interface is created in a namespace using netns option for
> ip, no events are logged in `ip monitor all-nsid`.
>
> Steps to reproduce:
>
>
> (console1)
>
> ip monitor all-nsid
>
>
> (console 2)
>
> ip net add foobar
>
> ip link add netns foobar type veth
>
>
> Expected results:
>
> Output in `ip monitor`. Actual result: no output, (but there are two new veth
> interaces in foobar namespace).
>
> Additional observation: namespace 'foobar' does not have id in output of `ip net`:
This is why.
https://man7.org/linux/man-pages/man8/ip-monitor.8.html
" If the all-nsid option is set, the program listens to all network
namespaces that have a nsid assigned into the network namespace
were the program is running"
You can assign one with:
ip netns set foobar auto
Regards,
Nicolas
>
> # ip net
> foobar
> test (id: 0)
> test2 (id: 1)
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Bug in netlink monitor
2022-10-26 8:34 ` Nicolas Dichtel
@ 2022-10-26 12:41 ` George Shuklin
2022-10-26 13:31 ` Nicolas Dichtel
0 siblings, 1 reply; 4+ messages in thread
From: George Shuklin @ 2022-10-26 12:41 UTC (permalink / raw)
To: nicolas.dichtel, netdev
On 26/10/2022 11:34, Nicolas Dichtel wrote:
> Le 25/10/2022 à 13:18, George Shuklin a écrit :
>> I found that if veth interface is created in a namespace using netns option for
>> ip, no events are logged in `ip monitor all-nsid`.
>>
>> Steps to reproduce:
>>
>>
>> (console1)
>>
>> ip monitor all-nsid
>>
>>
>> (console 2)
>>
>> ip net add foobar
>>
>> ip link add netns foobar type veth
>>
>>
>> Expected results:
>>
>> Output in `ip monitor`. Actual result: no output, (but there are two new veth
>> interaces in foobar namespace).
>>
>> Additional observation: namespace 'foobar' does not have id in output of `ip net`:
> This is why.
> https://man7.org/linux/man-pages/man8/ip-monitor.8.html
>
> " If the all-nsid option is set, the program listens to all network
> namespaces that have a nsid assigned into the network namespace
> were the program is running"
>
> You can assign one with:
> ip netns set foobar auto
>
Oh, I missed that.
But I think it's making things a bit odd, because there are network
events in the system which are not visible in `ip monitor` (no matter
what options are set).
Are there a way to see _all_ network events?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug in netlink monitor
2022-10-26 12:41 ` George Shuklin
@ 2022-10-26 13:31 ` Nicolas Dichtel
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2022-10-26 13:31 UTC (permalink / raw)
To: George Shuklin, netdev
Le 26/10/2022 à 14:41, George Shuklin a écrit :
> On 26/10/2022 11:34, Nicolas Dichtel wrote:
>> Le 25/10/2022 à 13:18, George Shuklin a écrit :
>>> I found that if veth interface is created in a namespace using netns option for
>>> ip, no events are logged in `ip monitor all-nsid`.
>>>
>>> Steps to reproduce:
>>>
>>>
>>> (console1)
>>>
>>> ip monitor all-nsid
>>>
>>>
>>> (console 2)
>>>
>>> ip net add foobar
>>>
>>> ip link add netns foobar type veth
>>>
>>>
>>> Expected results:
>>>
>>> Output in `ip monitor`. Actual result: no output, (but there are two new veth
>>> interaces in foobar namespace).
>>>
>>> Additional observation: namespace 'foobar' does not have id in output of `ip
>>> net`:
>> This is why.
>> https://man7.org/linux/man-pages/man8/ip-monitor.8.html
>>
>> " If the all-nsid option is set, the program listens to all network
>> namespaces that have a nsid assigned into the network namespace
>> were the program is running"
>>
>> You can assign one with:
>> ip netns set foobar auto
>>
> Oh, I missed that.
>
> But I think it's making things a bit odd, because there are network events in
> the system which are not visible in `ip monitor` (no matter what options are set).
It's not visible, because this netns is not visible.
>
> Are there a way to see _all_ network events?
No. Remember that network namespace are used for isolation. There are a lot of
scenarii where you don't have to know what happen in another netns, even not
that another netns exists ;-)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-26 13:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-25 11:18 Bug in netlink monitor George Shuklin
2022-10-26 8:34 ` Nicolas Dichtel
2022-10-26 12:41 ` George Shuklin
2022-10-26 13:31 ` Nicolas Dichtel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).