October 17, 2012

Communication between PCs in Packet Tracer

Here, we will see communication enabled between PCs via Router in Packet Tracer.
So, for this we need two PCs, a router ,and two cross over cables to connect them.
Important point is that we use cross over cable to connect PC to a router because they both use the same pins for transmission and receiving of data.

1

Now, we will connect them by selecting fast ethenet interfaces on both ends.
2
Similarly, on the PC side we will select fast Ethernet interface.
3
Now, we have connect the devices. Further, we will go to the router CLI mode and enter the following commands.
Step by step ,
we will have to do the following things.
i. Access the interfaces one by one
ii. Assign IP addresses to interfaces
iii. Change the status of the interfaces i.e. from Down to Up.
iv. Assign IP addresses to PCs.
v. Assign Default GateWay to PCs. FYI fast ethernet ip address is the gateway address to the PC. 
Now, commands of the Router CLI mode are as follows.
int
Now, we have accessed both interfaces one by one and we have assigned IP addresses respectively.
new
See the difference the lights have changed the color from Red to Green :)
Now, lets assign IP addresses to the PCs.
Click on PC1, go to Desktop, then click IP Configuration.
PC1:
pc1
PC2:
pc2
Now, our communication is enabled and we are able to communicate from PC1 to PC2 via Router.
Click on the packet in the right panel on the packet tracer, then click on PC1 and then click on PC2. You will see the successful packet tracer (status is shown in the bottom right corner)
packet
Select it and click on both PCs.
2pac

Bingo, your communication is successful.

Packet Tracer CLI

There are various common commands that one needs to be familiar with. These commands will be used all the time.

There are different modes. All modes have their own distinct commands.

clip_image002

 

All the configuration commands will be written in configuration mode.

Using the tab Key to Complete Commands

When you are entering a command, you can use the tab key to complete the command. Enter the first few characters of a command and press the tab key. If the characters are unique to the command, the rest of the command is entered in for you. This is helpful if you are unsure about the spelling of a command. For example, if we write in enable mode, “sh” and press tab button, “show” command will be written on the CLI mode.

clip_image002[6]

Router Modes

clip_image002[16]

clip_image004

TIP: There are other modes than these. Not all commands work in all modes. Be

careful. If you type in a command that you know is correct—show running-config, for example—and you get an error, make sure that you are in the correct mode.

Entering Global Configuration Mode

clip_image006

Configuring a Router Name

This command works on both routers and switches.

clip_image002[18]

Configuring Passwords

These commands work on both routers and switches.

clip_image004[5]

Here it is important to know that the enable secret password is encrypted by default. The enable password is not. For this reason, recommended practice is that you never use the enable password command. Use only the enable secret password command in a router or switch configuration. You cannot set both enable secret password and enable password to the same password. By doing so, it defeats the use of encryption.

Show Commands:

There are various show commands. in order to get familiar with these commands just write “show ?” in the enable mode.

show

Similarly, there are various commands that shows us the configurations that we have done on our router or any other device depending on the device we are working on. We will talk about later on.

Similarly, there are various commands in the configuration mode which we attain by entering the following command

Router# configure terminal.

Look at the following diagram.

basic

 

Ok, so now lot of things are happening here. Red markers explain them, also we are setting the hostname of the router and we have successfully applied the password by the following command.

enable password cisco

Here, “cisco” is the password.

 

Similarly, the command

router#show ip interface brief

gives us the information about the interfaces of the router. Now, detail discussion on the interfaces will be done later.

Networking Cables and Connections

In order for the communication to take place, cables play important role. Cable is the medium through which information usually moves from one network device to another. There are several types of cable which are commonly used with LANs. The type of cable chosen for a network is related to the network's topology, protocol, and size.
There are various types of cables used in networks as follows.
  • Unshielded Twisted Pair (UTP) Cable
  • Shielded Twisted Pair (STP) Cable
  • Coaxial Cable
  • Fiber Optic Cable

Twisted Pair Cables:
Twisted pair cabling is a type of wiring in which two conductors of a single circuit are twisted together for the purposes of canceling out electromagnetic interference (EMI) from external sources; for instance, electromagnetic radiation from unshielded twisted pair (UTP) cables, and crosstalk between neighboring pairs. In balanced pair operation, the two wires carry equal and opposite signals and the destination detects the difference between the two. This is known as differential mode transmission. Noise sources introduce signals into the wires by coupling of electric or magnetic fields and tend to couple to both wires equally. The noise thus produces a common-mode signal which is cancelled at the receiver when the difference signal is taken.

