Bsd connect wifi
FreeBsd linked and disconnect network
- linked default route and setup dns
- create route
1 | ifconfig <network interface> <self_ip> netmask <255.255.255.0> |
- delete route
1
route del <ip>
- setup default gateway
1
route add default <default_gateway>
- linked wifi
1
2
3
4
5
6
7use ifconfig to see if NetworkInterface is up
ifconfig <NetworkInterface> up
install net-tools first : apt install net-tools
wpa_passphrase [SSID_NAME] >> /etc/wpa_supplicant.conf
wpa_supplicant -B -D <drive> -i <NetworkInterface> -c /etc/wpa_supplicant.conf
//drive = nl80211
dhclient <NetworkInterface> - setup static inet
- at /etc/rc.conf setup:
1
2
3
4
5
6hostname="freebsd12"
ifconfig_em0="DHCP"
ifconfig_em0_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
- at /etc/rc.conf setup: