zeroslash.io

TCP/IP Sockets - How Applications Open a Connection To Access The Network

Submitted by zeroslash on Tue, 02/25/2020 - 05:50

In this topic we will use client-server applications for our example as they are the most common type of application that exist on the Internet. Client-server communication works where one application (the server) listens on a particular port and on a particular IP address on the computer it's running on, while another application (the client) does almost the same, only that it doesn't listen instead it initiates the connection and tries to reach the listening port on the server.

Network Automation Example - Finditer With Defaultdict

Submitted by zeroslash on Sat, 04/27/2019 - 01:40

In this example, I explored another approach to using Finditer to count network interfaces in my last post. I recommend you check that out first before going through this one.

Here I combined re.finditer() with defaultdict() instead, keeping the matched patterns associated with the keyword we are looking for.

Network Automation Example - Finditer With Counter

Submitted by zeroslash on Thu, 12/27/2018 - 11:10

Still using the same example data that I've been using in my previous Network Automation examples, this time around I try out a counting scenario.

In this example, I wanted a quick and easy way to just zip through the text and count how many interfaces of a certain type I will find.

I'm using the re.finditer() function to give me an iterable of all matches (line 16).

The Difference Between Pings To vs Pings Through a Network Device

Submitted by zeroslash on Mon, 10/22/2018 - 08:35

Have you ever encountered a situation wherein you did a continuous ping to a network device and saw packet loss, but did another continuous ping through it towards a device behind it and saw no packet loss? This can be a more common scenario in network troubleshooting than you might think.

Let's look at the below example diagram.