FreeBSD ifconfig: Difference between revisions

From wikinotes
No edit summary
 
No edit summary
Line 1: Line 1:
FreeBSD uses <code>ifconfig</code> to manage network interfaces.
FreeBSD uses <code>ifconfig</code> to manage network interfaces.


= Dynamic =
= Basics =
<blockquote>
== Dynamic ==
manipulate interfaces within shell.
manipulate interfaces within shell.


Line 10: Line 12:
</source>
</source>


= Persistent =
== Persistent ==
define interfaces to setup at boot.
define interfaces to setup at boot.


Line 20: Line 22:
defaultrouter="192.168.1.1"        # your local nameserver
defaultrouter="192.168.1.1"        # your local nameserver
</source>
</source>
</blockquote><!-- Basics -->

Revision as of 03:13, 7 August 2021

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