Book Image

Learning Python Network Programming

By : Dr. M. O. Faruque Sarker, Samuel B Washington, Sam Washington
Book Image

Learning Python Network Programming

By: Dr. M. O. Faruque Sarker, Samuel B Washington, Sam Washington

Overview of this book

Table of Contents (17 chapters)
Learning Python Network Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 6. IP and DNS

Every computer that is connected to a network needs an IP address. In Chapter 1, Network Programming and Python, an introduction to TCP/IP networking was presented. The IP address labels a machine's network interface with a numeric identifier, which also identifies the location of the machine, albeit with limited reliability. Domain Name System (DNS) is a core network service that maps the names to the IP addresses and vice-verse. In this chapter, we will mainly focus on manipulating the IP and DNS protocols with the help of Python. In addition to this, we will briefly discuss the Network Time Protocol (NTP), which helps in synchronizing the time with a centralized time server. The following topics will be discussed here:

  • Retrieving the network configuration of a local machine

  • Manipulating the IP addresses

  • The GeoIP look-ups

  • Working with DNS

  • Working with NTP