OpenBSD acts as a gateway for my Internet connection at home. The interface fxp0 is the external interface to the world. fxp1 is my internal interface to my local lan. Your interface names for your network cards could be different. Look at the startup screen (command: dmesg) to find out what your network card interface names are. The fxp0 inteface is hooked to my cable modem. fxp0 makes a dhcp request (command: dhclient fxp0) and recieves a lease (ip and other info) from my cable provider.
The interfaces need to be setup in a file in the /etc directory. The first part of the file is just called "hostname". The extention of the file is your interface name. For example I said my external interface was called fxp0 so my file in /etc/ for my interface would be called hostname.fxp0. Since this interface is connected to my isp I need to make a dhcp request to get an ip. The file /etc/hostname.fxp0 will be configured to do this with just one line which will be "dhcp NONE NONE NONE". The internal interface has a static ip so it's configured differently. The name of the this file is hostname.fxp1 and it also goes in the /etc/ directory. The line in this file looks like this "inet 192.168.0.1 255.255.255.0 192.168.0.255". When you reboot both interfaces will configure themselves with these settings.
The interface fxp1 as I said above is the internal interface to my local lan. It has a static private IP (192.168.0.1) The dhcpd server is bound to it and it gives leases to my internal workstations. Bind DNS is running a caching dns server on this interface. The caching DNS server will do DNS lookups for all of the workstations on the local lan. The dns server is set to the internal interface and the primary route is set to the same internal interface.
I also disable all services except PF, Quotas, DHCPD (internal interface) and SSH in /etc/rc.conf. Also, set forwarding to 1 (net.inet.ip.forwarding=1) in /etc/sysctl.conf because the box will acting as a router using NAT. NAT, queuing, and redirect rules are loaded from the pf.conf file.
To see configuration files for dhcp, pf, dns, and dhclient I mentioned above see the specific sections on pantz.org that refer to each. Each section has a post on how to setup each of them. Or use the pantz.org search box to find them. I won't link to them as the site structure may change in the future.