How to install Realtek 8125 2.5G network adapter Drivers in Pfsense

By | 2024-06-27

系统版本:Pfsense 2.72 CE

网卡芯片:Realtek 8125BG

1、进入控制台,更新软件包:pkg update

[2.7.2-RELEASE][admin@pfSense.home.arpa]/root: pkg update
Updating pfSense-core repository catalogue...
Fetching meta.conf:   0%
Fetching packagesite.pkg:   0%
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
Fetching meta.conf:   0%
Fetching packagesite.pkg:   0%
pfSense repository is up to date.
All repositories are up to date.

2、安装网卡驱动

[2.7.2-RELEASE][admin@pfSense.home.arpa]/root: pkg search realtek-re-kmod
realtek-re-kmod-198.00_3       Kernel driver for Realtek PCIe Ethernet Controllers
[2.7.2-RELEASE][admin@pfSense.home.arpa]/root: pkg install realtek-re-kmod
Updating pfSense-core repository catalogue...
Fetching meta.conf:   0%
Fetching packagesite.pkg:   0%
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
Fetching meta.conf:   0%
Fetching packagesite.pkg:   0%
pfSense repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        realtek-re-kmod: 198.00_3 [pfSense]

Number of packages to be installed: 1

The process will require 1 MiB more space.
102 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching realtek-re-kmod-198.00_3.pkg: 100%  102 KiB 104.6kB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing realtek-re-kmod-198.00_3...
[1/1] Extracting realtek-re-kmod-198.00_3: 100%
=====
Message from realtek-re-kmod-198.00_3:

--
Add the following lines to your /boot/loader.conf
to override the built-in FreeBSD re(4) driver.

if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"

By default, the size of allocated mbufs is enough
to receive the largest Ethernet frame supported
by the card.  If your memory is highly fragmented,
trying to allocate contiguous pages (more than
4096 bytes) may result in driver hangs.
For this reason the value is tunable at boot time,
e.g. if you don't need Jumbo frames you can lower
the memory requirements and avoid this issue with:

hw.re.max_rx_mbuf_sz="2048"

3、编辑/boot/loader.conf,末尾添加两行

if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"

4、重启系统,kldstat查看状态,驱动已正确加载

[2.7.2-RELEASE][admin@pfSense.home.arpa]/root: kldstat
Id Refs Address                Size Name
 1   33 0xffffffff80200000  339ce08 kernel
 2    1 0xffffffff8359e000     76f8 cryptodev.ko
 3    1 0xffffffff835a6000   103db0 if_re.ko
 4    1 0xffffffff836aa000   5d7790 zfs.ko
 5    1 0xffffffff83c82000    1e2b0 opensolaris.ko
 6    1 0xffffffff847e5000     2220 cpuctl.ko
 7    1 0xffffffff847e8000     5ee0 ig4.ko
 8    1 0xffffffff847ee000     3240 ichsmb.ko
 9    1 0xffffffff847f2000     2178 smbus.ko

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注