Basic Networking Commands
Basic Networking Commands
Hostname
=========
- create new host name
Switch(config)#hostname NetworKing
Logon Banner
=============
- set a message when log into user command
NetworKing(config)#banner motd &
*********************
put your message here
*********************&
- to see your message, type exit until you get out into first screen
NetworKing(config)#exit
NetworKing#exit
Console Password
=================
NetworKing>enable
NetworKing#configure terminal
NetworKing(config)#line console 0
NetworKing(config-line)#password cisco
NetworKing(config-line)#login
Telnet Password
================
NetworKing>enable
NetworKing#configure terminal
NetworKing(config)#line vty 0-15
NetworKing(config-line)#password telnet
NetworKing(config-line)#login
Enable Password
================
NetworKing>enable
NetworKing#configure terminal
NetworKing(config)#enable password enable
Management IP
=============
- show all interface at the device
NetworKing#show ip interface brief
- set ip
NetworKing>enable
NetworKing#configure terminal
NetworKing(config)#interface vlan 1
NetworKing(config-if)#ip address 10.1.1.1 255.255.255.0
Default Gateway
===============
NetworKing>enable
NetworKing#configure terminal
NetworKing(config)#ip default-gateway 10.1.1.10
Shutdown
========
NetworKing>enable
NetworKing#configure terminal
NetworKing(config)#interface vlan 1
NetworKing(config-if)#shutdown
Negating Command
================
NetworKing>enable
NetworKing#configure terminal
NetworKing(config)#interface vlan 1
NetworKing(config-if)#no shutdown
Saving Configuration
====================
NetworKing>enable
NetworKing#write
NetworKing#copy running-config startup-config
Allow ssh
Static Routing
(Config t) #<destination network> < subnet network> <next hop>
RIP :but network ismain class wala dena hai for eg 10.0.0.0 or 192.168.1.0
Inter VLAN and Router as a stick:
IPV6 RIP ROUTING : eik router main name same hona chaiye g0/0 and g0/1
ka 2nd router main bhale change ho name eg networking or network
#ipv6 rip ?
#ipv6 rip networking enable
exit
#Int g0/1
#ipv6 rip ?
#ipv6 rip networking enable
DHCP Configuration
ACL STANDARD: ismain sequesnce no ke sath khel sakte hain aur agar host hoga yani
sirf eik pc ya laptop to wildcard rule use karna like this yahan pe subnet mask ko minus
kiya hai for eg 255.255.255.255 - 255.255.255.192= 0.0.0.63
Yeah upper wale task hain neeche wali pic ke
Extended ACL
Task
STATIC NAT : yeah point to point hai means jitney inside local utne hi
inside global ip addresses.
Dynamic Nat: ismain point to point nai hoga means agar 3 inside local aur 2
outside to sirf 2 ip hi surf karainge ya translate hogi baki 3rd drop hojaigi aur
jab main se koi eik khatam hogi to hi 3rd lagegi yeah kaam 100 devices ke
sath bhi ho sakta hai.
Overloading PAT: ismain sari devices eik hi public ip bnkar age jainge sab
devices ki
OR
Last wali line main int kardo
Terminal Monitor : yeah hum tab use karte hain jab hum telnet use
karte hain dusre router ya switch ki loging commands bhi hamare pass ajain
For eg aur yahan loging syc ki command use hui hai take hum apni command js
line pe likha hai who na age peeche ho
SysLog : yeah hum tab use karte hain jab hum office se jain aur raat ko
konsi konsi ip se msg aya hai yeah dekhne ke liye. Iske liye yeah command
use hogi
NTP: yeah hum tab use karte hain jab humko time set karna ho kion ke
100 devices ka time alag alag jake set karna impossible hai so eik device ko
ntp server bnake sab device ka time set kardo
CDP:yeah command basically apnea p ko ya pure network ko identify karti
hai for eg network diagram. Yeah pure network ki diagram bta deta hai
Sh cdp
Sh cdp neibhours
Run cdp
No
PORTFAST AND BPDU guard: bpdu and root gurad dono safety ke
liye ate hain like switch A B AND C apas main loop main hai aur unmain eik
root bridge hai. Aur agar suppose koi switch D connect kardey aur uska
irada acha na ho to who aram se root bridge bnjaiga isliye hum bpdu and
root bridge guard use karte hain baki portfast jo hai who stp ki speed
barhane ke liye kaamata hai
Manually kisi sw ko root bnana
OSPF : SINGLE AREA: is main process id almost hamesha 1 rakho and
single area main area sabka 0 hoga aur loopback ip dena zaroori hai
Verification
SH IP PROTOCOLS
SH IP ROUTE CONNECTED