计算机网络-vlan的创建

单个交换机问题:

  1. 选设备

  2. 连线

  3. 配主机IP【IP配置位置,点击PC机小图标,下图】

    132349_a85B_1464493.jpg

  4. 配交换机

 //进入特权模式
switch>enable
switch(config)#hostname s1
//配置vlan
s1(config)#vlan 10
s1(config-vlan)#vlan 20
s1(config-vlan)#exit
s1# show vlan
//添加端口
s1(config)#int f0/1
s1(config-if)#switchport mode access 
s1(config-if)#switchport access vlan 10
//接着将其他PC 机配置到各自的vlan 10/20里面即可

133533_BGbF_1464493.png

5.    查看vlan主要概况

s1#show vlan brief



多个交换机问题:

  1. 选设备

  2. 连线

  3. 配主机IP【与上述配置基本一致】

  4. 配交换机

    vlan配置过程:

    1. 为所有交换机配置vtp:

      其中一个配置为服务器模式   

  switch1#vlan database    //并进入vlan配置模式
switch1(vlan)#vtp domain csico //设置vtp的域
switch1(vlan)#vtp password csico //设置vtp的域密码
switch1(vlan)#vtp server//设置vtp的模式
switch1(vlan)#vtp v2-mode//设置vtp的版本
switch1(vlan)#exit        //退出该模式

 

             另一个配置为客户模式

 switch2#vlan database    //并进入vlan配置模式
switch2(vlan)#vtp domain csico //设置vtp的域
switch2(vlan)#vtp password csico //设置vtp的域密码
switch2(vlan)#vtp client//设置vtp的模式
switch2(vlan)#vtp v2-mode//设置vtp的版本
switch2(vlan)#exit        //退出该模式

        2)   把交换机间互连的链路配置为trunk链路

  switch1(config)#interface fastethernet0/1    //进入端口配置模式
switch1(config-if)#switchport mode trunk//设置端口为trunk类型
switch1(config-if)#no shut  //激活
 switch2(config)#interface fastethernet0/1    //进入端口配置模式
switch2(config-if)#switchport mode trunk//设置端口为trunk类型
switch2(config-if)#no shut  //激活

     3)  与单个交换机的vlan配置相似

  switch#vlan database    //并进入vlan配置模式
switch(vlan)#vlan 10 name chinese //新建vlan 10并设置名字
……
switch(vlan)#exit        //退出该模式
  //在每个交换机把端口添加到相应的vlan中,比如服务器端switch1就配置连接到他端口的PC机
switch(config)#interface fastethernet0/1    //进入端口配置模式
switch(config-if)#switchport mode access//设置端口为access类型
switch(config-if)#switchport  access vlan 10 //把端口划分到vlan10
……

135347_PhgW_1464493.png

转载于:https://my.oschina.net/L110/blog/405486

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值