ifconfig
Syntax
ifconfig[-r [name]][-l[name]]
ifconfig[-s
name dhcp|[static
IPaddress mask gateway]| dns
IP]
Description
Modifies the default IP address of the UEFI IPv4 network stack.
Options
-r
Renews the interface configuration and sets the DHCP policy.
-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.
dns IP
Specifies a DNS server address.
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. The interface and IP address settings are selected automatically by the
Pre-Boot Network Settings configured in the System Utilities.
If the interface used by
ftp
and
webclient
is 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 preboot 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.
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
fso:\> ifconfig -s eth0 static 192.168.0.5 255.255.255.0 192.168.0.1 permanent
To configure a DNS server address for the
eth0
interface:
fso:\> ifconfig -s eth0 dns 192.168.0.8 192.168.0.9