Ads 468x60px

Friday, October 14, 2011

define in c Tutorial 2

 c preprocessor (Part 2)

 3.# undef
suppose you have something like this..

01# define x 4
02 
03# define x 5
04 
05int main(){
06 
07int z=x;
08 
09printf("%d",x); // output 5
10 
11}
although the output is 5 you can’t trust these type of declarations.If you want to redefine the same macro then first undefine it using #undef
correct way of doing
01# define x 8
02 
03# undef x // x is now unknown to compiler
04 
05# define x 9 // x is 9 now
06 
07int main()
08{
09 
10int z = x;
11 
12printf("%d",z); // output 9
13 
14}
so if you have your own macros and you are in doubt that their names can conflict with the macros defined in header files then first use # undef to undefine these macros.
1# undef conflictingname // undefining macro conflictingname in a headerfile.
2 
3# define conflictingname
4 
5int main()
6{
7// do some stuff here
8}
1# undef anyname // not an error
2int main()
3{
4// do some stuff here
5}
4.# pragma
The directive is a compiler specific directive which compiler vendors may provide .
1# pragma GCC poison x //variable cannot be used
2 
3int main(){
4 
5/*error x is poisoned .It cannot be used anywhere in GCC compiler system.*/
6 
7int x;
8 
9}
here GCC poison is called pragmas.Remember these are  compiler dependent.
So GCC poison will not work on microsoft compilers (will not give an error).You have to read manual of the compiler.
Predefined macro
1_LINE_
2_FILE_
3_TIME_
4_DATE_
5__STDC__
working example
01# define _LINE_ 98 // error predefined cannot be redefined
02int main()
03{
04// note this is __ not _
05printf("%d\n",__LINE__); // will output current line number
06printf("%s\n",__FILE__); // file name
07printf("%s\n",__DATE__); // date of execution
08printf("%s\n",__TIME__); // time of execution
09printf("%d\n",__STDC__); // Whether the compiler is standard conforming (1) or not
10}

Wednesday, October 12, 2011

Text to Image Converter tool

office Convert Word Txt to Image Jpg/Jpeg Free is a powerful and professional conversion tool, the converter produces fully functionalIMAGE documents with text, pictures, graphics etc, using the original document formatting.It can Create popular image formats as JPG,BMP,GIF,TIF,TGA,RLE,PNG,EMF,WMF from dozens of documents as Word (doc,docx,docm) rtf , Excel (xls,xlsx,xlsm), PowerPoint (ppt,pptx,pptm),txt with retaining the original style. More professional and easier interface is adaptable to everyone. You must like it as soon as you use it.


Download office Convert Word Txt to Image for Brothersoft

Features:

  • Convert Word (DOC,DOCX,DOCM), TXT, RTF to JPG,BMP,GIF,TIF,TGA,RLE,PNG,EMF,WMF.
  • Convert document to Vector format WMF.
  • Support drag and drop files.
  • Choose the entire folder to convert.
  • Intelligent processing of large files.
  • Easy to use. Convert with One Click.
  • Save the imported file list.
  • Create images with high good quality.
  • Process the conversion at very high speed.
  • It can automaticly view the output files after converted.
  • Provide the best service for you.

define in c Tutorial 1

# define a.k.a c preprocessor (Part 1)
The term can be little bit daunting but its use is very simple.It is a separate program invoked by the compiler as the first part of translation.The preprocessor can be thought as a smart editor.It Inserts,excludes,replaces text based on commands supplied by the programmer.In this case commands are made a permanent part of the source program
01/***** All are pre processor commands *****/
02# include
03# define pi 3.14
04# undef pi
05 
06/*******************************/
07int main()
08{
09// do sum stuff here
10}
for time being  do not bother what these commands do.Just see how they are used in the source program.
They are many more commands .we will see them one by one.

1) # include
The most common use of preprocessor is to include files containing declarations(header files).
#include contains declarations of all the functions used for input output.
# include will be replaced by the contents of filename.h
Ques: i have seen #include “filename.h” at many places.Is there any difference between the two?
yes there is one.
angled brackets means the preprocessor will search filename.h in standard include directory.
in my case it will be C:\Dev-Cpp\include.
if you have your file in any other location then you must specify the full path
for eg if location of file that i want to include is at “d:\folder1\filename.h” then i will write
1# include "d:\folder1\filename.h"
That is all for #include
2. # define
This is also the most widely used command plus it is risky too.
it can be used in two ways
a) to define a constant (replacement macro)
b) to simulate a function (function like macro)
first lets see a)
01# define x 123
02 
03# define y "hey"
04 
05int main(){
06 
07int i=x; //int  i=123
08 
09float j=x; // j is now 123.000000
10 
11x=5; // invalid x cannot be changed
12 
13printf(y); //
14 
15printf("%s",x);// undefined behavior
16 
17printf("%d",x);//valid
18 
19}
actually everywhere where x will appear it will be replaced by its corresponding replacement text
01# define x 123;
02 
03# define y while
04 
05int main()
06{
07 
08int i=x // valid it is equivalent to int i=123;
09 
10int a=0;
11 
12y(a<5){ //equivalent to while(a<5)
13 
14a++;
15 
16}
17 
18}
one last thing and that is very important
01# define x 10
02 
03# define y x+1 // must be # define y (x+1)
04 
05int main()
06{
07 
08int z =y*3; // equivalent to x+1*3 ==>10+1*3
09 
10printf("%d",z);// expected result 33 . Actual result 13 !
11 
12}
so always use parenthesis according to your precedence
lets look at b)
i.e how to simulate a function
simple protoype
1# define macro_name(parameter_list) (token expression)
2 
3//examples//
4# define square(x) (x*x) // there must be no space between -> macro_name and ( <-
5# define square (x)(x*x) // it is not a function like macro.It is a replacement macro
1# define square(x) (x*x) // 1st macro
2 
3int main(){
4 
5int area,length=5;
6 
7area = square(5); // 1st macro equivalent to area = (5*5)
8 
9}
1#define CALL(a, b) a b // macro
2int main(){
3 
4CALL(printf, ("%d %d %s\n",1, 24, "urgh")); // macro
5/* results in printf ("%d %d %s\n",1, 24, "urgh"); */
6}
you have to take care of the parenthesis. like
01# define square_incorrect(x) (x *x) // incorrect version
02 
03# define square_correct(x) ((x) *(x)) // correct version
04 
05int main(){
06 
07int a,b;
08 
09a=square_incorrect(3+7) // equivalent expression 3+7*3+7 result in 31 expected result 100 !
10 
11b=square_correct(3+7) // result in 100
12 
13}
There is something which i wanted to tell you.suppose you have a macro like
1# define f(x) f((x)+2)
how many times this replacement is done?
if you are replacing each time then this will go into infinite replacement
for eg
a call like this
f(2)
f((2)+2)
f(((2)+2)+2)
f((((2)+2)+2)+2)…
so these are not allowed
Note if the macro name results directly from replacement text then the replacement is not done more then one level
so the call
f(2)
f((2)+2) ->will stop here.
there is one last thing in function like macro called Stringizing
lets see what it is and how it works?
There is special treatment for places in the macro replacement text where one of the macro formal parameters is found preceded by #.the # and the token list are turned into a single string literal
01#define MESSAGE(x) printf("Message: %s\n", #x)
02 
03int main(){
04 
05MESSAGE (how are you);
06 
07/* above is equivalent to */
08 
09printf("Message: %s\n", "how are you")
10 
11MESSAGE (how are "you");
12 
13/* above is equivalent to */
14 
15printf("Message: %s\n", "how are \"you\"") // " or \ characters within the new string literal are preceded by \
16 
17}
hope you are fine until now.Rest we will see in next section.

