yxixi 发表于 2018-7-25 07:43:06

华为三层交换机的配置!求指教

  华为三层交换机的配置
  先来看拓扑图

  下来看看配置过程
  SW2配置
  <Huawei>sys
  vlan batch 10 20 30    创建vlan
  sysname SW2
  interface GigabitEthernet 0/0/1
  port link-type access      此端口加入VLAN
  port default vlan 10
  undo shutdown               开启此端口
  Info: Interface GigabitEthernet0/0/1 is not shutdown.
  q
  interface GigabitEthernet 0/0/2
  port link-type access
  port default vlan 20
  undo shutdown
  Info: Interface GigabitEthernet0/0/2 is not shutdown.
  q
  interface gi0/0/3
  port link-type access
  port default vlan 30
  q
  interface gi0/0/24
  port link-type trunk         这个端口配置trunk模式,允许所有VLAN通过
  port trunk allow-pass vlan all
  SW3配置
  和sw2配置思路相同
  <Huawei>sys
  SYSNAME SW3
  VLAN batch 40 50
  interface GigabitEthernet 0/0/1
  port link-type access
  port default vlan 40
  undo shutdown
  Info: Interface GigabitEthernet0/0/1 is not shutdown.
  q
  interface gi0/0/2
  port link-type access
  port default vlan 50
  undo shutdown
  Info: Interface GigabitEthernet0/0/2 is not shutdown.
  q
  interface gi0/0/23
  port link-type trunk
  port trunk allow-pass vlan all
  sw1配置
  <Huawei>sys
  sysname sw1         改名字
  vlan batch 10 to 50   创建VLAN
  int vlanif 10             给每个VLAN配置IP地址
  ip address 192.168.1.254 24
  int vlanif 20
  ip address 192.168.2.254 24
  int vlanif 30
  ip address 192.168.3.254 24
  int vlanif 40
  ip address 192.168.4.254 24
  int vlanif 50
  ip address 192.168.5.254 24
  q
  int gi0/0/24                         此端口配置trunk模式
  port link-type trunk
  port trunk allow-pass vlan all
  q
  int gi0/0/23                         此端口配置trunk模式
  port link-type trunk
  port trunk allow-pass vlan all
  vlan 60
  q
  interface gi0/0/1
  port link-type access
  port default vlan 60
  q
  int vlanif 60
  ip address 192.168.7.1 24
  q
  ip route-static 192.168.6.0 24 192.168.7.2   配置去往下一个网段的的下一跳
  路由器的配置
  每个端口配置IP地址
  在配置下一跳
  sysname R1
  interface gi0/0/1
  ip address 192.168.7.2 24
  q
  interface gi0/0/0
  ip address 192.168.6.254 24
  q
  ip route-static 0.0.0.0 0.0.0.0 192.168.7.1
  实验验证:华为交换机也可以当作三层设备来用它默认是开启的
  ip routing
  实现全网通
页: [1]
查看完整版本: 华为三层交换机的配置!求指教