23 Şub 2009

CCNA LAB:VLANs Configuration

Switch>enable

Switch#configure terminal

Switch(config)#hostname Switch2960

Switch2960(config)#vlan 2

Switch2960(config-vlan)#name Sales

Switch2960(config-vlan)#exit

Switch2960(config)#vlan 3

Switch2960(config-vlan)#name Engineering

Switch2960(config-vlan)#vlan 4

Switch2960(config-vlan)#name Marketing

Switch2960(config-vlan)#exit

Switch2960(config)#interface range fasthethernet 0/1 – 4

Switch2960(config-if-range)#switchport mode access

Switch2960(config-if-range)#switchport access vlan 4

Switch2960(config-if-range)#interface range fastethernet 0/5 – 9

Switch2960(config-if-range)#switchport mode access

Switch2960(config-if-range)#switchport access vlan 3

Switch2960(config-if-range)#interface range fastethernet 0/10-11

Switch2960(config-if-range)#switchport mode access

Switch2960(config-if-range)#switchport access vlan 2

Switch2960(config-if-range)#exit

Switch2960(config)#exit

Switch2960#copy running-config startup-config

Switch2960#

 

CCNA LAB:Switch Configuration

switch>enable

switch#configure terminal

switch(config)#hostname 2960switch

2960switch (config)#enable password thewayofccie

2960switch (config)#enable secret ccie

2960switch (config)#line console 0

2960switch (config-line)#login

2960switch (config-line)#password passcon0

2960switch (config-line)#exit

2960switch (config)#line aux 0

2960switch (config-line)#login

2960switch (config-line)#password passaux

2960switch (config-line)#exit

2960switch (config)#line vty 0 4

2960switch (config-line)#login

2960switch (config-line)#password passtelnet

2960switch (config-line)#exit

2960switch (config)#ip default-gateway 192.168.20.1

2960switch (config)#interface vlan 1

2960switch (config-if)#ip address 192.168.20.2 255.255.255.0

2960switch (config-if)#no shutdown

2960switch (config-if)#interface fastethernet 0/1

2960switch (config-if)#description Link to RTA

2960switch (config-if)#interface fastethernet 0/2

2960switch (config-if)#description Link to EmrahPc

2960switch (config-if)#switchport port-security

2960switch (config-if)#switchport port-security maximum 1

2960switch (config-if)#switchport port-security violation shutdown

2960switch (config-if)#interface fastethernet 0/3

2960switch (config-if)#description Link to MustafaPc

2960switch (config-if)#switchport port-security

2960switch (config-if)#switchport port-security maximum 1

2960switch (config-if)#switchport port-security violation shutdown

2960switch (config-if)#exit

2960switch (config)#exit

2960switch #copy running-config startup-config

2960 witch #

VLANs (Virtual LAN)

VLANs (Virtual LAN)
A virtual LAN (VLAN) is a logical LAN, or a logical subnet.Vlan defines a broadcast domain. A physical subnet is a group of devices that shares the same physical wire. A logical subnet is a group of switch ports assigned to the same VLAN.

· Logically divide a switch into multiple, independent switches at L2
· Create separate broadcast domains in a switch, increasing the number of broadcast domains
· Span multiple switches using trunks
· Allow logical grouping of users by function
· Simplify adding, moving, and changing hosts in the network
· Enhance security

VLAN configuration steps:
1. The VLAN must be created.
2. The VLAN may be named.
3. The desired ports must be added to the new VLAN.
Note: Routing between VLANs requires a router or Layer 3 switch.

Creating Static VLANs
There are 2 ways of create Vlans:
• Using the VLAN configuration mode, which is the recommended way to create VLANs
• Using the VLAN database mode (which should not be used but is still available)

Using VLAN Configuration Mode
Switch(config)#vlan 2----->Creates VLAN 3 and enters VLAN configuration mode for further definitions.
Switch(config-vlan)#name Marketing
-----> Assigns a name to the VLAN.
Switch(config-vlan)#exit
Switch(config)#
Using VLAN Database Mode
Switch#vlan database
----->Enters VLAN database mode.
Switch(vlan)#vlan 5 name Engineering
----->Creates VLAN 5 and names it Engineering.
Switch(vlan)#vlan 10
----->Creates VLAN 10 and gives it a name of VLAN0010 as a default.
Switch(vlan)#apply----->Applies changes to the VLAN database and increases the revision number by 1.
Switch(vlan)#exit
Switch#
Assigning Ports to VLANs
Switch(config)#interface fastethernet 0/0
-----> Moves to interface configuration mode
Switch(config-if)#switchport mode access ----->Sets the port to access mode
Switch(config-if)#switchport access vlan 2-----> Assigns this port to VLAN 2
Using the range Command
Switch(config)#interface range fastethernet 0/1 – 8----->Enables you to set the same configuration parameters on multiple ports at the same time.
Switch(config-if-range)#switchport mode
-----> Access Sets ports 1–9 as access ports.
Switch(config-if-range)#switchport access vlan 5
-----> Assigns ports 1–9 to VLAN 5.

Verifying VLAN Information
Switch#show vlan-----> Displays VLAN information
Switch#show vlan brief ----->Displays VLAN information in brief
Switch#show vlan id 5-----> Only displays information about VLAN 5
Switch#show vlan name sales ----->Only displays information about VLAN named sales
Switch#show interfaces vlan x
----->Displays interface characteristics for the specified VLAN

Erasing VLANs
Switch#delete flash:vlan.dat-----> Removes the entire VLAN database from flash

Switch(config)#interface fastethernet 0/0
Switch(config-if)#no switchport access vlan 2
Switch(config-if)#exit
Switch(config)#no vlan 2
Or
Switch#vlan database
Switch(vlan)#no vlan 2
Switch(vlan)#exit

Configuration Switch

Setting Host Name

Switch#configure terminal

Switch(config)#hostname 2960Switch ----->Create a hostname of the switch.

2960Switch(config)#

Setting Passwords

Configuring Console Password

2960Switch(config)#line con 0

2960Switch(config-line)#login

2960Switch(config-line)#password thewayofccie ---->set the password to thewayofccie

Configuring Telnet Password

2960Switch(config)#line vty 4

2960Switch(config-line)#login

2960Switch(config-line)#password thewayofccie---->set the password to thewayofccie

Configuring Enable Password

2960Switch(config)#enable password runccie---->set the password to runccie

2960Switch(config)#enable secret thewayofccie---->Sets the encrypted secret password to thewayofccie

Setting IP Addresses and Default Gateways

2960Switch(config)#interface vlan1

2960Switchconfig-if)#ip address 192.168.100.2 255.255.255.0

2960Switch(config-if)#exit

2960Switch(config)#ip default-gateway 192.168.100.1

Duplex Configuration

2960Switch(config)#interface fastethernet 0/0

2960Switch(config-if)#duplex full

2960Switch(config)#interface fastethernet 0/1

2960Switch(config-if)#duplex auto

2960Switch(config)#interface fastethernet 0/2

2960Switch(config-if)#duplex half

Setting Operation Speed

2960Switch(config)#interface fastethernet 0/0

2960Switch(config-if)#speed 10

2960Switch(config)#interface fastethernet 0/1

2960Switch(config-if)#speed 100

2960Switch(config)#interface fastethernet 0/2

2960Switch(config-if)#speed auto

18 Şub 2009

CCNA LAB:Single Area OSPF Configuration



RTA ROUTER
Router>enable
Router#configure terminal
Router(config)#hostname RTA
RTA(config)#interface serial 0/0
RTA(config-if)#ip address 192.168.1.1 255.255.255.252
RTA(config-if)#clock rate 64000
RTA(config-if)#no shutdown
RTA(config-if)#exit
RTA(config)#interface fastethernet 0/0
RTA(config-if)#ip address 192.168.10.1 255.255.255.0
RTA(config-if)#no shutdown
RTA(config-if)#exit
RTA(config)#router ospf 65
RTA(config-router)#network 192.168.1.0 0.0.0.255 area 0
RTA(config-router)#network 192.168.10.0 0.0.0.255 area 0
RTA(config-router)# exit
RTA(config)# exit
RTA#copy running-config startup-config


RTB ROUTER
Router>enable
Router#configure terminal
Router(config)#hostname RTB
RTB (config)#interface serial0/0
RTB (config-if)#ip address 192.168.2.1 255.255.255.252
RTB (config-if)#clock rate 64000
RTB (config-if)#no shutdown
RTB (config-if)#exit
RTB (config)#interface serial 0/1
RTB (config-if)#ip address 192.168.1.2 255.255.255.252
RTB (config-if)#no shutdown
RTB (config-if)#exit
RTB(config)#interface fastethernet 0/0
RTB (config-if)#ip address 192.16.20.1 255.255.255.0
RTB (config-if)#no shutdown
RTB (config-if)#exit
RTB (config)#router ospf 65
RTB (config-router)#network 192.168.20.0 0.0.0.255 area 0
RTB (config-router)#network 192.168.1.0 0.0.0.255 area 0
RTB (config-router)#network 192.168.2.0 0.0.0.255 area 0
RTB(config-router)#exit
RTB(config)#exit
RTB #copy running-config startup-config


RTC ROUTER
Router>enable
Router#configure terminal
Router(config)#hostname RTC
RTC(config)#interface serial 0/1
RTC(config-if)#ip address 192.168.2.2 255.255.255.252
RTC(config-if)#no shutdown
RTC(config-if)#exit
RTC(config)#interface fastethernet 0/0
RTC(config-if)#ip address 192.168.30.1 255.255.255.0
RTC(config-if)#no shutdown
RTC(config-if)#exit
RTC(config)#router ospf 65
RTC(config-router)#network 192.168.2.0 0.0.0.255 area 0
RTC(config-router)#network 192.168.30.0 0.0.0.255 area 0
RTC(config-router)# exit
RTC(config)# exit
RTC#copy running-config startup-config

CCNA LAB:EIGRP CONFIGURATION


RTA ROUTER

Router>enable

Router# configure terminal

Router(config)#hostname RTA

RTA(config)#interface serial 0/0 

RTA(config-if)#ip address 192.168.100.1 255.255.255.252

RTA(config-if)#clock rate 64000

RTA(config-if)#no shutdown

RTA(config-if)#exit

RTA(config)#interface fastethernet 0/0

RTA(config-if)#ip address 172.16.10.1 255.255.255.0

RTA(config-if)#no shutdown

RTA(config-if)#exit

RTA(config)#router eigrp 65

RTA(config-router)#network 192.168.100.0

RTA(config-router)#network 172.16.10.0

RTA(config-if)#no auto-summary

RTA(config-if)#exit

RTA(config)#exit

RTA# copy running-config startup-config


RTB ROUTER

Router>enable

Router# configure terminal

Router(config)#hostname RTB

RTB(config)#interface serial 0/1

RTB(config-if)#ip address 192.168.100.2 255.255.255.252

RTB(config-if)#no shutdown

RTB(config-if)#exit

RTB(config)#interfacefastethernet 0/0

RTB(config-if)#ip address 172.16.20.1 255.255.255.0

RTB(config-if)#no shutdown

RTB(config-if)#exit

RTB(config)#router eigrp 65

RTB(config-router)#network 192.168.100.0

RTB(config-router)#network 172.16.20.0

RTB(config-if)#no auto-summary

RTB(config-if)#exit

RTB(config)#exit

RTB# copy running-config startup-config


16 Şub 2009

OSPF in a Single Area

OSPF in a Single Area
· OSPF uses the Shortest Path First (SPF) algorithm developed by Edgar Dijkstra.
· OSPF is an open-standard, link state protocol.
· OSPF classless and supports hierarchical routing and route summarization.
· OSPF uses cost as a metric, which is the inverse of the bandwidth of a link.
· OSPF requires more memory and faster processors to handle its additional information.
· The administrative distance for OSPF is 110.
· Each OSPF router has an ID, which is either the highest IP address on a loopback interface, if one exists, or the highest IP address on an active interface.

Configure a loopback interface:
Router(config)# interface loopback interface-number
Router(config-if)# ip address ip-address subnet-mask


· Routers use LSAs to learn the topology of the network.
Link State Advertisement (LSAs): A packet that contains the status of a router's links or network interfaces.
· Each OSPF router has a router ID, which is either the highest IP address on a loopback interface or the highest IP address on an active interface.
· LSAs are used to develop neighbor relationships and are sent as multicasts every 10 seconds. For LAN segments, a DR and a BDR are elected (highest router ID) to disseminate routing information.
· Routers use 224.0.0.6 to send information to the DR/BDR.
· OSPF is connection-oriented in that any routing information sent to another router requires a responding ACK. When DRs share routing information to their neighbors, the multicast address used is 224.0.0.5

OSPF Packet Types
OSPF includes five packet types:
Hello packets— Establish communication with directly attached neighbors.
Database Descriptor (DBD)— Sends a list of router IDs from whom the router has an LSA and the current sequence number. This information is used to compare information about the network.
Link State Requests (LSR)— Follow DBDs to ask for any missing LSAs.
Link State update (LSU)— Replies to a link-state request with the requested data.
Link-state acknowledgements (LSAck)— Confirm receipt of link-state information.


Configuring OSPF in a Single Area
Router(config)#router ospf process-number
Router(config-router)#network network-number wildcard-mask area area-number




RTA(config)#router ospf 65
RTA(config-router)#network 192.168.10.0 0.0.0.255 area 0
RTA(config-router)#network 192.168.20.0 0.0.0.255 area 0

RTB(config)#router ospf 65
RTB(config-router)#network 192.168.10.0 0.0.0.255 area 0
RTB(config-router)#network 192.168.30.0 0.0.0.255 area 0
Configuring MD5 Authentication
Router(config-if)#ip ospf message-digest-key key-id md5 key
Router(config-if)# ip ospf authentication [message-digest null]
Router(config-router)#area area-id authentication [message-digest]

key-id ----> An identifier in the range from 1 to 255
key-----> Alphanumeric password of up to 16 bytes


Example:
RouterA(config)#int s0/0
RouterA(config-if)#ip ospf message-digest-key 1md5 thewayofccie
RouterA(config-if)#ip ospf authentication message-digest
RouterA(config-if)#exit
RouterA(config)#router ospf 65
RouterA(config)#area 0 authentication message-digest

Router Modes

Router Modes
Router> --------------->User mode
Router# ---------------->Privileged mode
Router(config)# -------->Global configuration mode
Router(config-if)# ------>Interface mode
Router(config-subif)#--->Subinterface mode
Router(config-line)#----->Line mode
Router(config-router)#--->Router configuration mode

Global Configuration Mode
Router>------->In this mode you cannot make changes
Router>enable
Router#------->You can see the configuration and move to make changes.
Router#configure terminal
Router(config)#

Configuring a Router Name
Router(config)#hostname RTA
RTA(config)#

Configuring Passwords
Router(config)#enable password runcisco
Router(config)#line console 0
Router(config-line)#password thewayofccie
Router(config-line)#login
Router(config)#line vty 0 4
Router(config-line)#password telnet
Router(config-line)#login

Configuring a Serial Interface
Router(config)#interface s0/0
Router(config-if)#description Link to RTA---->(Optional command)
Router(config-if)#ip address 172.16.0.1 255.255.0.0
Router(config-if)#clock rate 64000------->Assigns a clock rate for the interface (The command is used only on a serial interface that has a DCE cable plugged into it.)
Router(config-if)#no shutdown----->Turns interface on

Configuring a Fast Ethernet Interface
Router(config)#interface fastethernet 0/0
Router(config-if)#description Sales LAN------>(Optional command)
Router(config-if)#ip address 192.168.101.1 255.255.255.0
Router(config-if)#no shutdown--------->Turns interface on

Saving Configurations
Router#copy running-config startup-config
Saves the running configuration to local NVRAM
Router#copy running-config tftp
Saves the running configuration remotely to a TFTP server
Router#erase startup-config
Deletes the startup configuration file from NVRAM

EIGRP-Enhanced Interior Gateway Routing Protocol



EIGRP-Enhanced Interior Gateway Routing Protocol

· EIGRP is a hybrid routing protocol developed by Cisco to replace IGRP.
· It uses the Diffusing Update Algorithm (DUAL).
· Maximum hop count 224.
· EIGRP sends updates only when there is a change in the network.

EIGRP Features:

· Fast convergence
· Support for VLSM
· Partial updates conserve network bandwidth
· Support for IP, AppleTalk, and IPX
· Support for all layer 2 (data link layer) protocols and topologies
· Sophisticated metric that supports unequal-metric proportional load-balancing
· Use of multicasts (and unicasts where appropriate) instead of broadcasts
· Support for authentication

There are five EIGRP messages:
Hello : Identifies neighbors and serves as a keepalive mechanism
Update : Reliably sends route information
Query : Reliably requests specific route information
Reply : Reliably responds to a query
ACK : Acknowledgment

EIGRP PATH Calculation
EIGRP uses Diffusing Update Algoritm to calculate and maintain loop-free path and provide fast convergence.
The following is a list of the terminilogy DUAL uses to select a route;
Successor : The primary route used to reach a destination.The successor route is kept in the routing table.
Feasible successor : The backup route must have an AD less than the FD of the current successor route.
Adversited distance (AD): The lowest-cost route between the next -hop router and the destination.
Feasible distance (FD) : The sum of the AD plus the cost between the local route and the next-hop router.

EIGRP maintains three tables:
1-Neighbor table
2-Topology table
3-Routing table

EIGRP Metric
The criteria that EIGRP uses by default to calculate its metric:
· Bandwidth
· Delay

The optional criteria that EIGRP can be configured to use when calculating its metric:
· Reliability
· Load

Note: Although MTU is exchanged in EIGRP packets between neighbor routers, MTU is not factored into the EIGRP metric calculation.

Configuring EIGRP
Router (config)# router eigrp autonomous-system
Router(config-router)# network network-number

Similar to RIP version 2 and OSPF, EIGRP can be a classless routing protocol. By default, it is classful. To enable classless routing, type the following command under the routing process:

Router(config-router)#no auto-summary

RTA(config)#router eigrp 65
RTA(config-router)#network 172.16.10.0
RTA(config-router)#network 172.16.20.0
RTA(config-router)# no auto-summary


RTB(config)#router eigrp 65
RTB(config-router)#network 172.16.10.0
RTB(config-router)#network 172.16.20.0
RTB(config-router)# no auto-summary

EIGRP Load Balancing

Router (config-router)# variance multiplier

Multiplier : A value from 1 to 128, used for load balancing. The default is 1, which indicates that only equal-cost load balancing is being performed. The multiplier defines the range of metric values that are accepted for load
balancing by the EIGRP process.

· Allows the router to load-balance across routes with a metric smaller than the multiplier value times the minimum metric route to that destination.
· The default variance is 1, which means equal-cost load balancing.

EIGRP Authentication
Eigrp support MD5 authentication.The following steps enable authentication on a cisco router.
Step1: Enter the interface you want to configure authentication on.
Step2 : Enable MD5 authentication using the
ip authentication mode eigrp process-id md5 command.
Step3 : Create an authentication key using the
ip authentication key-chain eigrp process-id key-chain command.
The key-chain paremater is the name of the key you want to create.
Step4 : Exit interface configure mode.
Step5 : Identify the key chain you configured in Step3 using the key chain name-of-key-chain command.
Step6 : Create a key number: key number.
Step7 : Identify the key string using the key-string text command.

The following example configures MD5 authentication with thewayofcisco as the key:
RouterA(config)#interface s0/0
RouterA(config-if)#ip authentication mode eigrp 65 md5
RouterA(config-if)#ip authentication key-chain eigrp 65 thewayofccie
RouterA(config-if)#exit
RouterA(config)#key chain thewayofccie
RouterA(config-keychain-key)#key 1
RouterA(config-keychain-key)#key-string mykey