Wednesday, October 5, 2011

Trace Cell Phone

Want to Trace Cell Phone? Are you worried that your partner is having an affair?  Do you want to find out the truth?  We have one solution: use the Trace Cell Phone feature of a great spy software program that’s foolproof and guarantees great results. Allow us to tell you what it will do for you.
SpyBubble Will Do All The Spying You Need
This program is definitely what you need in your predicament.  We highly recommend that you get your hands on it because it comes with great feedback and amazing reviews from tons of satisfied clients who have found the answer to their problem in SpyBubble.


SpyBubble can be the solution to your problem, too.  Here is what it does:
* records events on the select cell phone
* spies on all text messages (incoming plus outgoing)
* spies on web browser activities
* checks call logs
* uses GPS location to track phone owner
* offers complete phone book access
* provides global worldwide application
* covers you with 100% undetectability
* gives spy access to unlimited cell phones
As you can see, you will be able to trace cell phone activities of your partner without him or her being able to trace you!  You can do this both domestically or abroad, anywhere in the world!  This feature will be of great use to you especially if your partner travels often.
Why Is SpyBubble So Highly Recommended?
It delivers what it promises.  This is confirmed by the myriads of impressive feedback from satisfied customers who have tried and proven this great spy software program.
Do not waste your time looking elsewhere as we guarantee you will not find another program like this.
The truth is that SpyBubble takes over for you and literally becomes your eyes and ears, gathering all sensitive and accurate information you need.  Better still,  it keeps you safe and secure and exempt from being found out.
It allows you to remain low key and under the radar while it uses all its scientific satellite capabilities to do its job on your behalf.  It’s a veritable scientific wonder!
Why don’t you take a look at this software program? Visit: Spybubble
So, if you are serious about beginning your trace cell phone project, trust the expert and get SpyBubble right away. We highly recommend it and would refer and trust it even to our immediate, personal family members regardless of how sensitive the specific circumstance.
Get your online copy of SpyBubble right now by clicking the button and be on your way to successfully carrying off your trace cell phone pet project conveniently at your leisure from the comfort of your own home.
SpyBubble is so convenient that you will not have to neglect your family members and responsibilities. Get it now!
So, do you want to easily start tracing any cell phone? Visit: How To Trace A Cell Phone

Sunday, October 2, 2011

Tapping Cell Phones – Easily Tap Any Cell PhoneMany people often wonder if Tapping Cell Phones is ethical or moral. There are a number of reasons why someone would want tap the calls of another person. They could be for business or personal reasons. If you have a business, you may want to know if a person is using company resources for his or her personal gain. It could also be that your spouse or partner is having second thoughts about the relationship. Your child may be having difficulties in their life that they just don’t feel they can openly talk about. Is it possible to tap cell phones? You probably know by now that it is possible to tap land line connections. With the advancement in technology, especially with the internet, many different types of software have been created to address different challenges and issues that are faced daily. To answer your question, yes, it is possible. Here’s what you will need to do: You need to prepare a few things before you can start tapping a cell phone. * You need to have a pc with a good internet connect, probably DSL or cable. * You need to have access to the cell phone you want to tap. * You will need to download a mini-application that will need to be installed on the phone you want to tap into. The next thing you will need to do is get the phone setup so that you can start monitoring the calls. Here’s how: 1. This may be the challenging part, but you will need to have access to the phone you are trying to tap into. You will only need access this one time. 2. Install the program on the cell phone and restart it. 3. Use an online application that will allow you to track the different activities of the phone. Using a robust, undetectable piece of software for easily Tapping Cell Phones. When you start using the software you’ll find out that you have a wealth of resources. You will be able to track incoming/outgoing calls and text from any computer. You just need to have access to any computer and within seconds you will know exactly what has been said in any text or call. You will also have logs for evidence if you need to take any action. Why don’t you have a look for yourself at the phone application that has helped many people find out the truth? Visit: Tapping Cell Phones. If you’ve made the decision to start monitoring someone’s calls, you need to have access to a computer with internet, install a phone application on a target cell phone and regularly check the different calls or texts online. How badly do you want to start monitoring those calls? Visit: Tapping Cell Phones.

Many people often wonder if Tapping Cell Phones is ethical or moral. There are a number of reasons why someone would want tap the calls of another person. They could be for business or personal reasons. If you have a business, you may want to know if a person is using company resources for his or her personal gain.
It could also be that your spouse or partner is having second thoughts about the relationship. Your child may be having difficulties in their life that they just don’t feel they can openly talk about.

Is it possible to tap cell phones?
You probably know by now that it is possible to tap land line connections. With the advancement in technology, especially with the internet, many different types of software have been created to address different challenges and issues that are faced daily. To answer your question, yes, it is possible. Here’s what you will need to do:

You need to prepare a few things before you can start tapping a cell phone.
*     You need to have a pc with a good internet connect, probably DSL or cable.
    You need to have access to the cell phone you want to tap.
