配置交換機(jī)主機(jī)名:
?#enable??
#configure terminal
#hostname? SW1
配置虛擬局域網(wǎng)接口(SVI):
?#interface? vlan 1
#ip? address? 192.168.1.100? 255.255.255.0
#no? shutdown
#exit
#ip? default-gateway? 192.168.1.254
配置交換機(jī)口令:
?#enable? secret? ytvc
#line? console 0
#password? admin
#login
#exit
#line? vty 0 4
#password? ccna
#login
#exit
#service? password-encryption
配置交換機(jī)登錄標(biāo)語(yǔ):
?#banner? motd? #Authorized? Access Only!#
保存配置:
?#end
#copy? running-config? startup-config? ?或? #write
查看配置文件:
#show? running-config
配置FTP客戶端:
#ip?ftp? username ccna
#ip? ftp? password? ccnp
#show? flash? ?查看設(shè)備配置文件
備份配置文件到FTP服務(wù)器:
?#copy? flash? ftp
#delete? flash:config.txt? ? 刪除配置文件
#copy? startup-config? ?running-config? ? ? 將配置文件加載到內(nèi)存
#copy? running-config? flash? ? ? 把運(yùn)行配置文件復(fù)制到flash中保存
#copy? ftp? flash? ? 把ftp服務(wù)器中的文件復(fù)制到flash中
配置路由器DHCP服務(wù)器:
#hostname? Router1
#interface g0/0
#ip? address 192.168.1.254? 255.255.255.0
#no? shutdown
#exit
#ip? dhcp? exclude-address? 192.168.1.1? 192.168.1.10? ? ?排除地址段
#ip dhcp? pool? ytvc? ? ? ? 建立地址池,名稱為ytvc
#network? 192.168.1.0? ?255.255.255.0? ? ? ? ? ? ? ? ? ? ? ? 設(shè)置DHCP分配的網(wǎng)絡(luò)子網(wǎng)掩碼
#default-router? ?192.168.1.254? ? ? ? ? ? ? ? ? ? ? ? ? ?設(shè)置dhcp分配的網(wǎng)關(guān)
#dns-server? 114.114.114.114? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?設(shè)置dhcp分配的DNS
#show? ip? dhcp? pool? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 查看dhcp地址池的信息
#show? ip? dhcp? ?binding? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 查看dhcp地址綁定情況
本文摘自 :https://blog.51cto.com/u