Posts

Showing posts from April, 2019

Network Utilities

Image
Network Utilities ping:  ping command is used to test the ability of the source computer to reach a specified destination computer. netstat :   It is used to display detailed info about how your computer is communicating with network devices. ipconfig: It is a console application designed to run from the windows command prompt. This utility allows you to get IP Addresses info of a window computer. arp: It displays and modifies entries in the Address resolution protocol cache which contains one or more tables that are used to store IP and their resolved ethernet. traceroute: It is a function which traces the path from one network on another. It allows us to diagnose the source of many problems.

Socket Programming for TCP in Python

Image
Socket Programming for TCP in Python Sockets and the socket API are used to send messages across a network. They provide a form of interprocess communication (IPC). The network can be logical, a local network to the computer or physically connected to an external network, with its own connection to the other networks. The obvious example is the internet. Sockets have a long history. Their use originated with ARPANET in 1971 & later become an API in the Berkley Software Distribution (BSD) operating system released in 1983 called Berkely sockets. The most common type of socket applications is client-server applications where one side acts as the server & waits for the connections from the clients. TCP Sockets: We will create a socket object using socket .socket() and specify the socket type as socket.SOCK_STREAM. When we do that the default protocol that used is the transmission control protocol (TCP).

Socket Programming using UDP in Python

Image
Socket Programming using UDP in Python What is Socket Programming? Socket programming is a way of connecting two nodes a network to communicate with each other. One socket (mode) listens on a particular port an IP, while other socket reaches out to the other to form a connection, server forms the listens to socket while client reaches out to the server. UDP: UDP or user datagram protocol is connectionless protocol/ which is suitable for applications that require efficient communication that doesn't have to carry about packet loss. For gaming applications, this tends to the perfect protocol due to the lower overhead in current as opposed to TCP. Steps to implement UDP using Socket programming: import socket library create a socket object reserve a port on computer and bind to port. put the socket into listening mode. establish a connection with the client. start server (after importing and creating socket ) open the terminal and connect to the server with t