Monday, July 18, 2011

Address Binding Technique 1

1.Address resolution with table lookup: This technique of address resolution requires a data structure that contains information about address binding. The table consists of an array. Each entry in the array contains a pair (P,H),where P is the protocol address and H is its corresponding hardware address. The main advantage of table lookup approach is generality- a table can store the address bindings for an arbitrary set of computers on a given network. In particular a particular protocol address can map to an arbitrary hardware address.

Furthermore, the table lookup algorithm is straight forward and easies among all the approaches. Suppose we have given a next-hop address, N, the software searches the table until it finds an entry where the IP address matches N. The software then extracts the hardware address from the entry.For a network that contains a less then dozen of hosts, a sequential search is sufficient ,the resolution software begins at first entry and searches each entry in table until a match is found. But for large networks this sequential search is not possible because it consumes excessive CPU time. In these type of situations to improve computational efficiency we can use Hashing or Direct Indexing.
As all we know that Hashing is a general purpose data structure and is well known to all the programmers, so, here I am not going to discuss it. Let’s take a look at the other technique that is of Direct Indexing. Direct Indexing is slightly more efficient but less general technique. In particular Direct Indexing is possible only in those cases where protocol addresses are assigned from a compact range.
For Example
Direct Indexing can be used with IP addresses that are arranged in sequential order. In these type of cases the software maintains a one dimensional array of hardware addresses, and uses the host suffix from an IP address as an index to an array.
In the next post I will tell you the second technique of Address Binding.

Address Resolution Protocol

As all we know that IP addresses are virtual because they are maintained by software. Neither Local Area network nor Wide Area Network hardware understands the relationship between an IP address prefix and a network or the relationship between an IP address suffix and a particular computer. I am telling you all these things because we have to know all these things before understanding Binding Address Protocol. Now let’s come to our main issue of Binding Protocol Addresses, the first point that came into the mind of any one that is new to networking is what Binding Protocol Address is and what its requirement is.

Now before giving answer of first question I would like to give the answer of our second question. Let’s consider an application program that generates data to be sent across an internet, for this software places the data in the packet, which contains the protocol address (IP address) of the destination. Software in each host or router uses the protocol destination address to select the next hop for the packet. Once a next hop has been selected, software transfers the packet across one physical network to the selected host or router. To provide the illusion of a single, large network, software works with the IP addresses when forwarding the packets. Both the next hop and destination addresses are the IP addresses.

Now the main problem arises here, when we want to transmit frames across physical network hardware we need hardware address of the destination because the hardware does not understand the IP addressing. So, when a frame is set across a physical network it must use the hardware’s frame format and all the addresses in the frame must be hardware addresses. Consequently, the protocol address of the next hop must be translated to an equivalent hardware address before a frame can be sent. The process of converting IP address to its equivalent hardware address is known as Address Resolution and a protocol address is said to be resolved to the correct hardware address. Address Resolution is local to network that means one computer can resolve the address of another computer only if both computers attach to the same physical network. A computer never resolves the address of a computer on a remote network.

After this explanation I hope you understand a little bit about the Address Resolution Protocol. In the next post I will tell about the various techniques through which Address Resolution takes place. Hope you like this post.
If you have any doubts in any of the topics of Computer Networks then post your problem in the comment. I will try to sort it out.

Network Troubleshooting

Acquiring Network Address problem

I recently solved "ACQUIRING NETWORK ADDRESS" problem on my friend's laptop and I just wanted to pass thing on.
My friend had this problem on his laptop ever since we reinstalled Windows XP. No matter what we tried his laptop just won’t connect to the internet. I have a Belkin N150 wireless router at home; all other laptops would connect but not his. It would get stuck with “ACQUIRING NETWORK ADDRESS”. I referred online help but its all about updating the drivers and other troubleshooting which I have all done.

Like most of us, I did initial troubleshooting on the IP settings, router configurations etc. Also tried updating the device drivers – the Ethernet driver and 802.11g Wireless LAN driver but nothing seem to resolve the problem. After the problem didn’t resolve for a long time, I felt kind of embarrassed as his expectation of me resolving the issue was high being an IT guy LOL :)
But finally I solved the problem, and here’s how I resolved it:-
To solve similar issues, start with the basic troubleshooting as mentioned above like checking IP settings, router configurations etc.

  1. Assume you tried the basic troubleshooting
  2. Check these setting in Services.msc
    1. Start > run > services.msc
    2. Make sure these services are started and set to automatic
      1. WIRELESS ZERO CONFIGURATION (start | keep on ‘automatic’ )
      2. DHCP CLIENT (start | keep on ‘automatic’ )
      3. DNS CLIENT (start | keep on ‘automatic’ )

