Sunday, July 26, 2009

About Gujarat

Our State of GUJARAT Situated in western India and bordering Pakistan , Gujarat is among Indias most prosperous states.

Its per capita GDP is 2.4 times the Indian average.

Gujaratis GDP growth rate is 10.6% and India can not achieve 8 percent Growth rate without Gujarat getting closer to 12% growth rate.

If it was a nation it would have been 67th richest nation in the world above many European and Asian economies like Taiwan and Ukraine .

Gujarat holds many records in India for economic development:
20% of India 's Industrial Output
80% of India 's Diamond Production
9% of India 's Mineral Production
50% of India 's Natural Gas Production
54% of India 's Crude Oil Production
22% of India 's exports
24% of India 's textile production
45% of India 's pharmaceutical products
35% of India 's Sponge Iron Production
47% of India 's petrochemical Production

The world's largest ship breaking yard is in Gujarat near Bhavnagar at Alang.

Reliance Petroleum Limited, one of the group companies of Reliance Industries Limited founded by Dhirubhai Ambani operates the oil refinery at Jamnagar which is the world's largest grass roots refineries.

Gujarat ranks first nationwide in gas-based thermal electricity generation with national market share of over 8% and second nationwide in nuclear electricity generation with national market share of over 1%.

Over 20% of the S&P CNX 500 conglomerates have corporate offices in Gujarat

Over 35% of the stock market wealth of India is with Gujarati People.

In recent Forbes magazine list of 10 richest Indian people four are Gujarati - Mukesh Ambani, Anil Ambani, Azim Premji and Tulsi Tanti Over 60% of Indian Population in North America is Gujarati.

An average income of a Gujarati family in North America is three times more than the average income of an American family.

Gujarat is having the longest sea shore compared to any other Indian state

Gujarat is having the highest no. of operating airports in India (Total 12).

India 's 16% of Investment are from Gujarat ..

Gujarat is having highest no. of vegetarian people compared to any other state in India ..

The first ALL VEG PIZZA-HUT was opened in Ahmedabad

Ahmedabad “ the commercial capital of Gujarat is the seventh largest city in India ..

Surat is the fastest growing city in the world.

Gandhinagar is the Greenest Capital City in whole Asia

Indian Institute of Management, Ahmedabad(IIMA) is Asia 's 1st and world's 45th ranked management college located in Ahmedabad, Gujarat .

Gujarat is the safest state as the Crime rate of it is 8.2 which is the least in India stated by India Today 2005 report.

Gujarat is having least crime against women among all Indian states where AP is 1st, Delhi is 2nd , Bihar is 3rd , Zarakhand is 4th and UP is 5th.

Ahmedabad which is the seventh largest city in India is the lowest in crime rate among all Tier-I and Tier-II cities of India as per National Crime Records Bureau (NCRB) report.

Ahmedabad is ranked 2nd in Real Estate - Ahead of Bangalore, Chennai, Hyderabad, Mumbai & Delhi.

Ahmedabad is ranked 3rd in Policy Initiatives - Ahead of Bangalore, Chennai, Calcutta, Mumbai & Delhi.

Ahmedabad is ranked 4th in Manpower - Ahead of Bangalore, Chennai, Mumbai & Delhi.

Percent of man-days lost in Gujarat due to labor strike are lowest in country - just 0.52%

It is the first state to implement the BOT law for encouraging private sector participation

The first state to have to fully functional LNG terminal

Gujarat has 33 approved SEZs

Gujarat is the first state to interconnect 20 rivers

It is the first state to provide uninterrupted 24hr 2 phase electricity to all villages

It is the only state with statewide gas grid

It is currently implementing statewide water distribution grid that will connect all 14,000 villages and all cities

It has largest e-governance network in Asia Pacific

Its agricultural production has been increased four-fold in five years (from USD 2 Billion in 2001-2002 to 7.5 Billion in 2005-2006)

In every corner of Gujarat , within the range of 25 KMs there is a development going on.

Operation WHITE FLOOD (MILK) was initiated in Gujarat by Dr. Kurien which took India in 1998 to become highest milk producer in the world.

Consumption of GOLD in Gujarat is highest in India ..

Largest number of immigration & emigration is done from Gujarat ..

Also highest Numbers of passports are issued from Gujarat .

Baroda gas project - bringing natural gas to every home - More than 35 years ago they installed pipelines to bring natural gas to every kitchen.

AMUL - NDDB another achievement for Gujarat - it was just fantastic to see how they collected milk early morning from every village in Gujarat . The villagers would line up at 3 in the morning at the milk collection centers!!! What a sight!

According to a recent study by the Reserve Bank of India, the country's central bank, Gujarat stood first in the country with investments of US$17.8 billion in 2006-07 or 25.8% of India 's total investment of $69 billion during the year.The southern state of Andhra Pradesh stood a distant second having attracted $6.1 billion in 2006-07.

