Tuesday, March 1, 2011

Directly connected, Routing table, some codes in routing table, how to connect between routers .

Example about Directly connected :

cast :

Robert
Sarah
Aamy




## Robert met agirle in the university





and ask her : Hello,Whats your name?

1- the girl answered : My name is Sarah .
And Sarah asked him , whats your name ? he said My name is Robert ।
Now Sarah and Robert have been directly connected with each other .






## then he went to another girl :









and asked her Hello, whats your name?
2- the girl answered My name is Aamy .
And Aamy asked him , whats your name ? he said My name is Robert |
Now Aamy and Robert have been directly connected with each other .







$$ Now Robert has known Sarah and Aamy and directly connected with both of them |
But Sarah & Aamy didnt know each other .












## while Robert walking with Sarah he met Aamy and :





Robert Said : Sarah! this is Aamy
Sarah Said : Oh! Hello Aamy
Aamy Said : Hello Sarah




Now Sarah & Aamy connected by robert by sharing Robert's friend Aamy to Sarah and sharing him friend Sarah to Aamy but we want to say here in Routing protocol friends mean
( neighbors ) its mean we are using Routing protocols for disseminating information that enables them to select routes between any two nodes on a computer network .











as we can see in routing table







first we want to know somthing about Routing Table .



we need to know some codes like :

C - connected, S - static, I - IGRP, R - RIP, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area .


C - connected : this mean my router directly connected for your router.
S - static route : this mean by Administratore.
I - IGRP : An interior gateway protocol (Routing protocol)
R - RIP : Routing Information Protocol (Routing protocol)
B - BGP : Border Gateway Protocol (Routing protocol)
D - EIGRP : Enhanced Interior Gateway Routing Protocol (Routing protocol - Cisco proprietary)
O - OSPF : Open Shortest Path First (Routing protocol)







example about how to connect between routers and show routing Table ..etc



















go to R1 then press on it to configure it by console cable then enter to it and type :


R1>enable ( User mode )
R1# ( Privilege mode )
R1#configure terminal ( Type configure terminal to go to Global configuration mode )
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# ( Global configuration mode )
R1(config)#interface e0/0 ( Type your interface )
R1(config-if)#ip address 192.168.30.10 255.255.255.0 ( Type your ip for this interface )
R1(config-if)#no shutdown ( Enable this interface )
R1(config-if)# ( Press on CNTL/Z to end and go to previlige mode )
*Mar 1 00:04:24.019: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up *Mar 1 00:04:25.019: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up

## Don't forget to type :


R1#copy running-config startup-config ( to save your configuration to NVram )
Destination filename [startup-config]? Building configuration... [OK]

Now we want to show routing table by type :

R1#show ip route









its mean R1 and R2 has been directly connected .











Now we will go to R2 to configure it by type :

R2>enable
R2r#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface e1/0
R2(config-if)#ip address 192.168.30.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#
*Mar 1 00:01:36.827: %SYS-5-CONFIG_I: Configured from console by console
*Mar 1 00:01:37.563: %LINK-3-UPDOWN: Interface Ethernet1/0, changed state to up
*Mar 1 00:01:38.563: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to up
R2(config-if)#exit
R2(config)#interface s0/0
R2(config-if)#ip add
R2(config-if)#ip address 192.168.31.10 255.255.255.0
R2(config-if)#no
R2(config-if)#no sh
R2(config-if)#no shutdown
R2(config-if)#
*Mar 1 00:05:47.079: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
*Mar 1 00:05:48.083: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up


## Dont forget to type :

R2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]








its mean R1 and R2 has been directly connected and R2 directly connected with R3 .



if you didnt understand configuring R2 lets see it again in R3 :









configure R3 by type :

R3>enable
R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#interface s0/0
R3(config-if)#ip address 192.168.31.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface s0/1
R3(config-if)#ip address 192.168.32.10 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#
R3#
*Mar 1 00:14:52.195: %SYS-5-CONFIG_I: Configured from console by consolecop


## Dont forget to type :


R3#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R3#







its mean R3 directly connected to R2 and R4 .




if you didnt understand configuring R3 lets see it again in R4 :







configure R4 by type :