Verifying EIGRP
RouterA#show ip eigrp neighbors
Displays information drawn from the neighbor table.
RouterA#show ip eigrp topology
Displays information drawn from the topology table.
RouterA#show ip eigrp traffic
Shows statistics about the EIGRP traffic reaching the router.
RouterA#debug eigrp packet
Shows EIGRP packets sent and received.
RouterA#debug ip eigrp neighbors
Shows the hello packets sent and received by the router and the neighbors discovered by this process.
RouterA#debug ip eigrp summary
Shows when a summary is changed on the router.

14 Şub 2009

RIP (Routing Information Protocol)

RIP (Routing Information Protocol)


Characteristics of RIP




  • RIP is a distance vector routing protocol.

  • Hop count is used as the metric for path selection.

  • The maximum allowable hop count is 15.

  • Routing updates are broadcast every 30 seconds by default.

  • RIP is capable of load-balancing over as many as sixteen equal-cost paths. (Four paths is the default.)



In addition, version 2 provides the following benefits not available in version 1:




  • Routing Authentication

  • Classless routing

  • Summarization



RIP Configuration


Router(config)# router rip




  • Starts the RIP routing process


Router(config-router)# version




  • Enables RIP version 2


Router(config-router)# network network-number




  • Selects participating attached Networks

  • Requires a major classful network number








RTA(config)#router rip


RTA(config-router)#network 192.168.10.0


RTA(config-router)#network 192.168.20.0



RTB(config)#router rip


RTB(config-router)#network 192.168.20.0


RTB(config-router)#network 192.168.30.0


RTB(config-router)#network 192.168.40.0



RTC(config)#router rip


RTC(config-router)#network 192.168.40.0


RTC(config-router)#network 192.168.50.0


Verifying and Troubleshooting RIP
There are two commands that you can use to verify proper operation of RIP:
1-show ip route -- The show ip route command displays your routing table
The show ip route command on RTA's router, you should see the following:

RTA#show ip routeGateway of last resort is not set.C 192.168.10.0/24 is directly connected, FastEthernet0/0
C 192.168.20.0/24 is directly connected, Serial0/0
R 192.168.30.0/24 [120/1] via 192.168.20.2, 00:00:12, Serial0/0
R 192.168.40.0/24 [120/1] via 192.168.20.2, 00:00:12, Serial0/0R 192.168.50.0/24 [120/2] via 192.168.20.2, 00:00:12, Serial0/0
2-show ip protocols -- The show ip protocols command displays values about routing protocols and the routing protocol timer information that is associated with the router.




debug ip rip -- The command to display RIP routing updates as they are sent and received.
The no debug all command turns off all debugging.

RIP v2


RTA(config)#router rip
RTA(config-router)#network 10.10.0.0
RTA(config-router)#network 10.20.0.0
RTA(config-router)#version 2
RTA(config-router)# no auto-summary

RTB(config)#router rip
RTB(config-router)#network 10.20.0.0
RTB(config-router)#network 10.30.0.0
RTB(config-router)#network 10.40.0.0
RTB(config-router)#version 2
RTB(config-router)# no auto-summary

RTC(config)#router rip
RTC(config-router)#network 10.40.0.0
RTC(config-router)#network 10.50.0.0
RTC(config-router)#version 2
RTC(config-router)# no auto-summary

Default route

Default route
A default route is similar to a static route, but instead of configuring a route to a specific network, you are configuring the router to know where to send traffic for any network not found in its routing table. Default routes are used to establish a gateway of last resort for your router.


Router(config)# ip route 0.0.0.0 0.0.0.0 IP_address_of_next_hop_neighbor [administrative_distance] [permanent]
Or
Router(config)# ip route 0.0.0.0 0.0.0.0 interface_to_exit [administrative_distance] [permanent]

permanent (Optional) Specifies that the route will not be removed, even if the interface shuts down.



RTA(config)# ip route 0.0.0.0 0.0.0.0 172.16.3.2
Or
RTA(config)#ip route 0.0.0.0 0.0.0.0 s0/0

RTB(config)#ip route 0.0.0.0 0.0.0.0 172.16.3.1
Or
RTB(config)#ip route 0.0.0.0 0.0.0.0 s0/0