*     You will need to download a mini-application that will need to be installed on the phone you want to tap into.
The next thing you will need to do is get the phone setup so that you can start monitoring the calls. Here’s how:
1. This may be the challenging part, but you will need to have access to the phone you are trying to tap into. You will only need access this one time.
2. Install the program on the cell phone and restart it.
3. Use an online application that will allow you to track the different activities of the phone.
Using a robust, undetectable piece of software for easily Tapping Cell Phones.
When you start using the software you’ll find out that you have a wealth of resources. You will be able to track incoming/outgoing calls and text from any computer. You just need to have access to any computer and within seconds you will know exactly what has been said in any text or call. You will also have logs for evidence if you need to take any action.
Why don’t you have a look for yourself at the phone application that has helped many people find out the truth? Visit: Tapping Cell Phones.
If you’ve made the decision to start monitoring someone’s calls, you need to have access to a computer with internet, install a phone application on a target cell phone and regularly check the different calls or texts online.
How badly do you want to start monitoring those calls? Visit: Tapping Cell Phones.

Monday, September 19, 2011

The 7 Layer of OSI

Lets Start OSI

OSI-Open Systems Interconnect. It was developed in 1984 by (ISO).
By this we can know the mechanism of sending data fro one PC to anyother.
It Includes 7 layers

While Receiving data                             And While Sending data


7.. Application                                               1.Application
6.. Presentation                                              2.Presentation
5.. Session                                                     3.Session
4.. Transport                                                  4.Transport 
3.. Network                                                   5.Network
2.. Data Link                                                  6.Data Link
1.. Physical                                                     7.Physical

Each And Every layer has Its own Role. I'll tell u all in details.



The O.S.I. model (O.S.I. - Open System Interconnection) is a way of sub-dividing a System into smaller parts (called layers) from the point of view of communications.
 A layer is a collection of conceptually similar functions that provide services to the layer above it and receives services from the layer below it. On each layer an instance provides services to the instances at the layer above and requests service from the layer below. For example,
 a layer that provides error-free communications, across a network provides the path needed by applications above it, while it calls the next lower layer to send and receive packets that make up the contents of the path. Conceptually two instances at one layer are connected by a horizontal protocol connection on that layer.


 Virtually all networks in use today are based in some fashion on the Open Systems Interconnection (OSI) standard.

The core of this standard is the OSI Reference Model, a set of seven layers that define the different stages that data must go through to travel from one device to another over a network. In this article, you'll find out all about the OSI standard.



Layer 7: Application - This is the layer that actually interacts with the operating system or application whenever the user chooses to transfer files, read messages or perform other network-related activities.

Layer 6: Presentation - Layer 6 takes the data provided by the Application layer and converts it into a standard format that the other layers can understand.

Layer 5: Session - Layer 5 establishes, maintains and ends communication with the receiving device.

Layer 4: Transport - This layer maintains flow control of data and provides for error checking and recovery of data between the devices. Flow control means that the Transport layer looks to see if data is coming from more than one application and integrates each application's data into a single stream for the physical network.

Layer 3: Network - The way that the data will be sent to the recipient device is determined in this layer. Logical protocols, routing and addressing are handled here.

Layer 2: Data - In this layer, the appropriate physical protocol is assigned to the data. Also, the type of network and the packet sequencing is defined.

Layer 1: Physical - This is the level of the actual hardware. It defines the physical characteristics of the network such as connections, voltage levels and timing.

To help remember the layers names of the OSI model, try the following mnemonic device (Moving from the bottom layer to the top layer)

Layer Name Mnemonic

Layer 7......................Application.........................Away
Layer 6......................Presentation......................Pizza
Layer 5......................Sessions............................Sausage
Layer 4......................Transport...........................Throw
Layer 3......................Network.............................Not
Layer 2......................Data link.............................Do
Layer 1......................Physical..............................Please

while going 1 to 7 we can say
Please Do Not Take Sausage Pizza Away

And While Going 7th to 1st

Andhra Pradesh Se Train New Delhi Pahuchi



Lets Come To layers
1) Application layer: - This layer directly interacts with the user.
* Application layer provides a way for the network application like internet browser etc.
* The application layer provides the interface between application and network.
* It specifies many important network services that are used on the internet.

These include:-
1) HTTP
2) Telnet
3) FTP
4) TFTP
5) SNMP


2) Presentation Layer: - It presents the data into particular format like ASCII, MP3, MPEG, DOC, TEXT etc.

There are 3 works done by presentation layers.
* Encryption and decryption.
* Compression and decompression.
* Encapsulation and de-capsulation.

The presentation layer formats data for the application layer .Therefore; it also sets standards for multimedia and other file formats.
These include standard file format such as:
1) IPEG, BMP, TIFF, PICT.
2) MPEG,WMV,AVI,
3) ASCII, EBCDIC.
4) MIDI,WAV

3) Sessions Layer: -Creates maintains and terminates the session between sender and receiver.

* The Session layer protocols and interfaces co-ordinates requests and responses between different hosts using the same application.
These Protocols and interface include:
1) Network file system (NFS)
2) Apple Session protocol (ASP)

4.) Transport Layer: - Transport layer provides end to end data transfer between sender and receiver .It provides a transition between upper layer and lower layers of OSI model.

*.... It has 6 works to do :-

1).... It decides whether TCP or UDP is to be used:-
TCP – Transmission control protocol.
UDP- User data-gram protocol.

Following are the differences between TCP And UDP

...................TCP................................................................... UDP

a)......It is reliable................................................Unreliable
b)......TCP supports acknowledgment............... Doesn’t support acknowledgment.
c)......Slow...........................................................Fast
d)......Supports 3 way hand shake......................Supports one way handshake.
e)......Used for data.............................................Used for voice and video.
f)......TCP is connection oriented........................ UDP is connection less.

2).... Segmentation and desegmentation :-
Segmentation means breaking the data into smaller parts and desegmentation means reassembling those parts.
Segmentation in done at sender’s side.
And desegmentation is done at receiver’s side.

3).... Sequencing and rearranging:-
Sequencing means giving sequence number to the segment .It is done at sender’s side.
Rearranging means arranging those segments. It is done at receiver’s side.

4).... Multiplexing and demultiplexing:-
Multiplexing means one sender, many receivers.
Demultiplexing means many senders, one receiver.

5).... Error control:-
It checks for the lost segment and resends it.

6).... Flow control :-
It is also known as windowing. It controls the transmission speed.

Notes:-
Protocols that work at transport layer are TCP, UDP.

Transport layer Facts:-
The transport layer receiver large packets of information from higher layer and breaks of into smaller packets called segment.
Segmentation is necessary to enable the data to meet network size and format uses packet sequence number to reassemble segments into the original message.


5.) Network Layer:-
It adds IP address information to the packets.

Facts:-
The network layer describes how data is routed across network and on to the destination.
Network layer functions include:-
• Maintaining addresses of neighboring router.
• Maintaining a list of known networks.
The network layer uses a logical address for identifying hosts and making routing decisions. The types of addresses used are determined by the protocol.
*.... IP uses IP addresses that identify both the logical network and host addresses.
*.... IP X uses an 8 digit hexadecimal number for the network called for the host addresses.
*.... Apple talk uses a network number, ranging from 1 to 65,278 and a host number, ranging from 1 to 253.
*.... Hardware devices related to the network layer include:
•____Routers
•____Layer 3 switches.

Note
Devices that operate at the network layer read the logical address to make forwarding and receiving decisions.
Contrast their with devices that operate at the data link layer which read the MAC address.

*.... Protocols that work on network layer are IP, IPX, and apple talk.


6.) Data Link Layer :-
Data link layer is divided into 2 parts.
1) LLC – Logical link control.
2) MAC – Media access control.
Data link Facts:-
The data link layer defines the rules and procedures for hosts as they access the physical layer.

These rules and procedures specify or define:-
1) How hosts on the network are identified.
2) How the network medium can be accessed.
3) How to verify that the data received from the physical layer is error free.

It is divided into 2 sub layers:-
1) MAC: - Media access control.
The media access control layer defines specifications for controlling access to the media. The MAC sub layers are responsible for:-
*....Adding cyclical redundancy check for error checking.
*....Converting frames into bits to be sent across the network.
*....Identifying network devices and network topologies in preparation for media transmission.
*....Define an address (such as MAC address) for ex: - through CSMA/CD, CSMA/CA or token passing.

2) LLC
The logical link control layer provides an interface between the MAC layer and upper protocols.
LLC protocols are defined by the IEEE 802.2 committee. The LLC sub layer is responsible for:-
*....Maintaining orderly delivery of frames through sequencing.
*....Controlling the flow of rate of transmission.
*....Ensuring error free reception of message by retransmitting.
*....Converting data into an acceptable from the upper layers.
*.... Removing framing information from the packet and forwarding the message to the network layer.
*.... Provide a way for upper layers of the OSI model to use any MAC layer protocol.

The following network devices are associated with the data link layer.
*.... Nic card with external.

Data link layer adds MAC address information to the packets and makes it frames.

Diff between IP And Mac
......................IP.........................................................MAC

a).............32 bit.......................................................48 bit
b) Logical (changeable)...........................................Physical (unchangeable)
c) Divided into 4 parts.............................................12 parts
d) Separated by dot (.)............................................Separated By (:)

*....First 24 bits of MAC addresses is provided by IEEE, and the remaining 24 bits are company specific.

7.)Physical layer:-
It converts data into bits and sends them across the media.

*.... Facts
The physical layer of the OSI model sets standards for sending and receiving electrical signals between devices .It describes how digital data (bits) are converted to electrical pulses radio waves or pulses of light.
Hardware associated with physical layer include:-
1) Transmission media (cable and wires) media connector’s repeaters and hubs.
*.... Encapsulation of data on all layers
*.... Encapsulation of data on all layers:-

A – Data – PDU – protocols data unit.
P – Data
S – Data
T – Segment
N – Segment + IP (packet)
D – Packet + MAC Frame
P – Bits

Layers Works In Short:
A – Create
P – Present
S – Create a session
T – End to end data transfer
N – Gives the path
D – Adds MAC addresses and provides CRC check.
P – Convert the data into bits.

Sunday, September 18, 2011

IP Address

IP - Internet Protocol  Address

Every system connected to the Internet or connected to a particular network has
a unique Internet Protocol Address of an IP Address. Just as in the real world
every person has his or her own Home Contact Address, similarly every system
connected to the Internet has its own unique IP Address. Your IP Address is the
address to which data should be sent to ensure that it reaches your system. The
IP Address of a system acts as the system’s unique identity on the net.



‘….Like in the real world everyone has got an individual Home Address or
telephone number so that, that particular individual can be contacted on that
number or address, similarly all computers connected to the Internet are given a
unique Internet Protocol or IP address which can be used to contact that
particular computer…..’



An Ip Address Can be Assigned to
1. Computer
2. printer
3. Ip Phone

U Cannot provide Ip Address to any device which is connected to A Computer on the network.
For Ex:
We Have Two Printers 1 is connected to one of the computer and other is directly connected to the network using LAN Cable.
So U cannot provide Ip Address to The Printer which is connected to the computer.

 Internet Address (IP Address) is a 32-bit address or number, which is
normally written as four decimal numbers (of 8 bits each) , each separated from
the other by a decimal.. This standard is known as the dotted-decimal notation.

Now as u all no It Is used in decimal format Which is divided into 4 parts. Each part is Called An Octet.

Example
192.168.1.1

octet.octet.octet.octet.

Each octet Consists of a number between 0-255 .


IPV6 Is also launched. It Is 128 Bit Address and used in Hexa-decimal Format.

n Total we have 2 to the power 32 ( 4,294,967,296 ) possible unique addresses But Still its too less for the growing world of computers,
 so we are shifting to IPV6.
IPV6 is a 128 bit address so u can calculate yourself what is 2 to the power 128.


Ip address is divided into Further two parts 1. network And Second host

To Communicate between two computers The network part of Both The Pc Must be The same and the host part must be different.

For ex

on 1st PC U gave Ip address network.host.host.host
on 2nd PC U gave ip address Network.Network.Host.Host

They will not communicate because on 1st PC 1st octet is network and rest 3 are host and on the second PC 1st two octets are network and rest two are host.

So to differentiate between network And Host part Ip Address is further Classified between 5 classes

As u know we can use ip address from 0-255
Addresses being used are divided into a number of ranges, which are as follows:

                           Class                                           Range
                                A                             0.0.0.0 to 127.255.255.255

                                B                             128.0.0.0 to 191.255.255.255
                            
                                C                             192.0.0.0 to 223.255.255.255

                                D                             224.0.0.0 to 239.255.255.255

                                E                              240.0.0.0 to 247.255.255.255

