华为AR101 WLAN命令行配置方式
一、 基本配置 配置时钟 <Huawei>clocktimezone BJ add 8:00:00 <Huawei>clockdatetime 23:50:00 2020-12-09 配置抬头信息 <Huawei>headershell information “Welcome to ipgzj.com” <Huawei>headerlogin information “Welcome to zurkj.com” 配置名称 <Huawei>system-view [Huawei]sysnamezurkj 二、 LAN配置 1. 三层接口配置地址(DHCP上层自动获取) [zurkj]interface GigabitEthernet 0/0/4 [zurkj-GigabitEthernet0/0/4]ip addressdhcp-alloc //配置接口地址为DHCP自动获取 [zurkj-GigabitEthernet0/0/4]quit 2. 创建VLAN [zurkj]vlan batch 10 20 30 40 50 60 //批量创建VLAN 3. 开启DHCP服务功能 [zurkj]dhcp enable //开启DHCP功能 4. 创建DHCP全局地址池 [zurkj]ip pool vlan10 //创建DHCP地址池 [zurkj-ip-pool-vlan10]gateway-list192.168.10.1 //配置网关地址 [zurkj-ip-pool-vlan10]network 192.168.10.0mask 24 //配置网段及掩码 [zurkj-ip-pool-vlan10]excluded-ip-address192.168.10.200 192.168.10.254 //配置不参与DHCP地址池分配的IP [zurkj-ip-pool-vlan10]lease day 0 hour 12minute 0 //配置租约时间 [zurkj-ip-pool-vlan10]dns-list114.114.114.114 8.8.8.8 //配置DNS地址 [zurkj-ip-pool-vlan10]quit [zurkj]ip pool vlan20 [zurkj-ip-pool-vlan20]gateway-list192.168.20.1 [zurkj-ip-pool-vlan20]network 192.168.20.0mask 24 [zurkj-ip-pool-vlan20]excluded-ip-address192.168.20.200 192.168.20.254 [zurkj-ip-pool-vlan20]lease day 0 hour 12minute 0 [zurkj-ip-pool-vlan20]dns-list114.114.114.114 8.8.8.8 [zurkj-ip-pool-vlan20]quit [zurkj]ip pool vlan30 [zurkj-ip-pool-vlan30]gateway-list192.168.30.1 [zurkj-ip-pool-vlan30]network 192.168.30.0mask 24 [zurkj-ip-pool-vlan30]excluded-ip-address192.168.30.200 192.168.30.254 [zurkj-ip-pool-vlan30]dns-list114.114.114.114 8.8.8.8 [zurkj-ip-pool-vlan30]quit [zurkj]ip pool vlan40 [zurkj-ip-pool-vlan40]gateway-list192.168.40.1 [zurkj-ip-pool-vlan40]network 192.168.40.1mask 24 [zurkj-ip-pool-vlan40]excluded-ip-address 192.168.40.200192.168.40.254 [zurkj-ip-pool-vlan40]lease day 0 hour 12minute 0 [zurkj-ip-pool-vlan40]dns-list114.114.114.114 8.8.8.8 [zurkj-ip-pool-vlan40]quit [zurkj]ip pool vlan50 [zurkj-ip-pool-vlan50]gateway-list192.168.50.1 [zurkj-ip-pool-vlan50]network 192.168.50.0mask 24 [zurkj-ip-pool-vlan50]excluded-ip-address192.168.50.200 192.168.50.254 [zurkj-ip-pool-vlan50]lease day 0 hour 12minute 0 [zurkj-ip-pool-vlan50]dns-list114.114.114.114 8.8.8.8 [zurkj-ip-pool-vlan50]quit [zurkj]ip pool vlan60 [zurkj-ip-pool-vlan60]gateway-list192.168.60.1 [zurkj-ip-pool-vlan60]network 192.168.60.0mask 24 [zurkj-ip-pool-vlan60]excluded-ip-address192.168.60.200 192.168.60.254 [zurkj-ip-pool-vlan60]lease day 0 hour 12minute 0 [zurkj-ip-pool-vlan60]dns-list 114.114.114.1148.8.8.8 [zurkj-ip-pool-vlan60]quit [zurkj]display ip pool 5. 配置三层虚拟接口 [zurkj]interface vlanif 10 //创建虚拟三层接口 [zurkj-Vlanif10]ip address 192.168.10.1 24 //配置地址及掩码 [zurkj-Vlanif10]dhcp select global //配置DHCP选择全局 [zurkj-Vlanif10]quit [zurkj]interface vlanif 20 [zurkj-Vlanif20]ip address 192.168.20.1 24 [zurkj-Vlanif20]dhcp select global [zurkj-Vlanif20]quit [zurkj]interface vlanif 30 [zurkj-Vlanif30]ip address 192.168.30.1 24 [zurkj-Vlanif30]dhcp select global [zurkj-Vlanif30]quit [zurkj]interface vlanif 40 [zurkj-Vlanif40]ip address 192.168.40.1 24 [zurkj-Vlanif40]dhcp select global [zurkj-Vlanif40]quit [zurkj]interface vlanif 50 [zurkj-Vlanif50]ip address 192.168.50.1 24 [zurkj-Vlanif50]dhcp select global [zurkj-Vlanif50]quit [zurkj]interface vlanif 60 [zurkj-Vlanif60]ip address 192.168.60.1 24 [zurkj-Vlanif60]dhcp select global [zurkj-Vlanif60]quit 6. 创建环回口 [zurkj]interface loopback 0 [zurkj-LoopBack0] [zurkj-LoopBack0]ip address 100.100.100.10032 [zurkj-LoopBack0]quit 7. 三层虚拟接口引用至物理接口 [zurkj]interface GigabitEthernet 0/0/0 [zurkj-GigabitEthernet0/0/0]port link-typeaccess //接口链路类型访问 [zurkj-GigabitEthernet0/0/0]port defaultvlan 10 //接口默认VLAN [zurkj-GigabitEthernet0/0/0]quit [zurkj]interface GigabitEthernet 0/0/1 [zurkj-GigabitEthernet0/0/1]port link-typeaccess [zurkj-GigabitEthernet0/0/1]port defaultvlan 20 [zurkj-GigabitEthernet0/0/1]quit [zurkj]interface GigabitEthernet 0/0/2 [zurkj-GigabitEthernet0/0/2]port link-typeaccess [zurkj-GigabitEthernet0/0/2]port defaultvlan 30 [zurkj-GigabitEthernet0/0/2]quit [zurkj]interface GigabitEthernet 0/0/3 [zurkj-GigabitEthernet0/0/3]port link-typeaccess [zurkj-GigabitEthernet0/0/3]port defaultvlan 40 8. 配置默认路由及Easy-IP [zurkj]ip route-static 0.0.0.0 0192.168.31.1 //配置默认路由 [zurkj]acl 2000 //创建访问控制列表 [zurkj-acl-basic-2000]step 10 //配置步长为10 [zurkj-acl-basic-2000]rule permit sourceany //规则允许所有源IP通过 [zurkj-acl-basic-2000]quit [zurkj]interface GigabitEthernet 0/0/4 [zurkj-GigabitEthernet0/0/4]nat outbound2000 //出接口配置NAT转换 [zurkj-GigabitEthernet0/0/4]quit 三、 配置Telnet [zurkj]telnet server enable //Telnet服务功能开启 [zurkj]user-interface vty 0 4 //用户界面 [zurkj-ui-vty0-4]authentication-mode aaa //配置身份认证模式为AAA [zurkj-ui-vty0-4]quit [zurkj]aaa //三A视图 [zurkj-aaa]local-user zurkj password cipheradmin1234 privilege level 15 //创建本地用户密码及特权 [zurkj-aaa]local-user zurkj service-typetelnet //本地用户服务类型为Telnet [zurkj-aaa]quit 四、 配置WLAN 1. 配置无线基本服务集接口(WLAN-Basicservice set) [zurkj]interface wlan-bss 2 [zurkj-Wlan-Bss2]port hybrid tagged vlan 50 [zurkj]interface wlan-bss 5 [zurkj-Wlan-Bss5]port hybrid tagged vlan 60 [zurkj-Wlan-Bss5]quit 2. 配置Security-Profile安全模板 [zurkj-wlan-view]security-profile namezurkj2g id 2 [zurkj-wlan-sec-prof-zurkj2g]security-policywpa2 [zurkj-wlan-sec-prof-zurkj2g]wpa2authentication-method psk pass-phrase cipher qwe123123 encryption-method tkip [zurkj-wlan-sec-prof-zurkj2g]quit [zurkj-wlan-view]security-profile namezurkj5g id 5 [zurkj-wlan-sec-prof-zurkj5g]security-policywpa2 [zurkj-wlan-sec-prof-zurkj5g]wpa2 authentication-methodpsk pass-phrase cipher qwe123123 encryption-method tkip [zurkj-wlan-sec-prof-zurkj5g]quit 3. 配置Traffic-profile流量模板 [zurkj-wlan-view]traffic-profile namezurkj2g id 2 [zurkj-wlan-traffic-prof-zurkj2g]quit [zurkj-wlan-view]traffic-profile name zurkj5gid 5 [zurkj-wlan-traffic-prof-zurkj5g]quit 4. 配置Wmm-profile模板 [zurkj-wlan-view]wmm-profile name zurkj2gid 2 [zurkj-wlan-wmm-prof-zurkj2g]quit [zurkj-wlan-view]wmm-profile name zurkj5gid 5 [zurkj-wlan-wmm-prof-zurkj5g]quit 5. 配置Radio-profile模板 [zurkj-wlan-view]radio-profile name zurkj2gid 2 [zurkj-wlan-radio-prof-zurkj2g]wmm-profileid 2 [zurkj-wlan-radio-prof-zurkj2g]quit [zurkj-wlan-view]radio-profile name zurkj5gid 5 [zurkj-wlan-radio-prof-zurkj5g]wmm-profileid 5 [zurkj-wlan-radio-prof-zurkj5g]quit 6. 配置Service-set服务集 [zurkj-wlan-view]service-set name zurkj2gid 2 [zurkj-wlan-service-set-zurkj2g]wlan-bss 2 [zurkj-wlan-service-set-zurkj2g]ssidzurkj2g [zurkj-wlan-service-set-zurkj2g]traffic-profileid 2 [zurkj-wlan-service-set-zurkj2g]security-profileid 2 [zurkj-wlan-service-set-zurkj2g]quit [zurkj-wlan-view]service-set name zurkj5gid 5 [zurkj-wlan-service-set-zurkj5g]wlan-bss 5 [zurkj-wlan-service-set-zurkj5g]ssidzurkj5g [zurkj-wlan-service-set-zurkj5g]traffic-profileid 5 [zurkj-wlan-service-set-zurkj5g]security-profileid 5 [zurkj-wlan-service-set-zurkj5g]quit [zurkj-wlan-view]quit 7. 配置射频接口(无线物理接口) [zurkj]interface wlan-radio 0/0/0 [zurkj-Wlan-Radio0/0/0]radio-profile id 2 [zurkj-Wlan-Radio0/0/0]service-set id 2 [zurkj-Wlan-Radio0/0/0]quit [zurkj]interface wlan-radio 0/0/1 [zurkj-Wlan-Radio0/0/1]radio-profile id 5 [zurkj-Wlan-Radio0/0/1]quit 五、 更改为配置拨号 1. 配置拨号规则 [zurkj]dialer-rule [zurkj-dialer-rule]dialer-rule 1 ip permit [zurkj-dialer-rule]quit 2. 创建虚拟拨号接口 [zurkj]interface dialer 1 [zurkj-Dialer1]dialer user zurkj [zurkj-Dialer1]dialer-group 1 [zurkj-Dialer1]dialer bundle 1 [zurkj-Dialer1]ppp pap local-userad77004926 password cipher 55648779 [zurkj-Dialer1]ip address ppp-negotiate [zurkj-Dialer1]ppp ipcp default-route [zurkj-Dialer1]quit 3. 虚拟接口绑定至物理接口 [zurkj-GigabitEthernet0/0/4]pppoe-clientdial-bundle-number 1 [zurkj-GigabitEthernet0/0/4]quit 4. 配置拨号接口NAT转换 [zurkj-Dialer1]nat outbound 2000 [zurkj-Dialer1]quit 六、 配置虚拟服务器 [zurkj]interface vlanif 40 [zurkj-Vlanif40]nat server protocol tcpglobal interface dialer 1 65534 inside 192.168.40.200 8080 [zurkj-Vlanif40]nat server protocol tcpglobal interface dialer 1 65533 inside 192.168.40.200 3389 [zurkj-Vlanif40]quit [zurkj]interface vlanif 10 [zurkj-Vlanif10]nat server protocol tcpglobal interface dialer 1 65532 inside 192.168.10.200 80 [zurkj-Vlanif10]nat server protocol tcpglobal interface dialer 1 65531 inside 192.168.10.200 3389 [zurkj-Vlanif10]return 七、 最终保存配置 <zurkj>saveall Warning: The current configuration will bewritten to the device. Are you sure to continue?[Y/N]:y |