Can't get IP by DHCP (Wired network)

Dmitry Bond imperator.bm at gmail.com
Mon Jul 9 19:23:04 UTC 2007


Hello, User.

You wrote:


> What ip do you get in windows..

> What ethx do you get in windows...

> note both:

> boot linux

> from the command line as sudo or root

> /sbin/ifconfig  eth<number from windows> <ipfrom windows>/some_class up
> example

> /sbin/ifconfig eth0 192.168.100.2/16 up

> HTH

> Me


The trick won't work in any case, because my provider gives the IP by
the MAC. It won't allow to take the same ip I worked on my desktop a
seconds ago but on another PC with different MAC :). So I can only
change my MAC on the notebook (bad, because I want them both to be in
the net) or get it by the DHCP (here is the problem though...).

But, nevertheless, I've done what you asked, the ifconfig after that
shows me the changed ip(87.237.115.100):

ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:16:36:4D:CF:3A  
          inet addr:87.237.115.100  Bcast:87.237.115.255  Mask:255.255.255.0
          inet6 addr: fe80::216:36ff:fe4d:cf3a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1858 errors:0 dropped:0 overruns:0 frame:0
          TX packets:206 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:119668 (116.8 KiB)  TX bytes:37466 (36.5 KiB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:95 errors:0 dropped:0 overruns:0 frame:0
          TX packets:95 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7300 (7.1 KiB)  TX bytes:7300 (7.1 KiB)

, but the network manager shows, that it uses eth0 now, but again all
0.0.0.0 IPs. Maybe I should reset some network manager settings? I
really need the dhcp thing working, because my ISP won't allow me just
to use the static IP , which i noted from my desktop PC without
setting the corresponding MAC...





More information about the ubuntu-users mailing list