Net commands wstk-titlewstk-title wpk-titlewpk-title#

Use the net commands to retrieve and configure IP settings for the adapter.

Commands

Description

net dnslookup

Perform DNS lookup for a given hostname.

net mac

Retrieves the MAC address of the adapter.

net ip

Show the current IP configuration.

net ip addr

Set or show IP address.

net ip dns

Set or show DNS server address.

net ip gw

Set or show gateway address.

net ip dhcp

Enable the DHCP client.

net ip config

Configure IP configuration.

net ip conn

Show a list of ports and active connections.

net dnslookup#

Performs a DNS lookup for a given hostname.

Command Line Syntax

$ net dnslookup <hostname>

Command Line Example

$ net dnslookup google.com
Host name    : google.com
IP Address   : 142.250.74.142
IP address = 142.250.74.142

net mac#

Gets the MAC address of the adapter.

Command Line Syntax

$ net mac

Command Line Example

$ net mac
MAC Address: A0:C4:5E:31:81:3C

net ip#

Shows the currently active IP configuration.

Command Line Syntax

$ net ip

Command Line Example

$ net ip
IP Address : 192.168.1.34/24
DNS Server : 192.168.162.10
Gateway    : 192.168.1.1
Configured using DHCP.

net ip addr#

Sets or shows the IP address using CIDR notation, (e.g. 192.168.0.1/24).

If DHCP is currently enabled, this will disable DHCP. If the IP address is not supplied, the active IP address will be shown.

Command Line Syntax

$ net ip addr [ipAddr]

Command Line Example

$ net ip addr 192.168.0.1/24
Setting IP Address to 192.168.0.1/24...
IP Address : 192.168.0.1/24

net ip dns#

Sets or shows the DNS server address.

If DHCP is currently enabled, the configuration will be stored, but DHCP will not be disabled. If the DNS server address is not specified, the active DNS server address will be shown.

Command Line Syntax

$ net ip dns [dnsAddr]

Command Line Example

$ net ip dns 192.168.0.10
DNS Server : 192.168.0.10

net ip gw#

Sets or shows the gateway address.

If DHCP is currently enabled, the configuration will be stored, but DHCP will not be disabled. If the gateway address is not specified, the active gateway address will be shown.

Command Line Syntax

$ net ip gw [gwAddr]

Command Line Example

$ net ip gw 235.6.12.1
Gateway    : 235.6.12.1

net ip dhcp#

Enables the DHCP client.

If 'enable' is not specified, the current state of the configuration is shown. The IP address must be manually set to disable DHCP.

Command Line Syntax

$ net ip dhcp ['enable']

Command Line Examples

$ net ip dhcp
Configured manually.

$ net ip dhcp enable
Configured using DHCP.

net ip config#

Configures multiple IP configuration parameters simultaneously. The IP address must be given in CIDR notation.

Command Line Syntax

$ net ip config <ip> <gateway> [dns]

Command Line Example

$ net ip config 192.168.0.3/24 192.168.0.1 8.8.8.8.
Setting IP Address to 192.168.0.3/24...
IP Address : 192.168.0.3/24
DNS Server : 8.8.8.8
Gateway    : 192.168.0.1
Configured manually.

net ip conn#

Shows a list of available ports on the adapter and the connected clients.

Command Line Syntax

$ net ip conn

Command Line Example

$ net ip conn
 #       Name  Type               ClientIP               ServerIP    LastEvent PipeFull PipeBroken SendErrors
-------------------------------------------------------------------------------------------------------------
 0        BGT   UDP     192.168.1.40:61887           0.0.0.0:4920  00:00:00:21        0          0          0
 1        BCC   TCP              0.0.0.0:0           0.0.0.0:4901  00:00:57:46        0          0          0
 2      ADMIN   TCP     192.168.1.53:49974           0.0.0.0:4902  00:00:00:12        0          0          0
 3        DCH   TCP              0.0.0.0:0           0.0.0.0:4905  00:00:57:46        0          0          0
 4      VUART   TCP              0.0.0.0:0           0.0.0.0:4900  00:00:57:46        0          0          0