首页 > 其他分享 >思科vlan简单配置

思科vlan简单配置

时间:2023-03-02 23:35:04浏览次数:33  
标签:10 配置 思科 Fa0 vlan Switch active config

实验拓扑

 

实验目标:2台交换机,4台pc,分别处于10,20vlan中可以跨交换机相互通信

tips:vlan是2层技术 可以配置在交换机上

实验ip

PC2 10.1.1.2/24  

PC1 10.1.1.1/24

PC6 10.1.1.6/24

PC7 10.1.1.7/24

实验开始

解析:

1.在两个交换机创建10 vlan和20vlan 

2.将接口放在分别的vlan中

3.配置trunk中继端口:也称为trunk端口,一般用于连接其他交换机,属于公共端口,允许所有vlan的数据通过!

一. 对sw0的操作

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 10 
Switch(config-vlan)#name IT #可以给vlan10这个分区起一个名字 选做 Switch(config-vlan)#exit Switch(config)#vlan 20 Switch(config-vlan)#exit Switch(config)#int f0/1 Switch(config-if)#switchport access vlan 10 Switch(config-if)#int f0/2 Switch(config-if)#switchport access vlan 20 Switch(config-if)#exit Switch(config)#do sh vlan b VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/3, Fa0/5, Fa0/6, Fa0/7 Fa0/8, Fa0/9, Fa0/10, Fa0/11 Fa0/12, Fa0/13, Fa0/14, Fa0/15 Fa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 Fa0/24, Gig0/1, Gig0/2 10 IT active Fa0/1 20 USER active Fa0/2 40 VLAN0040 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch(config)#int f0/4 Switch(config-if)#switchport mode trunk #配置中继端口 配置了之后不会再vlan brief里面在看到f0/4接口在哪个vlan中 Switch(config-if)#exit

根据不同的交换机接口 进入到这个接口的配置命令行后将此接口加入相应的vlan即可 

 

标签:10,配置,思科,Fa0,vlan,Switch,active,config
From: https://www.cnblogs.com/lisenMiller/p/17174024.html

相关文章

  • android studio有关grdle配置
    我们每次新建工程的时候,项目都会通过该路径下寻找适合的gradle包,如果没有则会自动下载到对应的文件夹下......
  • springboot application.yml 配置说明
    1.springbootapplication.yml配置说明server:port:8080spring:datasource:username:rootpassword:123456driver-class-name:com.mysql.cj.......
  • [转]Windows10下CLion配置说明
    Windows10下CLion配置说明CLion是C/C++的IDE,可以配置多种编译环境,本文以配置MinGW编译环境为例。安装CLion的安装可直接到官网下载ZIP,文件解压后直接运行即可。我在......
  • Mybatis学习_03_配置学习
    Mybatis学习_03MyBatis的配置文件包含了会深深影响MyBatis行为的设置和属性信息。1、环境配置(environments)MyBatis可以配置成适应多种环境,这种机制有助于将SQL映......
  • unixODBC 不使用GUI配置数据源
     {PurposeAlotofpeopleareusingunixODBCbutforanumberofreasonsarenotbuildingtheGUIconfigurationandtestingtools(ODBCConfigandDataManage......
  • 如何配置maven中setting.xml文件
    下面是setting.xml的具体内容<?xmlversion="1.0"encoding="UTF-8"?><!--LicensedtotheApacheSoftwareFoundation(ASF)underoneormorecontributorlicens......
  • K8S的资源配置管理
    一、SecretSecret是用来保存密码、token、密钥等敏感数据的k8s资源,这类数据虽然也可以存放在Pod或者镜像中,但是放在Secret中是为了更方便的控制如何使用数据,并减少......
  • IDEA配置Maven
    IDEA配置Maven1.选择IDEA中File-->Settings2.搜索maven3.设置IDEA使用本地安装的Maven,并修改配置文件路径  Maven坐标详解***什么是坐标?maven中的坐标是资......
  • vue+vant项目中 rem适配配置
    vantrem适配,需要安装两个插件postcss-pxtorem 是一款postcss插件,用于将单位转化为rem  lib-flexible 用于设置rem基准值postcss-pxtorem:npminstallpostc......
  • Android&gradle配置(以小米便签为例)
    写在最前以下所涉及到的某些部分需要翻越中国长城防火墙,请确保你有此能力,本文作者不提供相关技术支持。且本文所有涉及境外网站的图片均来自网络,本人只负责讲解。Android......