zoukankan      html  css  js  c++  java
  • 结合以太通道的VLAN配置

    实验要求:建立一条以太通道,并划分vlan,让同一vlan的主机能够通信,不同vlan的主机则不能通信

    拓扑如下:

    涉及内容有:

    1.以太通道的建立和配置

    2.vlan的创建和划分

    配置如下:

    A

    enable  进入特权模式

    configure terminal   进入全局模式

    interface port-channel 5  创建以太通道

    switchport trunk encapsulation  将通道进行封装

    switchport mode trunk  将通道修改为trunk模式  

    exit   返回上一级

    interface range f0/20-21  进入端口

    channel-group 5 mode on  将端口划分到通道中

    exit  返回上一级

    vlan 10  创建vlan10

    vlan 20  创建vlan20

    interface f0/1  进入端口

    switchport mode access  将端口模式修改为access

    switchport access vlan 10  将端口划分到vlan10

    interface f0/2  进入端口

    switchport mode access  将端口模式修改为access

    switchport access vlan 20  将端口划分到vlan20

    end  返回特权模式

    copy running-config startup-config   保存

    B

    enable  进入特权模式

    configure terminal   进入全局模式

    interface port-channel 5  创建以太通道

    switchport trunk encapsulation  将通道进行封装

    switchport mode trunk  将通道修改为trunk模式  

    exit   返回上一级

    interface range f0/20-21  进入端口

    channel-group 5 mode on  将端口划分到通道中

    exit  返回上一级

    vlan 10  创建vlan10

    vlan 20  创建vlan20

    interface f0/1  进入端口

    switchport mode access  将端口模式修改为access

    switchport access vlan 10  将端口划分到vlan10

    interface f0/2  进入端口

    switchport mode access  将端口模式修改为access

    switchport access vlan 20  将端口划分到vlan20

    end  返回特权模式

    copy running-config startup-config   保存

  • 相关阅读:
    关于SimpleDateFormat安全的时间格式化线程安全问题
    JAVA多线程和并发基础面试问答
    探秘Java中的String、StringBuilder以及StringBuffer
    Java开发岗位面试题归类
    Java并发编程:阻塞队列
    Shell基本概述
    Ansible--06 ansible roles
    Ansible --05 ansible jinja2
    Ansible--04 ansible 流程控制
    Ansible--03 ansible 变量
  • 原文地址:https://www.cnblogs.com/guoshiyu/p/9178042.html
Copyright © 2011-2022 走看看