Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Enjoy The TCP/IP Guide? Get the complete PDF!
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP Administration and Troubleshooting Utilities and Protocols

Previous Topic/Section
TCP/IP Network Status Utility (netstat)
Previous Page
Pages in Current Topic/Section
1
2
345
Next Page
Miscellaneous TCP/IP Troubleshooting Protocols: Echo, Discard, Character Generator, Quote Of The Day, Active Users, Daytime, Time
Next Topic/Section

TCP/IP Configuration Utilities (ipconfig, winipcfg and ifconfig)
(Page 2 of 5)

ifconfig Syntaxes, Options and Parameters

Table 304 provides a simplified summary of the different functions that ifconfig can perform, and the syntaxes that are used to specify each in a typical UNIX implementation (NetBSD in this case). Table 305 describes the common options and parameters that can be used for many of these different modes. When ifconfig is used to modify an interface’s configuration, this is done by setting any of several dozen configuration parameters, using the syntax shown in the last row of Table 304; I have provided a brief description of some sample parameters in Table 306 (see your ifconfig documentation for a complete list).


Table 304: Typical UNIX ifconfig Syntaxes, Options and Parameters

Syntax, Options and Parameters

Description

ifconfig [-L] [-m] <interface>

When ifconfig is called with just an interface specification and no other options (other than possibly “-L” and “-m”), it displays the configuration information for that network interface.

Note that entering “ifconfig” by itself with no interface just causes help information for the parameter to be displayed; to see all interfaces, the “-a” parameter should be used.

ifconfig -a [-L] [-m] [-b] [-d]
[-u] [-s] [<family>]

Displays information about all the interfaces on the host. The output may be restricted using the universal parameters shown, or by specifying an address family (see Table 305).

ifconfig -l [-b] [-d] [-u] [-s]

Lists all available interfaces on the system.

ifconfig <interface> create

Creates the specified logical network interface on the host, which is then configured using the syntax shown in the last row of this table. Note that some variations of UNIX allow certain parameters to be set at the time of creation.

ifconfig <interface> destroy

Destroys the specified logical interface.

ifconfig <interface> [<family>]
[<address> [<dest_address>]]
[<parameters>]

Configures parameters for a particular interface on the host. If the address is being set, it is the first parameter specified, after the optional address family, if present. The “<dest_address>” is used to specify a destination address for a point-to-point link. After this, any of several dozen parameters may be specified for the interface, some of which are shown in Table 306.



Table 305: Typical UNIX ifconfig Universal Options and Parameters

Option / Parameter

Description

-L

Displays the address lifetime for IPv6 addresses.

-m

Displays all supported media for the interface.

-b

Limits the display of interface information to broadcast interfaces.

-d

Shows only interfaces that are presently down (disabled).

-u

Shows only interfaces that are presently up (operational).

-s

Shows only interfaces that may be connected.

<family>

Specifies a particular address family, either to limit output or indicate what address type is being configured. The value “inet” is used for IPv4 and “inet6” for IPv6.



Table 306: Typical UNIX ifconfig Interface Configuration Parameters

Parameters

Description

alias / -alias

Establishes or removes a network address alias.

arp / -arp

Enables / disables the use of ARP on this interface.

delete

Removes the specified network address.

down

Marks an interface as being “down”, disabling it.

media <type>

Sets the media type of the interface to a particular value.

mtu <n>

Sets the maximum transmission unit (MTU) of the interface.

netmask <mask>

Sets the network or subnet mask for the interface’s address.

prefixlen <n>

Same as “netmask” but allows the mask to be specified using a CIDR-style prefix length.

up

Sets an interface “up”, enabling it.


Note: Since creating, destroying or modifying interfaces can cause a host to stop working properly, administrative (super-user) rights are generally required on most systems in order to do anything with ifconfig other than examining the existing configuration.


ifconfig Sample Output

In Table 307, I have provided a sample output of the “ifconfig -a” command on one of the UNIX machines I use regularly, showing the settings for its interfaces.


Table 307: Sample Routing Table Display From Windows netstat Utility

%ifconfig -a
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:a0:c9:8c:f4:a1
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet 166.84.1.3 netmask 0xffffffe0 broadcast 166.84.1.31
inet alias 166.84.1.13 netmask 0xffffffff broadcast 166.84.1.13
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33228
inet 127.0.0.1 netmask 0xff000000


Previous Topic/Section
TCP/IP Network Status Utility (netstat)
Previous Page
Pages in Current Topic/Section
1
2
345
Next Page
Miscellaneous TCP/IP Troubleshooting Protocols: Echo, Discard, Character Generator, Quote Of The Day, Active Users, Daytime, Time
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.