33
Configuring advanced features
Configuring VLAN
Configuring 802.1Q VLAN
This section uses RHEL 7.5 as an example.
To configure 802.1Q VLAN in the operating system:
1.
Execute the
modprobe
8021q
command to load the 802.1Q module.
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 81 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 82 Assigning an IP address to the VLAN interface and set the VLAN interface
state to UP
Configuring IEEE 802.1ad Provider Bridges (QinQ)
1.
Install the official lediag tool.
a.
Copy the lediag tool package into the operating system.
b.
Execute the
tar –zxvf
file_name.tar.gz
command to decompress the package.
c.
Execute the
cd
<lediag_directory>
command to navigate to the directory where the
decompressed package resides and then use the
make
command to compile the file.
2.
Start the tool and switch to the corresponding network adapter.
a.
After compiling, execute the
./load.sh –b10eng
command in the lediag folder to enter
engineering mode.
b.
If the server has multiple network adapters installed, use the
dev
<num>
command to
switch to the corresponding network adapter. The
<num>
argument represents the number