Here are the necessary changes for `.../conf/MACHINE' in order to incorporate the various networking-facilities into your kernel:
option INET # Basic networking support - mandatory pseudo-device loop 1 # network loopback - mandatory
pseudo-device sl 1 # Serial Line IP (SLIP)
pseudo-device ppp 1 # Point-to-Point-Protocol (PPP)
le0 at zbus0 # A2065, Ameristar and ASDG (Lance) ethernet. ed0 at zbus0 # Hydra (dp8390) ethernet es0 at zbus0 # A4066 (SMC 91C90) ethernet qn0 at zbus0 # Quicknet ethernet ae0 at zbus0 # Ariadne ethernet
bah0 at zbus0 # C= arcnet
mfc0 at zbus0 # MultiFaceCard I/O board mfcs0 at mfc0 unit 0 # MFC serial mfcs1 at mfc0 unit 1 # MFC serial
options NFSSERVER # Network File System server side code options NFSCLIENT # Network File System client side code
options GATEWAY # Packet forwardingPlease note that you can switch this on/off on a running system with
sysctl -w net.inet.ip.forwarding=1/0
.
options DIRECTED_BROADCAST # Broadcast across subnets
options MROUTING # Multicast routing
options NS # XNS options ISO,TPIP # OSI options EON # OSI tunneling over IP options CCITT,LLC,HDLC # X.25
options "TCP_COMPAT_42" # Use 4.2 BSD style TCP
tunX
) from a device (/dev/tunX
), and to route data
written to the same device as if it came from that networking
device. With this tunneling mechanism, one can e.g. implement
dial-on-demand on for SLIP/PPP (NetBSD V1.2's pppd does DOD without
hacking the tunnel-device), etc. The size of the packets read
from/written to the /dev
ice is the same as given to
ifconfig
by the mtu
value.
To enable the tunneling mechanism, add the following line:
pseudo-device tun 1 # network tunnel line discipline
tcpdump
and rarpd
. The packets are
intercepted using the Berkeley Packet Filter interface:
pseudo-device bpfilter 4 # berkeley packet filters
Most of these options are already included in the GENERIC kernel. They are listed here rather as an hint for those who want to known what to exclude from a kernel. Leaving out all the networking stuff should save you about 300-500k of memory, but please note that e.g. X needs TCP/IP networking facilities.