Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong IP #23

Open
japita-se opened this issue Nov 17, 2017 · 3 comments
Open

Wrong IP #23

japita-se opened this issue Nov 17, 2017 · 3 comments

Comments

@japita-se
Copy link

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:a5:16:d4  
          inet addr:192.168.1.149  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::e1bf:48cf:786c:ee08/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:48895 errors:0 dropped:71 overruns:0 frame:0
          TX packets:28059 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17395152 (16.5 MiB)  TX bytes:13433226 (12.8 MiB)

root@casa# node
> var net = require('network');
> net.get_interfaces_list(function(err, list) {console.log(list)})

> [ { name: 'wlan0',
    ip_address: '169.254.126.229',
    mac_address: 'b8:27:eb:a5:16:d4',
    gateway_ip: '192.168.1.254',
    netmask: '255.255.255.0',
    type: 'Wireless' } ]
@tomas
Copy link
Owner

tomas commented Nov 17, 2017

Yikes, that's weird. Do you mind showing the output of os.networkInterfaces()?

@nsgundy
Copy link

nsgundy commented Jan 11, 2018

If an interface has multiple IPs, ifconfig will only show one of them. ip addr is to be preferred.

@tomas
Copy link
Owner

tomas commented Jan 11, 2018

@nsgundy I'm not sure if this is related to #26. The list is populated using os.networkInterfaces() as a starting point (including the IP addresses), and then adding the missing bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants