• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Add vlan network on eth1

Larsm

Basic Pleskian
Hello,

I need to add VLAN to my server on the second Networkinterface.

The command

route add -net 10.x.122.0 netmask 255.255.255.0 gw 10.x.y.1 eth1 don't work.

So I add the ip and netmask to the IP address list to Plesk. But how can I change the gateway?
 
Hi Larsm,

pls. note, that we can't guess your operating system and your current network configuration. To answer your question, it would really help, if you provide for example the existing interface configuration file(s):

For Ubuntu/Debian based systems:
Code:
/etc/network/interfaces

For CentOS/RHEL based systems:
Code:
/etc/sysconfig/network-scripts/ifcfg-XXXX
 
Hi Larsm,

pls. note, that we can't guess your operating system and your current network configuration. To answer your question, it would really help, if you provide for example the existing interface configuration file(s):

For Ubuntu/Debian based systems:
Code:
/etc/network/interfaces

For CentOS/RHEL based systems:
Code:
/etc/sysconfig/network-scripts/ifcfg-XXXX

This is my interfaces conf. I only add the eht1 section. The other dublicate?! entry's are add from plesk.

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
iface eth0:1 inet static
        address 81.169.168.7
        netmask 255.255.255.255
auto eth0:1
iface eth0:1 inet static
        address 81.169.168.7
        netmask 255.255.255.255
auto eth0:
iface eth0:1 inet static
        address 81.169.168.7
        netmask 255.255.255.255
auto eth0:1
iface eth0:1 inet static
        address 81.169.168.7
        netmask 255.255.255.255
auto eth0:1
iface eth0:1 inet static
        address 81.169.168.7
        netmask 255.255.255.255
auto eth0:1
iface eth0:1 inet static
        address 81.169.168.7
        netmask 255.255.255.255
auto eth0:1
auto eth1
iface eth1 inet static
        address 10.31.122.0
        netmask 255.255.255.0
        network 10.48.0.0
        broadcast 10.31.122.255
        mtu 1500
Here the IP-Adresses in Plesk.

361ab41956a61668f70140e1b46a8083.jpg


Ifconfig

Code:
docker0   Link encap:Ethernet  Hardware Adresse 02:42:1f:dd:62:e7
          inet Adresse:172.17.0.1  Bcast:0.0.0.0  Maske:255.255.0.0
          inet6-Adresse: fe80::42:1fff:fedd:62e7/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:22 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:20 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX-Bytes:22073 (22.0 KB)  TX-Bytes:2646 (2.6 KB)

eth0      Link encap:Ethernet  Hardware Adresse 8c:89:a5:1d:ad:8f
          inet Adresse:85.214.229.172  Bcast:85.214.229.172  Maske:255.255.255.255
          inet6-Adresse: fe80::8e89:a5ff:fe1d:ad8f/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:124217849 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:247755658 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX-Bytes:10130454727 (10.1 GB)  TX-Bytes:373361528482 (373.3 GB)
          Interrupt:16 Speicher:feae0000-feb00000

eth0:1    Link encap:Ethernet  Hardware Adresse 8c:89:a5:1d:ad:8f
          inet Adresse:81.169.168.7  Bcast:0.0.0.0  Maske:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          Interrupt:16 Speicher:feae0000-feb00000

eth1      Link encap:Ethernet  Hardware Adresse 8c:89:a5:1d:ad:90
          inet Adresse:10.48.0.0  Bcast:10.48.255.255  Maske:255.255.0.0
          inet6-Adresse: fe80::8e89:a5ff:fe1d:ad90/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:10 Fehler:0 Verloren:3 Überläufe:0 Fenster:0
          TX-Pakete:56 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX-Bytes:640 (640.0 B)  TX-Bytes:3752 (3.7 KB)
          Interrupt:17 Speicher:febe0000-fec00000

lo        Link encap:Lokale Schleife
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:65536  Metrik:1
          RX-Pakete:5937789 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:5937789 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1
          RX-Bytes:3586131362 (3.5 GB)  TX-Bytes:3586131362 (3.5 GB)

tun0      Link encap:UNSPEC  Hardware Adresse 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet Adresse:10.8.0.1  P-z-P:10.8.0.2  Maske:255.255.255.255
          UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:0 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:0 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:100
          RX-Bytes:0 (0.0 B)  TX-Bytes:0 (0.0 B)

veth3893d5f Link encap:Ethernet  Hardware Adresse a2:96:f6:6d:82:72
          inet6-Adresse: fe80::a096:f6ff:fe6d:8272/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:22 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:28 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX-Bytes:22381 (22.3 KB)  TX-Bytes:3294 (3.2 KB)

Gesendet von meinem Nexus 5X mit Tapatalk
 
Last edited:
Hi Larsm,

according to your provided informations, I suggest to correct your configuration file to:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface

auto lo
iface lo inet loopback

auto eth0 
iface eth0 inet static
    address 85.214.229.172
    netmask 255.255.255.255
    gateway 85.214.229.1

auto eth0:1
iface eth0:1 inet static
    address 81.169.168.7
    netmask 255.255.255.255

auto eth1
iface eth1 inet static
    address 10.31.122.0
    netmask 255.255.255.0
    network 10.48.0.0
    broadcast 10.31.122.255
    mtu 1500

You should definetly CHECK over the Control of your IP - provider, that the IP addresses and their netmask definition match your settings. ONLY if they match, you should afterwards consider to reboot your server, to be sure, that all your settings are correct now. ;)
( Pls. keep a special eye onto the GATEWAY - definitions at the Control Panel of your IP - provider! ;) )
 
Hi, i changed it but it must be

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
    address 85.214.229.172
    netmask 255.255.255.255

auto eth0:1
iface eth0:1 inet dhcp
    address 81.169.168.7
    netmask 255.255.255.255

#vlan
auto eth1
iface eth1 inet static
    address 10.31.122.8
    netmask 255.255.255.0
    network 10.48.0.0
    broadcast 10.31.122.255
    mtu 1500
iface eth1:1 inet static
   address 10.31.122.0
   netmask 255.255.255.0

Plesk wont accept the new IP, but after reconfigure Plesk addet this
Code:
auto eth0:1
iface eth0:1 inet dhcp
    address 81.169.168.7
    netmask 255.255.255.255
to the end of the file. I dont why :-/



i can pinging from the VLAN Backend my server but can connect to this with ncftp or curl.

Code:
connect to 10.xx.y.24 port 21 failed: no route to host
 
Back
Top