Basic configuration
Router>ena
Router#show version
Router#show start
Router#show run
Router#show history
Router#show clock
Router#show users
Router#show flash
Router#show tech-support
Router#show interfaces
Router#show ip interface brief
Router#copy run start
Router#ping
Router#reload
Router#config t
Router(config)#ip host yasser 10.0.0.100
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#speed auto
Router(config-if)#duplex auto
Router(config-if)#no shutdown
Router(config-if)#exit
Secure Router & Setting Telnet connection
Router(config)#enable password 1111
Router(config)#no enable password
Router(config)#enable secret 1111
Router(config)#line console 0
Router(config-line)#password 2222
Router(config-line)#login
Router(config-line)#exit
Router(config)#line vty 0 4
Router(config-line)#password 3333
Router(config-line)#login
Router(config-line)#exit
Router(config)#service password-encryption
Router(config)#banner motd # dont login #
Router(config)#username yasser password 2222
Router(config)#username yasserramzy secret 2222
Router(config)#username yasserauda privilege 15 password 2222
Router(config)#username yasserramzyauda privilege 15 secret 2222
Router(config)#no ip domain-lookup
Cisco DISCOVERY PROTOCOL
Router(config)#cdp run
Router#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/1 171 S 2960 Fas 0/1
Router Fas 0/0 122 R C2800 Fas 0/0
Router#show cdp interface
Vlan1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/0 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/1 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Router#show cdp entry *
Device ID: Switch
Entry address(es):
Platform: cisco 2960, Capabilities: Switch
Interface: FastEthernet0/1, Port ID (outgoing port): FastEthernet0/1
Holdtime: 148
Version :
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX,
RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Wed 12-Oct-05 22:05 by pt_team
advertisement version: 2
Duplex: full
---------------------------
Device ID: Router
Entry address(es):
IP address : 120.0.0.2
Platform: cisco C2800, Capabilities: Router
Interface: FastEthernet0/0, Port ID (outgoing port): FastEthernet0/0
Holdtime: 158
Version :
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version
12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 06:21 by pt_rel_team
advertisement version: 2
Duplex: full
Password recovery
1- connect your router using console cable
2- turn off turn on your router
3- press ctrl + pause break
4- change confreg to 0x2142
5- reset
6- n
7- ena
8- copy start run
9- config t
10- use password commands to change or remove passwords
11- confgire-register 0x2102
12- exit
13- copy run start
BACKUP & RESTORE
Router#copy tftp flash
Router#copy flash tftp
Router#copy run tftp
Router#copy start tftp
Router(config)#boot system flash ?
WORD System image filename
note: Boot priority (system,flash,tftp,rxboot.rommon)
DHCP
Router(config)#ip dhcp pool me
Router(dhcp-config)#network 10.0.0.0 255.0.0.0
Router(dhcp-config)#default-router 10.0.0.10
Router(dhcp-config)#dns-server 10.0.0.11
Router(dhcp-config)#exit
Router(config)#ip name-server 10.0.0.11
Router(config)#ip dhcp excluded-address 10.0.0.100 10.0.0.200
Router(config)#exit
Router#show ip dhcp binding
IP address Client-ID/ Lease expiration Type Hardware address
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address dhcp
SSH
Router(config)#username yasser password 2222
Router(config)#hostname alexrouter
alexrouter(config)#ip domain-name me.com
alexrouter(config)#ip ssh time-out 30
alexrouter(config)#ip ssh authentication-retries 3
alexrouter(config)#ip ssh version 2
Please create RSA keys (of at least 768 bits size) to enable SSH v2.
alexrouter(config)#crypto key generate rsa
The name for the keys will be: alexrouter.me.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 512
% Generating 512 bit RSA keys, keys will be non-exportable...[OK]
*Mar 1 0:1:26.828: RSA key size needs to be at least 768 bits for ssh version 2
*Mar 1 0:1:26.828: %SSH-5-ENABLED: SSH 1.5 has bee
No comments:
Post a Comment