Home linux Communication of physical LAN ports in the Open VSWITCH virtual switch

Communication of physical LAN ports in the Open VSWITCH virtual switch

Author

Date

Category

There is an iron (server on Linux), in which there are 2 physical LAN ports. One port is connected to the main local network, and the second must connect to the video server.
It is necessary that the server can perform the role of a virtual switch and transmit information received on one port to another.

installed Open VSwitch application.
When installed, a virtual switch (Bridge OVS0) was created with the OVS0 port, added to the switch to the ENO1 and ENO2 ports, after that, there was a connection with the SSH server and the server became unparalleled on the local network.

The server uses to communicate with the local network ENO1, on which the status is configured.

Removing the ENO1 port from the virtual switch, the server started to determine again on the network!

Found a file configuration example / etc / network / interfaces

auto ivs0
Allow-OVS OVS0
IFACE OVS0 INET MANUAL
OVS_TYPE OVSBRIDGE.
OVS_PORTS ETH0 OVS0-VLAN2 OVS0-VLAN3 OVS0-VLAN4
Allow-OVS0 ETH0
IFACE ETH0 INET MANUAL
OVS_TYPE OVSPORT
OVS_BRIDGE OVS0.
OVS_Options VLAN_MODE = Native-Untagged TAG = 2 trunks = 2,3,4
Allow-OVS0.
OVS0-VLAN2.
IFACE OVS0-VLAN2 INET STATIC
OVS_BRIDGE OVS0.
OVS_TYPE OVSINTPORT
OVS_Options TAG = 2
ADDRESS 169.254.254.1
NetMask 255.255.255.0.
Allow-OVS0 OVS0-VLAN3
IFACE OVS0-VLAN3 INET DHCP
OVS_BRIDGE OVS0.
OVS_TYPE OVSINTPORT
OVS_Options TAG = 3
Allow-OVS0 OVS0-VLAN4
IFACE OVS0-VLAN4 INET STATIC
OVS_BRIDGE OVS0.
OVS_TYPE OVSINTPORT
OVS_Options TAG = 4
ADDRESS 0.0.0.0.
NetMask 255.255.255.0.

Tell me how can I repel / etc / network / interfaces so that the network work normally?

wrote it:

# The Primary Network Interface
AUTO OVS0.
Allow-OVS0 OVS0
IFACE OVS0 INET MANUAL
 OVS_TYPE OVSBRIDGE.
 OVS_PORTS ENO1 ENO2.
AUTO ENO1
Allow-OVS0 ENO1
IFACE ENO1 INET STATIC
ADDRESS 192.168.10.2.
NetMask 255.255.255.0.
Gateway 192.168.10.253
DNS-NameServers 192.168.10.1
OVS_BRIDGE OVS0.
OVS_TYPE OVSINTPORT
AUTO ENO2.
Allow-OVS0 ENO2
IFACE ENO2 INET MANUAL
OVS_TYPE OVSPORT
OVS_BRIDGE OVS0.

Now there is a connection with the main server on static IP (ENO1). But in the local network of the video server connected to ENO2, not visible!


Answer 1

In general, samples, experiments found such a solution for its task:
Loaded both physical ports in Bridge + added VLAN (it is also a virtual connection of my current main server). Prescribed such config in / etc / network / interfaces:

auto ivs0
Allow-OVS0 OVS0
IFACE OVS0 INET MANUAL
 OVS_TYPE OVSBRIDGE.
 OVS_PORTS ENO1 ENO2 VLAN1
AUTO ENO1
Allow-OVS0 ENO1
IFACE ENO1 INET MANUAL
OVS_BRIDGE OVS0.
OVS_TYPE OVSPORT
AUTO ENO2.
Allow-OVS0 ENO2
IFACE ENO2 INET MANUAL
OVS_BRIDGE OVS0.
OVS_TYPE OVSPORT
AUTO VLAN1.
Allow-OVNS VLAN1
IFACE VLAN1 INET STATIC
ADDRESS 192.168.10.2.
NetMask 255.255.255.0.
Gateway 192.168.10.253
DNS-NameServers 192.168.10.1
OVS_BRIDGE OVS0.
OVS_TYPE OVSINTPORT

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions