Library Table of Contents Index Previous Next Comments

Configuring an interface using the ifconfig command

About using the ifconfig command  Top

The NetCache appliance configuration contains the information required to configure network interfaces at system boot. If you cannot access the Appliance Manager, you can use the ifconfig command at the console to configure an interface.

The changes you make using the ifconfig command at the console are persistent only if made using the -set option.

ifconfig command syntax  Top

The ifconfig command syntax is as follows:

ifconfig [ -a | [ [-set] <interface>
[ [ alias | -alias ] <address> ] [ up | down ]
[ netmask <mask> ] [ broadcast <address> ]
[ mtusize <size> ]
[ mediatype { tp | tp-fd | 100tx | 100tx-fd | 1000fx | auto } ]
[ flowcontrol { none | receive | send | full } ]
[ trusted | untrusted ]
] ] 

When to use the ifconfig command  Top

Usually, you use the ifconfig command for the discussed purposes in the following paragraphs:

Changing the interface's IP address, network mask, or broadcast address

The following are examples of ifconfig commands that can be used to configure an Ethernet interface on a NetCache appliance:

ifconfig e1 192.9.200.6
ifconfig e1 netmask 255.255.255.0
ifconfig e1 broadcast 192.9.200.255

The interface names on your system might be different, depending on your NetCache appliance model. See Naming conventions for network interfaces for more information about interface naming conventions.

Setting the media type on an Ethernet interface

The following are examples of ifconfig commands that can be used to configure an Ethernet interface on a NetCache appliance:

ifconfig e1 mediatype 100tx-fd
ifconfig e2 mediatype 1000fx
ifconfig e3 mediatype 100tx

The media types you can use depend on the type of Ethernet card. The possible types you can enter in the ifconfig command are the same as those you can select when running the setup program.

The media types are described in the following table.

Media type

Description

tp

10Base-T

tp-fd

10Base-T, full-duplex

100tx

100Base-T

100tx-fd

100Base-T, full-duplex

1000fx

Gigabit Ethernet

auto

10Base-T/100Base-TX Ethernet using autonegotiation

Setting the maximum transmission unit (MTU)

Generally, you will not need to set the mtusize option for the interfaces on your NetCache appliance. However, you can use this option to set the jumbo frame size on a Gigabit Ethernet interface. This option can also be used to set the frame size on an FDDI interface when the network infrastructure does not support the default FDDI frame size.

The following is an example of an ifconfig command that can be used to set the MTU (jumbo frame size) for a Gigabit Ethernet interface on a NetCache appliance.

ifconfig e8 mtusize 9000 

To view the current setting of the MTU size, use the command

netstat -i 
Bringing an interface up or down

The following are examples of ifconfig commands that can be used to bring an interface up and bring an interface down.

ifconfig e1a up
ifconfig f1 down 
Showing the current configuration of all interfaces

To show the current configurations of all network interfaces, enter the following:

ifconfig -a 
Showing the configuration of a single interface

To show the current configuration of a specific network interface, for example e0, enter the following:

ifconfig e0

Library Table of Contents Index Previous Next Comments