Changing a network card


thany

Recommended Posts

Here's what I did:

  1. Added a secondary NIC
  2. Started the server
  3. Gave the new NIC an IP address I can access
  4. Went to that IP-address
  5. Switched the two IP addresses around so that the new NIC gets the IP address I want to access the server by.
  6. Reboot, just in case, and disconnected the old NIC

 

The result:

Absolutely no network access. The startup screen at the local console tells me the IP address the server listens on, which doesn't work. I login to figure out what the heck is going on in `ifconfig` and I discover that my new NIC is eth1. Maybe that's why.

 

So then, I remove the old NIC from the computer, since the new one appears to be working fine anyway, and start her up again. It's still on eth1. And the problem persists. Here's what came next: I changed the `NAME` in `/etc/udev/rules.d/70-persistent-net.rules` to eth0. The original eth0 was gone at this point anyway. And reboot for good measure.

 

Then the server came back to life. Well, almost. I found that the server can't access the internet. In the network setting (now in the web interface) everything appears to be fine. Back at the local console, I CAN ping other computers in the nerwork, and I CAN ping the gateway. I CANNOT ping anything beyond my house though. I suspected it's not picking up the DNS servers or something.

 

So I decided to delete config/network.cfg from the flash. And it came back alive again, but this time on DHCP. It was also able to access the internet properly, but I don't want a DHCP-assigned address. I want a static one. How hard can it be, right? So back to the network settings. Changed it from DHCP to Static, and filled out my desired IP address. All other settings were already filled in correctly.

 

I hit Apply.

 

I wait.

And wait.

It shouldn't take more than a second or two to change an IP address, should it?

Okay, a minute at most, right?

Five minutes?

 

Back to the local console. Reboot the darn thing then. That also take ridiculously long. After 10 minutes of trying to shutdown, it's still on whatever phase after unmounting /boot.

 

I'll try the reset button then. Let's see.

The server came back to life. It's probably not too happy about that, and it'll probably retaliate a few months from now. However, the IP address is correct, it's using my new NIC, and it can access the internet. Story time's over.

 

Now, why did that have to be so hard?

 

Link to comment
  • 5 months later...
On 1/10/2020 at 1:13 AM, johnnie.black said:

It's not, you just needed to change the new NIC to be eth0 on setting -> network settings -> interface rules, then reboot and at the same time chance cable to new NIC.

And exactly how do I do that when I can't have both cards in the server at the same time?

And also, why do I need to tell the OS how to do its internal workings? It should figure it out by itself.

Edited by thany
Link to comment
7 hours ago, thany said:

And also, why do I need to tell the OS how to do its internal workings? It should figure it out by itself.

 

On 1/9/2020 at 11:46 PM, thany said:

Added a secondary NIC

Because you added a second interface, you have to tell the system what to use, it can't guess your mind.

 

Link to comment

No I think you misunderstand. I didn't add a second card per se. I *replaced* the existing card. There was more than one NIC in the system only once, but the old one was replaced in the end. If there's a single NIC in the system, I shouldn't have to tell it anything, other than setting the IP-address and such.

Edited by thany
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.