• Skip to primary navigation
  • Skip to content
  • Skip to footer
Devang Patel
  • Posts
  • Categories
  • Tags
  • About
    Devang Patel

    Devang Patel

    Network Professional CCIE/3xJNCIE Python

    • GitHub
    • LinkedIn

    DNS name resolution using Python

    less than 1 minute read

    Script I used to resolve DNS name to IP.

    '''
    NetOps
    Given url find out the IP address of it
    Devang Patel
    '''
    import socket
    ip_add = 'Not a valid name'
    try:
        ip_add = socket.gethostbyname('www.google.com')
    except socket.gaierror as e:
        print(e)
    print(ip_add)
    
    

    Output:

    172.217.6.68
    

    Tags: NetOps, Networking

    Categories: Blog

    Updated: December 13, 2016

    Twitter Facebook LinkedIn
    Previous Next

    You May Also Enjoy

    400G Migration Notes

    1 minute read

    Ever growing data bandwidth requirement pushes the operators to constantly optimize traffic engineering to accommodate the growth with available resources. A...

    What limits your decision?

    1 minute read

    What limits your design or architectural decision?

    Next hop based Dynamic Tunnels - MPLSoUDP

    16 minute read

    Scaling is a biggest concern in could providers in terms of tunnel interfaces. Network devices also have to deal with lots of tunnel interfaces and related s...

    GO XML parsing

    1 minute read

    API calls are very common while working with modern networking devices. Recently I had to work on the XML API with one of the network vendor to fetch the dat...

    • GitHub
    • Feed
    © 2022 Devang Patel. Powered by Jekyll & Minimal Mistakes.