LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Does a new NIC need to be manually configured in Ubuntu server? (https://www.linuxquestions.org/questions/linux-server-73/does-a-new-nic-need-to-be-manually-configured-in-ubuntu-server-643580/)

lumix 05-20-2008 02:03 PM

Does a new NIC need to be manually configured in Ubuntu server?
 
Running Ubuntu server 8.04:

I had to replace the network card but the server doesn't automatically recognize it. Is this a design feature? For ha-ha's, I started the Ubuntu CD in the same setup and the setup did recognize the new NIC. So how do I go about installing the driver manually? The card is old and the driver is no longer available, but clearly the Ubuntu CD has something that works, since I'm pinging it now, only a few steps into an installation process. Again, I only started the installation to test out the functionality of the card (it works, I now know), but I DON'T want to actually reinstall Ubuntu server.

Any thoughts?

jay73 05-20-2008 02:25 PM

I guess you should try to find out which module is required for that NIC and then insert it manually (sudo modprobe). NIC driver issues appear to be widespread with 2.6.24 kernels, it's not just Ubuntu. I have recently had to patch and recompile one of those drivers on Fedora 8 although it worked perfectly fine until I did a kernel upgrade.

Russianspi 05-20-2008 05:01 PM

May be a different problem...
 
Hmmm. Are you sure that it is actually a driver issue? I'd be willing to bet that if you ran
Quote:

ifconfig -a
your new NIC shows up, albeit without an ip address. The trouble may well be, that on Ubuntu server, new NIC's, although automatically recognized, don't activate by default. Assuming that ifconfig shows your card, look at
Code:

/etc/network/interfaces
and see if your new card is there. If not, add something like:
Code:

auto eth1
iface eth1 inet dhcp

to use dhcp, or something like
Code:

auto eth1
iface eth1 inet static
address 192.168.1.50
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

to use a static IP address.

When you have finished, run
Code:

/etc/init.d/networking restart
or just restart the server. That might well fix your problem. Good luck!

jlpeifer 11-27-2010 03:24 PM

Very helpful Russianspi!!! Thanks.

fro1269 03-09-2011 06:52 PM

I have encountered this issue whenever I clone a VDI file in virtualbox and then add the vdi file to a vm on a different machine. It seems everytime I clone the VDI file, I need to go into /etc/network/interfaces and change the increment on eth* up one. Is there a way that I can reset this so I can go back to using eth0?

chrismyers 07-04-2011 04:42 AM

This is a common problem also when a Vmware machine is moved to another server.

It is beacause the new card has a different MAC address.

Unlike Ubuntu Desktop, the server version is desgned NOT to make an assumption of how the card is configured - just in case it gets it wrong & places vulnerable data outside a firewall on the Internet.

You can enable the card easliy by deleting a file:

sudo rm /etc/udev/rules.d/70-persistent-net.rules

Then reboot.

This file is recreated with the new card MAC address upon reboot.

Then check your settings.

Cheers.

cycocool 07-24-2011 11:35 AM

Quote:

Originally Posted by chrismyers (Post 4404185)
This is a common problem also when a Vmware machine is moved to another server.

It is beacause the new card has a different MAC address.

Unlike Ubuntu Desktop, the server version is desgned NOT to make an assumption of how the card is configured - just in case it gets it wrong & places vulnerable data outside a firewall on the Internet.

You can enable the card easliy by deleting a file:

sudo rm /etc/udev/rules.d/70-persistent-net.rules

Then reboot.

This file is recreated with the new card MAC address upon reboot.

Then check your settings.

Cheers.

have a similar issue and when i did the above, the lan port was enabled but the eth0 still isnt detected when i check with 'ifconfig'. any ideas?

Closetheloop 11-14-2011 01:16 PM

Delete /etc/udev/rules.d/70-persistent-net.rules
 
@Chris Myers

Thanks a bunch for your advice Chris. Dell changed the motherboard in my Ubuntu 10.04 server today and that meant they installed two new NICS as well. The new setup did not get recognised on the network but luckily your technique:

1) deleting a file: sudo rm /etc/udev/rules.d/70-persistent-net.rules
2) reboot

fixed a big problem for me :)

Thanks

rdingram 12-19-2011 02:30 PM

Just wanted to thank chrismyers for that tip. I had to replace a NIC on a server here in the office that runs 10.04. Deleted the rules file, shutdown, pull old nic, insert new nic, power up, everything works like nothing ever changed. Whole process took less than 5 minutes.

Gracias my friend.


All times are GMT -5. The time now is 12:01 AM.