The following forum(s) have migrated to Microsoft Q&A (Preview): Azure Virtual Machines!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
Ping issue with Linux RRS feed

  • Question

  • When I install a linux VM, say Ubuntu, on AWS/on-premise VMWare or virtualbox, anywhere, I cannot ping my machine with another machine directly with hostname, I can do only with IPAddress.

    No matter whether I installed wins or any other package, the issue persists.

    It is working only with manual entries in hosts file.

    But, if I install a Linux VM on Azure, it is able to ping another linux machine directly.

    So, can anyone please how it is working with Azure, so that I can implement the same with other infrastructure also.


    Thanks and Regards, Uday Kiran Reddy Project Engineer Technology Infrastructure Services, Wipro Technologies ____________________________________________ Mob: +91-900-061-2578 | Email: uday1kiran@live.in

    Monday, November 18, 2019 6:33 AM

All replies

  • Hi Uday,

    I suggest you to read about DNS (Domain Name System). Because of that you are able to ping with hostname.

    When you give the command "ping some-hostname", Then that hostname is sent to the DNS to convert them to the ip address. Then the communication happens as usual via IP.

    In Azure, Vnets can be configured with Azure provided or custom DNS servers. More info is here

    I think in your case, Azure provided dns servers are used and thats the default. You can go to the Vnet in the portal and click on "DNS servers" on the Vnet blade to know that.

    With that setting, Each Vm created in the Vnet will have that dns servers added with a domain(usually <randomstring>tx.internal.cloudapp.net)

    You can look at the contents of the file /etc/resolv.conf   to know about the dns domain and the list of dns servers configured with that particular VM. In Azure DNS server address will have localhost which will be forwarded.

    Now lets see how you can do that same in On premise.

    Your organization will have a DNS server. Collect that info and configure them on your linux machines /etc/resolv.conf file. Then create an DNS A record for your server on the DNS server. (In azure this record is created automatically.) For adding the record you need to check with the Organizations DNS administrator.

    Once the record is added, Then you can ping them with hostname from other Servers where the same dns is added in /etc/resolv.conf.

    Let me know if you have more questions.

    For the benefit of the community, Please click on "mark as answer" for the reply which helped you to solve the problem.


    Monday, November 18, 2019 8:55 AM
  • Hello,

    Any update on the issue?

    If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" on the answer that helped you for benefit of community.

    Thanks.

    Tuesday, November 26, 2019 10:46 AM
  • Hello,

    Any update on the issue?

    If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" for the answer that helped you for benefit of the community.

    Thanks.
    Friday, November 29, 2019 9:58 AM