12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7When an interface is marked as down, the system stops transmitting traffic on theinterface. If possible, the system also resets the interface so that it does not receiveany incoming traffic.You can bring an interface up again with the ifconfig's up option:# ifconfig bge0 upMarking an interface down does not necessarily deactivate the physicallayer. This is why you will see your switch port active, even when theinterface is down. On the other hand, after seeing an interface status as updoes not indicate that the physical layer link is active. The status field inifconfig output indicates the actual physical layer status.In order to make the interface configuration persistent and configure networkinterfaces automatically after system reboot, you should add appropriate linesto the /etc/rc.conf configuration file. Your rc.conf file may contain severalinterface configuration lines for each physical interface installed on your system andin accordance with the address you configure on an interface. A typical interfaceconfiguration line looks like the following sample:ifconfig_fxp0="inet 10.2.0.1 netmask 255.255.255.192"ifconfig_fxp0_alias0="inet 10.2.0.5 netmask 255.255.255.255"The first part of the parameter is ifconfig_fxp0 which indicates that this is anifconfig statement for the fxp0 interface. You should replace this with the interfacename that you want to configure. The second part of the statement inside the doublequotation mark indicates the ifconfig configuration parameters you want to use forthat specific interface. For example, the first configuration line assigns IPv4 address10.2.0.1 with subnet mask 255.255.255.192 to interface fxp0.The second line is the same as the first line, but it assigns a secondary address (alias)to the same interface. Assigning secondary addresses to an interface is explainedlater in this chapter.During system start up, the /etc/rc.d/netif script takes care of network interfaceconfiguration. This rc script is also useful in loading network configuration withoutactually rebooting the server. For example, if you've added a few aliases to anexisting interface or configured a new interface in the /etc/rc.conf file, you canapply the new settings by calling the netif rc script:# /etc/rc.d/netif restartThis will reload the network configuration and apply your changes. However,you may want to verify this to see whether all changes are applied, or not, using theifconfig utility.[ 105 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!