[SOLVED] How to replace a NIC in Buster?

Getting your soundcard to work, using Debian on non-i386 hardware, etc

[SOLVED] How to replace a NIC in Buster?

Postby GabrieleMax » 2018-03-06 07:30

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.
GabrieleMax
 
Posts: 51
Joined: 2016-09-07 20:24
Location: Senigallia

Re: How to replace a NIC in Buster?

Postby bw123 » 2018-03-06 10:47

Replace all references to the old mac address and interface name with the new ones?
User avatar
bw123
 
Posts: 3084
Joined: 2011-05-09 06:02
Location: TN_USA

Re: How to replace a NIC in Buster?

Postby GabrieleMax » 2018-03-06 11:11

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...
GabrieleMax
 
Posts: 51
Joined: 2016-09-07 20:24
Location: Senigallia

Re: How to replace a NIC in Buster?

Postby dcihon » 2018-03-06 11:21

I see there is a package called macchanger out there but I have never used it.
dcihon
 
Posts: 212
Joined: 2012-09-23 16:18

Re: How to replace a NIC in Buster?

Postby bw123 » 2018-03-06 11:49

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?
User avatar
bw123
 
Posts: 3084
Joined: 2011-05-09 06:02
Location: TN_USA

Re: How to replace a NIC in Buster?

Postby p.H » 2018-03-06 11:52

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/Software/systemd/PredictableNetworkInterfaceNames/ 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.
p.H
 
Posts: 398
Joined: 2017-09-17 07:12

Re: How to replace a NIC in Buster?

Postby GabrieleMax » 2018-03-06 11:57

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: 51
Joined: 2016-09-07 20:24
Location: Senigallia

Re: How to replace a NIC in Buster?

Postby GabrieleMax » 2018-03-06 12:02

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".
GabrieleMax
 
Posts: 51
Joined: 2016-09-07 20:24
Location: Senigallia

Re: How to replace a NIC in Buster?

Postby p.H » 2018-03-06 12:11

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" ?
p.H
 
Posts: 398
Joined: 2017-09-17 07:12

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

Postby GabrieleMax » 2018-03-06 12:22

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
GabrieleMax
 
Posts: 51
Joined: 2016-09-07 20:24
Location: Senigallia

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

Postby dcihon » 2018-03-07 02:22

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/mac-address-linux
mine was in /sys/class/net/wlp3s0
dcihon
 
Posts: 212
Joined: 2012-09-23 16:18

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

Postby p.H » 2018-03-07 13:10

Macchanger cannot work if the interface is not already present. I do not see how "ip a" could have not shown an existing interface.
p.H
 
Posts: 398
Joined: 2017-09-17 07:12

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

Postby GabrieleMax » 2018-03-10 12:05

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.
GabrieleMax
 
Posts: 51
Joined: 2016-09-07 20:24
Location: Senigallia


Return to Hardware

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable