While your driver names and device numbers will vary, if you have two identical network cards you may have difficulty determining which physical card has which interface name. My test computer has two identical network cards. These particular cards use the “fxp” driver and are numbered 0 and 1. There is no way to look at the hardware and identify which is which. If you are installing over the network, you must configure the card that is attached into the network! Trying to install any software over the network is extraordinarily frustrating when you aren’t plugged in. It is very difficult to tell which card it is from the information presented within the installer or even on the command line.
This is one place where a shell escape comes in very handy. You can escape to a command shell with CONTROL -C, or run a single shell command by putting an exclamation point in front of it. The “ifconfig -a” command will tell you which network card is hooked up to the network. (We discuss ifconfig at some length later but for right now just run the command as a single shell command. Network interfaces that are not plugged in or that have failed for some other reason will have a “media” line that says “no carrier,” while cards that have plugged in and are talking to the network will have a “media” line that says how they are connected.
!ifconfig -a
lo0: flags=8008<LOOPBACK,MULTICAST> mtu 33224
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:02:b3:63:e4:1d
media: Ethernet autoselect (100baseTX full-duplex)
status: active 1
fxp1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:02:b3:63:e3:ec
media: Ethernet autoselect (none)
status: no carrier 2
The fxp0 card is connected to the network at 100 megabits full duplex and is active, while the fxp1 card is not connected and hence has “no carrier.” You want to configure the fxp0 card, so enter “fxp0.”
IP address for fxp0 (or 'dhcp')? 192.168.1.250
We have an IP address for this system, but entering “dhcp” will make the system get IP address and domain information from the DHCP server.
Symbolic (host) name? [openbsdtest]
We want to use the same host name, so hit ENTER here.
If you have a netmask other than 255.255.255.0, enter it here. Otherwise, hit ENTER.
The default media for fxp0 is
media: Ethernet autoselect (100baseTX full-duplex)
Do you want to change the default media? [n]
Media options tell a network card how to connect to the network. In this case, the card seems to have picked up the network connection automatically. If you have an older network card, this may not work so seamlessly; you may need to tell your card to use the 10baseT connector instead of the BNC attachment, for example, or to use full-duplex instead of half-duplex. You’ll have to look at the OpenBSD manual page for your card. You might think this would be difficult to do before you have OpenBSD installed, but don’t forget that the manual pages are available on the OpenBSD website.
You can repeat the process for the other network card or just enter “done” to tell the installer you have finished configuring network cards. The installer will then ask you for the default route on your network and the IP address of your primary nameserver.
Enter IP address of default route: [none] 192.168.1.1
Enter IP address of primary nameserver: [none] 192.168.1.5
Would you like to use the nameserver now? [y]
The next question might seem curious — if you have your network configured, why would you need to do more configuration?
Do you want to do more, manual, network configuration? [n] y
If you’re an experienced network administrator, you’ve probably seen networks where your could only connect to the Internet if you had a particular secondary route set, or where multiple DNS servers were required. This also gives anyone who wants to install over a network an opportunity to test their network configuration. If you have a problem with network installs, this will make your life simpler.