Showing posts with label networking. Show all posts
Showing posts with label networking. Show all posts

Wednesday, June 13, 2007

IP Addressing

IP Addressing
============

An identifier for a computer or device on network Networks route messages based on the IP address of the destination. Every computer that communicates over the Internet is assigned an IP address that uniquely identifies the device and distinguishes it from other computers on the Internet. An IP address consists of 32 bits, often shown as 4 octets of numbers from 0-255 represented in decimal form instead of binary form. The four numbers in an IP address are used in different ways to identify a particular network and a host on that network.

For example, the IP address
168.212.226.204
in binary form is
10101000.11010100.11100010.11001100.


But it is easier for us to remember decimals than it is to remember binary numbers, so we use decimals to represent the IP addresses when describing them. However, the binary number is important because that will determine which class of network the IP address belongs to. An IP address consists of two parts, one identifying the network and one identifying the node, or host. The Class of the address determines which part belongs to the network address and which part belongs to the node address. All nodes on a given network share the same network prefix but must have a unique host number.

Class A Network -- binary address start with 0, therefore the decimal number can be anywhere from 1 to 126. The first 8 bits (the first octet) identify the network and the remaining 24 bits indicate the host within the network. An example of a Class A IP address is 102.168.212.226, where "102" identifies the network and "168.212.226" identifies the host on that network.

Class B Network -- binary addresses start with 10, therefore the decimal number can be anywhere from 128 to 191. (The number 127 is reserved for loopback and is used for internal testing on the local machine.) The first 16 bits (the first two octets) identify the network and the remaining 16 bits indicate the host within the network. An example of a Class B IP address is 168.212.226.204 where "168.212" identifies the network and "226.204" identifies the host on that network.

Class C Network -- binary addresses start with 110, therefore the decimal number can be anywhere from 192 to 223. The first 24 bits (the first three octets) identify the network and the remaining 8 bits indicate the host within the network. An example of a Class C IP address is 200.168.212.226 where "200.168.212" identifies the network and "226" identifies the host on that network.

Class D Network -- binary addresses start with 1110, therefore the decimal number can be anywhere from 224 to 239. Class D networks are used to support multicasting.

Class E Network -- binary addresses start with 1111, therefore the decimal number can be anywhere from 240 to 255. Class E networks are used for experimentation. They have never been documented or utilized in a standard way.

Tuesday, June 12, 2007

Web Ports

Web Ports
=========


Some of you might have woundered what are sockets and ports.

Sockets are low-level access points to the IP stack. Socket is used to send and receive data where data generally travels in blocks (these blocks are referred to as packets) of few kilobytes at a time.

Also these packets which travel from source to destination must follow a set of rules i.e. protocol.

Also at the source / destination there is a term called port which defines the kind of service. This no can be between 1 to 65535. Eg: port no 80 is used to identify http service (webpage request by the client).

Hence when we type www.google.com, the client (i.e. our machine with a ip address (through web browser client software)) it asks the google server at port no 80 to provide a service of delivering the webpage google.com. During this process it must use various protocols http(hyper text transfer protocol - transferrng of webpage also known as hypertext docs) and tcp/ip protocol (transmission control protocol/internet protocol) for disassembling of data to packets at source and assembling of packets at destination and tranfer of packets. Also tcp is responsible for assigning headers informa like destination ipaddress, checksum, packet no etc etc..


Anyway here is a list of port nos (most of which are reserved):


20 - FTP data
21 - FTP control
25 - smtp email outgoing
53 - DNS
66 - Oracle SQL*Net
80 - http (webpages)
81 - http proxy, alternative http port, cobalt server administration port
110 - pop3 incoming email
143 - IMAP incoming email
443 - Secure Socket Layer (SSL)
445 - Ms Sql Server over NetBIOS
457 - unixware/netscape fasttrack server
1080 - socks proxy
1100 - oracle webcache listener
1241 - kazaa file sharing server
1352 - lotus domino (notes)
1433 - ms sql server 2000
1434 - ms sql server over tcp/ip redirector
1521-1530 - oracle
1944 - ms sql server 7
2301 - compaq insight manager, compaq survey utility
3128 - http proxy (squid, netcache, etc.)
3306 - mysql
4000 - oracle webcache listener
4001 - oracle webcache listener
4002 - oracle webcache listener
4100 - sybase 11.0 (jConnect)
5000 - sybase 12.x
5432 - postgreSQL
5800 - VNC HTTP Console Port #1
5801 - VNC HTTP Console Port #2
5802 - VNC HTTP Console Port #3
6346 - Gnutella (HTTP-like protocol)
6347 - Gnutella (HTTP-like protocol)
7001 - BEA WebLogic
7002 - BEA WebLogic
8000 - HTTP Proxy, Alternative HTTP Port, HP Web JetAdmin
8001 - BEA WebLogic
Port - Server
8005 - Apache Tomcat Administration Server (non-HTTP protocol)
8080 - HTTP Proxy, Alternative HTTP Port
8888 - HTTP Proxy, Alternative HTTP Port
30821 - Netscape Enterprise Server Administration Server