بسم الله الرحمن الرحيم
Configuring a Single Cisco Router
في موضوع اليوم اهم الاوامر لضبط الاعدادات الاساسيه لجميع رواتر سيسكو لا غني عنها ويعتبر مراجعه عامه علي اوامر كورس CCNA هذا الموضوع اخي الكريم ليس شرح للاوامر ولكن تذكره وتجميع للاوامر الاساسيه والمهمه.
1- Router Modes يختلف كل مود عن الاخر من حيث الاوامر المتاحه للاستخدم علي سبيل المثال المود الاول يتيح لك قليل من الاومر التي يمكن استخدامها مثل ال Ping وبعض اوامر ال Show وغيرها
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
|
2- Configuring a Router Name اضافه اسم جديد للواوتر او السوتش
Router(config)#hostname
Cisco
|
Name can be any word you choose
|
3- Configuring Passwords اضافه باسورد للراوتر او السوتش علي ال Enable وال Console وال VTY
Router(config)#enable
password cisco
|
Sets enable password
|
Router(config)#enable
secret class
|
Sets enable secret password
|
Router(config)#line con
0
Router(config-line)#password console
Router(config-line)#login
|
Enters console-line mode
|
Sets console-line mode password to console
| |
Enables password checking at login
| |
Router(config)#line vty
0 4
Router(config-line)#password telnet
Router(config-line)#login
|
Enters vty line mode for all five vty lines
|
Sets vty password to telnet
| |
Enables password checking at login
| |
Router(config)#line aux
0
Router(config-line)#password backdoor
Router(config-line)#login
|
Enters auxiliary line mode
|
Sets auxiliary line mode password to backdoor
| |
Enables password checking at login
|
4- Password Encryption تشفيرجميع الباسوردات بالراوتر او السوتش
Router(config)#service
password-encryption
|
Applies a weak encryption to passwords
|
5- show Commands اوامر تحليل وحل المشكلات عن طريق مراجعه الاعدادات
Router#show
?
|
Lists all show commands
available
|
Router#show
interfaces
|
Displays statistics for all interfaces
|
Router#show interface
serial 0
|
Displays statistics for a specific interface, in this case
Serial 0
|
Router#show ip interface
brief
|
Displays a summary of all interfaces, including status and IP
address assigned
|
Router#show controllers
serial 0
|
Displays statistics for interface hardware. Statistics display
if the clock rate is set and if the cable is DCE, DTE, or not
attached
|
Router#show
clock
|
Displays time set on device
|
Router#show
hosts
|
Displays local host-to-IP address cache. These are the names
and addresses of hosts on the network to which you can connect
|
Router#show
users
|
Displays all users connected to device
|
Router#show
history
|
Displays history of commands used at this edit
level
|
Router#show
flash
|
Displays info about Flash memory
|
Router#show
version
|
Displays info about loaded software version
|
Router#show
arp
|
Displays the ARP table
|
Router#show
protocols
|
Displays status of configured Layer 3 protocols
|
Router#show
startup-config
|
Displays configuration saved in NVRAM
|
Router#show
running-config
|
Displays configuration currently running in RAM
|
6- Interface Names استعراض الفتحات بدخل الراوتر باختصار
router#show ip interface brief
وهذا الجدول يبين الفتحات وطرق كتابتها علي اغلب الموديلات ومكان الفتحه داخليه او WIC
Router Model
|
Port Location/Slot Number
|
Slot/Port Type
|
Slot Numbering Range
|
Example
|
---|---|---|---|---|
2501
|
On Board
|
Ethernet
|
Interface-type Number
|
ethernet0 (e0)
|
On Board
|
Serial
|
Interface-type Number
|
serial0 (s0) & s1
| |
2514
|
On Board
|
Ethernet
|
Interface-type Number
|
e0 & e1
|
On Board
|
Serial
|
Interface-type Number
|
s0 & s1
| |
1721
|
On Board
|
FastEthernet
|
Interface-type Number
|
fastethernet0 (fa0)
|
Slot 0
|
WAC (WIN Interface Card) (Serial)
|
Interface-type Number
|
s0 & s1
| |
1760
|
On Board
|
Fast Ethernet
|
Interface-types 0/port
|
fa0/0
|
Slot 0
|
WIC/VIC (Voice Interface Card)
|
Interface-type 0/port
|
s 0/0 & s0/1
v0/0 & v0/1
| |
Slot 1
|
WIC/VIC
|
Interface-type 1/port
|
s1/0 & s1/1
v1/0 & v1/1
| |
Slot 2
|
VIC
|
Interface-type 2/port
|
v2/0 & v2/1
| |
Slot 3
|
VIC
|
Interface-type 3/port
|
v3/0 & v3/1
| |
2610
|
On Board
|
Ethernet
|
Interface-type 0/port
|
e0/0
|
Slot 0
|
WIC (Serial)
|
Interface-type 0/port
|
s0/0 & s0/1
| |
2611
|
On Board
|
Ethernet
|
Interface-type 0/port
|
e0/0 & e0/1
|
Slot 0
|
WIC (Serial)
|
Interface-type 0/port
|
s0/0 & s0/1
| |
2620
|
On Board
|
FastEthernet
|
Interface-type 0/port
|
fa0/0
|
Slot 0
|
WIC (Serial)
|
Interface-type 0/port
|
s0/0 & s0/1
| |
2621
|
On Board
|
FastEthernet
|
Interface-type 0/port
|
fa0/0 & fa 0/1
|
Slot 0
|
WIC (Serial)
|
Interface-type 0/port
|
s0/0 & s0/1
| |
1841
|
On Board
|
FastEthernet
|
Interface-type 0/port
|
fa 0/0 & fa 0/1
|
Slot 0
|
High Speed WAN Interface Card (HWIC)/WIC/VWIC
|
Interface-type 0/slot/port
|
s0/0/0 & s0/0/1
| |
1841
|
Slot 1
|
HWIC/WIC/VWIC
|
Interface-type 0/slot/port
|
s0/1/0 & s0/1/1
|
2801
|
On Board
|
FastEthernet
|
Interface-type 0/port
|
fa0/0 & fa 0/1
|
Slot 0
|
VIC/VWIC (voice only)
|
Interface-type 0/slot/port
|
voice0/0/0 voice0/0/3
| |
Slot 1
|
HWIC/WIC/VWIC
|
Interface-type 0/slot/port
|
0/1/0 0/1/3 (single-wide HWIC) 0/1/0 0/1/7 (double-wide
HWIC)
| |
Slot 2
|
WIC/VIC/VWIC
|
Interface-type 0/slot/port
|
0/2/0 - 0/2/3
| |
Slot 3
|
HWIC/WIC/VWIC
|
Interface-type 0/slot/port
|
0/3/0 0/3/3 (single-wide HWIC) 0/3/0 - 0/3/7 (double-wide
HWIC)
| |
2811
|
Built into Chassis Front
|
USB
|
Interface-type port
|
usb0 & usb 1
|
Built into Chassis Rear
|
FastEthernet Gigabit Ethernet
|
Interface-type 0/port
|
fa0/0 & fa 0/1
gi0/0 & gi0/1
| |
Slot 0
|
HWIC/HWIC-D/WIC/VWIC/VIC
|
Interface-type 0/slot/port
|
s0/0/0 & s0/0/1
fa0/0/0 & 0/0/1
| |
Slot 1
|
HWIC/HWIC-D/WIC/VWIC/VIC
|
Interface-type 0/slot/port
|
s0/1/0 & s0/1/1
fa0/1/0 & 0/1/1
| |
NME Slot
|
NM/NME
|
Interface-type 1/port
|
gi1/0 & gi1/1
s1/0 & s1/1
|
7- Moving Between Interfaces التنقل بين فتحات الراوتر او السويتش دون الحاجه للامر Exit او بالامر Exit
Router(config)#int
s0
|
Router(config)#int
s0
|
Moves to interface S0 mode
|
Router(config-if)#exit
|
Router(config-if)#int
e0
|
In int S0, move to E0
|
Router(config)#int
e0
|
#(Router(config-if
|
In E0 mode now
|
#(Router(config-if
|
Prompt does not change; be careful
|
8- Configuring a Serial Interface ضبط اعدادات فتحات السريال
Router(config)#int
s0/0
|
Moves to interface Serial 0/0 mode
|
Router(config-if)#description Link to ISP
|
Optional descriptor of the link is locally
significant
|
Router(config-if)#ip
address 192.168.10.1 255.255.255.0
|
Assigns address and subnet mask to interface
|
Router(config-if)#clock
rate 56000
|
Assigns a clock rate for the interface
|
Router(config-if)#no
shut
|
Turns interface on
|
9- Configuring an Ethernet/Fast Ethernet
Interface
Router(config)#int
fa0/0
|
Moves to Fast Ethernet 0/0 interface mode
|
Router(config-if)#description Accounting LAN
|
Optional descriptor of the link is locally
significant
|
Router(config-if)#ip
address 192.168.20.1 255.255.255.0
|
Assigns address and subnet mask to interface
|
Router(config-if)#no
shut
|
Turns interface on
|
10- Creating an MOTD Banner وضع رساله ترحيبيه في اول الدخول علي الراوتر والسويتش يجب البدايه بعلامه محدده مثل # والانتهاء بها بعد كتابه الرساله
Router(config)#banner motd # This is a secure
system. Authorized Personnel Only! #
Router(config)#
|
# is known as a delimiting
character. The delimiting character must surround the banner message and
can be any character so long as it is not a character used within the body of
the message
|
11- Setting the Clock Time Zone
Router(config)#clock
timezone EST 5
|
Sets the time zone for display purposes. Based on coordinated
universal time (Eastern Standard Time is 5 hours behind UTC)
|
12- Assigning a Local Host Name to an IP Address
Router(config)#ip host
london 172.16.1.3
|
Assigns a host name to the IP address. After this assignment,
you can use the host name instead of an IP address when trying to Telnet or ping to
that address
|
Router#ping
london
|
|
=
|
|
Router#ping
172.16.1.3
|
13- no ip domain-lookup Command لتجنب رساله الخطاء 255.255.255.255 في حاله كتابه امر غير موجود بدومين الراوتر او السويتش
Router(config)#no ip domain-lookup
Router(config)#
|
Turns off trying to automatically resolve an unrecognized
command to a local host name
|
14- logging synchronous Command يستخدم بداخل ال Consols او ال VTY لتجنب رسائل ال Log عند كتابه الاوامر
Router(config)#line con
0
|
|
Router(config-line)#logging synchronous
|
Turns on synchronous logging. Information items sent to console
will not interrupt the command you are typing. The command will be moved to a
new line
|
15- exec-timeout Command بداخل ال Console او ال VTY لتحديد لوقت او عمر السيشين للمستخدم
Router(config)#line con
0
|
|
Router(config-line)#exec-timeout 0 0
|
Sets time limit when console automatically logs off. Set to
0 0 (minutes seconds) means console never logs
off
|
Router(config-line)#
|
16- Saving Configurations لحفظ الاوامر داخل ال NVRAM او ال FTP
Router#copy run
start
|
Saves the running-config to local NVRAM
|
Router#copy run
tftp
|
Saves the running-config remotely to TFTP server
|
17- Erasing Configurations لحذف جميع اعدادات الجهاز ماعدا ال VLAN لانها بداخل ال Flash وتكلمنا عنها في مقال سابق
Router#erase
start
|
Deletes the startup-config file from
NVRAM
|
18- Configuration Example: Basic Router
Configuration
مثال كامل علي ضبط الاعدادات الاساسيه
Boston Router
#Router
|
Enters privileged mode
|
Router#clock set
18:30:00 15 Nov 2004
|
Sets local time on router
|
Router#config
t
|
Enters global config mode
|
Router(config)#hostname
Boston
|
Sets router name to Boston
|
Boston(config)#no ip
domain-lookup
|
Turns off name resolution on unrecognized commands (spelling
mistakes)
|
Boston(config)#banner
motd #
|
Creates an MOTD banner
|
This is the Boston Router.
|
|
Authorized Access Only
|
|
#
|
|
Boston(config)#clock
timezone EST 5
|
Sets time zone to Eastern Standard Time (5 from
UTC)
|
Boston(config)#enable
secret cisco
|
Enables secret password set to cisco
|
Boston(config)#service
password-encryption
|
Passwords will be given weak encryption
|
Boston(config)#line con
0
|
Enters line console mode
|
Boston(config-line)#logging sync
|
Commands will not be interrupted by unsolicited
messages
|
Boston(config-line)#password class
|
Sets password to class
|
Boston(config-line)#login
|
Enables password checking at login
|
Boston(config-line)#line
vty 0 4
|
Moves to virtual Telnet lines 0 through 4
|
Boston(config-line)#password class
|
Sets password to class
|
Boston(config-line)#login
|
Enables password checking at login
|
Boston(config-line)#line
aux 0
|
Moves to line auxiliary mode
|
Boston(config-line)#password class
|
Sets password to class
|
Boston(config-line)#login
|
Enables password checking at login
|
Boston(config-line)#exit
|
Moves back to global config mode
|
Boston(config)#no
service password-encryption
|
Turns off password encryption
|
Boston(config)#int fa
0/0
|
Moves to Fast Ethernet 0/0 mode
|
Boston(config-if)#desc
Engineering LAN
|
Sets locally significant description of the
interface
|
Boston(config-if)#ip
address 172.16.10.1 255.255.255.0
|
Assigns IP address and subnet mask to the
interface
|
Boston(config-if)#no
shut
|
Turns on the interface
|
Boston(config-if)#int
s0/0
|
Moves directly to Serial 0/0 mode
|
Boston(config-if)#desc
Link to Buffalo Router
|
Sets locally significant description of the
interface
|
Boston(config-if)#ip
address 172.16.20.1 255.255.255.0
|
Assigns IP address and subnet mask to the
interface
|
Boston(config-if)#clock
rate 56000
|
Sets a clock rate for serial transmission. DCE cable must be
plugged into this interface
|
Boston(config-if)#no
shut
|
Turns on the interface
|
Boston(config-if)#exit
|
Moves back to global config mode
|
Boston(config)#ip host
buffalo 172.16.20.2
|
Sets a local host name resolution to IP address
172.16.20.2
|
Boston(config)#exit
|
Moves back to privileged mode
|
Boston#copy run
start
|
Saves running-config to NVRAM
|
تم بفضل الله وبالتوفيق للجميع وانتظرونا مع اوامر اخري