IP Fragmentation

In one of my previous posts (https://rtodto.net/2011/08/18/path-mtu-ip-fragmentation-and-mss/) , I wrote about IP fragmentation. This time I would like to show some wireshark screen shots showing a single IP packet consisting of 3 fragmentations to see the IP header fields used in fragmentation process. This IP packet is carrying an HTTP response: List of packets in
Read More »

DNS uses UDP or TCP?

As you know DNS uses UDP primarily as its transport layer protocol to communicate but for zone transfers (opcode AXFR,IXFR) it also uses TCP. There is one more indeed! DNS messages are restricted to 512 bytes and according to RFC 1035 (one of my favorites by the way), longer messages are truncated and TC bit
Read More »

Negative caching on DNS

Today I have increased the SOA minimum TTL value to increase my negative caching period but I have seen that no DNS server respect my change:) Here are two different results; From Google server 8.8.8.8 [root@tux1 ~]# dig test.rtoodtoo.net ; DiG 9.7.4b1-RedHat-9.7.4-0.3.b1.fc14 test.rtoodtoo.net ;; global options: +cmd ;; Got answer: ;; ->>HEADERHEADER

searching dictionary by value in python

The following list comprehension is a life saver for me to search a dictionary by value. Searching dictionary by value may not seem to be sensible as you may get multiple values but in case needed, it is a wonderful one line of code. list_values = [ key for key,val in mydict.items() if val==value ]
Read More »

How to turn a list into string

Here is a quote from python.org describing how we can use the join method. str.join(iterable) Return a string which is the concatenation of the strings in the iterable iterable. The separator between elements is the string providing this method. As it can be seen it isn’t only for strings but for something called “iterable”. Again
Read More »

Python list comprehensions

I don’t know if you have used list comprehension in Python. It is a great feature. You can go through a list and do some small changes with very little effort. Here is an example; For example you have a list of user names and you would like to shorten these user names to 8
Read More »

Increasing the number of inodes

If you are keeping huge number of small files in your disks, this may one day cause running out of available inodes because of which even though you might have sufficient disk space, file system cannot create new files. Lets see how it works in my 1GB disk partition. The parameter “-i” allows us to
Read More »

Linux file attributes

Have you ever received such an error when you are logged in as root? This error surprised me as I asked myself: Hang on a second! I am the super user, I should be able to change the permission of this regular file. [root@tux /]# chmod 644 /test chmod: changing permissions of `/test': Operation not
Read More »

Junos Space Password Recovery

There are three username/password pair that you may work with in Junos Space application: admin user used for CLI login to Linux (default password during installation: abc123) super user used for WEBUI (default initial password: juniper123) maintenance user used for maintenance operations and password of which is set by the administrator (i.e there is no
Read More »