华为基础命令

dis cu 看所有
dis this 看自己
undo info-center enable不开信息提示
restore fac 恢复出厂模式
save 要在<>模式
dis vlan 可以看端口和vlan

加终端
进入端口 int g0/0/1
p l a 加入access
p d v 10 加入vlan10


配置端口
dis int brief查看所有端口概要信息

dis ip int brief 查看端口IP情况

dis current-configuration int查看所有接口配置情况。

dis current-configuration int g0/0/1查看指定接口情况

int g0/0/1 dis this进入到指定接口,查看接口情况

路由
ip route-static 目的地址 子网掩码 下一条地址.
[AR1]ip route-static 0.0.0.0 0 192.168.30.21
dis ip route-table用于查看路由器的路由表


内网访问外网

[AR2]acl number 2000  
[AR2]rule 5 permit source 192.168.0.0 0.0.255.255
[AR2] rule 10 deny
(G0/0/1)nat outbound 2000
dis nat session all

1、建立地址池[AR2]nat address-group 1 2.2.2.2 2.2.2.10
注意设置ip地址池时,不要包括该端口的地址,否则会出现  Error: The address conflicts with interface or ARP IP.
2、在接口中取消原来的nat outbound [G0/0/1]undo nat outbound 2000
3、添加新的[G0/0/1]nat outbound 2000 address-group 1
interface GigabitEthernet0/0

 port link-mode route // 改为三层
 ip address 112.44.45.96 255.255.255.0  //互联网地址
 nat outbound 2000                      
 nat server protocol tcp global 112.44.45.96 441 inside 192.168.255.249 441 description vpn
 nat server protocol tcp global 112.44.45.96 20000 inside 192.168.255.249 443 description VPN

外网访问内网


加地址要改为三层模式
port link-mode route
 ip address 10.148.23.250 255.255.255.0

配置ssh
#
#
local-user admin class manage   创建一个admin的账号
password simple  password1     设置密码
service-type ssh
authorization-attribute user-role network-admin 设置权限
#
ssh server enable
ssh user admin  service-type  stelnet  authentication-type  password 登录方式用密码

 display ssh user-information [username] 看远程
提高
line vty 5 63  //line vty 0 63表示最多可以有64个用户进行远程登录,0到63
 authentication-mode scheme
 user-role admin
 user-role network-operator

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值