I have installed FreeBSD in various incarnations, but one of the problems I continuously encounter is the networking part, namely connecting to the network or internet. In DesktopBSD this is done automatically during install, so I am wondering whether there is a script that can be utilised that connecting to the network can be done for every FreeBSD installation.
Can you explain a bit more about what you mean because I have used various versions of FreeBSD and have never had a problem setting up the network (it just works after configurng it at install time).
When having a FreeBSD distribution installed, say PC-BSD, Frenzy or DragonflyBSD, and starting the local browser, it will respond with a not-connected error message. So when starting the networks menu, I can try DHCP through any of the NICs the system has detected, but no network will be detected. I can still do this manually by typing in the details of the network, but I do not think that is a user's job. Perhaps there is a better way, for instance the way some of the Linux distros do this?
Are you not using DHCP on your network? If not, you can assign your IP and netmask in /etc/rc.conf:
ifconfig_<ifname>="inet 192.168.1.100 netmask 255.255.255.0"
The whole network uses DHCP. The point is that some distributions connect automatically, but many others do not. I do not possess the technical expertise to connect computers to the network. And if this is not done automatically, this rules out trying many more BSD based distributions. Undoubtedly there is a better way.
If you're using DHCP, you had the option to set that up during installation (and that configuration would have persisted after installation). If not, you can enable it by adding the following line to your /etc/rc.conf:
And potentially running /etc/rc.d/netif restart
rc.conf already contains ifconfig_rl0="DHCP" and the RealTek interface was correctly detected. From the network module two other interfaces (an old one and a wifi one) are detected too, but no carrier.
The following happens regarding netif:
This is in the live version of DesktopBSD. Kubuntu and Puppy correctly detect and connect to the network on the machine without any configuration.
desktopbsd# ./netif restart
Stopping network: lo0 rl0 fwe0 plip0.
rl0: no link .............. giving up
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
media: Ethernet autoselect (none)
status: no carrier