Online Promoters™ :: Web Development made simple

RTNETLINK answers: Invalid argument

While setting up the network in a linux environment you may encounter this error: RTNETLINK answers: Invalid argument
First check your /etc/sysconfig/network-scripts/ifcfg-ethX script ...
For more linux networking commands check this post.
If you use static IP addressing you might want to check out the following commands:
- check out the network adapters:
[root@linux hack]# /sbin/ifconfig
- Use Linux 'netstat' command to display or view kernel IP routing table:
[root@linux hack]# netstat -r
- The route add command below show the example to add network and host to the routing table.

[root@linux hack]# route add -net netmask gw eth0
[root@linux hack]# route add -host netmask gw eth0

- Adding a default route by using route command.

[root@linux hack]# route add default gw eth0

If you use dhcp (dhcpclient) and encounter the error in discussion then you might want to check your dhcpserver configuration and also the ip class(subnet) allocation. If you have not properly configured the dhcp server so that it serves the right broadcast address and gateway you will encounter the error.
Here is an IP calculator that is very helpful ...

some info from: