HCNP - Server

时间:2021-09-19 22:28:58

Server

DHCP配置

HCNP - Server

DHCP服务器配置:

第一种方法:自动配置

路由上面配置网关,开启dhcp服务

[R1]dhcp enable

[R1-GigabitEthernet0/0/0]dhcp select interface

第二种方法:自定义配置

[R1]dhcp enable

[R1]ip pool ZDYDZCMZ    定义地址池名

[R1-ip-pool-ZDYDZCMZ]network 192.168.2.1 mask 24    宣告地址池网络

[R1-ip-pool-ZDYDZCMZ]gateway-list 192.168.2.1       定义网关

[R1-ip-pool-ZDYDZCMZ]dns-list 8.8.8.8               定义DNS

[R1-ip-pool-ZDYDZCMZ]lease day 3 hour 23 minute 59  租约时间

[R1-ip-pool-ZDYDZCMZ]excluded-ip-address 192.168.2.254  排除IP

[R1-ip-pool-ZDYDZCMZ]domain-name www.baidu.com   设置域名

[R1-ip-pool-ZDYDZCMZ]static-bind ip-address 192.168.2.10 mac-address 5489-98F1-701C    IP与MAC绑定

[R1-GigabitEthernet0/0/1]dhcp select global    DHCP全局配置模式

DHCP中继

HCNP - Server

第一步:实现全网互通

第二步:布置DHCP服务器

第三步:在SW1上启用DHCP中继

第四步:在SW2上启用snooping控制非法DHCP2服务器

[DHCP1]dhcp server ping packet 5   //在分配IP前检查是否有人占用IP

DHCP服务器跨网段分配:第三步

[SW1]dhcp enable

[SW1]dhcp server group huawei

[SW1-dhcp-server-group-huawei]dhcp-server 192.168.20.20

[SW1-dhcp-server-group-huawei]dhcp-server 192.168.20.30

[SW1-Vlanif10]dhcp select relay

[SW1-Vlanif10]dhcp relay server-select huawei

[SW1-Vlanif20]dhcp select relay

[SW1-Vlanif20]dhcp relay server-select huawei

[SW1-Vlanif30]dhcp select relay

[SW1-Vlanif30]dhcp relay server-select huawei

第四步

[SW2]dhcp enable

[SW2]dhcp snooping enable

[SW2-GigabitEthernet0/0/2]dhcp option82 insert enable

[SW2-GigabitEthernet0/0/2]dhcp snooping enable

[SW2-GigabitEthernet0/0/2]dhcp snooping trusted

[SW2-GigabitEthernet0/0/1]dhcp option82 insert enable

[SW2-GigabitEthernet0/0/1]dhcp snooping enable

[SW2-GigabitEthernet0/0/3]dhcp option82 insert enable

[SW2-GigabitEthernet0/0/3]dhcp snooping enable

FTP配置

HCNP - Server

FTP配置方法:

1,配置IP地址

2,AAA模式(认证,授权,//计费,FTP共享文件夹)

[server-aaa] local-user bbb password cipher 123456 //认证

[server-aaa] local-user bbb service-type ftp //ftp协议授权

[server-aaa] local-user bbb password cipher 123456 ftp-directory flash:  //ftp的共享文件夹

注:user:bbb   password:123456

3,FTP启用

[server]ftp server enable

4,验证

get 下载

put 上传

5,截取FTP用户名和密码

查看网络分层以及相关协议之间的关系(使用抓包工具)

Telnet配置

HCNP - Server

Telnet配置及登陆认证登陆标语:

[R1]user-interface console 0

[R1-ui-console0]authentication-mode password

提示:Please configure the login password (maximum length 16):mima      输入密码

[R1]user-interface vty 0 4

[R1-ui-vty0-4]authentication-mode password

Please configure the login password (maximum length 16):huawei

[R1-ui-vty0-4]user privilege level 3  设置访问级别:0-参观;1-监控;2-系统所有配置命令;3-管理员级别