有问题,请指出,这个仅代表个人总结, 难免会有错误的地方,谢谢
1.设使能口令
2.设置使能加密口令
S1(config)# enable secret 111
3.设置控制台保护口令
S1(config)#line console 0
S1(config-line)#password 222
S1(config-line)#login
4.开启虚拟线路并设置口令(Telnetlssh)
S1(config)#line vty 0 15 //开启虚拟线路0到15
S1(config-line)#password Telnetlssh //设置虚线路密码为Telnetlssh
S1(config-line)#login //远程登录虚线路密码有效
5.设置登录标语
S1(config)#banner motd “提示语”
6.给明文密钥加密保存
S1(config)#interface vlan 1 //进入VLAN1接口
S1(config-if)#no shutdown //打开接口
S1(config-if)#ip address 192.168.1.2 255.255.255.0 //配置接口IP地址
S1(config)#Service password-encryption//对明文弱加密
7.保存配置
S1#copy running-config startup-config
8.将启动配置文件保存到TFTP服务器
S2(config)#ip default-gateway ip地址
9.设置端口安全(最大数量、MAC绑定方式,违例事件处理)
Switch(config-if)#switchport port-security mac-address ?
H.H.H 48 bit mac address //具体MAC地址 //静态绑定
sticky Configure dynamic secure addresses as sticky //通过交换机学习的MAC地址
Switch(config-if)#switchport port-security mac-address sticky //绑定MAC地址
Switch(config-if)#switchport port-security maximum 1 //设置最大的MAC地址数
Switch(config-if)#switchport port-security violation ? //设置违例事件
protect Security violation protect mode //保护
restrict Security violation restrict mode //限制
shutdown Security violation shutdown mode //关闭
Switch(config-if)#switchport port-security violation shutdown //违规后直接关闭端口
10.设置端口工作模式(半双工、全双工)
S1(config)#interface range fastEthernet 0/18,fastEthernet 0/24
S1(config-if-range)#duplex full//攻防模式,全双工
11.设置接口传输速度
R3(config)#int s0/0/0
R3(config-if)#do show int s0/0/0(查看默认带宽)
R3(config-if)#bandwidth 10000
12.设置交换机默认网关
S1(config)#ip default-gateway 192.168.1.1
13.给管理VLAN配置IP地址
S1(config)#int vlan 1
S1(config-if)#no shutdown
S1(config-if)#ip address 1.1.1.2 255.255.255.0
14.设置交换机接口模式为用户模式(访问模式)
S1(config)#interface fastethernet 0/18
S1(config-if)#switchport mode access
15.同时进入f0/1-10接口
S1(config)#interface(range组) fastEthernet 0/2
16.开启三层交换机路由功能
s2#show ip route
s2(coning)# ip routing
17.设备接口模式为中继模式
S1(config)#interface fastEthernet 0/24
S1(config-if)#switchport mode trunk
18.修改交换机优先级(STP)
S1(config)#spanning-tree vlan 1 prioity(优先级)24576
19.创建VLAN10
S1(config)#vlan 10
20.接□划分到VLAN10
S2(config)#int f 0/1
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 10
S2(config-if)#exit
21.设置24接口为本证VLAN99
S1(config)#interface fastEthernet 0/24(本征vlan)
S1(config-if)#switchport mode trunk
S1(config-if)#switchport trunk native vlan 99
Exit
22.利用SV实现VLAN间通信原理(过程)
三层交换机SV
S1(config)#int f 0/1
S1(config-if)#sw mo tu
Exit
23.在路由器上配置DHCP地址池(过程)
S1(config)#ip dhcp pool aaa //设置地址池名称
S1(dhcp-config)#default-router 192.168.10.1 //指定地址池的网关
S1(dhcp-config)#dns-server 119.6.6.6 //配置DNS地址
S1(dhcp-config)#network 192.168.10.0 255.255.255.0 //指定地址池的范围
S1(dhcp-config)#exit
24.DHCP中继转发
先添加vlan
Int f0/1
Sw acc vlan 10
Sw mo acc
配置三层交换机
Int vlan 10
Ip add 192.168.10.254 255.255.255.0
Ip helper-address 192.168.30.2//配置DHCP中继服务,DHCP服务器的地址是192.168.30.2
25.静态路由配置命令格式
R1(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.1(sr f0/2作为下家地址)
26.默认路由配置命令及格式
R1(config)#int f 0/0
R1(config-if)#no sh
R1(conifg-if)#ip add 192.168.1.2 255.255.255.0
Exit
27.链路聚合配置(LACP)
S1(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.10 //设置排除地址范围
S1(config)#ip dhcp pool aaa //设置地址池名称
S1(dhcp-config)#default-router 192.168.10.1 //指定地址池的网关
S1(dhcp-config)#dns-server 119.6.6.6 //配置DNS地址
S1(dhcp-config)#network 192.168.10.0 255.255.255.0 //指定地址池的范围
S1(dhcp-config)#exit
28.rip配置付过程)
R22(config)#router rip(进入路由协议,rip协议)
R22(config-route)#version 2(打开版本2,无类别地址)
R22(config-route)#no auto-summary(关闭自动汇总,默认打开)
R22(config-route)#network 172.17.0.0(宣告当前子网网络)
R22(config-route)#passive-interface fastEthernet 0/1(这个接口不参与路由更新)
29.0spf配置(过程)
R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 10.1.1.0 0.0.0.3 area 0
R1(config-router)#network 10.2.2.0 0.0.0.3 area 0
R1(config-router)#passive-interface loopback 0
30.ssh配置(过程)
Switch>enable
Switch#conf t
Switch(config)#hostname s1
S1(config)#int vlan 1
S1(config-if)#no shutdown
S1(config-if)#ip address 1.1.1.2 255.255.255.0//配ip地址,网关
S1(config-if)exit//远程登录,进入特权模式
S1(config)#enable password 密码//使能加密口令
配ssh安全的远程访问
S1(config)#ip domain-name 名称//配置ip域名
S1(config)#crypto key//生成命域
S1(config)#crypto key generate rsa//生成,取消命运加密算法
回车默认512输入1024
S1(config)#username 用户名 password 密码//创建本地认证用户名称
S1(config)#line vty 0 15//虚线路,0开到最大15,总共16个终端
S1(config-line)#transport inqut ssh//线路下加载的协议inqut ssh
S1(config-line)#login local//本地认证
S1(config-line)#exit//退出
S1(config)#ip ssh version 2//ssh的版本号2
电脑认证ssh
Pc>ssh -1 名称 ip地址
回车输入密码
S1>enable//进入特权模式
输入密码,成功进入