Moxa V2403-C3-W-T [18/90] Static ip address

Moxa V2403-C7-W-T [18/90] Static ip address
V2403 Series Linux Software Managing Communications
3-3
Static IP Address
As shown in the following example, the default static IP addresses can be modified.
# 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
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
auto 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@MOXA:~# /etc/init.d/networking restart
Adjusting IP Addresses withifconfig
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@MOXA:~# ifconfig eth0 192.168.1.1
moxa@MOXA:~#

Содержание

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

Скачать