Accessing the Network

The kernel supplied with the dimmPCITM CPU module supports TCP/IP networks (IPX is not supported at this time). Before the network may be accessed, the dimmPCITM CPU module must obtain an IP address.

The subnets 10.xxx.xxx.xxx, 172.16.xxx.xxx, and 192.168.xxx.xxx are reserved for local area networks. Addresses are either statically assigned or dynamically allocated using DHCP (static IPs are still possible as the DHCP server allows specific MAC ID to IP mappings). The dimmCPU module may be configured with either a static or dynamic IP.

Static IP

A static IP is selected running ‘ifattach’ from the ‘/etc/rc’ script. The ‘ifattach’ is called first without parameters to release any network bindings. The second call specifies the desired address, mask and gateway, followed by the interface name (eth0). Network access is immedi- ately available after the ‘ifattach’, therefore it is common practice to mount network drives with subsequent lines in the /etc/rc file.

For example, to select the IP 192.168.10.141 on a network using the subnet 192.168.10.xxx, use:

/sbin/ifattach

/sbin/ifattach —addr 192.168.10.141 —mask 255.255.255.0 \ —net 192.168.10.0 —gw 192.168.10.1 eth0

* NOTE * the backslash may be used in a script file to break a long line over several lines.

Dynamic IP

A dynamic IP is obtained by running ‘dhcpcd’ from the ‘/etc/rc’ script. The ‘dhcpcd’ is called in background mode with a number of parameters.

The ‘-p’ option forces the daemon to run in persistent mode, retrying indefinitely until an IP is obtained; without it, the daemon will abort if a DHCP server cannot be located.

The ‘-c’ option specifies a command file (the functionality of this option deviates slightly from

www.amctechcorp.com

37

Page 37
Image 37
AMC 68VZ328 software manual Accessing the Network, Static IP, Dynamic IP