|
|
||
|
||
|
|
| Red Hat Documentation |
5.4. Configuring a network interface. Kernels 2.0 and 2.2When you have all of the programs you need and your address and network information you can configure your network interfaces. When we talk about configuring a network interface we are talking about the process of assigning appropriate addresses to a network device and to setting appropriate values for other configurable parameters of a network device. The program most commonly used to do this is the ifconfig (interface configure) command. Typically you would use a command similar to the following:
In this case I'm configuring an ethernet interface `eth0' with the IP address `192.168.0.1' and a network mask of `255.255.255.0'. The `up' that trails the command tells the interface that it should become active, but can usually be omitted, as it is the default. To shutdown an interface, you can just call ``ifconfig eth0 down''. The kernel assumes certain defaults when configuring interfaces. For example, you may specify the network address and broadcast address for an interface, but if you don't, as in my example above, then the kernel will make reasonable guesses as to what they should be based on the netmask you supply and if you don't supply a netmask then on the network class of the IP address configured. In my example the kernel would assume that it is a class-C network being configured on the interface and configure a network address of `192.168.0.0' and a broadcast address of `192.168.0.255' for the interface. There are many other options to the ifconfig command. The most important of these are:
With the release of Kernel 2.2 there are a number of options available that are not listed above. Some of the most interesting are tunneling and IPV6 options. The ifconfig paramaters for kernel 2.2 are listed below.
| ||||||||
|
|