Categories Of UTP Cable:
It has been categorized into three categories based on the equipment that are being connected through these wires.
i. Straight Through Cable
ii. Cross Over Cable
iii. Roll Over Cable

Explanation:

Straight Through Cable:
Straight through cables are used to connect different devices like Switch to PC. Switch to Router. Router to Switch etc. Straight-through cables are used when each end of the communication transmits and receives on different pairs.

Cross Over Cable:
In a cross over the cable, the send and receive wires are "crossed over", meaning the wires are opposite on each end. This allows two PCs to talk to each other, has it connects the send of one computer to the receive of the other. Hence, the cross over cables are used to connect similar devices like PC to PC , Router to Router, Switch to Switch, Hub to Hub etc.

Roll Over Cable:
Roll over cables are used to connect to the console port of the device. It gets the name rollover because the pin outs on one end are reversed from the other, as if the wire had been rolled over and you were viewing it from the other side.

Transmission Pins:
Devices that transmit on 1,2 and receive on 3,6
1) PC
2)Router
3)Wireless Access Point AP
4) Networked printers
Devices that transmit on 3,6 and receive on 1,2
1)switch
2)bridge
3)hub

image

Required Equipment:
In order to make a network cable you need the following equipment.
i. Cat5, Cat5e cable.

CAT5 cable usually contains four pairs of copper wire, Fast Ethernet communications only utilize two pairs. A newer specification for CAT5 cable -CAT5 enhanced ("CAT5e" or "CAT 5e")- supports networking at Gigabit Ethernet[ speeds (up to 1000 Mbps) over short distances by utilizing all four wire pairs, and it is backward-compatible with ordinary CAT5.

ii. A connector named RJ-45.

RJ45 connectors feature eight pins to which the wire strands of a cable interface electrically. Standard RJ-45 pin outs define the arrangement of the individual wires needed when attaching connectors to a cable.

iii. Crimping tool:

Use to crimp the cable inside RJ 45 connector. 

iv. Wire stripper or Knife:

You can use a knife too to cut the wire open. In order to make different combinations of it. we will have to cut the upper protective coating and bring out the eight wires. 

Category Speed Use
1 1 Mbps Voice Only (Telephone Wire)
2 4 Mbps LocalTalk & Telephone (Rarely used)
3 16 Mbps 10BaseT Ethernet
4 20 Mbps Token Ring (Rarely used)
5 100 Mbps (2 pair) 100BaseT Ethernet
5e 1,000 Mbps Gigabit Ethernet
6 10,000 Mbps Gigabit Ethernet


Auto-MDIX:
Auto-MDIX (automatic medium-dependent interface crossover) is a computer networking technology that automatically detects the required cable connection type (straight-through or crossover) and configures the connection appropriately, thereby removing the need for crossover cables to interconnect switches or connecting PCs peer-to-peer. When it is enabled, either type of cable can be used and the interface automatically corrects any incorrect cabling. For Auto-MDIX to operate correctly, the speed on the interface and duplex setting must be set to "auto".

October 3, 2012

OSPF on Packet Tracer

Apply OSPF Routing Protocol on the following protocol.

OSPF MANUAL

Follow the instructions given on the manual step by step. 

October 1, 2012

List Data Structure


The List data structure is among the most generic of data structures. In daily life, we use shopping list, groceries list, list of people to invite to a dinner, list of presents to give etc. In this tutorial, we will see how we use lists in programming.

A list is the collection of items of the same type (grocery items, integers, names, books etc). The data in arrays are also of same type. When we say an array of x[10]; it means that only the integers can be stored in it. The same is true for list. The data which we store in list should be of same nature. The items, or elements of the list, are stored in some particular order. What does this mean? Suppose in the list, you have the fruit first which are also in some order. You may have names in some alphabetical order i.e. the names which starts with A should come first followed by the name starting with B and so on. The order will be reserved when you enter data in the list like a dictionary. We have all the elements in the alphabetical order in dictionary.  

It is possible to insert new elements at various positions in the list and remove any element of the list. 
List is a set of elements in a linear order. Suppose we have four names a1, a2, a3, a4 and their order is as (a3, a1, a2, a4) i.e. a3, is the first element, a1 is the second element, and so on. We want to maintain that order in the list when data is stored in the list. We don’t want to disturb this order. The order is important here; this is not just a random collection of elements but an ordered one. Sometimes, this order is due to sorting i.e. the things that start with A come first. At occasions, the order may be due to the importance of the data items. We will discuss this in detail while dealing with the examples.

Now we will see what kind of operations a programmer performs with a list data structure. Following long list of operations may help you understand the things in a comprehensive manner.

Operation Name
Description
createList()
Create a new list (presumably empty)
copy()
Set one list to be a copy of another
clear();
Clear a list (remove all elements)
insert(X, ?)
Insert element X at a particular position in the list
remove(?)
Remove element at some position in the list
get(?)
Get element at a given position
update(X, ?)
Replace the element at a given position with X
find(X)
Determine if the element X is in the list
length()
Returns the length of the list.

Details of Functions

createList() is a function which  creates a new list. For example to create an array, we use int x[10] or int* y = new int[10]; we need similar functionality in lists too. The copy() function will create a copy of a list. The function clear() will remove all the elements from a list. We want to insert a new element in the list, we also have to tell where to put it in the list. For this purpose insert(X, position) function is used. Similarly the function remove(position) will remove the element at position. To get an element from the list get(position) function is used which will return the element at position. To replace an element in the list at some position the function update(X, position) is used. The function find(X) will search X in the list. The function length() tells us about the number of elements in the list.

We need to know what is meant by “particular position” we have used “?” for this in the above table. There are two possibilities:

  • Use the actual index of element: i.e. insert it after element 3, get element number 6. This approach is used with arrays
  • Use a “current” marker or pointer to refer to a particular position in the list.

The first option is used in the data structures like arrays. When we have to manipulate the arrays, we use index like x[3], x[6]. In the second option we do not use first, second etc for position but say wherever is the current pointer. Just think of a pointer in the list that we can move forward or backward. When we say get, insert or update while using the current pointer, it means that wherever is the current pointer, get data from that position, insert data after that position or update the data at that position. In this case, we need not to use numbers. But it is our responsibility that current pointer is used in a proper way.


Arrays



Arrays are data structure in which identical data types are stored. The arrays occupy the memory depending upon their size and have contiguous area of memory. We can access the arrays using the array index.


To declare arrays, we have to give their data type, name and size. These are fixed-size arrays. The declaration of arrays is as follows:

data_type    array_name [size] ;


Consider the following program:

void main(  )
{          
int x[6]; 
        int j;

    for(j = 0; j < 6; j++) 
        {

         x[j] = 2 * j;
        }
    }

We have declared an int array of six elements and initialized it in the loop.

Let’s revise some of the array concepts. The declaration of array is as int x[6]; or float x[6]; or double x[6]; You have already done these in your programming assignments. An array is collection of cells of the same type. In the above program, we have array x of type int of six elements. We can only store integers in this array. We cannot put int in first location, float in second location and double in third location. What is x? x is a name of collection of items. Its individual items are numbered from zero to one less than array size. To access a cell, use the array name and an index as under:

           x[0], x[1], x[2], x[3], x[4], x[5]

To manipulate the first element, we will use the index zero as x[0] and so on. 
Array occupies contiguous memory area in the computer. In case of the above example, if some location is assigned to x[0], the next location can not contain data other than x[1]. The computer memory can be thought of as an array. It is a very big array. Suppose a computer has memory of 2MB, you can think it as an array of size 2 million and the size of each item is 32 bits. You will study in detail about it in the computer organization, and Assembly language courses. In this array, we will put our programs, data and other things.

In the above program, we have declared an array named x. ‘x’ is an array’s name but there is no variable x. ‘x’ is not an lvalue

If some variable can be written on the left- hand side of an assignment statement, this is lvalue variable. It means it has some memory associated with it and some value can be assigned to it. For example, if we have the code  
          int a, b; 

It can be written as b = 2;
It means that put 2 in the memory location named b. We can also write as a = b; it means whatever b has assign it to a, that is a copy operation. If we write as a = 5; it means put the number 5 in the memory location which is named as a. But we cannot write 2 = a; that is to put at number 2 what ever the value of a is. Why can’t we do that? Number 2 is a constant. If we allow assignment to constants what will happen? Suppose ‘a’ has the value number 3. Now we assigned number 2 the number 3 i.e. all the number 2 will become number 3 and the result of 2 + 2 will become 6. Therefore it is not allowed.

x’ is a name of array and  not an lvalue. So it cannot be used on the left hand side in an assignment statement. Consider the following statements

int x[6];   
int n;
x[0] = 5;   x[1] = 2;
x = 3;                                // not allowed
x = a + b;                            // not allowed
x = &n;                           // not allowed

In the above code snippet, we have declared an array x of int. Now we can assign values to the elements of x as x[0] = 5 or x[1] = 2 and so on. The last three statements are not allowed. What does the statement x = 3; mean? As x is a name of array and this statement is not clear, what we are trying to do here? Are we trying to assign 3 to each element of the array? This statement is not clear. Resultantly, it can not be allowed. The statement x = a + b is also not allowed. There is nothing wrong with a + b. But we cannot assign the sum of values of a and b to x. In the statement x = &n, we are trying to assign the memory address of n to x which is not allowed. The reason is the name x is not lvalue and we cannot assign any value to it. For understanding purposes, consider x as a constant. Its name or memory location can not be changed. This is a collective name for six locations. We can access these locations as x[0], x[1] up to x[5]. This is the way arrays are manipulated.

Sometimes, you would like to use an array data structure but may lack the information about the size of the array at compile time. Take the example of telephone directory. You have to store one lakh (100,000) names in an array. But you never know that the  number of  entries may get double or decline in future. Similarly, you cannot say that the total population of the country is one crore (10 million) and declare an array of one crore names. You can use one lakh locations now and remaining will be used as the need arrives. But this is not a good way of using the computer resources. You have declared a very big array while using a very small chunk of it. Thus the remaining space goes waste which can, otherwise, be used by some other programs. 

Suppose you need an integer array of size n after the execution of the program. We have studied that if it is known at the execution of the program that an array of size 20 or 30 is needed, it is allocated dynamically. The programming statement is as follows:

            int*  y = new int[20]; 

It means we are requesting computer to find twenty memory locations. On finding it, the computer will give the address of first location to the programmer which will be stored in   y. Arrays locations are contiguous i.e. these are adjacent. These twenty locations will be contiguous, meaning that they will be neighbours to each other. Now y has become an array and we can say y[0] =1 or y[5] = 15. Here y is an lvalue. Being a pointer, it is a variable where we can store the address of some variable. 

When we said , int* y = new int[20];  

The new returns the memory address of first of the twenty locations and we store that address into y. As y is a pointer variable so it can be used on the left-hand side. We can write it as:

            y = &x[0];      

In the above statement, we get the address of the first location of the array x and store it in y. As y is lvalue, so it can be used on left hand side. This means that the above statement is correct.

            y = x;

Similarly, the statement y = x is also correct. x is an array of six elements that holds the address of the first element. But we cannot change this address. However we can get that address and store it in some other variable. As y is a pointer variable and lvalue so the above operation is legal. We have dynamically allocated the memory for the array. This memory, after the use, can be released so that other programs can use it. We can use the delete keyword to release the memory. The syntax is:

            delete[ ] y;

We are releasing the memory, making it available for use by other programs. We will not do it in case of x array, as ‘new’ was not used for its creation. So it is not our responsibility to delete x

September 30, 2012

WHY


Why, Why do
we press harder on a remote control when we know the batteries are
getting weak?

Why
do banks charge a fee due to insufficient funds when they already know
you're broke?

Why
is it that when someone tells you that there are one billion stars in
the universe, you believe them but, if they tell you there is wet
paint, you have to touch it to check?

Why
do they use sterilised needles for lethal
injections?

Why
doesn't Tarzan have a beard?

Why
does Superman stop bullets with his chest, but ducks when you throw a revolver at him?


Whose 
cruel idea was it to put an "s" in the word "lisp"?


Why is it that, no matter what colour bubble bath you use, the bubbles are always white?

Is there ever a day that mattresses are not on sale?

Why do people constantly return to the refrigerator with hopes that
something new to eat will have materialised?

Why is it that no plastic trash bag will open from the first end you
try?

How do those dead bugs get into enclosed light fixtures?


Why is it that whenever you attempt to catch something that's falling off the table you always manage to knock something else over?


If swimming is a good exercise to stay FIT, than why are whales FAT?
 
Why is the place in a stadium where people SIT, called a STAND?
 
Why is that everyone wants to go to HEAVEN but nobody want to DIE?
 
Shall I say that there is racial discrimination even in chess as the WHITE piece is moved FIRST?
 
In our country, we have FREEDOM of SPEECH, then why do we have TELEPHONE BILLS?
 
If money doesn’t grow on TREES, then why do banks have BRANCHES?
 
Why doesn’t GLUE stick to its BOTTEL?
 
Why do you still call it a BUILDING when it is already BUILT?
 
If it’s true that we are here to HELP others, what are others HERE for?
 
If All The Nations in The World Are in Debt, where Did All The Money Go?
 
If The “Black Box” Flight Recorder Is Never Damaged During A Plan Crash, Why Isn’t The Whole Airplane Made Out of that Stuff?
 
Who Copy wrote The Copyright Symbol?



September 29, 2012

Data Structures



Data structures help us to organize the data in the computer, resulting in more efficient programs. An efficient program executes faster and helps minimize the usage of resources like memory, disk. Computers are getting more powerful with the passage of time with the increase in CPU speed, availability of faster network and the maximization of disk space. Therefore people have started solving more and more complex problems. As computer applications are becoming complex, so there is need for more resources. This does not mean that we should buy a new computer to make the application execute faster. Our effort should be to ensure that the solution is achieved with the help of programming, data structures and algorithm. We have to analyze the problem to determine the resource constraints that a solution must meet. Suppose, the data is so huge i.e. in Gigabytes (GBs) while the disc space available with us is just 200 Mega bytes. This problem cannot be solved with programming. Rather, we will have to buy a new disk.

Data Organization

What does organizing the data mean? It means that the data should be arranged in a way that it is easily accessible. The data is inside the computer and we want to see it. We may also perform some calculations on it. Suppose the data contains some numbers and the programmer wants to calculate the average, standard deviation etc. May be we have a list of names and want to search a particular name in it. To solve such problems, data structures and algorithm are used. Sometimes you may realize that the application is too slow and taking more time. There are chances that it may be due to the data structure used, not due to the CPU speed and memory. You may have two data structures and try to decide which one is more suitable for the resolution of the problem.

A solution is said to be efficient if it solves the problem within its resource constraints. What does it mean? In the computer, we have hard disk, memory and other hardware. Secondly we have time. Suppose you have some program that solves the problem but takes two months. It will be of no use. Usually, you don’t have this much time and cannot wait for two months. Suppose the data is too huge to be stored in disk. Here we have also the problem of resources. This means that we have to write programs considering the resources to achieve some solution as soon as possible. There is always cost associated with these resources. We may need a faster and better CPU which can be purchased. Sometimes, we may need to buy memory. As long as data structures and programs are concerned, you have to invest your own time for this.

Importance of Data Structure


Each data structure has costs and benefits. Any data structure used in your program will have some benefits. For this, you have to pay price. That can be computer resources or the time. Also keep in mind that you are solving this problem for some client. If the program is not efficient, the client will not buy it.

In rare cases, a data structure may be better than another one in all situations. It means that you may think that the array is good enough for all the problems. Yet this is not necessary. In different situations, different data structures will be suitable. Sometimes you will realize that two different data structures are suitable for the problem. In such a case, you have to choose the one that is more appropriate. An important skill this course is going to lend to the students is use the data structure according to the situation. You will learn the programming in a way that it will be possible to replace the one data structure with the other one if it does not prove suitable. We will replace the data structure so that the rest of the program is not affected. You will also have to attain this skill as a good programmer.

There are three basic things associated with data structures. A data structure requires:

Ø    Space for each data item it stores
Ø   Time to perform each basic operation
Ø   Programming effort


Understand how to measure the cost of a data structure or program. These techniques also allow you to judge the merits of new data structures that you or others might develop. At times, you may have two suitable data structures for some problem. These can be tried one by one to adjudge which one is better one. 


Selection of a Data Structure

It is necessary to determine the basic operations that must be supported. Quantify the resource constraints for each operation. Suppose you have to insert the data in the computer or database and have to search some data item. Let’s take the example of telephone directory. Suppose there are eight million names in the directory. Now someone asks you about the name of some particular person. You want that this query should be answered as soon as possible. You may add or delete some data. It will be advisable to consider all these operations when you select some data structure.

Finally select the data structure that meets these requirements the maximum. Without, sufficient experience, it will be difficult to determine which one is the best data structure. We can get the help from internet, books or from someone whom you know for already getting the problems solved. We may find a similar example and try to use it. After this course, you will be familiar with the data structures and algorithms that are used to solve the computer problems.

Now you have selected the data structure. Suppose a programmer has inserted some data and wants to insert more data. This data will be inserted in the beginning of the existing data, or in the middle or in the end of the data. Let’s talk about the arrays and suppose you have an array of size hundred. Data may be lying in the first fifty locations of this array. Now you have to insert data in the start of this array. What will you do? You have to move the existing data (fifty locations) to the right so that we get space to insert new data. Other way round, there is no space in the start. Suppose you have to insert the data at 25th location. For this purpose, it is better to move the data from 26th to 50th locations; otherwise we will not have space to insert this new data at 25th location.

Now we have to see whether the data can be deleted or not. Suppose you are asked to delete the data at 27th position. How can we do that? What will we do with the space created at 27th position?

Thirdly, is all the data processed in some well-defined order or random access allowed? Again take the example of arrays. We can get the data from 0th position and traverse the array till its 50th position. Suppose we want to get the data, at first from 50th location and then from 12th. It means that there is no order or sequence. We want to access the data randomly. Random access means that we can’t say what will be the next position to get the data or insert the data.

Comparison of Data Structures


How can you decide which data structure is better than other. Firstly, a programmer can do it by writing two programs using different data structure while solving the same problem. Now execute both data structures. One gives the result before the other. The data structure that gives results first is better than the other one. But sometimes, the data grows too large in the problem. Suppose we want to solve some problem having names and the data of names grows to one million. Now when you run both programs, the second program runs faster. What does it mean? Is the data structure used in program one not correct? This is not true. The size of the data, being manipulated in the program can grow or shrink. You will also see that some data structures are good for small data while the others may suit to huge data. But the problem is how can we determine that the data in future will increase or decrease. We should have some way to take decision in this regard. We will study further in other related articles on how to take such decisions.







September 25, 2012

Bitter Truth


A German Muslim scholar was once asked about terrorism and Islam: He said: Who started the First World War? Muslims? Who started the Second World War? Muslims? Who killed about 20 millions of Aborigines in Australia? Muslims? Who sent the nuclear bombs of Hiroshima and Nagasaki? Muslims? Who killed more than 100 millions of Indians in North America? Muslims? Who killed more than 50 millions of Indians in South America? Muslims? Who took about 180 millions of African people as slaves and 88% of them died and were thrown in Atlantic Ocean? Muslims? No, they weren’t Muslims! First of all, you have to define terrorism properly.  If a non-Muslim does something bad, it is crime. But if a Muslim commits same, he is a terrorist. So remove this double standard.

EIGRP Configuration on Packet Tracer

Configure Enhanced Interior Gateway Routing Protocol on the following topology.

EIGRP topology

2. Also, apply EIGRP on the following topology.

Apply all the IP addresses.
Change the interface states.
Apply Protocol.





September 23, 2012

Networking Devices

Since, we are going to do a series of tutorials on packet tracer. In this manner, we need to have a familiarity of various networking components and devices. We are going to discuss some important devices which are going to be used in networking. 

All networks are made up of basic hardware building blocks to interconnect network nodes, such as Network Interface Cards (NICs), Bridges, Hubs, Switches, and Routers etc. These devices also need cables to connect them. In this tutorial, we are going to discuss these important devices.  

 Network interface cards

A NIC (network interface card) is a piece of computer hardware designed to allow computers to communicate over a computer network. It provides physical access to a networking medium and often provides a low-level addressing system through the use of MAC addresses. It allows users to connect to each other either by using cables or wirelessly.The NIC provides the transfer of data in  megabytes. 


NIC




Every device on a network that needs to transmit and receive data must have a network interface card (NIC) installed. They are sometimes called network adapters, and are usually installed into one of the computer's expansion slots in the same way as a sound or graphics card. The NIC includes a transceiver, (a transmitter and receiver combined). The transceiver allows a network device to transmit and receive data via the transmission medium. Each NIC has a unique 48-bit Media Access Control (MAC) address burned in to its ROM during manufacture. The first 24 bits make up a block code known as the Organisationally Unique Identifier (OUI) that is issued to manufacturers of NICs, and identify the manufacturer. The issue of OUIs to organisations is administered by the Institute of Electrical and Electronics Engineers (IEEE). The last 24 bits constitute a sequential number issued by the manufacturer. The MAC address is sometimes called a hardware address or physical address, and uniquely identifies the network adapter. It is used by many data link layer communications protocols, including Ethernet, the 802.11 wireless protocol and Bluetooth. The use of a 48-bit adress allows for 248(281,474,976,710,656) unique addresses. A MAC address is usually shown in hexadecimal format, with each octet separated by a dash or colon, 

For example: 00-60-55-93-R2-N7


Repeaters

A repeater is an electronic device that receives a signal and retransmits it at a higher power level, or to the other side of an obstruction, so that the signal can cover longer distances without degradation. In most twisted pair ethernet configurations, repeaters are required for cable runs longer than 100 meters away from the computer. As signals travel along a transmission medium there will be a loss of signal strength i.e. attenuation. A repeater is a non-intelligent network device that receives a signal on one of its ports, regenerates the signal, and then retransmits the signal on all of its remaining ports. Repeaters can extend the length of a network (but not the capacity) by connecting two network segments. Repeaters cannot be used to extend a network beyond the limitations of its underlying architecture, or to connect network segments that use different network access methods. They can, however, connect different media types, and may be able to link bridge segments with different data rates. 
Repeater


Repeaters are used to boost signals in coaxial and twisted pair cable and in optical fibre lines. An electrical signal in a cable gets weaker the further it travels, due to energy dissipated in conductor resistance and dielectric losses. Similarly a light signal traveling through an optical fiber suffers attenuation due to scattering and absorption. In long cable runs, repeaters are used to periodically regenerate and strengthen the signal. 


Hubs

A hub contains multiple ports. When a packet arrives at one port, it is copied to all the ports of the hub for transmission. In a hub, a frame is passed along or "broadcast" to every one of its ports. It doesn't matter that the frame is only destined for one port. The hub has no way of distinguishing which port a frame should be sent to. Passing it along to every port ensures that it will reach its intended destination. This places a lot of traffic on the network and can lead to poor network response times. Additionally, a 10/100Mbps hub must share its bandwidth with each and every one of its ports. So when only one PC is broadcasting, it will have access to the maximum available bandwidth. If, however, multiple PCs are broadcasting, then that bandwidth will need to be divided among all of those systems, which will degrade performance.



Network Hub




Bridges


A network bridge connects multiple network segments at the data link layer (layer 2) of the OSI model. Bridges do not copy traffic to all ports, as hubs do, but learn which MAC addresses are reachable through specific ports. Once the bridge associates a port and an address, it will send traffic for that address only to that port. Bridges do send broadcasts to all ports except the one on which the broadcast was received.

Bridges learn the association of ports and addresses by examining the source address of frames that it sees on various ports. Once a frame arrives through a port, its source address is stored and the bridge assumes that MAC address is associated with that port. The first time that a previously unknown destination address is seen, the bridge will forward the frame to all ports other than the one on which the frame arrived.

Network Bridge
Bridges don't know anything about protocols, but just forward data depending on the destination address in the data packet. This address is not the IP address, but the MAC (Media Access Control) address that is unique to each network adapter card. The bridge is basically just to connect two local-area networks (LANs), or two segments of the same LAN that use the same protocol. Bridges can extend the length of a network, but unlike repeaters they can also extend the capacity of a network, since each port on a bridge has its own MAC address. When bridges are powered on in an Ethernet network, they start to learn the network's topology by analysing the source addresses of incoming frames from all attached network segments (a process called backward learning ). Over a period of time, they build up a routing table . 

The bridge monitors all traffic on the segments it connects, and checks the source and destination address of each frame against its routing table. When the bridge first becomes operational, the routing table is blank, but as data is transmitted back and forth, the bridge adds the source MAC address of any incoming frame to the routing table and associates the address with the port on which the frame arrives. In this way, the bridge quickly builds up a complete picture of the network topology. If the bridge does not know the destination segment for an incoming frame, it will forward the frame to all attached segments except the segment on which the frame was transmitted. Bridges reduce the amount of traffic on individual segments by acting as a filter, isolating intra-segment traffic. This can greatly improve response times.

Switches

The switch is a relatively new network device that has replaced both hubs and bridges in LANs. A switch uses an internal address table to route incoming data frames via the port associated with their destination MAC address. Switches can be used to connect together a number of end-user devices such as workstations, or to interconnect multiple network segments. A switch that interconnects end-user devices is often called a workgroup switch. Switches provide dedicated full-duplex links for every possible pairing of ports, effectively giving each attached device its own network segment This significantly reduces the number of intra-segment and inter-segment collisions. Strictly speaking, a switch is not capable of routing traffic based on IP address (layer 3) which is necessary for communicating between network segments or within a large or complex LAN. Some switches are capable of routing based on IP addresses but are still called switches as a marketing term. A switch normally has numerous ports, with the intention being that most or all of the network is connected directly to the switch, or another switch that is in turn connected to a switch.


Network Switch


Routers

Routers are networking devices that forward data packets between networks using headers and forwarding tables to determine the best path to forward the packets. A network environment that consists of several interconnected networks employing different network protocols and architectures requires a sophisticated device to manage the flow of traffic between these diverse networks. Such a device, sometimes referred to as an intermediate system, but more commonly called a router, must be able to determine how to get incoming packets (or datagrams) to the destination network by the most efficient route. Routers gather information about the networks to which they are connected, and can share this information with routers on other networks. The information gathered is stored in the router's internal routing table, and includes both the routing information itself and the current status of various network links. Routers exchange this routing information using special routing protocols. 


A router is connected to at least two networks, commonly two LANs or WANs or a LAN and its ISP's network. Routers are located at gateways, the places where two or more networks connect, and are the critical device that keeps data flowing between networks and keeps the networks connected to the Internet. When data is sent between locations on one network or from one network to a second network the data is always seen and directed to the correct location by the router. The router accomplishes this by using headers and forwarding tables to determine the best path for forwarding the data packets, and they also use protocols such as ICMP to communicate with each other and configure the best route between any two hosts. The Internet itself is a global network connecting millions of computers and smaller networks. There are various routing protocols which are helpful for various different environments and will be discussed later. 











September 21, 2012

ISHQ E RASOOL (SAW) Day

Today , 21st September 2012, we are celebrating the ishq e rasool day and of course, there is a local holiday in Pakistan. Pakistan is the country with the most local holidays in the world. That just official numbers i am talking about. All the strikes that take place and other events as Pakistan is very eventful country, Day in and day out, we either have riots resulting in the shutter down strikes causing loss to economy but who gives a "damn".

Coming back to original discussion about ISHQ E RASOOL (SAW) day, i was watching the news, watching people destroying signals, shops, cars, bikes, billboards, burning cinemas. But the question is, Should this be the reaction ? And who is going to pay for the destruction that happens as a result. The answer is "us, all of us through our tax money".

Hazrat Muhammad (PBUH) said, "Muslim is the one who does not harm another Muslim by all means (through his hands and tongue )". Are they going to stop publishing stuff like that. Same reaction was recorded when some cartoons were published by some danish artist.

This is what they do, they make something insulting, mock our religion and sit in front of the TV to watch us burn ourselves. This photo might give you the little idea of what i am talking about.



Its a shame, How can you protest with violence for somebody who always stood for peace . 


September 17, 2012

RIP assignment




1. Follow it step by step and perform it.

     Basic topology configuration

2. Apply RIP version 1 on the following configuration

     RIP Assignment

3. Apply RIP version 2 on the following configuration.

     RIP V2

C program to Read From a File

#include <stdio.h> #include <stdlib.h> void main() {     FILE *fptr;     char filename[15];     char ch;   ...