I am not sure if these services are activated by default, but I found they were not in my case. So you can start these services if they are not started.

And the issue was resolved. And we are able to connect to the internet both wired and wireless.

All the services mentioned above viz. wireless zero configuration, dhcp client and dns client can be enabled and set to automatic, as shown in the image below.


 

Friday, July 1, 2011

Hotspot in WiFi Network

A hotspot is any location where Wi-Fi network access (usually Internet access) is made publicly available. You can often find hotspots in airports, hotels, coffee shops, and other places where business people tend to congregate. Hotspots are considered a valuable productivity tool for business travelers and other frequent users of network services.Technically speaking, hotspots consist of one or several wireless access points installed inside buildngs and/or adjoining outdoor areas. These APs are typically networked to printers and/or a shared high-speed Internet connection. Some hotspots require special application software be installed on the Wi-Fi client, primarily for billing and security purposes, but others require no configuration other than knowledge of the network name (SSID).

Understanding Proxy Server

Proxy Server:A proxy server is a kind of buffer between your computer and the Internet resources you are accessing. The data you request come to the proxy first, and only then it transmits the data to you.Proxy servers accumulate and save files that are most often requested by thousands of Internet users in a special database, called “cache”. Therefore, proxy servers are able to increase the speed of your connection to the Internet. The cache of a proxy server may already contain information you need by the time of your request, making it possible for the proxy to deliver it immediately.Security and privacy. Anonymous proxy servers that hide your IP address thereby saving you from vulnerabilities concerned with it. Sometimes you may encounter problems while accessing to web server when server administrator restricted access from your IP or even from wide IP range (for example restricting access from certain countries or geographical regions). So you try to access those pages using an anonymous proxy server.

Public Proxy Server:It is a proxy server which is free and open for everybody on the Internet. Unfortunately most of them are not anonymous.Free service trying to provide list of public HTTP proxy servers. Usually provide small list of proxies with low percent of functioning servers due to hosting restrictions on CPU time (they simply can't allow themselves to check many proxies every second especially in parallel).

What is DHCP Server ?

DHCP is the only responsible to assign IP address to any device.Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server to automatically assign an IP address to an individual computer's TCP/IP stack software. DHCP assigns a number dynamically from a defined range of numbers configured for a given network.Today you found almost all wireless access points, many wired Ethernet routers, and computers running Internet Connection Sharing have built-in DHCP servers.Due to this reason DHCP servers are mainly preffered for the small networks in comparison to large networks.DHCP assigns a TCP/IP address when a system is started. Typically, it works like this:
1. A user turns on a computer with a DHCP client.

2. The client computer sends a broadcast request (called a DISCOVER or DHCPDISCOVER), looking for a DHCP server to answer.

3. The router directs the DISCOVER packet to the correct DHCP server.

4. The server receives the DISCOVER packet. Based on availability and usage policies set on the server, the server determines an appropriate address (if any) to give to the client. The server then temporarily reserves that address for the client and sends back to the client an OFFER (or DHCPOFFER) packet, with that address information. The server also configures the client's DNS servers, WINS servers, NTP servers, and sometimes other services as well.

5. The client sends a REQUEST (or DHCPREQUEST) packet, letting the server know that it intends to use the address.

6. The server sends an ACK (or DHCPACK) packet, confirming that the client has a been given a lease on the address for a server-specified period of time.

When we assign IP address statically to any computer then there is always a probability that two computers are configured with the same IP address. This creates a conflict that results in loss of service. Using DHCP to dynamically assign IP addresses minimizes these conflicts

How to install phpmyadmin and apache on centos

1.Installing Mysql:yum install mysql mysql-server
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
 mysqladmin -u root password servertest //this is the root and its password that you required when first time login in phpmyadmin here "root" is user and "servertest" is password

2.Installing Apache2:yum install httpd
chkconfig --levels 235 httpd on
/etc/init.d/httpd start

3.Installing PHP5:yum install php
/etc/init.d/httpd restart

4.Getting MysQl support in PHP5:
yum search php
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml php-xmlrpc
/etc/init.d/httpd restart

5.Installing phpMyAdmin:
cd /var/www/html
wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/2.11.11.1/phpMyAdmin-2.11.11.1-english.tar.gz
tar xvfz phpMyAdmin-2.11.11.1-english.tar.gz
mv phpMyAdmin-2.11.11.1-english phpmyadmin
cd phpmyadmin
cp config.sample.inc.php config.inc.php
nano config.inc.php
a file will open just type and replace,cookies,with,http,
service httpd restart