This episode takes DragonFlyBSD networking to a production level: dynamic routing with bird, NAT64, tunneling, plus a reliable bridge and VLAN setup for large-scale environments.

In episode 15 you hardened the system and set up monitoring. Now we move up to more complex network scenarios: when a single server becomes a router in the middle of a large network, with many subnets, dynamic routing, and connections between different networks. This is the real playground of network engineers.
In episode 10 you learned static routing (route add default). Episode 16 completes it: dynamic routing with BGP/OSPF protocols via bird, NAT64 for IPv6-IPv4 transition, tunneling to connect separate networks, and the bridge-VLAN combination for production infrastructure.
bird is a routing daemon that supports the BGP, OSPF, and RIP protocols. With bird, routes aren't written manually — networks talk to each other and exchange route information automatically. It's the standard for ISPs and data centers.
pkg install bird2bird's configuration lives in /etc/bird.conf. A basic example for a BGP session:
router id 203.0.113.1;
protocol device { }
protocol kernel {
import all;
export all;
}
protocol bgp uplink {
local as 64500;
neighbor 203.0.113.254 as 64501;
import all;
export all;
}Reading it: this server has AS 64500, has a BGP neighbor at 203.0.113.254, and exchanges all routes through the kernel session. When BGP comes up, the routing table fills automatically from the uplink.
service bird start
birdc show protocols
birdc show routebirdc is bird's control console: show protocols displays session status, show route displays known routes.
Warning
BGP is a sharp tool: one configuration mistake could route other people's traffic the wrong way. Test in a lab (for example with Bird in namespaces or a simulator) before touching real peering, and always apply filters — never export all to an untrusted peer without filtering.
NAT64 translates traffic between IPv6 and IPv4 — a transition solution when an IPv6-only network must communicate with the IPv4 world. DragonFlyBSD can configure NAT64 through its networking and firewall tooling. The concept:
64:ff9b::/96).NAT64 (along with DNS64) is the standard for giving IPv4 access to IPv6-only hosts — relevant for mobile and modern ISPs.
Tunneling wraps the traffic of one network inside another. Two common forms:
| Type | Function | Example |
|---|---|---|
| GRE | Generic point-to-point tunnel | Connecting two sites |
| IPsec | Encrypted tunnel | Site-to-site VPN |
| gif | IPv6-over-IPv4 tunnel | IPv6 transition |
ifconfig gif0 create
ifconfig gif0 tunnel 192.168.1.10 198.51.100.5
ifconfig gif0 inet6 2001:db8::1/64gif0 is wrapped from the IPv4 address 192.168.1.10 to 198.51.100.5, and inside it carries an IPv6 network. Once up, both tunnel ends see a virtual network between them.
For production, combine episode 10's concepts into a single architecture:
ifconfig lagg0 create laggproto failover laggport em0 laggport em1
ifconfig vlan10 create vlan 10 vlandev lagg0
ifconfig vlan20 create vlan 20 vlandev lagg0
ifconfig bridge0 create add vlan10 add vlan20 upThis chain makes VLAN 10 and 20 segments available across all bridge ports — the basic pattern for a hypervisor host serving many tenants.
To survive reboots, all of this is written into /etc/rc.conf:
cloned_interfaces="lagg0 vlan10 vlan20 bridge0"
ifconfig_lagg0="laggproto failover laggport em0 laggport em1"
ifconfig_vlan10="vlan 10 vlandev lagg0 inet 192.168.10.1/24"
ifconfig_vlan20="vlan 20 vlandev lagg0 inet 192.168.20.1/24"
ifconfig_bridge0="add vlan10 add vlan20 up"In this episode 16 you mastered DragonFlyBSD's advanced networking: dynamic routing with bird and BGP, NAT64 for IPv6-IPv4 transition, tunneling with gif, plus a reliable production bridge and VLAN setup with lagg as the foundation.
Key takeaways:
/etc/bird.conf, control with birdc.export all without control.In the next episode, episode 17, we enter the kernel core: LWKT, scheduler & performance. You'll understand Lightweight Kernel Threading and the per-process scheduler, lock CPU affinity with cpuset, tune sysctl like kern.sched and vfs.hammer2, and monitor with systat, top, and vmstat.