• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL



ifconfig Configures network interface parameters.
ifonfig <interface>
									<address_family> [<address>
								[<dest address>]]

ifconfig <interface> [<protocol family>]

ifconfig -a [-d] [-u] [<address family>]

ifconfig -l [-d] [-u] [<address family>]

ifconfig assigns an address to a network interface and/or configures network interface parameters. It must be used at boot time to define the network address of each network interface. It may also be used at a later time to redefine an interface's network address or other operating parameters.
Only the super user may modify the configuration of a network interface.
-a Produces a full listing of all available interfaces.
-l Produces a name-only listing of all available interfaces.
-d Limits a listing to those interfaces that are down.
-u Limits a listing to those interfaces that are up.
Available operands for ifconfig are
<address> For the DARPA-Internet family, the address is either a hostname in the hostname database or a DARPA internet address expressed in the Internet standard “dot notation.”
<address family> Specifies the <address family> that effects interpretation of the remaining parameters. The address or protocol families currently supported are inet, iso, and ns.
<interface> <interface> parameter is a string of the form <name physical unit>, such as en0.
The following parameters may be set with ifconfig:
alias Establishes an additional network address for this interface. This is sometimes useful when changing network numbers, while still accepting packets for the old interface. A <netmask> should be used with this parameter. If the new <alias> address is on the same subnet as an existing address assigned to this interface, the netmask must be If a netmask is not supplied, the command will use the one implied by the address itself. If the all ones netmask is used, the system will handle route installation. If another is used, a route to that address might have to be added by hand; for example, “route add -host xx.xx.xx.xx -interface”, where xx.xx.xx.xx is the alias. In either case, the route might have to be deleted by hand when the alias is removed (-alias or delete).
arp Enables the use of the Address Resolution Protocol in map ping between network level addresses and link level addresses (default). This is currently implemented for mapping between DARPA Internet addresses and 10 Mb/s ethernet addresses.
-arp Disables the use of the Address Resolution Protocol.
broadcast (inet only) Specifies the address to use to represent broadcasts to the network. The default broadcast address is the address with a host part of all 1s.
debug Enables driver-dependent bugging code. This usually turns on extra console logging.
-debug Disables driver-dependent debugging code.
delete Removes the network address specified. This would be used if you incorrectly specified an alias or it was no longer needed.
dest_addr Specifies the address of the correspondent on the other end of a point-to-point link.
down Marks an interface down. When an interface is marked down, the system does not attempt to transmit messages through that interface. If possible, the interface is reset to disable reception as well. This does not automatically disable routes using the interface.
ipdst Specifies an internet host to receive IP packets encapsulating NS packets bound for a remote network
metric <n> Sets the routing metric of the interface to <n>, default 0. The routing metric is used by the routing protocol. Higher metrics make a route less favorable. Metrics are counted as addition hops to the destination network or host.
netmask <mask> (inet and ISO) Specifies how much of the address to reserve for subdividing networks into subnetworks. The mask includes the network part of the local address and the subnet part, which is taken from the host field of the address. The mask can be specified as a single hexadecimal number beginning with 0x, as a dot-notation internet address, or as a pseudo-network name listed in the network table networks. The mask contains 1s for the bit positions in the 32-bit address that are to be used for the network and subnet parts, and 0s for the host part.
nsellength <n> (ISO only) Specifies a trailing number of bytes for a received NSAP used for local identification the remaining leading part of which is taken to be the NET (Network Entity Title). The default is 1, which is conformant to US GOSIP. When an ISO address is set in an ifconfig, it is really the NSAP that is being specified.
trailers Requests the use of a trailer link–level encapsulation when sending (default). If a network interface supports trailers, the system encapsulates outgoing messages such that the number of memory-to-memory copy operations performed by the receiver is minimized. On networks that support Address Resolution Protocol, this flag indicates that the system should request that other systems use trailer when sending to this host. Currently used by Internet protocols only.
-trailers Disables the use of a trailer link–level encapsulation.
link[0-2] Enables special processing of the link level of the interface.
-link[0-2] Disables special processing at the link level with the specified interface.
up Marks an interface up. May be used to enable an interface after ifconfig down has been run. It happens automatically when setting the first address on an interface. If the interface was reset when previously marked down, the hardware is reinitialized.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint