思科DHCP,SSH基本配置


思科DHCP,SSH基本配置


dhcp
dhcp(config)#service dhcp //打开dhcp功能
dhcp(config)#no ip dhcp conflictlogging //关闭dhcp日志记录
dhcp(config)#ip dhcp pool cisco //配置dhcp服务器的名称为cisco
dhcp(dhcp-config)#network192.168.1.0 255.255.255.0 //配置dhcp服务器要分配的网段
dhcp(dhcp-config)#default-router 192.168.1.1 //配置默认网关为192.168.1.1
dhcp(dhcp-config)#dns-server192.168.1.1 //配置dns服务器为
dhcp(dhcp-config)#lease 3 //地址租用期限: 3天
dhcp(dhcp-config)#exit //退出dhcp配置模式
dhcp(config)#ip dhcp excluded-address 192.168.1.200 192.168.1.254 //配置dhcp不分配的地址
网关:教室里面的人就是电脑 教室号vlan 网关就是大门。不同教室之间的人要进行通信必须出这个大门(网关)。
**

SSH基本配置

**

DNS服务器:如果你的服务器要使用域名去访问。你们公司的所有服信器要在DNS上进行注册。
注册内容:你的公网地址-------域名的对应关系。
www.baidu.com------1.1.1.1SSH服务的配置:
Switch>enable
Switch#configure terminal
Switch(config)#enablepassword cisco #设置密码
Switch(config)#hostnameSW #设置主机名
SW#configure terminalEnter configuration commands, one per line. End with CNTL/Z.
SW(config)#ip ssh authentication-retries 3 #设置认证次数
SW(config)#ip domain-name cisco.com #设置域名
SW(config)#crypto key generate rsa #生成RSA密钥The name for the keys will be: SW.cisco.comChoose the size of the key modulus in the range of 360 to 2048 for yourGeneral Purpose Keys. Choosing a key modulus greater than 512 may takea few minutes.How many bits in the modulus [512]: 2048 #指定2048位% Generating 2048 bit RSA keys, keys will be non-exportable…[OK]
SW(config)#username ssh secret cisco #设置用户名密码
SW(config)#line vty 0 4
SW(config-line)#transport input ssh #设置SSH登录
SW(config-line)#login local
测试:在PC机上进行ssh -l 用户名 IP地址

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值