Ifconfig does not show my IP [closed]

When i'm putting the code on: ifconfig

ifconfig results in a terminal shows:

eth0 Link encap:Ethernet HWaddr: f8:a9:63:64:3f:1c 
UP BROADCAST MULTICAST MTU:1500 Metric:1 
RX packets: 0 errors:0 dropped: 0 overruns: 0 frame: 0 
TX packets: 0 errors:0 dropped: 0 overruns: 0 carrier: 0 
colisions: 0 txqueuelen:1000 
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 

Does not show my Itnet addr, bcast and mask!

What's that supposed to mean?


Solution 1:

The interface eth0 is up, so the underlying device is found. There no IP address associated to this interface.

Assign an ip address manually:

$ sudo ifconfig eth0 w.x.y.z

Or contact the DHCP server, if it exists, and let it provides an ip address for the interface:

$ sudo dhclient -v eth0

If something goes wrong, dhclient will print error messages. They should be used to troubleshoot.

----

If the system just booted, then there could be a missing configuration or a mistake in interfaces configuration.

In order to fix issues of interfaces setting at boot or If you would like to make the settings persistent over the reboot:

  • man interfaces
  • edit /etc/network/interfaces file