13

I left Ubuntu and came back after a while so I don't remember much. Now I'm trying to get my IP address. All I'm getting from running ifconfig is

eth0      Link encap:Ethernet  HWaddr 3c:97:0e:11:22:0d  
          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
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Memory:f2500000-f2520000 

(BTW, I don't really understand what UP BROADCAST MULTICAST means.)

 $ sudo ifdown eth0 
 ifdown: interface eth0 not configured 

Then

$ sudo ifup eth0
Ignoring unknown interface eth0=eth0

And finally 2:

$ ip addr show eth0
eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN   
group default qlen 1000 link/ether 3c:97:0e:11:22:0d brd ff:ff:ff:ff:ff:ff
bain
  • 11,260
MasterPorky
  • 131
  • 1
  • 1
  • 3

5 Answers5

6

A remote possibility for this issue can be a misconfigured Ethernet Interface.

Use ethtool eth0 command to get the existing configuration.
In some cases, you might find

# ethtool eth0
Settings for eth0:
    ...
    Speed: Unknown!
    Duplex: Unknown! (255)
    ...

If so, set the speed and duplex using:

ethtool -s eth0 speed 100 duplex full

For modern networks, this config should work.
Once the speed and duplex are set, do dhclient eth0 if you still don't get an IP.


Note: The above setup will reset on reboot. So, if the above solution solves your problem, add following lines to /etc/rc.local:

ethtool -s eth0 speed 100 duplex full
dhclient eth0
3

Is this problem on a virtual machine? If so in the Advanced Network settings, on the Hypervisor see if the "cable connected" check box is ticked. It might just be that the VM isn't connected to the network

  • Your answer is priceless! Indeed, this is often the case with VMs. It is also possible that someone mistakes one interface for another (e.g. enp0s3 for enp0s8 on a VBox VM). – Arthur Khazbulatov Mar 31 '23 at 00:13
0

I have solved this problem by:

  1. Copying ifcfg file which currently run
  2. Putting the correct ip number as you want with its subnet on the new one. For ex: ifcfg-eth0 to ifcfg-eth1.
  3. Restarting the desktop.

It worked correctly for me.

0

Try :

ifdown eth0
ifup eth0
ip addr show eth0

The meanings of UP, BROADCAST, and MULTICAST

  • UP - device is functioning
  • BROADCAST - device can send traffic to all hosts on the link
  • MULTICAST - device can perform and receive multicast packets

More about mulicast visit Site

Chai T. Rex
  • 5,193
nux
  • 38,017
  • 35
  • 118
  • 131
  • 1
    I tried the commands and none of them worked out so far. sudo ifdown eth0 ifdown: interface eth0 not configured Then sudo ifup eth0 Ignoring unknown interface eth0=eth0 And finally 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 3c:97:0e:11:22:0d brd ff:ff:ff:ff:ff:ff – MasterPorky Jul 15 '14 at 04:45
0

You might just try setting your IP address to something on your subnet. Assuming you're on a 192.168.1.255 network, try this:

ifconfig address 192.168.1.50 netmask 255.255.255.0 gateway 192.168.1.1

Replace 192.168.1.50 with the IP you want to get, and replace 192.168.1.1 with the IP address of your router/gateway.

I have had a similar problem, and this solved it for me.

Daniel
  • 3,446