How do i know whether my NIC works or not?
Christian Schult
cschult at gmx.de
Wed Dec 30 12:01:47 UTC 2009
Hello arshad,
arshad wrote:
> On Wed, 2009-12-30 at 09:06 +0100, Christian Schult wrote:
>
> >
> > The two lines you showed with cat /etc/network/interfaces and i told you
> > to add are not the same. Look again please.
> >
> >
> > Christian
> >
>
> My bad, its way to different.
> Thank you Christian for pointing out that.
> here is the new output (i still cant connect to router page)
>
> $ sudo ifdown eth0
> ifdown: interface eth0 not configured
> arshad at arshad-desktop:~$ sudo ifup eth0
> Internet Systems Consortium DHCP Client V3.1.1
> Copyright 2004-2008 Internet Systems Consortium.
> All rights reserved.
> For info, please visit http://www.isc.org/sw/dhcp/
>
> Listening on LPF/eth0/00:e0:4d:af:6e:4f
> Sending on LPF/eth0/00:e0:4d:af:6e:4f
> Sending on Socket/fallback
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 2
> No DHCPOFFERS received.
> No working leases in persistent database - sleeping.
Well, no dhcp server answered. Maybe because dhcp is turned off in your
router config. We'll give your eth0 interface a fixed setup without dhcp.
Edit /etc/networking/interfaces as root.
Comment out the lines belonging to eth0 (those lines i gave you in my
previous mail).
Take care that empty lines segregate each interface setup from the others.
Add this to /etc/networking/interfaces
iface eth0 inet static
address 192.168.1.42
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
Your /etc/network/interfaces now looks like this:
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
#auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.42
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
After you saved that file, again do
$ sudo ifdown eth0
$ sudo ifup eth0
Can you point your webbrowser to http://192.168.1.1 now?
Can you ping your router:
$ ping 192.168.1.1
Can you access internet now? Send us the output of /sbin/ifconfig again.
Christian
More information about the ubuntu-users
mailing list