pyroute2
pyroute2 copied to clipboard
Python Netlink and PF_ROUTE library — network configuration and monitoring
```python #!/usr/bin/python3 from pyroute2.ethtool import Ethtool # pylint: disable=no-name-in-module,import-error import os import subprocess import gc def main(): subprocess.check_call(['ls', '-l', f'/proc/{os.getpid()}/fd']) Ethtool() gc.collect() subprocess.check_call(['ls', '-l', f'/proc/{os.getpid()}/fd']) if __name__ == '__main__': main()...
I try to apply a filter on a dump of an ndb interface view. I use the following test code: ``` import pyroute2 with pyroute2.NDB(log="debug") as ndb: report = ndb.interfaces.dump()...
I want to add some rules to nft and I'm having some problems with it: in first, i added some expressions: https://pastebin.com/qRkYx57N rule with that i have problems: `# nft...
That new version will come soon enough and this library could potentially already look into testing that. I recently updated pyroute2 in gentoo to 0.7.9 here https://github.com/gentoo/gentoo/pull/31259 and was wondering...
Hello, I have been using pyroute2 to create and use network namespace and I ran into a difference between the behavior of pyroute2 compared to the behavior of ip-netns in...
Hello, It's probably not an important bug, but when something does not work on a new IPRoute instance, we are not able to close the associated socket. Simplest way to...
When trying to read the netem percentage options like loss and duplicate, we get an int value as converted by the `percent2u32` function. So in order to get the percentage...
is there any way to find out which cast mode the vxlan interface used by pyroute2? Two vxlan interfaces: eno1.4096, eno1.4097 eno1.4096 use unicast eno1.4097 use multicast **ndb.interfaces['eno1.4096']** ` {'alt_ifname_list':...
I use add_port add interface to bond, but I received pyroute2.netlink.exceptions.Net linkError: (1, 'Operation not permitted): Traceback (most recent call last): File "/root/test.py", line 8, in bond2.add_port("ens192") File "/usr/local/lib/python3.9/site-packages/pyroute2/ndb/objects/__init__.py", line...
Hi, in an older version the bug was already fixed, but is now back again. More information please visit: https://github.com/svinota/pyroute2/issues/600