swith

Posted yesiming

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了swith相关的知识,希望对你有一定的参考价值。

学生成绩等级管理

#include <stdio.h>
int main()

    int a=0;
    printf("请输入学生成绩:");
    scanf("%d",&a);
    switch(a/10)
    
        case 10:printf("满分\\n");break;
        case 9:printf("A\\n");break;
        case 8:printf("B\\n");break;
        case 7:printf("C\\n");break;
        case 6:printf("D\\n");break;
        default:printf("不合格\\n");
    
    return 0;

配置AP+AC

配置交换机:

[swich]vlan batch  100 101
[swich]interface g0/0/1
[Swith-GigabitEthernet0/0/1]description Link-to-AP
[Swith-GigabitEthernet0/0/1]port link-type trunk
[Swith-GigabitEthernet0/0/1] port trunk pvid vlan 100
[Swith-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 101
[Swith-GigabitEthernet0/0/1]quit


[swich]interface g0/0/2
[Swith-GigabitEthernet0/0/2]description Link-to-AC
[Swith-GigabitEthernet0/0/2]port link-type trunk
[Swith-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 101
[Swith-GigabitEthernet0/0/2]quit

  

配置AC

1、配置接口信息和VLAN信息,AC为DHCP Server,为AP和Client分配地址
[AC]vlan bath 100 101
[AC]int g0/0/1
[AC-GigabitEthernet0/0/1]description Link-to-SW
[AC-GigabitEthernet0/0/1]port link-type trunk
[AC-GigabitEthernet0/0/1]port link-type trunk
[AC-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101
[AC-GigabitEthernet0/0/1]quit

[AC]dhcp enable
[AC]interface vlanif 100
[AC-Vlanif100]description for-ap
[AC-Vlanif100] ip address 192.168.100.1 24
[AC-Vlanif100]dbcp select interface
[AC-Vlanif100]quit


[AC]interface vlanif 101
[AC-Vlanif101]description for-STA
[AC-Vlanif101] ip address 192.168.101.1 24
[AC-Vlanif101]dbcp select interface
[AC-Vlanif101]quit

  

2、配置AC WLAN基础配置
[AC]wlan ac-global ac id 1 carrier id other
[AC]wlan ac-global country-code CN
[AC]wlan
[AC_wlan-view]wlan ac source interface Vlanif 100
[AC_wlan-view]ap-auth-mode no-auth

3、配置AC WLAN业务参数
#创建wlan-ess接口
[AC]interface Wlan-Ess 0
[AC-Wlan-Ess0]port hybrid pvid vlan 101
[AC-Wlan-Ess0]port hybrid untagged vlan 101
[AC-Wlan-Ess0]quit

#创建WMM模板,采用默认参数
[AC-wlan-view]wmm-profile name wmm-profile-0
[AC-wlan-wmm-prof-wmm-profile-0]quit
#创建安全模板,采用默认参数
[AC-wlan-view]security-profile name security-profile-0
[AC-wlan-sec-prof-security-profile-0]quit
#创建流量模板,采用默认参数
[AC-wlan-view]traffic-profile name traffic-profile-0
[AC-wlan-traffic-prof-traffic-profile-0]quit
#创建服务集并绑定WLAN-ESS接口,安全模板和流量模板
[AC-wlan-view]service-set name service-set-0
[AC-wlan-service-set-service-set-0]ssid SSID-Tmp1
[AC-wlan-service-set-service-set-0]wlan-ess 0
[AC-wlan-service-set-service-set-0]service-vlan 101
[AC-wlan-service-set-service-set-0]security-profile name security-profile-0
[AC-wlan-service-set-service-set-0]traffic-profile name traffic-profile-0

#创建射频模板,并绑定WMM模板
[AC-wlan-view]radio-profile name radio-profile-0
[AC-wlan-radio-prof-radio-profile-0]wmm-profile name wmm-profile-0
[AC-wlan-radio-prof-radio-profile-0]quit
#配置VAP并下发
[AC-wlan-view]ap 0 radio 0
[AC-wlan-radio-0/0]radio-profile name radio-profile-0
[AC-wlan-radio-0/0]service-set name service-set-0
[AC-wlan-radio-0/0]quit
[AC-wlan-view]commit ap 0

配置结束.

  效果如下:

技术图片

 

以上是关于swith的主要内容,如果未能解决你的问题,请参考以下文章

C# 里面swith的或者

swith 好久不用都忘记了

swith case判断

配置AP+AC

那位为我说一下c语言中的swith怎么用啊???

ng-if / ng-show/ng-hide ng-swith