XRPi Home

Documentation Index
Alphabetic Index

XRPi Documentation - Interfacing

Ethernet

Name

ETHERNET -- Ethernet Interfacing.

Description

If required, XRPi can share the machine's Ethernet adaptor with Linux. This enables it to have its own IP address and TCP/IP stack, independent of the Linux one.

In order to do this, XRPi must be run as root, or it needs to be given permission to access raw network resources. The latter is the safer option. See the discussion on the IP Stacks page.

XRPi interfaces to the Ethernet adaptor via an EXTERNAL interface, which is declared like this:

	INTERFACE=3	        ; "Handle" for PORT to attach to
		TYPE=EXTERNAL   ; External device driver
		ID=eth0         ; Ethernet adaptor to be used
		PROTOCOL=ETHER
		MTU=1064
	ENDINTERFACE

The interface number is not important. It is simply the "handle" to which a PORT is attached.

The "ID=" directive tells XRPi which Ethernet adaptor to use. This is normally "eth0". If you use an invalid device name, e.g. "eth1", XRPi will start, but will not be able to use Ethernet.

The Ethernet port is declared like this:

	PORT=1
		ID=Ethernet
		INTERFACENUM=3			; The interface number defined above
		IPADDRESS=192.168.0.2
		etc...
	ENDPORT

INTERFACENUM must refer to the number of the INTERFACE previously defined.

The port number is not important. It is merely a "handle" for users of the port. It doesn't have to match the INTERFACE number.

IPADDRESS specifies XRPi's IP address, overriding the global IP address only on that port.

Make sure you choose a different IP address to any that Linux is using!

See also

IP-STACKS -- IP Stacks in XRPi.