SW1

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname SW1
SW1(config)#no ip domain-lo SW1(config)#line console 0 SW1(config-line)#exec-timeout SW1(config-line)#exit SW1(config)#vlan SW1(config-vlan)#name caiwu SW1(config-vlan)#vlan SW1(config-vlan)#name it SW1(config-vlan)#exit SW1(config)#interface range fastEthernet /- SW1(config-if-range)#switchport mode access SW1(config-if-range)#switchport access vlan
SW1(config-if-range)#exit SW1(config)#interface range fa0/- SW1(config-if-range)#switchport mode access SW1(config-if-range)#switchport access vlan
SW1(config-if-range)#end
SW1#
%SYS--CONFIG_I: Configured from console by console SW1#show vlan b
SW1#show vlan brief VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
default active Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Gig0/
Gig0/
caiwu active Fa0/, Fa0/
it active Fa0/, Fa0/, Fa0/
fddi-default active
token-ring-default active
fddinet-default active
trnet-default active
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z. SW1(config)#interface gigabitEthernet /
SW1(config-if)#switchport mode trunk SW1(config-if)#end
SW1# #修改native VLAN为VLAN Switch(config)#interface gigabitEthernet / SW1(config-if)#switchport trunk native vlan
SW1(config-if)#
%CDP--NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/ (), with Switch GigabitEthernet0/ (). SW1(config-if)

SW2

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#no ip domain-lo Switch(config)#line console 0 Switch(config-line)#logging synchronous Switch(config-line)#exec-timeout
Switch(config-line)#exit Switch(config)#vlan Switch(config-vlan)#name caiwu Switch(config-vlan)#vlan Switch(config-vlan)#name it Switch(config-vlan)#exit Switch(config)#interface fa0/ Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan Switch(config-if)#int fa0/ Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan
Switch(config-if)#end Switch#
%SYS--CONFIG_I: Configured from console by console Switch#show vlan brief VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
default active Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Fa0/, Fa0/
Fa0/, Fa0/, Gig0/, Gig0/
caiwu active Fa0/
it active Fa0/
fddi-default active
token-ring-default active
fddinet-default active
trnet-default active
Switch#
%LINEPROTO--UPDOWN: Line protocol on Interface GigabitEthernet0/, changed state to down %LINEPROTO--UPDOWN: Line protocol on Interface GigabitEthernet0/, changed state to up Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface gigabitEthernet / Switch(config-if)#switchport mode trunk Switch(config-if)#end Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z. #在trunk上移除VLAN3的流量,使得SW1、SW2的VLAN3之间不能够通信
Switch(config)#interface gigabitEthernet /
Switch(config-if)#switchport trunk allowed vlan remove #在trunk上允许VLAN3的流量,使得SW1、SW2的VLAN3之间能够通信
Switch(config-if)#switchport trunk allowed vlan add #修改native VLAN为VLAN Switch(config)#interface gigabitEthernet / Switch(config-if)#switchport trunk native vlan Switch#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gig0/ on .1q trunking Port Vlans allowed on trunk
Gig0/ - Port Vlans allowed and active in management domain
Gig0/ ,, Port Vlans in spanning tree forwarding state and not pruned
Gig0/ ,,

