Ethernet interface
U
SER
G
UIDE
43
E
THERNET INTERFACE
I
NTERFACE CONFIGURATION
Imola Ethernet interfaces are called eth0 and eth1. The first is on the left and it is normally used as
a service port or as WAN port to connect to the network to external devices, leaving internal
network tasks to the eth1 interface. The LAN switch (if present) is connected to the eth1 port.
In LX models the 4-port LAN switch is connected to the eth0 port.
In order to set the IP address of an Ethernet interface the following
CLI
command is used:
set eth0|eth1 ipaddr <ip_address> [netmask <netmask> broadcast <broadcast>]
For example, in order to configure an eth0 interface with
10.10.9.1/16
IP address, specifying the
broadcast mode, the command is:
set eth0 ipaddr 10.10.9.1 netmask 255.255.0.0 broadcast 10.10.255.255
It is possible to enable the dynamic NAT over all outbound packets from the interface using:
set eth0 masquerade
You can limit the outgoing bandwidth to a maximum value with the command:
set eth0 bandwidth N
N is the value in Kbit/s.
It is possible to set an IPv6 address using the command:
set eth0 ipv6addr X:X::X:X/M
To set the MTU (Maximum Transfer Unit) value, use:
set eth0 mtu N
To activate the parameters:
set eth0|eth1 on
To deactivate an Ethernet interface:
set eth0|eth1 off
To configure the default gateway:
set last-resort-gateway <gw_ip_address>
To delete the default gateway:
set no-last-resort-gateway
For example, in order to set the address
10.10.254.254
as a default gateway the following
command line can be used:
set last-resort-gateway 10.10.254.254
In order to remove it, the command is:
set no-last-resort-gateway