R4>enable
R4#conf
Router#configure t
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#interface s0/0
R4(config-if)#ip address 192.168.32.1 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
*Mar 1 00:00:59.595: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
R4(config)#interface
*Mar 1 00:01:00.603: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to ups
R4(config)#interface s0/2
R4(config-if)#ip address 192.168.33.10 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
*Mar 1 00:01:33.667: %LINK-3-UPDOWN: Interface Serial0/2, changed state to ups
*Mar 1 00:01:34.675: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2, changed state to up
R4(config)#interface s0/1
R4(config-if)#ip address 192.168.34.1 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#
*Mar 1 00:01:57.135: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up
*Mar 1 00:01:57.163: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2, changed state to down
*Mar 1 00:01:58.135: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up
R4(config-if)#end
R4#
*Mar 1 00:02:03.679: %SYS-5-CONFIG_I: Configured from console by consolecop


## Dont forget to type :


R4#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R4#







its mean R4 directly connected to R3 and R5 and R6 .










if you didnt understand configuring R4 lets see it again in R5 :












configure R5 by type :


R5>enable
R5#conf
R5#configure t
R5#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R5(config)#interface s0/0
R5(config-if)#ip address 192.168.33.1 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#
*Mar 1 00:01:06.927: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
*Mar 1 00:01:07.931: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
R5(config-if)#exit
R5(config)#interface e1/0
*Mar 1 00:01:28.047: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down add
R5(config-if)#ip address 192.168.35.10 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#end
*Mar 1 00:01:50.099: %LINK-3-UPDOWN: Interface Ethernet1/0, changed state to up
*Mar 1 00:01:51.099: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to up



## Dont forget to type :

R5#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R5#

its mean R5 directly connected to R6 and R4 .






if you didnt understand configuring R5 lets see it again in R6 :










configure R6 by type :


R6>enable
R6#conf
R6#configure t
R6#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R6(config)#interface e1/0
R6(config-if)#ip address 192.168.35.1 255.255.255.0
R6(config-if)#no shutdown
R6(config-if)#exit
*Mar 1 00:01:04.083: %LINK-3-UPDOWN: Interface Ethernet1/0, changed state to up
*Mar 1 00:01:05.083: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to up
R6(config)#interface s0/0
R6(config-if)#ip address 192.168.34.10 255.255.255.0
R6(config-if)#no shutdown
R6(config-if)#end
*Mar 1 00:01:26.159: %SYS-5-CONFIG_I: Configured from console by console
*Mar 1 00:01:27.779: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
*Mar 1 00:01:28.787: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up

## Dont forget to type :

R6#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R6#









its mean R6 directly connected with R4 and R5 .





Notes :

1- sometimes type something wrong and appear for you like this message its mean Domain server and your router thought you are having domain lookup called for example (Ki) which i typed wrong





in this case if you want to disable Domain server enter to ( Global configuration mode ) and type
R1(config)#no ip domain lookup

2- if you want to troubleshooting your interfaces if it up or down u should type :
Router#show ip interface brief
or you can type Router#show interfaces s0/0


рей-if you want to verifying Mac Address on Ethernet interfaces you can type :
Router#show interfaces f0/0

3- its found two types of serial cables ( DCE & DTE ) if you want to know are this interfaces using ( DCE or DTE ) you should type for example :
Router#show controllers s0/0 (s0/0 its mean for any interface you want to configure it)

after that you should type on DCE interface cable you should type for example :

Router(config-if)#clock rate 64000

Saturday, February 19, 2011

Basic configuration !










(>) for user mode





(?) for help



Type (enable) on the user mode to enter to the privilege mode

