On this page
Configure Network on NetBSD
Operating System | 6.0.1 |
Website | NetBSD Website |
Last Update | 15/03/2013 |
Introduction
The network is an essential part of system configuration. I will cover some aspects of it here.
Configuration
Display Interfaces and Associated IPs
Here’s the command:
ifconfig
Static IPs
We can declare interfaces persistently:
[...]
# Add local overrides below
#
ifconfig_vr0="inet 192.168.0.254 netmask 255.255.255.0" # Wan
ifconfig_vr1="inet 192.168.1.254 netmask 255.255.255.0" # DMZ
[...]
You add an ifconfig entry with the interface name, followed by its parameters.
Gateway
It’s possible to set the gateway like this:
[...]
defaultroute="192.168.0.138"
[...]
Or alternatively:
192.168.0.138
Restart Network Services
/etc/rc.d/network restart
Last updated 15 Mar 2013, 22:32 CET.