Gujarat moved up from second place in 2005-06 having tripled its investments in a year..

A report in Times of India describes the Gulf of Kutch as India 's ' Gulf of Riches '. Four top business houses - Reliance Industries, Essar Group, Adani Group and Tata Group, have invested about $34 billion along the Gulf of Kutch's 700-kilometer long coastline. Other corporate, which had invested over $3.26 billion since the 2001 earthquake have investments worth another $19.5 billion in the pipeline.

Ten special economic zones (SEZs) near Jamnagar , a 4000-megawatt power project and five private shipyards are coming up. And massive expansion is being undertaken of the Mundra and Kandla ports.

Gujarat 's 41 ports handle 80% of India 's port traffic and 20% of its cargo. It is estimated that by 2015, Gujarat 's ports will handle 39% of India 's cargo.

Not only has Gujarat unseated Maharashtra as India 's number one investment destination but also, it is threatening to dislodge Mumbai, Maharashtra 's capital and the financial and business capital of India , as the trade gateway to the country..

Mundra port where Indian Oil Corporation and Hindustan Petroleum are setting up giant oil storage capacities has already emerged as India 's largest private oil storage tank farm.

Sixty percent of India 's coal imports enter via Mundra port. Mundra's importance is likely to soar further with the completion of mega power plants being set up by Adanis and Tatas.

The volume of cargo handled by Mundra and Kandla ports alone has outstripped that handled by Mumbai's ports - the Mumbai Port Trust and the Jawaharlal Nehru Port Trust.

And now Gujarat is nursing ambitions of dislodging Mumbai as India 's financial hub. Its government recently announced the setting up of an international financial services center, the Gujarat International Finance Tech-City with an investment outlay of $6 billion in Ahmedabad.

Forbes Magazine published list of Top 20 Self-Made Business-Men from Asia The list includes 6 men from India and out of 6 three are Gujarati - Tulsi Tanti, Gautam Adani and Uday Kotak..

Be VERY PROUD to be a GUJARATI and please pass alone this to other Gujarati'

Wednesday, July 15, 2009

Recipes for Networking

n this article, we’ll explore networking under GNU/Linux. You’ll find it interesting to manage the entire network through certain valid keystrokes known as commands. Imagine that you have to access the contents of several other machines from a mount point in your machine. Then imagine shutting down, rebooting, and installing applications on those remote machines, all at one time? Could you configure the WLAN and LAN interfaces from the CLI? This tutorial gives you some insights to the exciting bytes on controlling your network under GNU/Linux.

First we will learn the ‘Hello World’ of a networked machine.

Let us ping!

ping is a universal command that is available on every operating system to test the reachability of a network. When you shoot your terminal with the ping command and an IP address as its argument, the machine will try to send some bits of raw data towards the machine owning that IP address. If some machine exists with that IP address, it will send back certain bits. Thus the machine receives the bits and it confirms that a path is available from the current machine to the other through a network. We can check the existence of certain machines on the network by just pinging.

To see which machines are up in the current network, let’s write a bit of shell script. Open vim as the root:

# vim /usr/bin/netup.sh

…and key in the following lines in it:

#/bin/bash for i in 192.168.1.{1..255}; // checks 192.168.1.x class of IPs. do ping -c2 $i > /dev/null; [ $? -eq 0 ] && echo $i is up.  trap "exit"  SIGINT  // To force exit when Ctrl+C  keystroke is applied. done

Save the file, and make it executable by running the following command:

chmod a+x /usr/bin/netup.sh

Now, run the script as:

[slynux@gnuxbox ~]$ netup.sh 192.168.1.1 is up. 192.168.1.3 is up. 192.168.1.4 is up.

Configuring your network

Now, let us look at how to configure your machine on the network. You can configure it using two methods. It can be configured manually by the ifconfig command for static IP addressing or it can be done via the DHCP (Direct Host Control Protocol).

Static IP addressing is the one that you explicitly instruct the system to use by giving an IP address for a given Ethernet or wireless interface. In case you’re using the DHCP, simply issuing the dhclient command will fetch the system an available IP address from the DHCP server in your network. Note that it may not be the same IP address that your machine fetches each time you issue dhclient.

Interface cards

Machines are networked either via network cables or using wireless protocols. LAN cards used for networking are known as Ethernet and wireless LAN (WLAN) cards. We interface the network via this outlet. In *nix platforms, Ethernet cards or WLAN cards are denoted as eth0, eth1, etc, or wlan0, wlan1, etc, respectively.

ifconfig

We have ifconfig, a.k.a the interface config, for setting up a network on the machine. To get information about the availability of interface devices available on the current machine, open a terminal and execute the following as the root:

