Moxa DA-710-XPE [28/73] Dynamic ip address using dhcp

Moxa DA-710-XPE [28/73] Dynamic ip address using dhcp
DA-710 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 eth0
192.168.1.1 to change the IP address of LAN1 to 192.168.1.1.
MOXA:~# ifconfig eth0 192.168.1.1
MOXA:~#
Configuring Multiple LAN Ports for Expansion Modules
This section explains how to configure the LAN interface when you have inserted one or more LAN or switch
modules in your DA-710’s expansion PCI slots.
In the following example, we will insert two DA-LN04-RJ LAN modules and one DA-SW08-RJ switch module.
Follow the steps below.
1. Make sure the DA-710 computer is powered off.
2. Insert the three modules on the rear panel of the DA-710.
3. Turn on the DA-710 computer.
4. When the system has rebooted, udev daemon will detect these modules and generate a file:
/etc/udev/rules.d/70-persistent-net.rules.
5. Use an editor such as vi to configure /etc/udev/rules.d/70-persistent-net.rules.
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:90:e8:00:d6:71", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:90:e8:00:d6:74", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:c0:26:72:5e:3f", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:90:e8:00:d3:20", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"

Содержание

Похожие устройства

Скачать