Showing posts with label Packet Tracer Tutorial. Show all posts
Showing posts with label Packet Tracer Tutorial. Show all posts

October 17, 2012

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".

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. 











C program to Read From a File

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