(#) for privilege mode



Type (configure terminal) on the privilege mode to enter to the global configuration mode


(config)# for global configuration mode

Note:

1. This case understanding the abbreviation for example : you can type ena (for enable) and you can type conf t (for configure terminal)

2. Use your Tab key for complete your abbreviation .. for example you can type ena then press on Tab key for complete your abbreviation after press on Tab key it will be enable another example conf then Tab key it will be configure then type t it will be terminal … (Basics#conf +Tab key igure t +Tab key it will be Basics#configure terminal ) .

3.if you want to move from global configuration mode to privilege mode press on CTRL + C or CTRL + Z or you can type end or exit


Now you can configure your router lets start


Basics(config)#hostname (the name of your router)


Basics#terminal history size 50

This command for save latest 50 commands

to disable this command it will be Basics#terminal no history size 50

Note:
You can change number 50 to any number u want


To install clock on your router

Basics(config)#clock timezone gmt +2

Basics#clock set 07:11:00 february 17 2011
Basics#
* Feb 17 05:11:00.000: %SYS-6-CLOCKUPDATE: System clock has been updated from 04:26:28 gmt Fri Mar 1 2002 to 07:11:00 gmt Thu Feb 17 2011, configured from console by console.








You can show clock set by this command

Basics#show clock
07:11:39.067 gmt Thu Feb 17 2011





 (Top commands using on cisco devices)


Basics#show running-config 1.
This command for know what is the setting for this device but this settings not added to memory you should type this command to copy it to memory (Nvram) by type Basics#copy running-config startup-config




2. Basics#show interfaces

This command for show some information about your router interfaces and what is MTU (maximum transmission unit) and BW(Bandwidth) and know if the protocol down or up ..etc








3. Basics#show ip interface brief

This command for know if this interface up or down and are found any problem on layer two or layer one .








4. Basics(config-if)#no shutdown
This command for open the interface or enable it by enter to interface mode then type no shutdown command

For example :

Basics(config)#interface f0/0
Basics(config-if)#no shutdown



Basics(config-if)#no shutdown

*Mar 1 04:45:47.382: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 04:45:48.382: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up




5. Basics#show ip route

This command for show routing table&this routing table for showhow routers can connect with each other and which type of this protocols used to connect with another routers .



6. Basics#show version

This command for show a lot of information about this device for example router model , memory , configuration register , IOS revision number , IOS name .







7. Basics#debug






For example debug ip routing
debug eigrp packets
Basics#debug eigrp fsm
Basics#debug ip rip

This command using for Troubleshooting between protocols by sending updates between routers or know how many hops the way when the packet travelling to the destination to disable debug type Basics#undebug all .














8. Basics#show history

This command for show what commands your are typed





9. Basics#show ip protocols

This command for show some information about what protocols used on this router and what is the router ID and some Routing Information Sources .

10. Basics#write

This command equal copy running-config startup-config its mean copy configuration to memory (Nvram)

Basics#write
Building configuration...
[OK]






We want to configure

Console port
Vty port (telnet)
Aux port







For configure Console port lets see



Basics(config)#line console 0
Basics(config-line)#password cisco1
Basics(config-line)#login
Basics(config-line)#exec-timeout <0-35791> Timeout in minutes

exec-timeout command is used to configure the number of minutes without terminal activity before the session is automatically ended to diable it you can type Basics(config-line)#no exec-timeout

Note :

Line console (0) for one console port on the router








For configure Vty port (telnet) lets see

Basics(config)#line vty 0 15
Basics(config-line)#pas
Basics(config-line)#password cisco2
Basics(config-line)#login

Note :

1. Basics(config)#line vty 0 15 in the old IOS not support more than 5 user to telnet this router but in the new IOS it will be support 16 user to configure this router by telnet port .




For configure aux port lets see

Basics(config)#line aux 0
Basics(config-line)#password cisco3
Basics(config-line)#login



Now we should save our configuration to Nvram(memory) bye typing

Basics# copy running-config startup-config






Lets see how can put password for privilege mode

Basics(config)#enable secret cisco3




Note:
You can put some banners or message for warning any one try to login into your router
Banner login
Motd (message of the day banner )
Or (exec-banner)

For configure banner login type Basics(config) banner login #dont try to login#
For configure Motd (message of the day banner ) Basics(config)#banner motd # arning message dont try to login my router :- #

The following example sets a MOTD banner. The pound sign (#) is used as a delimiting character.
For configure (exec-banner) Basics(config)#$ $ Session activated. Enter commands at the prompt $

The following example sets an EXEC banner. The dollar sign ($) is used as a delimiting character.



To encrypt the passwords we should enter to global configuration mode the type Basics(config)#service password-encryption

Then type Basics#show running-config


Ok now we want to add ip address to interfaces and give it subnet mask lets see

Go to global configuration mode then type Basics(config)#interface f0/0

Then put the ip address and subnet musk Basics(config-if)#ip address 192.168.10.1 255.255.255.0




Now we need to verify are this interface become up or not lets see by type this command Basics#show ip interface brief





Note :

You can put small description on the interfaces for example

Basics(config-if)#description IT department










Don’t forget to save your configuration to startup-config (Nvram)






Enjoy!!