ifconfig
Syntax
ifconfig[-c [name]][-l[name]]
ifconfig[-s
name dhcp|[static
IPaddress mask gateway]|permanent]
Description
Modifies the default IP address of the UEFI IPv4 network stack.
Options
-c
Clears the configuration.
-l
Lists the configuration.
-s
Sets the configuration.
name
Specifies an adapter name. For example,
eth0
.dhcp
Specifies that DHCP4 is to dynamically request IPv4 addresses for all or a specific interface.
static IPaddress
Specifies a static IPv4 address in four integer values, each between 0 and 255, separated by periods.
mask
Specifies a subnet mask in four integer values, each between 0 and 255, separated by periods.
gateway
Specifies a default gateway in four integer values, each between 0 and 255, separated by periods.
permanent
Specifies that the configuration is permanent (not one-time only).
Usage
You do not need to use
ifconfig
on a network interface if you plan to run
webclient
or
ftp
over the same interface because these interface and IP address settings are automatically selected by the
Pre-Boot Network Settings configured in the System Utilities.
If the interface used by
ftp
and
webclient
happens to be configured by
ifconfig
, that setting is erased and, instead, the System Utilities
Pre-Boot Network Settings menu is applied on the interface when the commands are run.
You can use this command to configure host networks for pre-boot network access from the Shell. The
–c
option clears the configuration for all or a specified interface, causing the network stack for related interfaces to default back to DHCP. If
permanent
is not specified, the configuration is one-time only. If
permanent
is specified, the configuration survives a network stack reload.
Examples
To list the configuration for the
eth0
interface:
fso:\> ifconfig -l eth0
To use DHCP4 to dynamically request the IPv4 address configuration for the
eth0
interface:
fso:\> ifconfig -s eth0 dhcp
To use the static IPv4 address configuration for the
eth0
interface, and to set this configuration to survive a network reload:
fso:\> ifconfig -s eth0 static 192.168.0.5 255.255.255.0 192.168.0.1 permanent