首頁>
4
回覆列表
  • 1 # 小茶壺綠油油

    您好,以下是一些常見的邁普交換機配置命令:

    1. 配置交換機基本信息:

    ```

    enable // 進入特權模式

    configure terminal // 進入全局配置模式

    hostname [name] // 配置主機名

    enable password [password] // 配置特權模式密碼

    exit // 退出全局配置模式

    ```

    2. 配置端口:

    ```

    interface [interface] // 進入端口配置模式

    description [description] // 配置端口描述

    switchport mode [access/trunk] // 配置接口為訪問或Trunk模式

    switchport access vlan [vlan-id] // 配置訪問模式下的VLAN

    switchport trunk allowed vlan [vlan-id] // 配置Trunk模式下的允許VLAN

    no shutdown // 啟用端口

    exit // 退出端口配置模式

    ```

    3. 配置VLAN:

    ```

    vlan [vlan-id] // 進入VLAN配置模式

    name [name] // 配置VLAN名稱

    exit // 退出VLAN配置模式

    ```

    4. 配置鏈路聚合:

    ```

    interface port-channel [channel-id] // 進入聚合接口配置模式

    description [description] // 配置聚合接口描述

    channel-protocol [lacp/pagp] // 配置鏈路聚合協議

    channel-group [group-id] mode [active/passive] // 配置聚合組和模式

    exit // 退出聚合接口配置模式

    interface [interface] // 進入物理接口配置模式

    channel-group [group-id] mode [active/passive] // 將物理接口加入聚合組

    exit // 退出物理接口配置模式

    ```

    5. 配置STP:

    ```

    spanning-tree [mode] // 配置STP模式

    spanning-tree vlan [vlan-id] priority [priority] // 配置VLAN的優先級

    ```

    6. 保存配置:

    ```

    write memory // 將配置保存到NVRAM

    ```