diosney / node-iproute Goto Github PK
View Code? Open in Web Editor NEWShow and manipulate network devices, routing, policy routing and tunnels.
License: MIT License
Show and manipulate network devices, routing, policy routing and tunnels.
License: MIT License
As we can see in the data bellow, when we have nhflags on route, ip_route.show fail to parse the data.
$ ip route show table main
default via 192.168.0.1 dev eth0 onlink
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.110
[ { type: 'default',
to: 'via',
'192.168.0.1': 'dev',
eth0: 'onlink' },
{ type: 'unicast',
to: '169.254.0.0/16',
dev: 'eth0',
scope: 'link',
metric: '1000' },
{ type: 'unicast',
to: '192.168.0.0/24',
dev: 'eth0',
proto: 'kernel',
scope: 'link',
src: '192.168.0.110' } ]
iproute2 has a "-b" param that can accept multi commands at a time, like this
ashi009/bestroutetb#11
it's really useful when executing thousands of iproute2 commands.
The VXLAN "id" parameter is missing in ip-link/add.
Hello,
I can't find the equivalent for "ip route get " in your library, is it implemented ? Do you plan to implement it ?
How could I get the equivalent functionality ?
Thanks
Dam
Hi, using iproute 1.0.2 I have the following trouble
Linux ip link layout is
ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc aipt2 state UP mode DEFAULT group default qlen 1000
link/ether 0a:ca:90:10:38:8e brd ff:ff:ff:ff:ff:ff
altname enp0s5
...
i.e. the second link has 3 lines and it causes the following error
TypeError: Cannot read property 'slice' of undefined
at exports.parse_links (/opt/.../node_modules/iproute/lib/link/utils.js:95:35)
at /opt/.../node_modules/iproute/lib/link/show.js:65:21
at ChildProcess.exithandler (child_process.js:299:7)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1022:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
Would it be possible to adapt code to work correctly also with this ip link layout?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.