
27
2.
Execute the
ip
link
add
link
ethX
name
ethX
.
id
type
vlan
id
id
command
to create a VLAN interface on a physical port. The
ethX
argument represents the physical port
name. The
id
argument represents the VLAN ID.
3.
Execute the
ip
–
d
link
show
ethX
.
id
command to verify that the VLAN interface has been
created successfully.
Figure 59 Creating a VLAN interface
4.
Execute the
ip
addr
add
ipaddr
/
mask
brd
brdaddr
dev
ethX
.
id
and
ip
link
set
dev
ethX
.
id
up
commands to assign an IP address to the VLAN interface and set the
VLAN interface state to
UP
, respectively. The
ipaddr
/
mask
argument represents the IP
address and mask of the VLAN interface. The
brdaddr
argument represents the broadcast
address. The
ethX
.
id
argument represents the VLAN ID.
To delete a VLAN interface, execute the
ip
link
set
dev
ethX
.
id
down
and
ip
link
delete
ethX
.
id
commands.
Figure 60 Assigning an IP address to the VLAN interface and set the VLAN interface
state to UP
Configuring bonding (Linux)
This section uses RHEL 7.5 as an example to describes how to configure bonding in mode 6.
To configure bonding in mode 6:
1.
Execute the
vi
ifcfg
-
bond0
command in the
/etc/sysconfig/network-scripts/
directory to
create a configuration file for bond0 and add the following information:
BOOTPROTO=static
DEVICE=bond0
NAME=bond0
TYPE=Bond
BONDING_MASTER=yes
ONBOOT=yes
IPADDR=192.168.50.88 //Configure the interface IP address for bond0
PREFIX=24 //Configure the subnet mask
GATEWAY=
DNS=
BONDING_OPTS=”miimon=100 mode=6” //Set the detection interval to 100 ms and the
bonding mode to 6