Home

Documentation

Project Support

ifconfig

Command:ifconfig
Contexts:Network socket, serial console.
Function:Displays or sets the STARGRASP controller's network configuration
Required Parameters:none.
Optional Parameters:dynamic
static ipaddress netmask logaddress defaultrouter
loghost ipaddress
loghost auto
mtu max-enet-transmit-size

With no parameters, this command displays the current configuration and basic stats of the STARGRASP controller's network interface. This includes the link status, MAC address, configuration (dynamic or static), IP address information and packet counts. For example:

Link: up                                                                         
HWaddr 00:50:C2:64:90:5A                                                         
IP address configuration: Dynamic                                                
inet addr: 10.213.1.170  Mask:255.255.0.0  Router:10.213.1.1                     
MTU:1500
RX packets:2244219                                                               
TX packets:323158 errors:0

Additionally, the ifconfig command can be used to choose between two methods of obtaining an IP address: dynamic, which obtains an IP address and other information via DHCP; or static which assigns a specific IP address to the controller.

Dynamic IP

When set, the STARGRASP controller will negotiate an IP address via DHCP with a server on the network. In this mode, it takes the IP address, netmask and gateway IP assigned by the DHCP server, and will send log messages to the address specified by the configured next-server parameter (see the DHCP server's documentation for how to set this).

Usage:

ifconfig dynamic

Static IP

In this mode, the STARGRASP controller uses a preconfigured IP address to communicate on the network.

Usage:

ifconfig static ipaddress netmask logaddress defaultrouter

The four required parameters after the static option are as follows:

  • ipaddress - the IP address that the system should use.
  • netmask - the netmask for the subnet the system is on.
  • logaddress - the IP address where the system should log to.
  • defaultrouter - the gateway for the network the system is connected to.

All four parameters must be supplied in dotted-decimal format.

Note: When switching between dynamic and static mode or setting a new static IP address, the controller must be rebooted for the change to take effect.

Log Host IP (running grasp_receiver)

By default, the controller attempts to send log messages to the "next-server" host specified by DHCP. This can be overridden by an ifconfig command:

Usage

ifconfig loghost IP-Address

or

ifconfig loghost auto

The latter syntax returns log messages to the IP address which DHCP had set. Log messages are always sent to port 55500 to 55515 (depending on chassis ID.)

MTU

If ifconfig by itself displays "MTU:", then it is possible to change the packet size used by the UDP/CATP protocol which the controller uses to send pixel data to the pixel server. Variable packet size is only supported by embedded code versions >= r5338.

Usage:

ifconfig mtu 9000

The above example enables "Jumbo" packet transmission. Note that the maximum value is limited to 1500 unless the embedded code was compiled with HAVE_EMAC_JUMBO defined (at the moment, HAVE_EMAC_JUMBO is the default for builds >= r5338, as long as we don't discover any downside.) The receiving pixel server Ethernet interface and and switch hardware in between must also be configured to accept non-standard "Jumbo" packets if mtu > 1500.