let us refer to the following:

                Class                                      Information
                  A                                           It has the first
8-Bits for Netid and the last 24-bits for Hostid
                  B                                           It has the first
16-Bits for Netid and the last 16-bits for Hostid
                  C                                           It has the first
24-Bits for Netid and the last 8-bits for Hostid
                  D                                           It represents a
32-bit multicast Group ID.
                  E                                            Currently not
being used.

The above table will be clearer after reading the following examples:

Examples:

An IP Address 203.45.12.34 belonging to Class A means that the network ID is 203
and the host ID is 45.12.34

If the Same IP Address belonged to Class B, then the network ID would become
203.45 and the host ID would become 12.34

And if it belonged to Class C then the network ID would become 203.45.12 and the
host ID would become 34.

Almost all ISP’s prefer to use a Class B Network. If that is the case then each
time you login to your ISP, then the first 2 octets of your IP Address would not
change, while the last two are likely to change. However, even if only the last
octet changes, and the remaining three remain constant, it is likely that the
ISP uses Class B addressing. (Subnetting comes in. Explained later in the
manual)

Important Notes
Note 1: 127.0.0.0 is a class A network,
but is reserved for use as a loopback address
(typically 127.0.0.1).
Loopback testing means to test weather your Lan card is working or not and Weather TCP/Ip Service is installed or not. Just go to run and type ping 127.x.x.x -t. U can use any number between 0-255 in place of 'x'

Note 2: The 0.0.0.0 network is reserved for use as the default route.

Note 3: Class D addresses are used by groups of hosts or routers
that share a common characteristic. ( Used for multicast )

Note 4: Class E addresses exist (240-248),
but are reserved for future use or Use For testing purpose

Some More Notes About Ip Address Classes
The following are the classes of IP addresses.

*Class A "The first octet denotes the network address, and the last three octets are the host portion.
 Any IP address whose first octet is between 1 and 126 is a Class A address.
 Note that 0 is reserved as a part of the default address, and 127 is reserved for internal loopback testing.

*Class B "The first two octets denote the network address, and the last two octets are the host portion.
Any address whose first octet is in the range 128 to 191 is a Class B address.

*Class C "The first three octets denote the network address, and the last octet is the host portion.
The first octet range of 192 to 223 is a Class C address.

*Class D "Used for multicast. Multicast IP addresses have their first octets in the range 224 to 239.

*Class E "Reserved for future use and includes the range of addresses with a first octet from 240 to 255

Friday, September 16, 2011

NETWORKING BASICS

I'll be giving y ou all  Tutorials on NETWORKING basics & their working

NETWORKS - A COMPUTER NETWORK IS A GROUP OF COMPUTERS CONNECTED TO SHARE RESOURCES SUCH AS FILES PRINTERS AND EMAIL . NO TWO NETWORK S ARE ALIKE IN SIZE OR CONFIGURATION . HOWEVER EACH NETWORK INCLUDES COMMON NETWORK THAT PROVIDE RESOURCE AND COMMUNICATIONS
CHANNELS NECESSARY FOR A NETWORK TO OPERATE
NETWORK COMPONENTS


DEVICE - ANY PIECE OF HARDWARE SUCH AS A COMPUTER , SERVER , PRINTER OR FAX MACHINE
 
MEDIA -- WHICH CONNECTS DEVICES IN A NETWORK and carries data between them
 
NETWORK OPERATING SYSTEMS -- SOFTWARE THAT CONTROLS NETWORK TRAFFIC , ACCESS TO RESOURCES , AND AUTHORIZATION
 
PROTOCOL -- CONTROLS NETWORK COMMUNICATION USING A SET OF RULES

SERVERS

A SERVER IS A NETWORK COMPUTER THAT SHARES RESOURCES WITH AND RESPONDS TO REQUESTS FROM OTHER NETWORK COMPUTERS , INCLUDING OTHER SERVERS
SERVERS PROVIDE CENTRALIZED ACCESS AND STORAGE FOR RESOURCES THAT CAN INCLUDE APPLICATIONS, FILES, PRINTERS OR OTHER HARDWARE AND SPECIALIZED SERVICES SUCH AS EMAIL . A SERVER CAN BE OPTIMIZED AND DEDICATED TO A SPECIFIC FUNCTION , OR IT CAN SERVE GENERAL NEEDS . MULTIPLE SERVERS OF VARIOUS TYPES CAN EXIST ON A SINGLE NETWORK .


CLIENTS
A CLIENT IS A NETWORK COMPUTER THAT UTILIZES THE RESOURCES OF OTHER NETWORK COMPUTERS , INCLUDING OTHER CLIENTS . THE CLIENT COMPUTER HAS ITS OWN PROCESSOR , MEMORY AND STORAGE , AND CAN MAINTAIN SOME OF ITS OWN RESOURCES AND PERFORM ITS OWN TASK AND PROCESSING . ANY TYPE OF COMPUTER ON A NETWORK CAN FUNCTION AS A CLIENT OF ANOTHER COMPUTER FROM TIME TO TIME

PEERS

A PEER IS A SELF SUFFICIENT COMPUTER THAT ACTS AS A SERVER AND A CLIENT TO OTHER SIMILAR COMPUTERS ON THE NETWORK . PEER COMPUTING IS OFTEN USED IN SMALLER NETWORKS WITH NO DEDICATED SERVERS BUT BOTH SERVERS AND CLIENTS IN OTHER TYPES OF NETWORKS CAN ALSO SHARE RESOURCES WITH THEIR PEER COMPUTERS

HOST COMPUTERS/SERVERS

A HOST COMPUTER IS A POWERFUL , CENTRALIZED COMPUTER SYSTEM SUCH AS A MAINFRAME COMPUTER THAT PERFORMS DATA STORAGE AND PROCESSING TASKS ON BEHALF OF CLIENTS AND OTHER NETWORK DEVICES . ON A HOST BASED NETWORK , THE HOST DOES ALL THE COMPUTING TASKS AND RETURNS THE RESULTANT DATA TO THE END USER'S COMPUTER

TCP/IP HOSTS

IN THE EARLY DAYS OF COMPUTER NETWORK , ALL COMPUTER WERE HOST COMPUTERS THAT CONTROLLED THE ACTIVITIES OF NETWORK TERMINAL DEVICES . THE HOSTS WERE JOINED TOGETHER TO COMMUNICATE IN THE EARLY RESEARCH NETWORKS THAT LAID THE FOUNDATION FOR THE INTERNET