[slynux@gnuxbox ~]# ifconfig -a eth0      Link encap:Ethernet  HWaddr 00:1C:23:FB:37:22           inet6 addr: fe80::21c:23ff:fefb:3722/64 Scope:Link           UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:9724 errors:0 dropped:0 overruns:0 frame:0           TX packets:2720 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:2400589 (2.2 MiB)  TX bytes:645396 (630.2 KiB)           Interrupt:17  lo        Link encap:Local Loopback           inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:16436  Metric:1           RX packets:76320 errors:0 dropped:0 overruns:0 frame:0           TX packets:76320 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0           RX bytes:87151068 (83.1 MiB)  TX bytes:87151068 (83.1 MiB)  wlan0    Link encap:Ethernet  HWaddr 00:1C:BF:87:25:D2           inet addr:192.168.1.143  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::21c:bfff:fe87:25d2/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:45302 errors:0 dropped:0 overruns:0 frame:0           TX packets:37510 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:31091293 (29.6 MiB)  TX bytes:9734025 (9.2 MiB)

Here I have three interfaces — eth0, lo and wlan0, where:

  • eth0 corresponds to the Ethernet card
  • lo corresponds to a loopback device that points to the localhost network
  • wlan0 corresponds to the wireless LAN card

Static IP addressing

For static IP addressing, issue the following command as the root:

ifconfig 

For example:

ifconfig eth0 192.168.0.2

ifconfig -a gives you details of all interface devices and configurations. In order to receive details of only one Ethernet device, execute ifconfig eth0. The following is an example output:

[root@gnubox slynux]# ifconfig eth0 eth0      Link encap:Ethernet  HWaddr 00:1C:23:FB:37:22           inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0           inet6 addr: fe80::21c:23ff:fefb:3722/64 Scope:Link           UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:9724 errors:0 dropped:0 overruns:0 frame:0           TX packets:2720 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:2400589 (2.2 MiB)  TX bytes:645396 (630.2 KiB)           Interrupt:17

Now, let us go about setting the subnet mask. This is done easily with ifconfig, as follows:

ifconfig eth0 192.168.0.2 netmask 255.255.255.0

Now that the IP address and subnet mask is configured (or reconfigured), how do you get your Ethernet up (i.e., available) and down? The ifup and ifdown commands help you with that as follows:

ifup eth0 ifdown eth0

Wireless networking

In order to hack a wireless card, we have another utility called iwconfig. It works similar to ifconfig, but it has lots of additional features that are bonded to wireless cards. If we are using a wireless network with static IP, we can attach our wireless card interface to a network as follows:

iwconfig wlan0 essid slynux

…or:

iwconfig wlan0 essid slynux key 8c140b2037

…where ‘slynux’ is the ESSID (that is, the name of the wireless network) and ‘8c140b2037’ is the security key. Of course, you need to replace these variables with the values that hold good in your network. You can also scan and check the availability of wireless network(s) in your vicinity using the iwlist command as follows:

[root@gnuxbox~]# iwlist wlan0 scan wlan0  Scan completed :           Cell 01 - Address: 00:08:5C:52:E9:83                     ESSID:”slynux”                     Mode:Master                     Channel:11                     Frequency:2.462 GHz (Channel 11)                     Quality=92/100  Signal level:-39 dBm  Noise level=-78 dBm                     Encryption key:off                     Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s                               24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s                               12 Mb/s; 48 Mb/s                     Extra:tsf=00000000fc021187

The above command will list out the various wireless networks available with a number of properties.
Then we can set the IP for the interface card using the ifconfig command itself:

ifconfig wlan0 192.168.0.5

If you are using dynamic addressing, you can obtain the IP address as follows:

dhclient wlan0

The settings that you’ve configured with the ifconfig tool are available until the system reboot. But it’s a waste of time if you need to configure it on every system start. And hence we take the aid of network configuration scripts. On an Ubuntu (or any other Debian-based) system, this file is located at /etc/networks/interfaces, and contains data similar to the following:

auto lo iface lo inet loopback  iface eth0 inet static address 164.164.32.101 netmask 255.255.255.240 gateway 164.164.32.97

It is necessary to learn this scripting in order to play with your network. The syntax for these are as follows:

  1. Add the following lines if you want to configure eth0 as the DHCP:
    auto eth0 iface eth0 inet dhcp
  2. Add the following files if you want to configure static IP:
    auto eth0 iface eth0 inet static address  netmask  gateway 
  3. If it is a wireless network, add the following lines along with the above lines:
    wireless-essid  wireless-key 

Now, to restart the network daemon, execute the following as the root:

/etc/init.d/network restart

Spoofing a MAC ID

It is a real hassle for cable Internet customers that they are restricted to using a single machine for Internet access. If you want to plug your laptop in your friend’s cable Internet connection,
you have to call the service provider to refresh the MAC address.

