Problemas de encapsulamento de IP com o RDP

1

Eu tenho um problema com o tunelamento IP.

Servidores :

  • services01 (host proxmox) (ips internos: 10.21.21.0/24) (encapsulamento ip 172.16.0.1)
  • backup01 (host proxmox) (ips internos: 10.21.23.0/24) (encapsulamento ip 172.16.0.2)

VMs:

  • 10.21.21.7 - VM1 em serviços01
  • 10.21.23.4 - VM2 no backup01

Problema:

  • Cenário 1. Usando o login do KVM da VM2 do backup01. Conecte-se ao fileshare em 10.21.21.7 e baixe qualquer arquivo de ~ 10 GB, teste a funcionalidade da rede, etc - está tudo bem, sem problemas de rede, velocidade ~ 1 gbit, sem timeouts.
  • Cenário 2. Conecte-se de 10.21.21.7 a 10.21.23.4 usando Microsoft RDP , não faça nada e a cada 2 ou 3 minutos estou sendo desconectado da sessão RDP e, em seguida, reconectar. De acordo com dados de ping de 10.21.21.7 a 10.23.23.4, há tempo limite (para 2-3 solicitações de ping), mas ao mesmo tempo, o ping de 10.23.23.1 (host) para 10.23.23.4 mostra que não houve timeouts.

Configuração: /etc/network/interfaces (backup01)

auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
    address xx.xx.xx.95
    netmask 255.255.255.0
    gateway xx.xx.xx.1
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0

auto vmbr2
iface vmbr2 inet static
    address  10.21.23.1
    netmask  255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables-restore -n < /root/rules.txt

Script que eu uso para criar conexão VLAN para VLAN

#!/bin/sh
#/etc/init.d/tun_serv
#

### BEGIN INIT INFO
# Provides:          tun_serv
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Tun
# Description:       Tunnel
### END INIT INFO      

tun_name='tun_serv';
localip='xx.xx.xx.95';
remouteip='yy.yy.yy.213';
tunip='172.16.0.2';
ptpip='172.16.0.1';
route_to_net=10.21.21.0/24;

touch /var/lock/$tun_name;

case "$1" in
  start)
        echo "Create $tun_name Network"

        ip tunnel add $tun_name mode ipip local $localip remote $remouteip dev vmbr0
        ifconfig $tun_name $tunip/30 pointopoint $ptpip
        ifconfig $tun_name up

        echo "add routes to $route_to_net !"
        ip route add $route_to_net via $ptpip dev $tun_name metric 0

        echo "Add iptables rulles for multicast on ${tun_name}"

        iptables -A INPUT -s $ptpip/30 -j ACCEPT
        iptables -A INPUT -d $ptpip/30 -j ACCEPT
        iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT
        iptables -A INPUT -m pkttype --pkt-type broadcast -j ACCEPT
        ;;
  stop)
        echo "Stopping Network $tun_name"
        ifconfig $tun_name down
        echo "Remove routes"
        ip route del $route_to_net via $ptpip dev $tun_name metric 0

        ;;
  remove)
        echo "Stopping Network $tun_name"
        ifconfig $tun_name down
        echo "Remove Network $tun_name"
        ip tunnel del $tun_name

        echo "Remove routes"
        ip route del $route_to_net via $ptpip dev $tun_name metric 0

        echo "Remove rules from iptables $tun_name"
        iptables -D INPUT -s $ptpip/30 -j ACCEPT
        iptables -D INPUT -d $ptpip/30 -j ACCEPT
        iptables -D INPUT -m pkttype --pkt-type multicast -j ACCEPT
        iptables -D INPUT -m pkttype --pkt-type broadcast -j ACCEPT
        ;;

  *)
        echo "Usage: /etc/init.d/$tun_name {start|stop|remove}"
        exit 1
        ;;
esac

exit 0
    
por skydev 08.05.2017 / 13:11

0 respostas