# What are the Steps to Replace Network Card (NIC)?



## JLAIP (Aug 12, 2022)

What files do I need to modify when swapping NICs?

I have an intermittent no-name 32-bit PCI NIC card in a 32-bit PC, so I replaced the card with a new old stock Netgear 32-bit PCI NIC.
ifconfig identifed the old NIC as "vr0", but the new NIC is identified as "sis0".

After changing the "vr0" reference in /etc/rc.conf to "sis0" and rebooting, ifconfig reports:
_sis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=8<VLAN_MTU>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active_

ifconfig also indicates the correct _inet_, _netmask_ and _broadcast_ IPs.

I'm able to ping yahoo.com, but I'm unable to access any of the data on the server via the web or ssh into the PC since swapping the NICs.
I changed all of the "vr0" references in /etc/pf.conf and ipf.rules to "sis0" and ran:

```
ipf -Fa -f /etc/ipf.rules
```

...but that didn't help. So I'm guessing there's another file(s) that contains the original NIC card's "vr0"?

I've searched the forums as well as google, but can't find the answer.

p.s. After replacing the original NIC and replacing the updated config files with the originals, all's well....except for that intermittent NIC that I still want to replace.
p.p.s. Is there a way to force BSD to recognize or identify the new Netgear NIC as "vr0" rather than "sis0"?


----------



## zirias@ (Aug 12, 2022)

JLAIP said:


> I changed all of the "vr0" references in /etc/pf.conf and ipf.rules


So you are running two different firewalls at the same time? This is always begging for trouble, decide for one and use it.


----------



## JLAIP (Aug 12, 2022)

zirias@ said:


> So you are running two different firewalls at the same time? This is always begging for trouble, decide for one and use it.


pf was added ONLY because it offers a relative quick/easy way drop and/or block a "troublesome" IP address in real-time:

```
pfctl -t badhosts -T add <ip-address>
```

I couldn't find anything similar with ipf.


----------



## JLAIP (Aug 12, 2022)

UPDATE:

I got the new NIC installed and ALMOST everything's back to normal.
Although I CAN ping yahoo and google, I CANNOT ping our own domain (via name or static IP), localhost (127.0.0.1) or our other server.
The internal pings result in:
PING 127.0.0.1: 56 bytes (it just sits like that until I stop it)

Also, ntpq -pn returns:

```
localhost.domain.com: timed out, nothing received
***Request timed out
```

Everything else, ssh, http, mail, etc., is working fine.

We have two servers—one email and one web.
The email server's got two NICs—one NIC facing out to the internet and the other NIC facing in to the web server (which has a single NIC).
I only replaced the outer-facing NIC in the email server and, then, changed all of the vr0 entries in /etc/ipf.rules, /etc/pf.conf and ipnat.rules.
If I disable ipf in /etc/rc.conf, everything then works. So I'm pretty certain the problem lies within one of those firewall config files, but I've been all through them and can't find the problem.


----------



## JLAIP (Aug 12, 2022)

UPDATE 2:
I _think_ I may've fixed the firewall. I replaced the existing /etc/ipf.rules with a backup and that seems to have remedied whatever errant code was causing the  remaining problems in the original. Because the NIC swap was the result of an intermittent connection (my ISP says it's not their modem or connection, so I just needed to eliminate all the potential variables), I want to give it a few days before I call this a closed case.

zirias: Thank you for your input! Much obliged.


----------

