[Ilugc] .a-tip-a-day. (sipcalc - clear confusion over netmasks and IP addresses)

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Sun Sep 27 08:57:14 2009

$   sipcalc 203.196.171.124/28
-[ipv4 : 203.196.171.124/28] - 0

[CIDR]
Host address            - 203.196.171.124
Host address (decimal)  - 3418663804
Host address (hex)      - CBC4AB7C
Network address         - 203.196.171.112
Network mask            - 255.255.255.240
Network mask (bits)     - 28
Network mask (hex)      - FFFFFFF0
Broadcast address       - 203.196.171.127
Cisco wildcard          - 0.0.0.15
Addresses in network    - 16
Network range           - 203.196.171.112 - 203.196.171.127
Usable range            - 203.196.171.113 - 203.196.171.126

I think this is self explanatory. ;)

I get reminded of this great Tamil saying my friend said:

"Budhisaliku solli puriya veka vendiyathu illai, muttaluku sonnalum puriyathu"

Have a good laugh. ;)

It means this in Anglias.

" It is pointless to make a fool understand: For the truly wise there
is no need to explain."

Anyway I will digress a bit and speak about mail servers.

This IP address belongs to a company in TIDEL park HealthsoftUSA Pvt. Ltd.

This is the way you figure out the mail server IP addresses(MX
records) once you know the e-mail ID
of your friend.

Say you are sending mail to aplawrence.com.

His ID is tony@xxxxxxxxxxxxxx. So Do a cut at the '@' character and
take the domain part.

Now, run dig on it with the '-t mx' switch.

$ dig -t mx aplawrence.com
;; ANSWER SECTION:
aplawrence.com.         7200    IN      MX      10 aplawrence.com.


Amidst all the noise in the output, this is what we want.

There is aplawrence.com with a MX weight of 10.

Now let us look at girish1729@xxxxxxxx.

$ dig -t mx zoho.com
;; ANSWER SECTION:
zoho.com.               1800    IN      MX      10 mx.zohomail.com.
zoho.com.               1800    IN      MX      20 mx2.zohomail.com.
zoho.com.               1800    IN      MX      50 mx3.zohomail.com.

We have three mail servers here. Now we want to figure out the IP
addresses of each of them.

You can easily find out either with a ping or dig again.

$ dig mx.zohomail.com
;; ANSWER SECTION:
mx.zohomail.com.        140     IN      A       72.5.230.114

I got this from the noise.

Now, the thing with static public IP addresses is that usually big
companies/corporates buy a block of
16 IP addresses. So their mask will be this in most cases.
255.255.255.240 or /28.

Then you want to know two things:

a) which is the gateway in the upstream router of the ISP
b) Which are the public IPs I can use for other purposes like HTTP,
load balancing and so on

sipcalc is useful for that.

Sorry I want to digress little more now.

You saw the zoho had three mail servers with MX weights 10, 20 and 50
respectively.

This means that mails will be delivered with the record with weight 10
first. If that is busy,then
the one with 20 and so on.

Always priority in the technology world works this way. Lower the
number, higher the priority.

The idea of having multiple mail servers is to tell the mail server
that sends mail that you can
try contacting my backup mail server in case my primary mail server is
busy or that the link is full or down.

-Girish

Gayatri Hitech
web: http://gayatri-hitech.com

SpamCheetah Spam filter:
http://spam-cheetah.com

Other related posts:

  • » [Ilugc] .a-tip-a-day. (sipcalc - clear confusion over netmasks and IP addresses) - Girish Venkatachalam