zoukankan      html  css  js  c++  java
  • swconfig--交换接口配置命令

     swconfig是交换接口(switch)配置命令。

    swconfig list ; 列出可用的SWITCH设备信息(dev参数)
    Found: switch0 - ag71xx-mdio.0
    swconfig dev switch0 help ; 查询该设备信息
    switch0: ag71xx-mdio.0(Atheros AR8337), ports: 7 (cpu @ 0), vlans: 128
         --switch
        Attribute 1 (int): enable_vlan (Enable VLAN mode)
        Attribute 2 (none): reset_mibs (Reset all MIB counters)
        Attribute 3 (int): enable_mirror_rx (Enable mirroring of RX packets)
        Attribute 4 (int): enable_mirror_tx (Enable mirroring of TX packets)
        Attribute 5 (int): mirror_monitor_port (Mirror monitor port)
        Attribute 6 (int): mirror_source_port (Mirror source port)
        Attribute 7 (string): arl_table (Get ARL table)
        Attribute 8 (none): apply (Activate changes in the hardware)
        Attribute 9 (none): reset (Reset the switch)
         --vlan
        Attribute 1 (int): vid (VLAN ID (0-4094))
        Attribute 2 (ports): ports (VLAN port mapping)
         --port
        Attribute 1 (none): reset_mib (Reset single port MIB counters)
        Attribute 2 (string): mib (Get port's MIB counters)
        Attribute 3 (int): enable_eee (Enable EEE PHY sleep mode)
        Attribute 4 (int): pvid (Primary VLAN ID)
        Attribute 5 (string): link (Get port link information)
    swconfig dev <dev> [port <port>|vlan <vlan>] (help|set <key> <value>|get <key>|load <config>|show) ;设置switch,port,vlan
    swconfig dev switch0 show ;显示switch信息

    示例:

    显示switch0/eth1 port
    ~# swconfig dev eth1 show
    Global attributes:
        enable_vlan: 1
    Port 0:
        pvid: 1
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 
    Port 1:
        pvid: 1
        link: port:1 link:down
    Port 2:
        pvid: 1
        link: port:2 link:down
    Port 3:
        pvid: 1
        link: port:3 link:down
    Port 4:
        pvid: 1
        link: port:4 link:down
    VLAN 1:
        vid: 1
        ports: 0 1 2 3 4 
    ~# swconfig list
    Found: switch0 - eth1
  • 相关阅读:
    HTML页面空格记录&nbsp;&ensp; &emsp; (小计)
    JS对象、构造器函数和原型对象之间的关系
    情人节,送女友一桶代码可否?
    JavaScript中的BOM和DOM
    js中字符替换函数String.replace()使用技巧
    XML DOM 节点类型(Node Types)
    node 基础
    npm脚本命令npm run script的使用
    Node.js学习笔记六,获取get/post请求的参数
    querystring模块详解
  • 原文地址:https://www.cnblogs.com/embedded-linux/p/8834613.html
Copyright © 2011-2022 走看看