Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] How to replace a NIC in Buster?

Need help with peripherals or devices?
Post Reply
Message
Author
GabrieleMax
Posts: 126
Joined: 2016-09-07 20:24
Location: Senigallia (AN) - Italy
Has thanked: 4 times
Been thanked: 1 time
Contact:

[SOLVED] How to replace a NIC in Buster?

#1 Post by GabrieleMax »

I need to remove and replace a pci nic with a new one on my Debian Buster, I found on the net old documents like https://vk5tu.livejournal.com/38009.html but on Buster there isn't /etc/udev/rules.d/70-persistent-net.rules

How can I do it in a safe mode?
Last edited by GabrieleMax on 2018-03-06 12:20, edited 1 time in total.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: How to replace a NIC in Buster?

#2 Post by bw123 »

Replace all references to the old mac address and interface name with the new ones?
resigned by AI ChatGPT

GabrieleMax
Posts: 126
Joined: 2016-09-07 20:24
Location: Senigallia (AN) - Italy
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: How to replace a NIC in Buster?

#3 Post by GabrieleMax »

bw123 wrote:Replace all references to the old mac address and interface name with the new ones?
Thank you very much for your quick reply! :)

I replaced a NetMaster SG32 Atlantis V. 1.6 on the same pci slot with another NetMaster SG32 Atlantis V. 1.7, lspci said it's a Realtek 8069.

I don't understand where I should replace old mac address, on the web I read something about old Debian versions but on Buster I don't know what I should do because I can't find the right files...

dcihon
Posts: 279
Joined: 2012-09-23 16:18
Been thanked: 3 times

Re: How to replace a NIC in Buster?

#4 Post by dcihon »

I see there is a package called macchanger out there but I have never used it.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: How to replace a NIC in Buster?

#5 Post by bw123 »

GabrieleMax wrote: I don't understand where I should replace old mac address, on the web I read something about old Debian versions but on Buster I don't know what I should do because I can't find the right files...
Since there are different ways of configuring a network, then you would be the one to know how it is setup. I don't know if there would be any mac issues unless you set it up that way. Interface name is used in a lot of different ways by a lot of apps, so again, you would be the one to know.

Why don't you just tell people what isn't working?
resigned by AI ChatGPT

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: How to replace a NIC in Buster?

#6 Post by p.H »

Since Debian Stretch, udev uses so-called "predictable" network interface names by default and does not need to create and use /etc/udev/rules.d/70-persistent-net.rules any more (but it still uses it if it exists).

See https://www.freedesktop.org/wiki/Softwa ... faceNames/ for reference.

Most often, the predictable naming scheme is based on the device PCI bus and slot numbers, e.g. enp1s5 means the ethernet device on PCI bus 1, slot 5. So, if you replace the card by another card in the same PCI slot, chances are the new interface gets the same name.
Last edited by p.H on 2018-03-11 08:29, edited 2 times in total.

GabrieleMax
Posts: 126
Joined: 2016-09-07 20:24
Location: Senigallia (AN) - Italy
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: How to replace a NIC in Buster?

#7 Post by GabrieleMax »

dcihon wrote:I see there is a package called macchanger out there but I have never used it.
I should download from another device this package or I could replace the "old" nic to do it directly from this pc!

I can't see the new macaddress of the new nic because by "lspci" you don't have mac address and by "ip a" the new nic is hidden...

Do you think the problem is "just" the different mac address?

GabrieleMax
Posts: 126
Joined: 2016-09-07 20:24
Location: Senigallia (AN) - Italy
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: How to replace a NIC in Buster?

#8 Post by GabrieleMax »

bw123 wrote: Why don't you just tell people what isn't working?
Thanks for your reply! The new nic is hidden and the command "ip a" doesn't show it!

I need just to replace an old nic with a new one, I don't understand why the new nic is showed by "lspci" but it can't be showed by "ip a".

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: How to replace a NIC in Buster?

#9 Post by p.H »

Indeed this is weird. Maybe you'll find some clues in the kernel logs with dmesg.
Also, can you post the line displayed by "lspci -nn" ?

GabrieleMax
Posts: 126
Joined: 2016-09-07 20:24
Location: Senigallia (AN) - Italy
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: [SOLVED] How to replace a NIC in Buster?

#10 Post by GabrieleMax »

I used the package macchanger, I set it in automated mode and my new nic is now up!

I'd like to know where macchanger changes mac address! :D

dcihon
Posts: 279
Joined: 2012-09-23 16:18
Been thanked: 3 times

Re: [SOLVED] How to replace a NIC in Buster?

#11 Post by dcihon »

I found this article that I followed to show me where the MAC address of my network was stored:
https://www.linux.com/forums/networking ... ress-linux
mine was in /sys/class/net/wlp3s0

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [SOLVED] How to replace a NIC in Buster?

#12 Post by p.H »

Macchanger cannot work if the interface is not already present. I do not see how "ip a" could have not shown an existing interface.

GabrieleMax
Posts: 126
Joined: 2016-09-07 20:24
Location: Senigallia (AN) - Italy
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: [SOLVED] How to replace a NIC in Buster?

#13 Post by GabrieleMax »

p.H wrote:Macchanger cannot work if the interface is not already present. I do not see how "ip a" could have not shown an existing interface.
I had a nic but it was in v.1.6, I replaced it with another one (same brand/model) but v.1.7 but before to do it I loaded Macchanger.

Post Reply