vlan:virtual LAN 虚拟局域网 作用:通过VLAN技术,可以对局域网进行隔离,互相隔离开的局域网相互之间不能进行通信,一个VLAN为一个广播域 Vlan配置 GNS3(使用路由器来模拟交换机) Switch2,3,4的配置 Switch1# no ip routeing 关闭路由功能 Switch1(config-if)# ip address x.x.x.x255.255.255.0 Switch1(config-if)# no shutdown 打开接口 配置完之后,三个ip…
# 为VLAN10 指定一个描述字符串“connect to LAB1”.<Sysname> system-viewSystem View: return to User View with Ctrl+Z.[Sysname] vlan 10[Sysname-vlan10] description connect to LAB1 # 为Vlan-interface1 接口指定一个描述字符串“gateway of LAB1”<Sysname> system-viewSystem Vie…
在RedHat上配置vlan: ~]$ modinfo 8021q在ethX接口上配置vlan逻辑子接口: DEVICE=ethX. BOOTPROTO=none ONBOOT=yes IPADDR=192.168.1.1 PREFIX= NETWORK=192.168.1.0 VLAN=yes DEVICE=ethX.192会自动关联到ethx上,如果不能则需要指定 PHYSDEV=ethx 采用cli: ~]# ip link add link eth0 name eth0. type vl…
en conf t vlan id end conf t inter rang gi 0/0/1-x switchport access vlan id no shutdown exit (config)#interface range gigabitEthernet 1/0/23-24 (config-if-range)#switchport mode trunk (config-if-range)#switchport trunk allowed vlan all (config-if-ra…
一.实验目的:建立以太通道使相同VLAN下主机互通 二.拓扑图如下 三.具体步骤如下 (1)S1三层交换机配置 Switch>enableSwitch#config terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S1S1(config)#interface port-channel 5S1(config-if)#switchport trunk encapsu…
一.实验目的:将S1配置成VTP-Server,S2配置成VTP-Transparent,S3配置成VTP-Client,S4配置成VTP-Client 二.拓扑图如下 三.具体步骤: (1)S1交换机的配置 Switch>enable --进入特权模式Switch#config terminal --进入全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S1 …
一.实验目的:实现单交换机划分VLAN,使PC1主机和PC2主机不能通讯 二.拓扑图 三.实验步骤 最开始两台主机都输入的端口f0/1和f0/2都属于vlan 1 可以相互通讯(如下图) 现在需要让PC1和PC2分别属于2个不同的vlan,并且不互通,具体步骤如下 Switch>enable --进入特权模式Switch#config terminal --进入全局配置模式Enter configuration commands, one per line. End with CNTL/Z.…
命令部分: vlan划分(全局模式) vlan name v10 no shu no shu switchport access vlan vlan name v20 inter vlan no shu inter range fa0/- no shu swi acc vlan 20 vlan name v99 inter vlan no shu 上面分别在一个交换机里面划分了两个vlan(vlan10.vlan20)和一个用来当本征的vlan99. 中继.本征vlan switchport m…