Moxa TC-6110-T-LX [21/117] Ethernet interface configuration

Moxa TC-6110-T-LX [21/117] Ethernet interface configuration
TC-6110 Linux User's Manual Managing Communications
3-3
Ethernet Interface Configuration
The TC-6110-LX computer has two 10/100/1000 Ethernet ports named LAN1 and LAN2. The default IP
addresses and netmasks of these network interfaces are:
Default IP Address Netmask
LAN1
192.168.3.127
255.255.255.0
LAN2 192.168.4.127 255.255.255.0
These network settings can be modified by changing the interfaces (/etc/networking/interfaces)
configuration file, or they can be adjusted temporarily with the ifconfig command.
The file used for configuring network interfaces is the networking interfaces configuration file, located in
the
/etc/network directory. The /etc/network/interfaces file is where you will configure Ethernet
LAN ports for either static or dynamic (DHCP) IP addressing. To edit this file directly, open the network
configuration file with your preferred editor (below, we use VI):
moxa@MOXA:~#/etc/network# sudo vi interfaces
Static IP Address
The default static IP addresses can be modified. Below, we show the default configuration; changing these
values will change the addressing and broadcast parameters used by the associated interface.
### 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 receive an IP address through dynamic assignment, replace static with
dhcp and then comment out the rest of the lines. The eth0 interface is shown below, as an example.
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# address 192.168.3.127
# netmask 255.255.255.0
# broadcast 192.168.3.255
After modifying the boot settings of the LAN interface, issue the following command to immediately activate
the new LAN settings:
moxa@MOXA:~# sudo service networking restart

Содержание

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

Скачать