Configuring Network Settings with Sysinstall


The simplest way to configure your Ethernet card is by using Sysinstall. The Sysinstall method probably is familiar-looking to anyone who has gone through this process on a Windows or Macintosh machine. The first time you ask Sysinstall to do anything that requires a network connection (such as performing a network installation of the system, browsing packages, and various other tasks), it opens the network-configuration window, in which you can set the TCP/IP options for your Ethernet card visually.

If you're already up and running in multiuser mode and not in the initial system installation process, you can get to Sysinstall's TCP/IP configuration screen easily by running /usr/sbin/sysinstall, selecting Configure from the main menu, and then choosing the Media option. In this submenu, select FTP and some FTP server (it doesn't matter which; all you're doing here is triggering the network-configuration procedure, not installing any software). A dialog asks "Running Multiuser, Assume that the Network Is Already Configured?" Choose No to enter the network-configuration screens; the Network Interface Selection screen opens, as shown in Figure 23.1.

Figure 23.1. Selecting your Ethernet card in the Sysinstall program.


The Network Interface selection screen presents you with a list of the interfaces that FreeBSD has found in your system. You'll probably see a number of choices that don't make a lot of sense. In the figure, you can see choices such as lp0 or plip0 (the parallel port) and various PPP or SLIP options, and IPv6 devices such as gif0 and faith0. You can ignore most of the options in the screen because the one you want is probably at the top. The one you're using in this example is fxp1, an Intel EtherExpress Pro/100B PCI card.

When you select your Ethernet card, you're given two dialogs: a choice to let the system try to configure the card automatically using IPv6 and then another choice to let it try using DHCP. Answer No to both of these. You're then presented with the visual Network Configuration screen, as shown in Figure 23.2.

Figure 23.2. The visual Network Configuration screen in the Sysinstall program.


Tip

If your network is set up to use dynamically assigned IP addresses that are distributed using DHCP, you can choose Yes when prompted for automatic DHCP configuration and avoid a lot of the complexities of manually configuring your network. Refer to Chapter 35, "Dynamic Host Configuration Protocol (DHCP)," for more information on using DHCP both in a client and a server capacity.


Each field in this screen has a short description at the bottom of the window, but here's some further information about them:

  • Host This is the hostname, which is just the first part of the machine's fully qualified domain name. For instance, if your machine is simba.example.com, the Host: field should be set to simba.

  • Domain This is the rest of the domain name, or example.com. This can be a composite domain for networks with named subnets, such as cslab.ivyleague.edu.

  • IPv4 Gateway This is the IP address of your gateway router. Use the next-hop router closest to your machine, or whatever your network administrator or ISP identifies as your gateway address. If you are connected to the Internet via a DSL/cable modem or similar device, its IP address (which is assigned by the ISP) should be your gateway. This router will be responsible for transmitting any traffic between your machine and any other machines in the world. As you have learned in Chapter 22, "Principles of TCP/IP Networking," a gateway router must be on the same network as your FreeBSD machine's IP address, as defined by the netmask.

  • Name Server The IP address of the most reliable domain name server (DNS) in your network. You should use the DNS provided by your enterprise, ISP, or university network if at all possible; remote name servers are useful as backups, but they won't necessarily be set up to service nonlocal requests reliably. Later in this chapter you will learn how to assign multiple name servers, if necessary.

  • IPv4 Address This is the IP address you're assigning to your Ethernet card. It needs to be on the same subnet as your IPv4 gateway, as matched against your netmask. This was discussed in Chapter 22.

  • Netmask This is used to determine whether a packet's destination is on the local network. Set the field to 255.255.255.0 for a Class C network, which is the most commonly used netmask in most home configurations. Consult your network administrator to make sure what this number should be.

  • Extra options to ifconfig You most likely won't need to put anything in here unless you're a power user looking to tweak the performance of your interface card. Anything you put in here, such as specifying particular media types or duplex modes, will be added to the ifconfig command line that Sysinstall issues in the background. You learn more about this command in "Using ifconfig to Apply Network Settings," later in this chapter.

After you've set all these options, select OK. The network settings will be applied to the card on the fly. Whatever you were doing in Sysinstall continuesin this example, Sysinstall connects to your selected FTP server. If the network configuration isn't successful, there's likely a problem with the network settings you entered, and you'll have to go back in and troubleshoot your settings. If you're in an enterprise network, ask your network administrator to give you the correct settings.

This process works in much the same way if you're doing a first-time installation of FreeBSD (as you saw in Chapter 2, "Installing FreeBSD"). You are presented with this configuration screen early in the install process. If you're doing a network installation, it will use the settings to pull down the system distribution from the central server.

Coping with ISA Ethernet Cards

Most PCI Ethernet cards, which describes nearly all Ethernet cards sold today, are very troublefree. All you really need to do, especially if you have one of the commonly used cards supported in the GENERIC kernel, is plug it in, power up the machine, and watch the kernel identify the card in the boot process:

[View full width]

fxp0: <Intel PLC 10/100 Ethernet> port 0xde80-0xdebf mem 0xff8fe000-0xff8fefff irq 11 at device 8.0 on pci1 fxp0: Ethernet address 00:d0:b7:c7:74:f1 fxp1: <Intel Pro 10/100B/100+ Ethernet> port 0xdf00-0xdf3f mem 0xff700000-0xff7fffff,0xff8ff000-0xff8fffff irq 11 at device 9.0 on pci1 fxp1: Ethernet address 00:d0:b7:bd:5d:13


However, if you're working with an old ISA card, the process can be trickier. ISA cards are set to a certain memory address and IRQ (interrupt request) number, and you have to pick values for both of them that aren't already used by some other device. Most Ethernet cards have a memory address of 0x300 or 0x280 and an IRQ of 9 or 10. Installing more than one of these cards means you have to configure the additional card to use an unused slot. Here's the really sticky part: This card configuration usually has to be done with a DOS utility that comes with the card.

First check your FreeBSD kernel for the IRQs and memory addresses already in use; use a command like grep "irq" /var/run/dmesg.boot to find all the kernel devices that have claims on IRQs. Pick a number between 1 and 15 that isn't already in use as the IRQ to assign your Ethernet card. Assume that the memory location 0x300 will work unless you see that string claimed anywhere in the dmesg output.

If you have the card's original driver disks, boot into MS-DOS (or FreeDOShttp://www.freedos.org) with a DOS "rescue" floppy disk and then run the card's diagnostic program. An Ethernet card's bundled software typically has a selection of common memory addresses and IRQs to set the card to use; enter the IRQ and memory address you settled on earlier, set the card's firmware, and boot back into FreeBSD.

You might also need to alter the "device hints" (described in Chapter 18) for your card. These hints, kept in /boot/device.hints, control where FreeBSD expects to find the device. You can tweak them to match your card by editing that file. You should find lines such as the following:

hint.ed.0.at="isa" hint.ed.0.port="0x300" hint.ed.0.irq="10"


Modify the port (memory address) and IRQ lines to match the settings of your card and then reboot to activate it.

All this said, thoughEthernet cards are very cheap nowadays, and just as with the older serial mice that FreeBSD still dutifully (but inelegantly) supports, you're probably much better off just buying a cheap PCI Ethernet card and using that instead.





FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net