The first thing to do is an
ifconfig -a to see if the network interfaces are properly configured. Correct by editing
/etc/ifconfig.interface or the corresponding “
ifconfig_interface” variable in
rc.conf(5) (where
interface is the interface name, e.g., “le0”) and then using
ifconfig(8) to manually configure it if you do not wish to reboot.
Alternatively, you can configure interfaces automatically via DHCP with
dhclient(8) if you have a DHCP server running somewhere on your network. To get
dhclient(8) to start automatically on boot, you will need to have this line in
/etc/rc.conf:
dhclient=YES
See
dhclient(8) and
dhclient.conf(5) for more information on setting up a DHCP client.
You can add new “virtual interfaces” by adding the required entries to
/etc/ifconfig.interface. Read the
ifconfig.if(5) man page for more information on the format of
/etc/ifconfig.interface files. The loopback interface will look something like:
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 32972
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
an Ethernet interface something like:
le0: flags=9863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST>
inet 192.168.4.52 netmask 0xffffff00 broadcast 192.168.4.255
inet6 fe80::5ef0:f0f0%le0 prefixlen 64 scopeid 0x1
and a PPP interface something like:
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST>
inet 203.3.131.108 --> 198.181.0.253 netmask 0xffff0000
See
mrouted(8) for instructions on configuring multicast routing.