02: 项目实战一:part02

Top

NSD PROJECT1 DAY02

  1. 1 案例1:划分VLAN
  2. 2 案例2:多交换机VLAN的划分
  3. 3 案例3:配置trunk中继链路
  4. 4 案例4:以太网通道配置

1 1 案例1:划分VLAN

1.1 问题

在交换机上创建以下VLAN,按照拓扑图-1将端口加入到指定的VLAN并配置服务器IP地址,实现同VLAN主机的通信

图-1

1.2 步骤

由于默认情况下所有接口都在VLAN1中,且VLAN1默认就存在,所以只需要配置VLAN2和VLAN3即可。

 
  1. Switch>enable
  2. Switch#configure terminal
  3. Switch(config)#vlan 2                                    //创建VLAN2
  4. Switch(config-vlan)#vlan 3                                //创建VLAN3
  5. Switch(config-vlan)#exit    
  6. Switch(config)#interface range fastEthernet 0/3-4        //同时进入3、4接口
  7. Switch(config-if-range)#switchport access vlan 2        //将3、4接口加入VLAN2
  8. Switch(config-vlan)#exit
  9. Switch(config)#interface range fastEthernet 0/5-6
  10. Switch(config-if-range)#switchport access vlan 3
  11. Switch#show vlan brief

2 2 案例2:多交换机VLAN的划分

2.1 问题

通过配置交换机实现图-2中的同VLAN主机互通

图-2

2.2 步骤

注:以下配置需要在案例1的基础上完成

S1配置

 
  1. Switch#configure terminal
  2. Switch(config)#interface fastethernet 0/7
  3. Switch(config-if)#switchport access vlan 3

S2配置

 
  1. Switch>enable
  2. Switch#configure terminal
  3. Switch(config)#vlan 3
  4. Switch(config-vlan)#exit
  5. Switch(config)#interface range fastEthernet 0/5-7
  6. Switch(config-if-range)#switchport access vlan 3

3 3 案例3:配置trunk中继链路

3.1 问题

通过配置实现跨交换机的同VLAN通信,如图-3所示

图-3

3.2 步骤

注:以下配置需要在案例2的基础上完成

S1配置

 
  1. Switch>enable
  2. Switch#configure terminal
  3. Switch(config)#interface fastEthernet 0/7
  4. Switch(config-if)#switchport mode trunk

S2配置

 
  1. Switch>enable
  2. Switch#configure terminal
  3. Switch(config)#vlan 2
  4. Switch(config-vlan)#exit
  5. Switch(config)#interface range fastEthernet 0/3-4
  6. Switch(config-if-range)#switchport access vlan 2
  7. Switch(config-if-range)#exit
  8. Switch(config)#interface fastEthernet 0/7
  9. Switch(config-if)#switchport mode trunk

4 4 案例4:以太网通道配置

4.1 问题

参照图-4将交换机的f0/7-f0/9端口配置为以太网通道

图-4

4.2 步骤

S1配置

 
  1. Switch>enable
  2. Switch#configure terminal
  3. Switch(config)#interface range fastEthernet 0/7-9
  4. Switch(config-if-range)#channel-group 1 mode on
  5. Switch(config-if-range)#end
  6. Switch#show etherchannel summary

S2配置

 
  1. Switch>enable
  2. Switch#configure terminal
  3. Switch(config)#interface range fastEthernet 0/7-9
  4. Switch(config-if-range)#channel-group 1 mode on
  5. Switch(config-if-range)#end
  6. Switch#show etherchannel summary

猜你喜欢

转载自blog.csdn.net/xixi1067087210/article/details/83758879
02