FreeBSD ifconfig

From wikinotes
Revision as of 03:13, 7 August 2021 by Will (talk | contribs)

FreeBSD uses ifconfig to manage network interfaces.

Basics

Dynamic

manipulate interfaces within shell.

# create/destroy a network interface of type 'tun'
ifconfig tun  create up
ifconfig tun0 destroy

Persistent

define interfaces to setup at boot.

# /etc/rc.conf

cloned_interfaces="bridge0 brige1"  # space separated virtual interfaces to create
ifconfig_bridge0="inet 10.0.1.1/8"  # assign ip address to bridge0
defaultrouter="192.168.1.1"         # your local nameserver