Moxa DA-681A-I-DPP-T-LX [19/79] Dynamic ip address using dhcp

Moxa DA-681A-I-DPP-T-LX [19/79] Dynamic ip address using dhcp
DA-681A Series 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.
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
After modifying the boot settings of the LAN interface, issue the following command to activate the LAN settings
immediately.
# /etc/init.d/networking restart
MOXA:~# /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 eth1
192.168.1.1 to change the IP address of LAN1 to 192.168.1.1.
MOXA:~# ifconfig eth1 192.168.1.1
MOXA:~#
DNS Client
The DA-681A-LX supports DNS client (but not DNS server). To set up DNS client, you need to edit three
configuration files: /etc/hostname, /etc/resolv.conf, and /etc/nsswitch.conf.
/etc/hostname
1. Edit /etc/hostname:
MOXA:~# vi /etc/hostname
MOXA
2. Re-configure the hostname.
MOXA:~# /etc/init.d/hostname.sh start
3. Check the new hostname.
MOXA:~# hostname
/etc/resolv.conf
This is the most important file that you need to edit when using DNS. For example, before you using # ntpdate
time.nist.goc to update the system time, you will need to add the DNS server address to the file. Ask your
network administrator which DNS server address you should use. The DNS server’s IP address is specified with
the nameserver command. For example, add the following line to /etc/resolv.conf (assuming the DNS
server’s IP address is 168.95.1.1):
nameserver 168.95.1.1
MOXA:/etc# cat resolv.conf

Содержание

Скачать