service password-encryption之前所有的明文密碼都加密
Show running-config | exclude !顯示除了!開頭的所有行
Show running-config | include enable 顯示enable開頭的所有行
Show running-config | begin enable顯示從enable開始之後所有
Show running-config | section enable顯示所有與enable相關的資料塊
No enable password 删除enable密碼
no service password-encryption之前所改的密文還是密文,之後所輸的便不是密文了
ftp、pop和telnet在本質上都是不安全的,因為它們在網絡上用明文傳送密碼和資料,别有用心的人非常容易就可以截獲這些密碼和資料。而且,這些服務程式的安全驗證方式也是有其弱點的, 就是很容易受到“中間人”(man-in-the-middle)這種方式的攻擊。所謂“中間人”的攻擊方式, 就是“中間人”冒充真正的伺服器接收你傳給伺服器的資料,然後再冒充你把資料傳給真正的伺服器。伺服器和你之間的資料傳送被“中間人”一轉手做了手腳之後,就會出現很嚴重的問題。通過使用SSH,你可以把所有傳輸的資料進行加密,這樣"中間人"這種攻擊方式就不可能實作了,而且也能夠防止DNS欺騙和IP欺騙。使用SSH,還有一個額外的好處就是傳輸的資料是經過壓縮的,是以可以加快傳輸的速度。SSH有很多功能,它既可以代替Telnet,又可以為FTP、PoP、甚至為PPP提供一個安全的"通道"
username niubao secret 123
IP domain-name node 與使用者名密碼一起生成密鑰
Crypto key generate rsa modulus生成加密方式和密鑰長度
line vty 0 4
login local
transport intput ssh
ssh -l abc 1.1.1.1
r2#clock set 11:11:11 july 11 2011設定時鐘
r2(config)#ntp master 設定伺服器
r1(config)#ntp server 192.168.12.2
r1(config)#do show ntp status看時間
r1#show clock或者這個
R5(config-subif)#int e0/0.20
R5(config-subif)#ip helper-address 10.0.40.1
代理擷取DHCP伺服器
VPCS> ip dhcp
P4(config-if)#ip add dhcp
DHCPserver(config)#ip dhcp pool vlan10
DHCPserver(dhcp-config)#network 10.0.10.0 /24
DHCPserver(dhcp-config)#default-router 10.0.10.254
Switch(config)#ip dhcp snooping
開啟DHCP功能,這時預設不信任所有端口
Switch(config)#int range e0/0,e1/0,e0/3
Switch(config-if-range)#ip dhcp snooping trust
設定一些可信任端口
Switch(config)#ip dhcp snooping vlan 10,20,30,40設定一些可信任vlan
滿足以上就可以成功擷取ip了
Switch(config-if)#switchport mode access 首先把鍊路狀态改為access
Switch(config-if)#switchport port-security 開啟安全的功能
Switch(config-if)#switchport port-security maximum 1 Mac位址表最多存在一個Mac 位址
Switch(config-if)#switchport port-security violation shutdown
當條件出發,直接關閉接口
Switch(config-if)#shutdown 開啟前需再次關閉然後開啟
Switch(config-if)#no shutdown 開啟
Show logging 全局模式下檢視日志
Logging buffer 預設開啟
No logging buffer 關閉日志緩沖
longging console 開啟控制台顯示日志
No logging console 關閉控制台顯示日志
開啟telnet虛拟線路上日志顯示
需要在全局模式下輸入logging monitor (在被管理的終端上)
然後每次telnet 的時候,需要在特權模式下輸入terminal monitor(在管理的終端上)
日志存放在 日志伺服器中
SNMP管理的日志伺服器中
全局:logging 192.168.200.1
把級别為0-6(information)以上的全部寫入日志
全局: logging trap informational
例如:特權模式下:debug ip icmp
即把ip協定中的icmp封包全部寫入日志
序列号——時間戳——裝置類型——嚴重級别(0-7)——描述資訊
(全局)service sequence-numbers
(全局)service timestamps
snmp是UDP協定161
snmpV1明文
snmpV2明文
snmpV3密文
全局模式:snmp-server community(屬性) cisco1(密碼) ro(read only)
全局模式:snmp-server community cisco2 rw(read write)
全局模式:snap-server host 192.168.200.1 abc
以abc 的名字被192.168.200.1 伺服器管理