The MAC address is permanent to the hardware and cannot be changed. Since we operate the hardware via the software abstraction layer, it is quite possible to do some software-level cheating for the network card’s MAC ID. We can simply spoof it to some other MAC addresses.

You can obtain the original MAC ID from the ifconfig output. Mine is as follows:

 eth0      Link encap:Ethernet  HWaddr 00:1C:23:FB:37:22

Now, let’s change the last part of the MAC ID from 22 to 23:

ifconfig eth0 hw ether 00:1C:23:FB:37:23

Now, run ifconfig again:

[root@gnubox slynux]# ifconfig eth0 eth0    Link encap:Ethernet  HWaddr 00:1C:23:FB:37:23           inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0           BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)           Interrupt:17

Easy enough? Well, let’s consider the following instance: suppose you are in a Wi-Fi campus and the access to the wireless network is restricted using MAC addressing. You can simply look at your friend’s laptop MAC ID and spoof it. Yes! You are now free to access the network. Have fun!

DNS (Domain Name Service)

DNS is responsible for name resolution. When you point your browser to www.google.com, it points to a server on the Internet. How does that happen? As you are aware, all networked computers are assigned with IP addresses. But how do you access the Web page hosted in Google’s remote machine by simply typing a name like google.com?

That phenomenon is achieved using domain name resolution. There are some servers on the Web called name servers (or DNS) that resolve certain names to corresponding IP addresses, like google.com to its corresponding IP address, in our case. So, we should have the IP addresses of the DNS servers (generally provided by the Internet service provider) handy so that we don’t have to remember everyone else’s when we browse the Web. When we point our browser to google.com, it consults one of these name servers to find out the IP address and thus load the Web page. But where do we configure the IP addresses of these name servers?

If your network is configured with DHCP, there is no need to specify the name server explicitly. For static IPs, it is, however, necessary. We enter the DNS servers’ IP addresses in the /etc/resolv.conf file. Mine looks like the following:

nameserver 208.67.222.222 nameserver 208.67.220.220

Note that you don’t really need to use the DNS addresses provided by your ISP. For safety purposes, I use OpenDNS—the IP addresses are listed in the above snippet. You can learn more on why OpenDNS is a much safer bet at www.opendns.org.

SSH (Secure Shell)

SSH can be defined as the blood of *nix networks. SSH enables users and administrators to make remote logins to other machines that are connected through any kind of network. If you know the user name, password and IP address of another machine on the network, you can remotely log in to that machine and work on it as if you are actually working in front of that machine. The following is an example in which I’m authenticating to a system with the IP address of 192.168.1.3 as the user test:

[root@gnubox ~]# ssh test@192.168.1.3 The authenticity of host ‘192.168.1.3 (192.168.1.3)’ can’t be established. RSA key fingerprint is 9f:61:ae:ac:8f:75:bb:3a:02:4a:f4:6c:7d:b9:0d:07. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘192.168.1.3’ (RSA) to the list of known hosts. test@192.168.1.3’s password: -sh-3.2$ echo I am on 192.168.1.3 Machine I am on 192.168.1.3 Machine -sh-3.2$

You can open the CD tray of the other machine, close the tray, shutdown, reboot the machine — depending on the privileges the user name you’ve logged in with, has.

sftp is an extension to the ssh protocol that helps us to use the SSH connection to transfer files between machines. The following is an example:

[root@localhost ~]# sftp test@192.168.1.3 Connecting to 192.168.1.3... test@192.168.1.3’s password: sftp> ls Desktop    Documents  Download   Music      Pictures   Public     Templates Videos     a.out      test.bin     file.cpp   t.c sftp> get t.c Fetching /home/test/t.c to t.c /home/test/t.c                                100%  239     0.2KB/s   00:00 sftp>

To download a file from the remote machine we use the get command, and to upload a file, we use put. In the above snippet you can see that I’m downloading a file named t.c using the get command, after logging in to the remote machine using sftp.

sshfs is another extension to SSH, which empowers you to mount directories on a remote machine as a filesystem to a specified mount point:

root@localhost ~]# sshfs test@192.168.1.3:/home/test /mnt/test test@192.168.1.3’s password:

In the above snippet, I’m mounting the home directory of the user ‘test’ on 192.168.1.3 to my local machine under the /mnt/test directory.

Proxy server configuration

Many of us on a college campus or office network access the Internet through a proxy server. How do you set the proxy server details in your shell environment? You can set the proxy for different protocols as follows:

export http_proxy=”http://192.168.0.1:3128” ; // HTTP proxy export ftp_proxy=”192.168.0.1:3128” ; //FTP proxy

If you want these settings to be permanent, each time you log in add these lines to your ~/.bash_profile file.
That’s all, folks! Hope you have enjoyed learning the secrets of networking. Happy hacking till we meet again!