How to rerun the network setup script

0 views
Skip to first unread message

Jerry

unread,
Aug 30, 2024, 8:18:34 AM8/30/24
to FreeBSD
I recently erased my /etc/rc.conf file. I restored most of it;
however, the IP4 and IP6 addresses and routing were lost. Can I rerun
the 'network' setup script like it did when I first installed FreeBSD?
I don't want to change any other settings on the PC.

Arthur Chance

unread,
Aug 30, 2024, 9:53:01 AM8/30/24
to Jerry, FreeBSD
Have you tried "bsdinstall netconfig"?

--
Although not designed for computation, PIO is quite likely Turing
complete, provided a long enough piece of tape can be found. It is
conjectured that it could run DOOM, given a sufficiently high clock
speed. — The Raspberry Pi Pico datasheet on its PIO capability.


Jerry

unread,
Aug 30, 2024, 3:06:32 PM8/30/24
to Arthur Chance, FreeBSD
I tried that, but I need help getting it to work. After answering a
few questions, a screen that is supposed to show the addresses
appears, but it is completely blank.

David Christensen

unread,
Aug 30, 2024, 6:06:16 PM8/30/24
to ques...@freebsd.org
On 8/30/24 12:06, Jerry wrote:
> On Fri, Aug 30, 2024 at 9:52 AM Arthur Chance wrote:
>> On 30/08/2024 11:18, Jerry wrote:
>>> I recently erased my /etc/rc.conf file. I restored most of it;
>>> however, the IP4 and IP6 addresses and routing were lost. Can I
>>> rerun the 'network' setup script like it did when I first
>>> installed FreeBSD? I don't want to change any other settings on
>>> the PC.
>>
>> Have you tried "bsdinstall netconfig"?
>>
>> -- Although not designed for computation, PIO is quite likely
>> Turing complete, provided a long enough piece of tape can be found.
>> It is conjectured that it could run DOOM, given a sufficiently high
>> clock speed. — The Raspberry Pi Pico datasheet on its PIO
>> capability.
>
> I tried that, but I need help getting it to work. After answering a
> few questions, a screen that is supposed to show the addresses
> appears, but it is completely blank.


FWIW here are the IPv4 lines from a rc.conf(5) created by the 13.3-R
installer choosing DHCP:

2024-08-30 15:01:46 dpchrist@vf2 ~
$ cat /etc/rc.conf | egrep 'hostname|ifconfig'
hostname="vf2.tracy.holgerdanske.com"
ifconfig_em0="DHCP"


And, a multi-homed host with static IPv4 created by hand:

2024-08-30 15:02:54 toor@f5 ~
# cat /etc/rc.conf | egrep '^(defaultrouter|hostname|ifconfig)' | grep
-v ipv6
defaultrouter="192.168.5.1"
hostname="f5.tracy.holgerdanske.com"
ifconfig_igb0="inet 192.168.5.15 netmask 255.255.255.0"
ifconfig_igb0_alias0="inet 192.168.5.23 netmask 255.255.255.255"
ifconfig_igb0_alias1="inet 192.168.5.24 netmask 255.255.255.255"


David

Reply all
Reply to author
Forward
0 new messages