文档详情

配置跨交换机的VLAN(tag vlan).doc

发布:2017-05-23约2.44千字共3页下载文档
文本预览下载声明
第21讲 跨交换机的VLAN(tag vlan)配置p241 例题1:交换机间Trunk的配置1 准备工作: 图中的交换机为Cisco Catalyst 2950交换机。 各设备配置内容1: 交换机S1:特权口令为123,IP地址为192.168.1.251/24。 S1(config)#enable password 123 S1(config)#interface vlan 1 S1(config-if)#ip address 192.168.1.251 255.255.255.0 S1(config-if)#no shutdown 交换机S2:特权口令为123,IP地址为192.168.1.252/24。 PC1:IP地址为192.168.1.1/24。连接在S1的f0/2口上。 PC2:IP地址为192.168.1.2/24。连接在S2的f0/2口上。 在S1中创建一个ID为2的VLAN,并把f0/2口分配给了VLAN2。 S1#vlan database S1(vlan)#vlan 2 name v2 S1#configure terminal S1(config)#interface f0/2 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 2 在S2中也创建一个ID为2的VLAN,并把f0/2口分配给了VLAN2。 配置内容2: 1、请用命令检查PC1和PC2能否通信? 2、把两台交换机间的连接配置成Trunk连接,再检查PC1和PC2能否通信? S2(config)#interface f0/1 S2(config-if)#switchport mode trunk S2(config)#interface f0/12 S2(config-if)#switchport mode trunk 实例2、交换机间Trunk的配置2:部门之间不能通讯,部门内部可以通讯 参考配置: 1.创建vlansw1#vlan database??????? 进入vlan数据库sw1(vlan)#vlan 2 name jishu?? 创建名为:技术的vlansw1(vlan)#vlan 3 name caiwu??? 创建名为:财务的vlansw2#vlan database??????? 进入vlan数据库sw2(vlan)#vlan 2 name jishu?? 创建名为:技术的vlansw2(vlan)#vlan 4 name renshi?? 创建名为:人事的vlan注:的vlanid应该一致2.将端口划分到创建的vlan中sw1(config)#interface f0/1 sw1(config-if)# switchport mode access?????????? 将1号接口设置为接入链路 sw1(config-if)#switchport access vlan 2??????? 将1号接口放进vlan2sw1(config-if)#no shutdown???????????????????????激活此端口sw1(config)#interface range f0/2-3 sw1(config-if)# switchport mode access?????????? 将2号接口设置为接入链路sw1(config-if)#switchport access vlan 3????????? 将2号接口放进vlan3sw1(config-if)#no shutdown???????????????????????激活此端口sw2(config)#interface f0/1 sw2(config-if)# switchport mode access?????????? 将1号接口设置为接入链路 sw2(config-if)#switchport access vlan 2??????? 将1号接口放进vlan2sw2(config-if)#no shutdown???????????????????????激活此端口sw2(config)#interface range f0/2-3 sw2(config-if)# switchport mode access?????????? 将号接口设置为接入链路 sw2(config-if)#switchport
显示全部
相似文档