Problem: SOCKADDRT: Invalid Argument

Solution: File /etc/sysconfig/network-scripts/ifcfg-eth0 (or ...ifcfg-ppp0, ...) has an error. Make sure the network and broadcast addresses are correct and that the network mask is correct. Network and broadcast addresses are computed from the netmask as follows: The netmask consists of four numbers each ranging from 0-255. Each number has an 8 bit binary representation. For example, the number 252 is represented as 11111100. The entire netmask, therefore, specifies a 32 bit binary number. These always have the property that all the 1's are on the left and 0's on the right. For example, the netmask represents

To get your network address, do a bitwise and of the netmask and your ip address. For example, if your ip address is, your netmask is computed as follows:
         10000001100010010000101000011011   (ip address:
         11111111111111111111110000000000   (netmask:
         10000001100010010000100000000000   (network:
To get your broadcast address, reverse all the bits of the netmask bitwise or the result with your ip address. For the above example,
         10000001100010010000101000011011   (ip address:
         00000000000000000000001111111111   (reverses netmask)
         10000001100010010000101111111111   (broadcast:
Also make sure you do ifdown eth0 (use whatever device you have in place of eth0, if necessary) before editing the file and do ifup eth0 (use whatever) after editing.