Moxa DA-685-LX [21/76] Dynamic ip address using dhcp

Moxa DA-685-LX [21/76] Dynamic ip address using dhcp
DA-685 Linux Managing Communications
3-3
Dynamic IP Address using DHCP
To configure one or both LAN ports to request an IP address dynamically, replace static with dhcp and then
delete the rest of the lines.
After modifying the boot settings of the LAN interface, issue the following command to activate the LAN settings
immediately.
# /etc/init.d/networking restart
Adjusting IP Addresses with “ifconfig”
IP settings can be adjusted during run-time, but the new settings will not be saved to the flash ROM without
modifying the file /etc/network/interfaces. For example, type the command # ifconfig eth0
192.168.1.1 to change the IP address of LAN1 to 192.168.1.1.
Telnet/FTP Server
In addition to supporting Telnet client/server and FTP client/server, the DA-685-LX also supports SSH and sftp
client/server. To enable or disable the Telnet/ftp server, you need to edit the file /etc/inetd.conf.
1. Mount the root file system with write permission.
MOXA:~# mount -o remount,rw /
MOXA:~# ifconfig eth0 192.168.1.1
MOXA:~#
MOXA:~# /etc/init.d/networking restart
# The primary network interface
auto eth0
iface eth0 inet dhcp
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.3.127
netmask 255.255.255.0
broadcast 192.168.3.255
auto eth1
iface eth1 inet static
address 192.168.4.127
netmask 255.255.255.0
broadcast 192 168 4 255

Содержание

Скачать