配置trunk的更多相关文章

  1. [HCNA]VLAN配置Trunk接口

    实验目的 1.掌握Trunk端口的配置 2.掌握Trunk端口允许所有VLAN通过的配置方法 3.掌握Trunk端口允许特定VLAN通过的配置方法 4.理解干道链路的应用场景 实验仪器 eNSP 实验 ...

  2. VLAN实验2(配置Trunk接口)

    本实验基于<HCNA网络技术实验指南> 本实验使用eNSP软件 原理概述: 在以太网中,通过划分VLAN来隔离广播域和增强网络通信的安全性.以太网通常由 多台交换机组成,为了使VLAN的数 ...

  3. 在ensp上配置Trunk接口

    什么是Trunk接口? 在以太网中,通过划分 VLAN 来隔离广播域和增强网络通信的安全性.以太网通常由多台交换机组成,为了使 VLAN 的数据帧跨越多台交换机传递,交换机之间互连的链路需要设置为干道 ...

  4. VLAN实验2:配置Trunk接口

    实验环境公司规模较大200多个员工.内部网络是一个较大的局域网,有两台交换机S1和S2来负责员工网络的接入,接入交换机之间通过汇聚交换机S3相连.公司通过划分VLAN来隔离广播域,由于员工较多,同部门 ...

  5. eNSP——配置Trunk接口

    原理: 在以太网中,通过划分 VLAN 来隔离广播域和增强网络通信的安全性.以太网通常由多台交换机组成,为了使 VLAN 的数据帧跨越多台交换机传递,交换机之间互连的链路需要设置为干道链路( Trun ...

  6. 配置Trunk接口

    实验内容 本实验模拟某公司网络场景.公司规模较大,员工200余名,内部网络是-一个大的局域网.公司放置了多台接入交换机(如S1和S2)负责员工的网络接入.接入交换机之间通过汇聚交换机S3相连.公司通过 ...

  7. Cisco基础(一):Vlan的划分、配置trunk中继链路、以太通道配置、DHCP服务配置

    一.Vlan的划分 目标: VLAN(虚拟局域网)是对连接到的第二层交换机端口的网络用户的逻辑分段,不受网络用户的物理位置限制而根据用户需求进行网络分段.一个VLAN可以在 一个交换机或者跨交换机实现 ...

  8. VLAN配置Trunk接口

    实验二:配置Trunk接口. 实验原理: 实验内容: 本实验模拟某公司网络场景.公司规模较大,员工200余名,内部网络是-一个大的局域网.公司放置了多台接入交换机(如S1和S2)负责员工的网络接入.接 ...

  9. 配置trunk和access

    配置trunk和access 拓扑图 PC地址设置 PC1 :192.168.1.1 vlan10 PC2 :192.168.1.2 vlan10 交换机配置 LSW3配置 <Huawei> ...

  10. VLAN-2 配置Trunk接口

    一.实验拓扑图 二.实验编址 三.实验步骤 1.给对应的PC设置对应的IP和掩码还有接口,以及根据需要划分不同的vlan区域,再用文本标记出不同部门. 2.启动设备(全选) 3.首先用ping命令检查 ...

随机推荐

  1. 调用 js 生成图片二维码

    一.js 生成二维码: 首先,需要引用 jQuery 和 jquery.qrcode.js.然后: //生产二维码 $("#qrcodeCanvas").qrcode({ rend ...

  2. Nullable object must have a value

    有一个linq查询,由inner join改成left join, 对于有空值,就会出现Nullable object must have a value 的错误. 原来的查询: var qry = ...

  3. Qt核心机制与原理

    转:  https://blog.csdn.net/light_in_dark/article/details/64125085 ★了解Qt和C++的关系 ★掌握Qt的信号/槽机制的原理和使用方法 ★ ...

  4. 跟随我在oracle学习php(19)

    Order by子句 形式: order  by  排序字段1  [排序方式],  排序字段2  [排序方式], ..... 说明: 对前面取得的数据(含from子句,where子句,group子句, ...

  5. 跟随我在oracle学习php(16)

    数据库的增删改查 增:create  database  [if  not  exists ] 数据库名  [charset  字符集]  [collate  字符排序规则]: 说明: 1,if  n ...

  6. 基于服务器AAA的实验

    1.实验拓扑 2.地址分配   Device   Interface   IP Address   Subnet Mask   R0 Fa0/0 192.168.1.2 255.255.255.0 S ...

  7. vue-cli axios跨域 + 反向代理模拟http请求host+referer

    axios跨域 配置config->index.js中的proxyTable,内容如下: proxyTable: { // 跨域请求 '/api': { // 注意此处可设置为 '*' 代表不限 ...

  8. js 回调

    function getTittleLableData(callback) { $.ajax({ type : 'POST', url : ctx + '/feeInf/getDataValue', ...

  9. # -*- coding: utf-8 -*-

    -- coding: utf-8 -- import scrapy from jobscrawler_qianchengwuyou.items import JobscrawlerQianchengw ...

  10. java基础1(二)

    Bean的xml配置 1.bean的初始化方式 三种方式: 默认构造器,静态工厂初始化(了解)和实例工厂初始化(了解) 2.springbean的作用域 Bean默认作用域是单实例的 可以设置非单实例 ...