AS THE TCP/IP PROTOCOL WAS ADOPTED AND BECAME UBIQUITOUS AND AS PERSONAL COMPUTERS JOINED THE NETWORK THE TERM HOST WAS GENERALIZED AND IS NOW USED TO REFER TO VIRTUALLY AND INDEPENDENT SYSTEMS ON A TCP/IP NETWORK

TERMINALS

A TERMINAL IS A SPECIALIZED NETWORK DEVICE ON A HOST BASED NETWORK THAT TRANSMITS THE DATA ENTERED BY THE USER TO THE HOST FOR PROCESSING AND DISPLAYS THE RESULTS . TERMINALS ARE OFTEN CALLED ' DUMB ' BECAUSE THEY HAVE NO PROCESSOR OR MEMORY OF THEIR OWN .
STANDARD CLIENT COMPUTERS THAT NEED TO INTERACT WITH HOST COMPUTERS CAN RUN A SOFTWARE CALLED TERMINAL EMULATOR SO THAT THEY APPEAR TO THE HOST AS DEDICATED TERMINALS

AUTHENTICATION

DEFINITION :- AUTHENTICATION IS A NETWORK SECURITY MEASURE IN WHICH A COMPUTER USER OR SOME OTHER NETWORK COMPONENTS PROVES ITS IDENTITY IN ORDER TO GAIN ACCESS TO NETWORK RESOURCES . THERE ARE MANY POSSIBLE AUTHENTICATION METHODS , WITH THE MOST COMMON BEING A COMBINATION OF USER NAME AND PASSWORD .

TCP/IP HOSTS

IN THE EARLY DAYS OF COMPUTER NETWORK , ALL COMPUTER WERE HOST COMPUTERS THAT CONTROLLED THE ACTIVITIES OF NETWORK TERMINAL DEVICES . THE HOSTS WERE JOINED TOGETHER TO COMMUNICATE IN THE EARLY RESEARCH NETWORKS THAT LAID THE FOUNDATION FOR THE INTERNET

AS THE TCP/IP PROTOCOL WAS ADOPTED AND BECAME UBIQUITOUS AND AS PERSONAL COMPUTERS JOINED THE NETWORK THE TERM HOST WAS GENERALIZED AND IS NOW USED TO REFER TO VIRTUALLY AND INDEPENDENT SYSTEMS ON A TCP/IP NETWORK

TERMINALS

A TERMINAL IS A SPECIALIZED NETWORK DEVICE ON A HOST BASED NETWORK THAT TRANSMITS THE DATA ENTERED BY THE USER TO THE HOST FOR PROCESSING AND DISPLAYS THE RESULTS . TERMINALS ARE OFTEN CALLED ' DUMB ' BECAUSE THEY HAVE NO PROCESSOR OR MEMORY OF THEIR OWN .
STANDARD CLIENT COMPUTERS THAT NEED TO INTERACT WITH HOST COMPUTERS CAN RUN A SOFTWARE CALLED TERMINAL EMULATOR SO THAT THEY APPEAR TO THE HOST AS DEDICATED TERMINALS


NETWORK DIRECTORY SERVICES

A NETWORK DIRECTORY IS A CENTRALIZED HIERARCHICAL DATABASE THAT STORES AND ORGANIZES DATA ABOUT NETWORK USERS AND NETWORK RESOURCES . EACH PIECE OF DATA IS AN OBJECT HAS A SET OF ATTRIBUTES ASSOCIATED WITH IT . OBJECTS STORED IN A DIRECTORY INCLUDE USERS GROUPS PASSWORDS SHARED FOLDERS COMPUTERS AND SERVERS AMONG OTHERS

THE DIRECTORY MAY BE STORED ON ONE SERVER OR MAY BE REPLICATED ON MANY SERVERS ON THE NETWORK . NETWORK DIRECTORIES PROVIDE CENTRAL ADMINISTRATION AND CENTRALIZED AUTHENTICATION WHICH OFFER ADMINISTRATORS GREATER CONTROL OVER NETWORK


STANDARD NETWORK MODELS

A NETWORK MODEL IS A DESIGN SPECIFICATION FOR HOW THE NODES ON A NETWORK INTERACT AND COMMUNICATE. THE NETWORK MODEL DETERMINES THE DEGREETO WHICH COMMUNICATIONS AND PROCESSING ARE CENTRALIZED OR DISTRIBUTED


THREE PRIMARY NETWORK MODELS INCLUDE
* CENTRALIZED OR HIERARCHIAL
* CLIENT/SERVER
* PEER-TO-PEER

SOME NETWORKS CAN EVEN HAVE A MIXTURE OF THE ABOVE MODELS
I.E A NETWORK WITH PEER-TO-PEER NETWORK AS WELL AS CLIENT/SERVER MODEL


CENTRALIZED COMPUTING NETWORKS -- A CENTRALIZED NETWORK IS A NETWORK IN WHICH A CENTRAL HOST COMPUTER CONTROLS ALL NETWORK COMMUNICATION AND PERFORMS DATA PROCESSING AND STORAGE ON BEHALF OF CLIENTS. USERS CONNECT THROUGH A DEDICATED TERMINAL OR TERMINAL EMULATOR . CENTRALIZED NETWORKS PROVIDE HIGH PERFORMANCE AND CENTRALIZED MANAGEMENT ,BUT ALSO EXPENSIVE TO IMPLEMENT


CLIENT/SERVER NETWORKS
A CLIENT SERVER NETWORK IS A NETWORK IN WHICH SERVERS PROVIDE RESOURCES TO CLIENTS. TYPICALLY THERE IS ATLEAST ONE SERVER PROVIDING CENTRAL AUTHENTICATION SERVICES. SERVERS ALSO PROVIDE ACCESS TO SHARED FILES, PRINTERS HARDWARE AND APPS. IN CLIENT SERVER NETWORK PROCESSING POWER MANAGEMENT SERVICES AND ADMINISTRATIVE FUNCTIONS CAN BE CONCENTRATED WHERE NEEDED, WHILE CLIENTS CAN STILL PERFORM MANY BASIC END USER TASKS ON THEIR OWN

