What can I do if the network does not work

From ProfitBricks Online Help
Jump to: navigation, search

Cloud Network

Try to connect using the Remote Console of your VM. If this works, perform the following steps.

First, we need to know the following:

  • VM name
  • IP address
  • URLs of web applications that may run on the VMs.


Second, we need the output of the following commands:

Windows

  • ping Hostname
  • date /t
  • time /t
  • route print

Linux

  • date
  • traceroute
  • ping Hostname


The output of the following commands is also useful: arp -n, ip address list, ip route show, ip neighbour show, iptables --list --numeric --verbose, cat /etc/sysconfig/network-scrips/ifcfg-eth*, cat /etc/network/interfaces, cat /etc/resolv.conf, netstat tcp --udp --numeric -a.


Skript (for Linux-based VMs)

In order to help you collect the required information quickly, we have created a script for you to copy, which generates the output both on screen and to a file, which you can then send to us for further analysis.

It is recommended you execute the script with the additional parameter -p, which causes the script to pause after each command so that you can take a look at the output and take screenshots, if necessary.

#!/bin/bash

# Author: Georg Schieche-Dirik
# Contact: georg.schieche-dirik@profitbricks.com
# Organization: ProfitBricks GmbH
# License: GPL3

# This script aims to help you collect network related basic system information which is necessary to investigate 
# issues on VM that run on the ProfitBricks platform but have only reduced or no network connectivity.
# It should be usable for any other Linux installation anywhere as well.

function ShowHelp {
    if [[ $LANG =~ de ]] ; then
        echo
        echo "Anwendung:"
        echo
        echo "$0 [-p|--pause [Anhalten zwischen den einzelnen Kommandos]] [-t|--targethost Zieladresse]"
        echo "[-h|--help [Anzeigen dieser Hilfe]]"
        echo
        echo "Als Ziele sollten öffentlich erreichbare IP-Adressen gewählt werden wie z. B." 
        echo "185.48.118.10 (profitbricks.de)." 
        echo
        echo "Die Option -p hält den Programmablauf an, damit die Ausgabe mittels Screenshot festghalten werden kann."
        echo
    else 
        echo
        echo "Usage:"
        echo
        echo "$0 [-p|--pause [pause after each cammand execution]] [-t|--targethost host_to_test]" 
        echo "[-h|--help [print this help message]]"
        echo
        echo "As target host you should prefer a publicly reachable IP address, for" 
        echo "example 185.48.118.10 (profitbricks.de)."
        echo
        echo "The pause option -p pauses the command execution for taking screenshots" 
        echo "of each console output one after another."
        echo
    fi
}

TargetHost=185.48.118.10
ResultFile=/tmp/support_$(hostname)_$(date +%s).log

while test $# -gt 0 ; do
    case "$1" in
        -p|--pause) 
            Pause="echo 'Please type enter to proceed.' ; read";
            shift ;;
        -h|--help)
            ShowHelp;
            exit ;; 
        -t|--targethost) shift;
            TargetHost=$1;
            if [[ "$TargetHost" == "" ]] ; then
                ShowHelp
                exit 2
            fi ;
            shift ;;
         *) ShowHelp;
            exit 2 ;;
    esac
done

CommandList=(
    "date"
    "uname -a"
    "cat /etc/os-release"
    "arp -n"
    "ip address list"
    "ip route show"
    "ip neighbour show"
    "iptables --list --numeric --verbose"
    "cat /etc/sysconfig/network-scrips/ifcfg-eth*"
    "cat /etc/network/interfaces"
    "cat /etc/resolv.conf"
    "netstat --tcp --numeric -a"
    "netstat --udp --numeric -a"
    "ping -c 5 localhost"
    "mtr -n -r $TargetHost"
    "ping -c 5 $TargetHost"
)

function CheckNetwork {
    for i in $(seq 0 $((${#CommandList[*]}-1))) ; do 
        TopLine=$(echo ${CommandList[$i]} | tr '[:print:]' '=')
        echo
        echo "========${TopLine}========"
        echo "======= ${CommandList[$i]} ======= "
        echo
        eval ${CommandList[$i]} 
        echo
        eval $Pause
    done
}

CheckNetwork | tee $ResultFile

echo 

if [[ $LANG =~ de ]] ; then
   echo "Wenn Sie ein Supportticket eröffnen möchten, senden Sie bitte eine E-Mail an support@profitbricks.com"
   echo "und hängen Sie die Datei ${ResultFile} oder Screenshots der Kommandoausgaben an die E-Mail."
else 
   echo "If you would like to open a ticket for the ProfitBricks support, please write an e-mail to support@profitbricks.com"
   echo "and attach the file ${ResultFile} or the screenshots of the command output to it."
fi

echo 




If your question was not answered, please contact us.

Additional FAQs and support information can be found on the following resources:

ProfitBricks Cloud Computing Blog

ProfitBricks Press & Infocenter

Personal tools
Namespaces

Variants
Actions
Online Help
Introduction
First Steps in the Data Center Designer
Elements and Functions
Information
Tutorials
FAQ
DevOps Central Website
Tools