www.riscos.com Technical Support:
This chapter tells you how to set an IP address. It also gives you information about a variety of modules and * commands that duplicate UNIX commands. If you're a more experienced Internet user you may well find these useful.
The Internet application allows you to communicate with other computers on a fully-configured TCP/IP network. For this to work you need to use !InetSetup to reflect the state of your network, and your machine.
Firstly you must run !InetSetup and edit the displayed fields so that it specifies the machine (host) on the network to which it is connected.
A number of options are then displayed which you need to modify; the first one is Enable TCP/IP Protocol Suite. Choose this option and all the other options can now be accessed.
Choosing Interfaces should identify the network card in your machine and ticking the box will allow you to configure the options - for example, setting your IP address and the appropriate Netmask.
Routing allows you to select which host you will be using as a gateway, so that the computer knows how to access machines on other networks.
Host names requires your unique Host name to be entered, as well as server names and a choice of resolver modules if required, so that Internet names can be converted to IP numbers by a remote name server machine.
You will also need to edit the Hosts file - this can be done in Host names. This forms the link between the host name and the IP address (see If you plan to connect to other sites for details of obtaining a unique IP address). The file has the following format:
127.0.0.1 loopback localhost loghost
You need to specify computers in this list to which software may need to refer to the remote computer by name. This may include server and gateway machines. Do not delete the loop-back entry.
To use any of these commands you need to run the Internet application. There are three ways you can do this:
In both the latter cases you must use a command of the form:
where Internet_pathname is the rest of the pathname to the Internet application. You must start the command with *Run; if you don't RISC OS won't know which filing system holds the Internet application.
If you're using the desktop, there are three ways of getting a command line so you can enter * Commands:
The core of the Internet application is a module named Internet. It is stored as the !RunImage file within the application. It provides two * Commands:
|*InetGateway||Toggle IP packet forwarding|
|*InetInfo||Display Internet module internal statistics|
Running the Internet application loads the Internet module; you can then use the above * Commands.
There are also a set of commands that are provided as Absolute files (i.e. each file is a program that performs one command) in the bin subdirectory of the Internet application. These are:
|*ARP||Address resolution display and control|
|*IfConfig||Configure network interface parameters|
|*Ping||Send ICMP ECHO_REQUEST packets to network hosts|
|*Route||Manually manipulate the routing tables|
Running the Internet application adds the bin subdirectory to the system variable Run$Path. RISC OS then knows where to find the above * Commands, so you can use them directly from the command line.
Although the above are actually programs, in the section that follows we've treated them as * Commands because you're most likely to use them in just the same way.
The Ethernet driver modules (held in the drivers subdirectory of the application) each provide a single * Command to give information.
Ether3 refers to the A5000 style podules and EtherB to the Risc PC network card. Cards produced by different manufacturers may have differences - such as EtherH (i-cubed) - but all are suitable.
The Ether3 module also provides a configuration command:
|*Configure Ether3||Sets the configured state|
|*Configure EtherB||of Acorn Ethernet 3 cards|
|*EnInfo||Display details of physical interface activity, including their physical addresses|
Running the Internet application loads any appropriate Ethernet driver modules; you can then use any of the above * Commands that are relevant to your interface(s).
Address resolution display and control
*ARP -d host
*ARP -s host phys_addr [temp] [pub]
*ARP -f filename
an Internet host specified either by name (which must be present in the host name data base <InetDBase$Path>hosts) or by address (using the standard Internet dot notation)
the physical address of host given in Ethernet format (i.e. six hexadecimal bytes separated by colons)
the full pathname of a file containing multiple entries to be set in the ARP table
The ARP program displays and modifies the Internet-to-Physical-address translation tables located in the Internet module and used by the address resolution protocol ARP.
With no flags, the program displays the current ARP entry for host.
The -a flag makes the program display all the ARP entries currently in its table.
The -d flag makes the program delete an entry for host.
The -s flag makes the program create an ARP entry for the host called host with the physical address phys_addr.
The -f flag causes the file filename to be read and multiple entries to be set in the ARP tables. Entries in the file should be of the form:
host phys_addr [temp] [pub]
with argument meanings as given above.
If you don't know the physical address of an interface, you can use the *InetInfo command to find it.
For your reference, the physical address of an Econet interface takes the form:
*ARP -d 01.01.01.01
*ARP -s tp1 01.01.01.01.01.01 temp
*ARP -f adfs::HardDisc.$.Internet.ARP_Table
Sets the configured state of Acorn Ethernet 3 cards
*Configure Ether3 Enable|Disable|Default|Terse|Verbose [card]
card the expansion card's number, as given by *Podules
*Configure Ether3 sets the configured state of all fitted Acorn Ethernet 3 cards, or of a single card specified by its expansion card slot number.
*Configure Ether3 Enable permits the interface to be used - which is the default - whereas *Configure Ether3 Disable prevents the interface from being used.
*Configure Ether3 Default sets the configured state to the default: namely, Enabled.
*Configure Ether3 Default 0
Display details of physical interface activity, including their physical addresses
*E1Info Display details for all Acorn Ethernet 1 cards
*E2Info Display details for all Acorn Ethernet 2 cards
*E3Info Display details for all Ethernet 3 cards
*EBInfo Display details for all Atomwide-based Network slot cards
*EHInfo Display details for all i-cubed (I3) cards
*EnInfo displays details of physical interface activity, including the physical addresses of all Ethernet interfaces of the relevant type that are fitted to the computer.
Most of the information displayed is runic in nature. It is presented mainly as an aid to trouble-shooting, should you require it.
If you are using an interface that is not listed above, you should consult its documentation to see if its manufacturer has provided a similar command; we expect most will do so.
Ether3 interface statistics
ea0: 8005 16 bit MEMC1a, slot 2, up, hardware address 00:02:07:00:A3:48
Interface driver : ea
Interface unit : 0
Interface location : Expansion slot 2
Interface address : 00:02:07:00:A3:48
Interface controller: 8005 16 bit MEMC1a
Initialise time : Wed Mar 1 11:32:02 1995
Running time : 2 minutes, 5 seconds.
Packets sent : 4362
Packets received : 4830
Bytes sent : 2276647
Bytes received : 2352828
Send errors :
Receive errors :
Broadcasts sent :
Broadcasts received : 298
Multicasts sent :
Multicasts received : 111
Monitor sends :
Monitor receives :
Send interrupts : 4362
Receive interrupts : 4830
Delivered packets : 4835
Undelivered packets :
Sends too large :
Send max collisions :
Send overflows :
Sends blocked :
Receives too small :
Receives too large :
Incomplete receives :
Receive CRC errors :
Lack of mbufs :
Receive overflows :
Frame = &0800, ErrLvl=00, AddrLvl=01
Frame = &0806, ErrLvl=00, AddrLvl=01
Frame = &8035, ErrLvl=00, AddrLvl=01
IEEE 802.3 client:
Frame = &0000, ErrLvl=00, AddrLvl=02
Log: Ether3 messages can appear here
Configure network interface parameters
*IfConfig interface address_family [address [dest_address]] [parameters]
*IfConfig interface [protocol_family]
|address||for the DARPA-Internet family, the address is either a host name present in the host name data base, hosts, or a DARPA Internet address expressed in the Internet standard dot notation. For the Xerox Network SystemsTM family, addresses are net:a.b.c.d.e.f, where net is the assigned network number (in decimal), and each of the six bytes of the host number, a through f, are specified in hexadecimal. The host number may be omitted on 10Mb/s Ethernet interfaces, which use the hardware physical address, and on interfaces other than the first. For the ISO family, addresses are specified as a long hexadecimal string, as in the Xerox family. However, two consecutive dots imply a zero byte, and the dots are optional, if the user wishes to count out long strings of digits in network byte order.|
|address_family||Specifies the address family which affects interpretation of the remaining parameters. Since an interface can receive transmissions in differing protocols with different naming schemes, specifying the address family is recommended. The address or protocol families currently supported are inet, iso, and ns.|
|interface||The interface parameter is a string of the form name unit, for example, en0.|
IfConfig is used to assign an address to a network interface and/or configure network interface parameters. IfConfig must be used at boot time to define the network address of each interface present on a machine; it may also be used at a later time to redefine an interface's address or other operating parameters.
You can set the following parameters with the IfConfig program:
|alias||Establish an additional network address for this interface. This is sometimes useful when changing network numbers, and one wishes to accept packets addressed to the old interface.|
|arp||Enable the use of the Address Resolution Protocol in mapping between network level addresses and link level addresses (default). This is currently implemented for mapping between DARPA Internet addresses and 10Mb/s Ethernet addresses.|
|-arp||Disable the use of the Address Resolution Protocol|
|broadcast (Inet only)||Specify the address to use to represent broadcasts to the network. The default broadcast address is the address with a host part of all 1's.|
|debug||Enable driver-dependant debugging code; usually this turns on extra console error logging.|
|delete||Remove the network address specified. This would be used if you incorrectly specified an alias, or it was no longer needed. If you have incorrectly set an NS address having the side effect of specifying the host portion, removing all NS addresses will allow you to respecify the host portion.|
|dest_address||Specify the address of the correspondent on the other end of a point to point link.|
|down||Mark an interface `down'. When an interface is marked `down', the system will not attempt to transmit messages through that interface. If possible, the interface will be reset to disable reception as well. This action does not automatically disable routes using the interface.|
|ipdst||This is used to specify an Internet host which is willing to receive ip packets encapsulating NS packets bound for a remote network. An apparent point-to-point link is constructed, and the address specified will be taken as the NS address and network of the destination. IP encapsulation of CLNP packets is done differently.|
|metric n||Set the routing metric of the interface to n, default 0. The routing metric is used by the routing protocol routed. Higher metrics have the effect of making a route less favourable; metrics are counted as addition hops to the destination network or host.|
|mtu n||Set the maximum transmission unit of the interface to n; the default is interface-specific. The mtu is used to limit the size of packets that are transmitted on an interface. Not all interfaces support setting the mtu, and some interfaces have range restrictions.|
|netmask mask||(Inet and ISO) : specify how much of the address to reserve for subdividing networks into sub-networks. 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 with a leading 0x, with a dot-notation Internet address, or with a pseudo-network name listed in the network table networks. The mask contains 1's for the bit positions in the 32-bit address which are to be used for the network and subnet parts, and 0's for the host part. The mask should contain at least the standard network portion, and the subnet field should be contiguous with the networkportion.|
|nsellength n||This 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 value is 1, which is conformant to US GOSIP. When an ISO address is set in an IfConfig command, it is really the NSAP which is being specified. For example, in US GOSIP, 20 hex digits should be specified in the ISO NSAP to be assigned to the interface. There is some evidence that a number different from 1 may be useful for AFI 37 type addresses.|
|trailers||Request the use of a `trailer' link level encapsulation when sending (default). If a network interface supports trailers, the system will, when possible, encapsulate outgoing messages in a manner which minimizes the number of memory to memory copy operations performed by the receiver. On networks that support the Address Resolution Protocol (see ARP; currently, only 10 Mb/s Ethernet), this flag indicates that the system should request that other systems use trailers when sending to this host. Similarly, trailer encapsulations will be sent to other hosts that have made such requests. Currently used by Internet protocols only.|
|-trailers||Disable the use of a `trailer' link level encapsulation.|
|link[0-2]||Enable special processing of the link level of the interface. These three options are interface specific in actual effect, however, they are in general used to select special modes of operation. An example of this is to enable SLIP compression. Currently, only used by SLIP.|
|-link[0-2]||Disable special processing at the link level with the specified interface.|
|up||Mark an interface `up'. This may be used to enable an interface after an IfConfig down. It happens automatically when setting the first address on an interface. If the interface was reset when previously marked down, the hardware will be re-initialized|
|IfConfig -a||This displays information on all interfaces. When followed by a configuration parameter, it will also set the configuration on all interfaces.|
|IfConfig -au||Similar to IfConfig -a, except it only affects interfaces that are currently marked as up. Conversely, IfConfig -ad affects only interfaces that are marked down. IfConfig displays the current configuration for a network interface when no optional parameters are supplied. If a protocol family is specified, IfConfig will report only the details specific to that protocol family. Only the super-user may modify the configuration of a network interface.|
*IfConfig ea0 inet tp1 up
Toggle IP packet forwarding
*InetGateway may be used to enable (*InetGateway 1) or to disable (*InetGateway 0) IP layer packet forwarding (i.e. gateway operation) if multiple network interfaces are present.
The default state is off.
Display Internet module internal statistics
*InetInfo displays detailed information about Internet module activity. By default it only gives details of internal resource usage and protocol activity using the options
|r||display only internal resource information (the default)|
|i||display only interface information|
Most of the information displayed is runic in nature. It is presented mainly as an aid to trouble-shooting, should you require it.
The i option used in Release 1 of the TCP/IP Protocol Suite to give information on an interface has been replaced by the *EnInfo command.
Send ICMP ECHO_REQUEST packets to network hosts
*Ping [-dfnqrvR] [-c count] [-i wait] [-l preload] [-p pattern] [-s packetsize]
|-c count||stop after sending and receiving count ECHO_RESPONSE packets.|
|-i wait||wait within seconds between sending each packet. The default is to wait for one second between each packet. This option is incompatible with the -f option.|
|-l preload||if preload is specified, ping sends that many packets as fast as possible before falling into its normal mode of behaviour|
|-p pattern||you may specify up to 16 `pad' bytes to fill out the packet you send. This is useful for diagnosing data-dependent problems in a network. For example -p ff will cause the sent packet to be filled with all ones.|
|-s packetsize||specifies the number of data bytes to be sent. The default is 56, which translate into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data.|
An Internet can be a large and complex aggregation of network hardware, connected together by gateways. Tracking a single-point hardware or software failure can be difficult. The Ping program utilises the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams (or pings have an IP and ICMP header, and then an arbitrary number of padding bytes used to fill out the packet.
The optional -d parameter sets the SO_DEBUG option on the socket being used. The optional -f parameter causes a flood ping. It outputs packets as fast as they come back or one hundred times per second, whichever is more. For every ECHO_REQUEST sent a period `.' is printed, while for every ECHO_REPLY received a backspace is printed. Providing a rapid display of the number of packets dropped, but only a super-user may use this option and can be hard on a network.
The optional -n parameter specifies numeric output only. No attempt will be made to look up symbolic names for host addresses.
The optional -q parameter specifies quiet output. Nothing is displayed except the summary lines at start-up time and when finished.
The optional -r parameter bypasses the normal routing tables and sends directly to a host on an attached network. If the host is not on a directly-attached network, an error is returned. This option can be used to ping a local host through an interface that has no route through it (e.g. after the interface was dropped by routed).
The optional -v parameter specifies verbose output. ICMP packets other than ECHO_RESPONSE that are received are listed. The optional -R parameter specifies the recording of the route. Includes the RECORD_ROUTE option in the ECHO_REQUEST packet and displays the route buffer on returned packets. Note that the IP header is only large enough for nine such routes. Many hosts ignore or discard this option.
When using ping for fault isolation, it should first be run on the local host, to verify that the local network interface is up and running. Then, hosts and gateways further and further away should be `pinged'.
An IP header without options is 20 bytes. An ICMP ECHO_REQUEST packet contains an additional eight bytes worth of ICMP header followed by some data. When a packetsize is given, this indicated the size of this extra piece of data (default is 56). The amount of data received inside of an IP packet of type ICMP ECHO_REPLY will always be eight bytes more than the requested data space (the ICMP header).
If the data space is at least eight bytes large, ping uses the first eight bytes of this space to include a timestamp which it uses in the computation of round trip times. If less than eight bytes of pad are specified, no round trip times are given.
Ping will report duplicate and damaged packets. Duplicate packets should never occur, and seem to be caused by inappropriate link-level retransmissions. Duplicates may occur in many situations and are rarely (if ever) a good sign, although the presence of low levels of duplicates may not always be cause for alarm.
Damaged packets are obviously serious cause for alarm and often indicate broken hardware somewhere in the ping packet's path (in the network or in the hosts).
The (inter)network layer should never treat packets differently depending on the data contained in the data portion. However, data-dependent problems can get into networks and remain undetected. In many cases the pattern that will have problems is something that doesn't have sufficient `transitions', such as all ones or all zeros. It's not usually enough to specify a data pattern of all zeros on the command line because the pattern of interest is at the data link level, and the relationship between what you type and what the controllers transmit can be complicated.
This means that if you have a data-dependent problem you will probably have to do a lot of testing to find it. If you are lucky, you may manage to find a file that either can't be sent across your network or that takes longer to transfer than other similar size files. Then test using -p option of Ping examine for file repeated patterns.
*Ping -v tp1 1024 20
Manually manipulate the routing tables
*Route [-e] [-n] [-v] [-q] add | delete | change | get | monitor | flush [-net | -host] destination gateway flags
*Route [-e] [-n] [-v] [-q] flush | monitor
|destination||an Internet hot or network specified either by name (which must be present in the respective host or network name data base <InetDBase$Path>...) or by address (using the standard Internet dot notation)|
|gateway||the next hop gateway to which packets should be addressed|
|flags||various commands used to manipulate the routing|
You can use the Route program manually to manipulate the Internet module's network routing tables.
Routes to a particular host are distinguished from those to a network by interpreting the Internet address associated with the destination. The optional keywords net and host force the destination to be interpreted as a network or a host, respectively. Otherwise, if the destination has a local address part of 0 or if there is a symbolic name of a network, the route's presumed to be a host. All symbolic names specified from a destination or a gateway are looked up first as a host name; if this fails, the name is then looked up as a network name.
The -e option makes Route place any fatal error report string in the system variable Inet$Error instead of writing it to the standard output.
The -n option bypasses attempts to print host and network names symbolically when reporting actions. However, translating between symbolic names and numerical equivalents can be time consuming and may require correct operation of the network.
The -v option (verbose) allows the printing of additional details.
The -q option allows the suppression of all output.
There are many flags which can be attached to the routing command line and they are as follows:
|-cloning||generates a new route on use|
|-iface||destination is directly reachable|
|-static||is a manually added route|
|-nostatic||is a pretended route added by kernel or daemon|
|-reject||to emit an ICMP unreachable when matched|
|-blackhole||silently discards packets during updates|
|-rtt n||shows initial round-trip time|
|-rttvar n||shows initial RTT variance|
|-mtu n||shows initial MTU|
|-expire n||shown expiry time|
*Route -n monitor
Displays the configured state of Acorn Ethernet 3 cards
*Status Ether3 displays the configured state of all fitted Acorn Ethernet 3 cards.
ether3 enabled 0
Displays the configured state of Acorn Ethernet H cards
*Status EtherH displays the configured state of all fitted Acorn Ethernet H cards.
etherH virtual on