PEER - TO - PEER NETWORKS
A PEER TO PEER NETWORK IS A NETWORK IN WHICH RESOURCE SHARING ,PROCESSING AND COMMUNICATION CONTROL ARE COMPLETELY DECENTRALIZED . ALL CLIENTS IN THE NETWORK IS EQUAL IN TERMS ON SHARING AND RECEIVING RESOURCES AND USERS ARE AUTHENTICATED BY EACH INDIVIDUAL WORKSTATIONS . PEER TO PEER NETWORKS ARE THE MOST EASY RELIABLE AND INEXPENSIVE TO IMPLEMENT. HOWEVER THEY ARE ONLY PRACTICAL IN A VERY SMALL ORGANIZATION . DUE TO LACK OF ADMINISTRATION AND DATA STORAGE. A PEER TO PEER NETWORK IS ALSO REFERRED AS A WORKGROUP

EG: A BEST AWESOME EXAMPLE IS THE TORRENTS U USE TO DOWNLOAD FILES . THE APP WORKS ON THIS BASIS . IN THIS CASE SUPPOSE U R THE CLIENT U DONT GET THE FILE FROM THE OFFICIAL SERVER BUT FROM A PEER REMOTELY CURRENTLY DOWNLOADING THE SAME FILE .

SECONDLY COMES UR MINI LAB . WHERE U IMPLEMENT A NETWORK OF TWO OR MORE SERVER FOR THE PURPOSE OF GAMING OR FILE TRANSFER



PHYSICAL NETWORK TOPOLOGIES
A TOPOLOGY IS A NETWORK SPECIFICATION THAT DETERMINES THE NETWORKS OVERALL LAYOUT AND THE NETWORKS DATA FLOWING AND SIGNALLING PATTERNS , A TOPOLOGY CAN BE A PHYSICAL TOPOLOGY WHICH DESCRIBES PHYSICAL WIRING LAYOUT AND DIAGRAMS OR IT CAN BE A LOGICAL TOPOLOGY , WHICH DESCRIBES THE PATHS THROUGH WHICH THE DATA MOVES . THE PHYSICAL AND LOGICAL TOPOLOGIES DO NOT HAVE TO DO THE SAME . COMMON PHYISAL PATTERNS INCLUDE A STAR TOPOLOGY , TREE PATERN BUS OR A STRAIGHT LINE PATERN

NOTE:PHYSICAL BUS,TREE AND RING HAS BEEN DELETED OUT DUE ITS OUTDATED TECHNOLOGY AND NONRELIABLE NATURE

SO LETS START WITH PHYSICAL STAR TOPOLOGY

A PHYSICAL STAR TOPOLOGY IS A TYPE THAT USES A CENTRAL CONNECTIVITY DEVICE (ROUTER , SWITCHES , HUBS) WITH SEPERATE PHYSICAL CONNECTION TO EACH NODE(TERMINALS, SERVERS , PCS) THE INDIVIDUAL NODE FIRST SENDS DATA TO THE CENTRAL DEVICE AND THEN THE DEVICE FORWARDS THE DATA TO THE DESTINATION ADDRESS. STAR TOPLOGIES ARE INEXPENSIVE AND EASY TO MAINTAIN AND CONFIGURE ALSO TO IMPLEMENT. THE ONLY DRAWBACK IS IF THE CENTRAL DEVICE (SWITCH OR ROUTER ) GETS FAILED THEN THE WHOLE NETWORK IS ABNDONED AS ALL NODES ARE CONNECTED TO IT FOR DATA TRANSFER AND RESOURCE SHARING. STAR TOPLOGY IS THE MOST COMMERCIALLY USED TYPE OF NETWORK TOPOLOGIES EG: IN SCHOOLS, CYBERCAFES, SMALL ORGANIZATIONS , BANKS ETC ETC


PHYSICAL MESH TOPOLOGY
A PHYSICAL MESH TOPOLOGY IS A TYPE IN WHICH EACH NODE HAS A DIRECT CONNECTION TO EVERY OTHER NODE SIMILAR TO POINT TO POINT TOPOLOGY
. IN THIS CASE SUPPOSE THERE ARE 10 COMPUTERS EVERY NODE IS CONNECTED TO THE REMAINING 9 COMPUTERS VIA NIC CARDS (NETWORK INTERFACE CARDS)
OVERALL THIS TYPE OF NETWORK TOPOLGY IS THE MOST RELIABLE AND THE MOST MODERN . THE MOST SECURE AND MOST POWERFUL AND A FAULT TOLERENCE ONE AS NO TERMINAL NEEDS TO DEPEND ON OTHER END POINTS OR SERVERS


DRAWBACKS ARE ITS THE MOST EXPENSIVE ONE , THE MOST DIFFICULT ONE TO CONFIGURE AND IMPLEMENT . AND IS ALMOST A MESSY SITUATION WHEN IT COMES TO MAINTENANCE (AS THE NAME INDICATES MESH)

EG: COMPANIES AND ORGANIZATION WHICH WANTS THEIR NETWORKS TO BE MISSION CRITICAL AND FAULT TOLERANT IMPLEMENTS THIS NETWORK TOPOLOGY


FOR CURRENTLY I LL B NOT EXPLAINING LOGICAL TOPOLOGY
BECAUSE ITS OF NO USE ITS A THING JUST TO BE KEPT IN MIND
AND IS NOTHIN TO DO WITH PRACTICAL IMPLEMENTATION


HOWEVER IF ANYONE WANTS TO KNOW ABOUT IT
PLEASE LET ME KNOW AND I SHALL START POSTING

FOR NOW I LL B CONTINUING FROM LAN NETWORKS




LOCAL AREA NETWORKS


A LOCAL AREA NETWORK IS A SELF CONTAINED NETWORK THAT SPANS A SMALL AREA SUCH AS A SINGLE BUILDING , FLOOR OR ROOM , IN A LAN , ALL NODES AND SEGMENTS ARE DIRECTLY CONNECTED WITH CABLES OR SHORT RANGE WIRELESS TECHNOLOGIES
ALSO KNOWN AS WIRELESS LAN ( WLAN) .

WIDE AREA NETWORKS (WAN)
A WIDE AREA NETWORK IS A NETWORK THAT SPANS MULTIPLE GEOGRAPHIC LOCATIONS INCLUDING A METROPOLITAN AREA GEOGRAPHIC REASONS OR ENTIRE NATION . WANS TYPICALLY CONNECT MULTIPLE LANS AND OTHER NETWORKS USING LONG RANGE TRANSMISSION MEDIA. THE RESULT IS THAT USER AND COMPUTERS IN ONE LOCATION CAN COMMUNICATE WITH USERS AND COMPUTERS IN OTHER LOCATION(SIMILAR TO INTERNET) WANS ARE MOSTLY IMPLEMENTED BY LARGE PRIVATE COMPANIES OR BY INTERNET SERVICE PROVIDERS

