Is "inet addr" my or "bcast" my machine's actual IP?

109

10.0.2.15 is your system's address, .255 is the broadcast address for the subnet.

/24 is CIDR notation for the subnet mask; it means that 24 bits of the 32 bit IPv4 address are the network and the other 8 bits are the addresses within the subnet.

See this question for more information.

Share:
109

Related videos on Youtube

GM6
Author by

GM6

Updated on September 18, 2022

Comments

  • GM6
    GM6 over 1 year

    I'm trying to do a series of interactive commands in node.
    The first command I want to run is lftp and when it will returned continue with a few more.
    The problem is I'm not seeing any response. Here is my code

    var childProcess = require('child_process');
    var lftp = childProcess.spawn("lftp");
    
    lftp.stdout.on('data', function (data) {
            console.log('stdout: ' + data);
    });
    
        lftp.stdin.write("This is a test to see if something changes");    //it doesn't
    
        lftp.stderr.on('data', function (data) {
            console.log('stderr: ' + data);
    });
    
        lftp.on('close', function (code)  {
            console.log('child process exited with code: ' + code);
    });
    

    But stdout.on() is never activate. I played with the spwan parameters a lot and in some cases I got the stderr.on() to be called but never stdout. When I run the lftp command from shell I get:

       $ lftp
       lftp :~>
    

    I couldn't find any similar problems so I guess I'm doing something wrong, question is what is it?

    • BatchyX
      BatchyX over 11 years
      ifconfig is deprecated on Linux. Use ip addr (or just ip a) instead.
    • mdpc
      mdpc over 11 years
      @batchyx - would you please stop propogating this invalid information. I have seen this specific comment more than once and again, I must comment on how this is wrong.