Network Types:--
Peer to peer:

In a peer to peer network, the host provides and consumes network services, and each host has the same O.S
*.....Advantages of peer to peer network include:--
1)Easy implementation
2)Inexpensive

*.....Dis-Advantages of peer to peer network include:-
1)Difficult to expand (Not scalable)
2)Difficult to support
3)Lack centralized control
4)No centralize storage.

Client/server:

In a client/server network, hosts have specific rules. For example, some hosts are assigned server roles which allow then to provide network resources to other hosts.
Other hosts are assigned client roles which allow them to consume network resources. Unlike peer to peer network, host in a client/server network have difficult O.S.

*.....Advantages:-
1)Easily expanded (scalable)
2)Easy support
3)Centralized services
4)Easy to backup

*....Dis-Advantages:-

1)Servers O.S are expensive.
2)Requires extensive advanced planning.


Geographical types of network:-
1) LAN (Local area network)
2) MAN (Metropolitan area network)
3) CAN (Campus area network)
4) WAN (Wide area network)LAN:-
LANs reside in a smack geographic area, like in an office. A series of connected LANS, or a LAN connected across several building or offices is called an internetwork.Examples includes, home and organization (small business, corporate institute and govt.) network.

WAN: -
A WAN is a group of LANs that are geographically isolated but connected to form a large internetwork.
Example: INTERNET

CAN

A campus network is a computer network made up of an interconnection of local area networks (LANs) within a limited geographical area.The networking equipments (switches, routers) and trasmission media (optical fiber, copper plant, Cat5 cabling etc) are almost entirely owned (by the campus tenant / owner: an enterprise, university, government etc

MAN (Metropolitan Area Network )

A MAN is optimized for a larger geographical area than a LAN, ranging from several blocks of buildings to entire cities. MANs can also depend on communications channels of moderate-to-high data rates. A MAN might be owned and operated by a single organization, but it usually will be used by many individuals and organizations. MANs might also be owned and operated as public utilities. They will often provide means for internetworking of local networks.

Maximum Arear Covered

LAN 1 Kms
MAN: 100 KMS
Can: 5 Kms
Wan: Unlimited

Signaling
Baseband And BroadbandBaseband:Baseband signaling allows one signal at a time on network medium (cabling).

Broadband:Broadband signaling divides the network medium into multiple channels, allowing several signals to transverse the medium at the same time.

Topology

Topology is the term used to describe how devices are connected and how massages flow from device to device. There are 2 types of networking topologies.
1) The physical topology – Describes the physical way the network is wired.
2) The logical topology – Describes the way in which messages are sent.




1)Physical Topology Includes the following topologies

Bus topology
Star topology
Ring topology
Mesh topology
Hybrid topology

1)Bus topology: - A physical bus topology consists of a trunk cable with nodes either inserted directly into the trunk, or nodes tapping into the trunk using offshoot cables called drop cables.
*Signals travel from one mode to all other nodes on the bus.
*A device called a terminator is placed at both ends of the trunk cable.
*It absorbs signals and prevents them from reflecting back.
*This topology requires less cable than the star topology.
*Can be difficult to isolate cabling.
*100 Ohms of resistors are used at both the ends of the cable.

2)Ring topology: - A ring topology connects neighboring nodes until they form a ring .Signals travel in one direction around the ring .In ring topology, each device on the network acts as a repeater to send the signals to the next device.
With a ring:-
*Installation requires careful planning to create a continuous ring.
*Isolating problem can require going to several physical locations along the ring.
*A malfunctioning node or cable break can prevent signals reaching nodes further along on the ring.

3)Star Topology: - A star topology uses a hub or switch to concentrate all network connection to a single physical location. Today it is the most popular type of topology for a LAN. With the star:-
*All network connections are located in a single place, which makes it easy to troubleshoot and reconfigure.
*Hosts can be added or removed easily.
*Cabling problem only affect a single host.
*It requires more cable than any other topology.


4)Mesh Topology: - A mesh topology exists when there are multiple paths between any 2 nodes on a network. Mesh topologies are created using point to point connection. This increases the network’s fault tolerance because alternate paths can be used when one path fails.
Two vibrations of mesh topologies exist:-
*Partial mesh -> some redundant paths exists.
*Full mesh -> every node has a point to point connection with every other node.

Full mesh topologies are usually impractical because the number of connections increases dramatically with every new node added to the network. However a full mesh topology becomes more practical through the implementation of an ad-hoc wireless network. With this topology, every wireless network card can communicate directly with any other wireless network card on the network. A separate and dedicated network interface and cable for each host on the network is not required.

Advantages And Disadvantages
Advantages of bus topology :-
1) Installation of devices easy.
2) Requires less cable compared to star topology.
3) Less expensive and works better for smaller networks.

Dis- Advantages :-
1) If backbone breaks, entire networks get down.
2) Difficult to isolate.
3) Limited number of devices.

Advantages of star topology :-
1) Easy to install, configure, manage and expand.
2) Centralized management.
3) Addition or removal of device does not affect the whole network.

Dis-Advantages :-
1) Requires more cable
2) Failure of hub affects entire network.
3) More expensive.

Advantages of Ring topology :-
1) Data travels at greater speed.
2) No collisions.
3) Handles large volume of traffic.

Dis-Advantages:-
1) More cabling is required as compared to bus.
2) One faulty device affects the entire network.
3) Addition of devices affect network.

Advantages of Mesh topology :-
1) Improve Fault tolerance.
2) Failure of one link does not affect entire network.
3) Centralized management is not required.

Dis- Advantages:-
1) Difficult to install and manage.
2) Each link from one device to other requires individual Nic.
3) Very much expensive.

Advantages of Hybrid topology :-
1) Used for creating larger networks.
2) Handles large volume of traffic.
3) Fault detection is easy.

Dis-Advantages:-
1) Installation and configuration is difficult.
2) More expensive than other topologies.
3) More cabling is required.

Related Posts Plugin for WordPress, Blogger...
 

Sample text

Sample Text