0


用ENSP华为模拟器组建一个完整的校园网

先来看一下我设计的拓扑图:

这个是我的设计总图


下面来看一下我的设计总思路和配置:

Sw1:

  1. <Huawei>sys
  2. Enter system view, return user view with Ctrl+Z.
  3. [Huawei]sys sw1(改名)
  4. [sw1]un in EN(关闭信息提示)
  5. Info: Information center is disabled.
  6. [sw1]VLAN batch 10 20 30 40 50 60 100 101(创建vlan)
  7. [sw1]int Vlanif 10(进入vlan10)
  8. [sw1-Vlanif10]ip ad 192.168.10.254 24(配置IP,做后面配置的网关)
  9. [sw1-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.252(配置VRRP协议的虚拟IP地址)
  10. [sw1-Vlanif10]vrrp vrid 10 priority 120(配置优先级)
  11. [sw1-Vlanif10]vrrp vrid 10 track interface GigabitEthernet 0/0/1(创建监视端口实现快速主备切换)
  12. [sw1-Vlanif10]vrrp vrid 10 track interface GigabitEthernet 0/0/2(创建监视端口实现快速主备切换)
  13. [sw1-Vlanif10]q(推出)
  14. [sw1]int Vlanif 20(进入vlan20)
  15. [sw1-Vlanif20]ip address 192.168.20.254 24(配置IP)
  16. [sw1-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.252(配置虚拟IP)
  17. [sw1-Vlanif20]vrrp vrid 20 priority 120(配置优先级)
  18. [sw1-Vlanif20]vrrp vrid 20 track interface GigabitEthernet 0/0/1(创建监视端口实现快速主备切换)
  19. [sw1-Vlanif20]vrrp vrid 20 track interface GigabitEthernet 0/0/2(创建监视端口实现快速主备切换)
  20. [sw1-Vlanif20]q
  21. [sw1]int Vlanif 30
  22. [sw1-Vlanif30]ip ad 192.168.30.254 24
  23. [sw1-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.252
  24. [sw1-Vlanif30]vrrp vrid 30 priority 120
  25. [sw1-Vlanif30]vrrp vrid 30 track interface GigabitEthernet 0/0/1
  26. [sw1-Vlanif30]vrrp vrid 30 track interface GigabitEthernet 0/0/2
  27. [sw1-Vlanif30]q
  28. [sw1]int Vlanif 40
  29. [sw1-Vlanif40]ip ad 192.168.40.254 24
  30. [sw1-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.252
  31. [sw1-Vlanif40]vrrp vrid 40 priority 120[sw1-Vlanif40]vrrp vrid 40 track interface GigabitEthernet 0/0/1
  32. [sw1-Vlanif40]vrrp vrid 40 track interface GigabitEthernet 0/0/2
  33. [sw1-Vlanif40]q
  34. [sw1]int Vlanif 50
  35. [sw1-Vlanif50]ip ad 192.168.50.254 24
  36. [sw1-Vlanif50]vrrp vrid 50 virtual-ip 192.168.50.252
  37. [sw1-Vlanif50]vrrp vrid 50 track interface GigabitEthernet 0/0/1
  38. [sw1-Vlanif50]vrrp vrid 50 track interface GigabitEthernet 0/0/2
  39. [sw1-
  40. [sw1-Vlanif7]ip ad 192.168.7.2 24
  41. [sw1-Vlanif7]q
  42. [sw1]int g
  43. [sw1]int GigabitEthernet 0/0/1
  44. [sw1-GigabitEthernet0/0/1]port link-type access (配置接口类型为接入模式)
  45. [sw1-GigabitEthernet0/0/1]port default vlan 5(允许通过vlan5)
  46. [sw1-GigabitEthernet0/0/1]int g
  47. [sw1-GigabitEthernet0/0/1]q
  48. [sw1]int g
  49. [sw1]int GigabitEthernet 0/0/2
  50. [sw1-GigabitEthernet0/0/2]port link-type access
  51. [sw1-GigabitEthernet0/0/2]port default vlan 7
  52. [sw1-GigabitEthernet0/0/2]q
  53. [sw1] User interface con0 is available
  54. [sw1]int e
  55. [sw1]int Eth-Trunk 1(创建链路聚合端口)
  56. [sw1-Eth-Trunk1]port link-type trunk (改为通道模式)
  57. [sw1-Eth-Trunk1]port trunk allow-pass vlan all (允许所有vlan通过)
  58. [sw1-Eth-Trunk1]trunkport GigabitEthernet 0/0/3(加入trunk口)
  59. [sw1-Eth-Trunk1]trunkport GigabitEthernet 0/0/4
  60. [sw1]int g
  61. [sw1]int GigabitEthernet 0/0/5
  62. [sw1-GigabitEthernet0/0/5]port link-type trunk
  63. [sw1-GigabitEthernet0/0/5]port trunk allow-pass vlan all
  64. [sw1-GigabitEthernet0/0/5]int GigabitEthernet 0/0/6
  65. [sw1-GigabitEthernet0/0/6]port link-type trunk
  66. [sw1-GigabitEthernet0/0/6]port trunk allow-pass vlan all
  67. [sw1-GigabitEthernet0/0/6]int GigabitEthernet 0/0/7
  68. [sw1-GigabitEthernet0/0/7]port link-type trunk
  69. [sw1-GigabitEthernet0/0/7]port trunk allow-pass vlan all
  70. [sw1-GigabitEthernet0/0/7]int GigabitEthernet 0/0/10
  71. [sw1-GigabitEthernet0/0/10]port link-type trunk
  72. [sw1-GigabitEthernet0/0/10]port trunk allow-pass vlan all
  73. [sw1-GigabitEthernet0/0/10]q
  74. [sw1-GigabitEthernet0/0/9]port trunk allow-pass vlan all
  75. [sw1-GigabitEthernet0/0/9]int GigabitEthernet 0/0/8
  76. [sw1-GigabitEthernet0/0/8]port link-type trunk
  77. [sw1-GigabitEthernet0/0/8]port trunk allow-pass vlan all
  78. [sw1-GigabitEthernet0/0/8]port trunk pvid vlan 101
  79. [sw1-GigabitEthernet0/0/8]
  80. [sw1]stp en
  81. [sw1]stp enable (配置生成树)
  82. [sw1]stp region-configuration进入生成树配置模式)
  83. [sw1-mst-region]re
  84. [sw1-mst-region]region-name huawei(改名)
  85. [sw1-mst-region]re
  86. [sw1-mst-region]region-name
  87. [sw1-mst-region]revision-level 5(配置生成树的权限)
  88. [sw1-mst-region]instance 1 vlan 10 20 30 100(把vlan划分到实例中)
  89. [sw1-mst-region]instance 2 vlan 40 50 60
  90. [sw1-mst-region]active region-configuration (激活实例)
  91. Info: This operation may take a few seconds. Please wait for a moment...done.
  92. [sw1]stp instance 1 root primary (配置实例的优先级的主次)
  93. [sw1]stp instance 2 root secondary (配置实例的优先级的主次)
  94. [sw1]

Sw2:

[sw2]:

  1. [sw2]un in en
  2. Info: Information center is disabled.
  3. [sw2]vlan batch 10 20 30 40 50 60 100 101 6 8(创建vlan
  4. Info: This operation may take a few seconds. Please wait for a moment...done.
  5. [sw2]int vlan
  6. [sw2]int Vlanif 10
  7. [sw2-Vlanif10]ip address 192.168.10.253 24
  8. [sw2-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.252
  9. [sw2-Vlanif10]vrrp vrid 10 track interface GigabitEthernet 0/0/1
  10. [sw2-Vlanif10]vrrp vrid 10 track interface GigabitEthernet 0/0/2
  11. [sw2-Vlanif10]q
  12. [sw2]int vl
  13. [sw2]int Vlanif 20
  14. [sw2-Vlanif20]ip address 192.168.20.253 24
  15. [sw2-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.252
  16. [sw2-Vlanif20]vrrp vrid 20 track interface GigabitEthernet 0/0/1
  17. [sw2-Vlanif50]ip ad 192.168.50.253 24
  18. [sw2-Vlanif50]vrrp vrid 50 virtual-ip 192.168.50.252
  19. [sw2-Vlanif50]vrrp vrid 50 priority 120
  20. [sw2-Vlanif50]vrrp vrid 50 track interface GigabitEthernet 0/0/1
  21. [sw2-Vlanif50]vrrp vrid 50 track interface GigabitEthernet 0/0/2
  22. [sw2-Vlanif50]q
  23. [sw2]int vlna
  24. [sw2]int vl
  25. [sw2]int Vlanif 60
  26. [sw2-Vlanif60]ip ad 192.168.60.253 24
  27. [sw2-Vlanif60]vrrp vrid 60 virtual-ip 192.168.60.252
  28. [sw2-Vlanif60]vrrp vrid 60 priority 120
  29. [sw2-Vlanif60]vrrp vrid 60 track interface GigabitEthernet 0/0/1
  30. [sw2-Vlanif60]vrrp vrid 60 track interface GigabitEthernet 0/0/2
  31. [sw2-Vlanif60]
  32. [sw2-Vlanif60]q
  33. [sw2][sw2-Vlanif60]
  34. [sw2-Vlanif60]q
  35. [sw2]int Vlanif 6
  36. [sw2-Vlanif6]ip ad 192.168.6.2 24
  37. [sw2-Vlanif6]q
  38. [sw2]int Vlanif 8
  39. [sw2-Vlanif8]ip ad 192.168.8.2 24
  40. [sw2-Vlanif8]q
  41. [sw2]int g
  42. [sw2]int GigabitEthernet 0/0/1
  43. [sw2-GigabitEthernet0/0/1]port link-type access
  44. [sw2-GigabitEthernet0/0/1]port default vlan 8
  45. [sw2-GigabitEthernet0/0/1]int g0/0/2
  46. [sw2-GigabitEthernet0/0/2]port link-type access
  47. [sw2-GigabitEthernet0/0/2]port default vlan 6
  48. [sw2-GigabitEthernet0/0/2]q
  49. [sw2]int e
  50. [sw2]int Eth-Trunk
  51. [sw2]int Eth-Trunk 1
  52. [sw2-Eth-Trunk1]port link-type trunk
  53. [sw2-Eth-Trunk1]port trunk allow-pass vlan all
  54. [sw2-Eth-Trunk1]trunkport GigabitEthernet 0/0/3
  55. Info: This operation may take a few seconds. Please wait for a moment...done.
  56. [sw2-Eth-Trunk1]trunkport GigabitEthernet 0/0/4
  57. [sw2-Eth-Trunk1]q
  58. [sw2]int g
  59. [sw2]int GigabitEthernet 0/0/6
  60. [sw2-GigabitEthernet0/0/6]port link-type trunk
  61. [sw2-GigabitEthernet0/0/6]port trunk allow-pass vlan all
  62. [sw2-GigabitEthernet0/0/6]int GigabitEthernet 0/0/7
  63. [sw2-GigabitEthernet0/0/7]port link-type trunk
  64. [sw2-GigabitEthernet0/0/7]p
  65. [sw2-GigabitEthernet0/0/7]port trunk allow-pass vlan all
  66. [sw2-GigabitEthernet0/0/7]int GigabitEthernet 0/0/5
  67. [sw2-GigabitEthernet0/0/5]port link-type trunk
  68. [sw2-GigabitEthernet0/0/5]port trunk allow-pass vlan all
  69. [sw2-GigabitEthernet0/0/5]int GigabitEthernet 0/0/10
  70. [sw2-GigabitEthernet0/0/10]port link-type trunk
  71. [sw2-GigabitEthernet0/0/10]int GigabitEthernet 0/0/10
  72. [sw2-GigabitEthernet0/0/10]int GigabitEthernet 0/0/9
  73. [sw2-GigabitEthernet0/0/9]port link-type trunk
  74. [sw2-GigabitEthernet0/0/9]port trunk allow-pass vlan all
  75. [sw2-GigabitEthernet0/0/9]int GigabitEthernet 0/0/11
  76. [sw2-mst-region]re
  77. [sw2-mst-region]region-name
  78. [sw2-mst-region]revision-level 5
  79. [sw2-mst-region]instance 1 vlan 10 20 30
  80. [sw2-mst-region]instance 2 vlan 40 50 60
  81. [sw2-mst-region]undo instance 1 vlan 10 20 30
  82. [sw2-mst-region]instance 1 vlan 10 20 30 100
  83. [sw2]stp instance 1 root secondary
  84. [sw2]stp instance 2 root primary
  85. [sw2]

Sw3:

<Huawei>sys

  1. [Huawei]sys sw3
  2. [sw3]un in en
  3. Info: Information center is disabled.
  4. [sw3]vlan batch vlan 10 20 30 40 50 60 100 101
  5. [sw3]stp enable
  6. [sw3]st
  7. [sw3]stp re
  8. [sw3]stp region-configuration
  9. [sw3-mst-region]re
  10. [sw3-mst-region]region-name huawei
  11. [sw3-mst-region]re
  12. [sw3-mst-region]region-name
  13. [sw3-mst-region]revision-level 5
  14. [sw3-mst-region]in
  15. [sw3-mst-region]instance 1 v
  16. [sw3-mst-region]instance 1 vlan 10 20 30 100
  17. [sw3-mst-region]in
  18. [sw3-mst-region]instance 2 v
  19. [sw3-mst-region]instance 2 vlan 40 50 60
  20. [sw3-mst-region]active region-configuration
  21. [sw3-mst-region]q
  22. [sw3]int g
  23. [sw3]int GigabitEthernet 0/0/1
  24. [sw3-GigabitEthernet0/0/1]port link-type trunk
  25. [sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan al
  26. [sw3-GigabitEthernet0/0/1]int g0/0/2
  27. [sw3-GigabitEthernet0/0/2]port link-type trunk
  28. [sw3-GigabitEthernet0/0/2]po
  29. [sw3-GigabitEthernet0/0/2]port trunk allow-pass vlan all
  30. [sw3-GigabitEthernet0/0/2]int e0/0/1
  31. [sw3-Ethernet0/0/1]port link-type access
  32. [sw3-Ethernet0/0/1]port default vlan 10
  33. [sw3-Ethernet0/0/1]int e0/0/2
  34. [sw3-Ethernet0/0/2]port link-type access
  35. [sw3-Ethernet0/0/2]port default vlan 10
  36. [sw3-Ethernet0/0/2]q
  37. [sw3]
  38. Sw4:
  39. The device is running!
  40. <Huawei>
  41. <Huawei>sys
  42. Enter system view, return user view with Ctrl+Z.
  43. [Huawei]un in en
  44. Info: Information center is disabled.
  45. [Huawei]sys sw4
  46. [sw4]vlan batch 10 20 30 40 50 60 100 101
  47. Info: This operation may take a few seconds. Please wait for a moment...done.
  48. [sw4]stp enable
  49. [sw4]stp enable
  50. [sw4]stp region-configuration
  51. [sw4-mst-region]region-name huawei
  52. [sw4-mst-region]region-name huawei
  53. [sw4-mst-region]revision-level 5
  54. [sw4-mst-region]instance 1 vlan 10 20 30 100
  55. [sw4-mst-region]instance 2 vlan 40 50 60
  56. [sw4-mst-region]active region-configuration
  57. Info: This operation may take a few seconds. Please wait for a moment...done.
  58. [sw4-mst-region]dis
  59. [sw4-mst-region]display th
  60. [sw4-mst-region]display this
  61. #
  62. stp region-configuration
  63. region-name huawei
  64. revision-level 5
  65. instance 1 vlan 10 20 30 100
  66. instance 2 vlan 40 50 60
  67. active region-configuration
  68. #
  69. return
  70. [sw4-mst-region]st
  71. [sw4-mst-region]stp re
  72. [sw4-mst-region]q
  73. [sw4]st
  74. [sw4]stp re
  75. [sw4]stp region-configuration
  76. [sw4-mst-region]q
  77. [sw4]int g
  78. [sw4-GigabitEthernet0/0/2]q
  79. [sw4]int e
  80. [sw4]int Eth
  81. [sw4]int Ethernet0/0/1
  82. [sw4-Ethernet0/0/1]port link-type access
  83. [sw4-Ethernet0/0/1]port default vlan 20
  84. [sw4-Ethernet0/0/1]int e0/0/2
  85. [sw4-Ethernet0/0/2]port link-type ac
  86. [sw4-Ethernet0/0/2]port default vlan 20
  87. [sw4-Ethernet0/0/2]q
  88. [sw4]q
  89. <sw4>save

Sw5:

The device is running!:

  1. <Huawei>
  2. <Huawei>sys
  3. Enter system view, return user view with Ctrl+Z.
  4. [Huawei]un in en
  5. moment...done.
  6. [sw5]stp enable
  7. [sw5]stp region-configuration
  8. [sw5-mst-region]region-name huawei
  9. [sw5-mst-region]revision-level 5
  10. [sw5-mst-region]instance 1 vlan 10 20 30 100
  11. [sw5-mst-region]instance 2 vlan 40 50 60
  12. [sw5-mst-region]active region-configuration
  13. Info: This operation may take a few seconds. Please wait for a moment...done.
  14. [sw5]int GigabitEthernet 0/0/1
  15. [sw5-GigabitEthernet0/0/1]port link-type trunk
  16. [sw5-GigabitEthernet0/0/1]port trunk allow-pass vlan al
  17. [sw5-GigabitEthernet0/0/1]int g0/0/2
  18. [sw5-GigabitEthernet0/0/2]port link-type trunk
  19. [sw5-GigabitEthernet0/0/2]port trunk allow-pass vlan all
  20. [sw5-GigabitEthernet0/0/2]int e
  21. [sw5-GigabitEthernet0/0/2]int e0/0/1
  22. [sw5-Ethernet0/0/1]port link-type access
  23. [sw5-Ethernet0/0/1]port default vlan 30
  24. [sw5-Ethernet0/0/1]int e0/0/2
  25. [sw5-Ethernet0/0/2]port link-type access
  26. [sw5-Ethernet0/0/2]port default vlan 30
  27. [sw5-Ethernet0/0/2]

Sw6:

The device is running!

<Huawei>
  1. <Huawei>sys
  2. Enter system view, return user view with Ctrl+Z.
  3. [Huawei]un in en
  4. Info: Information center is disabled.
  5. [Huawei]sys
  6. ^
  7. Error:Incomplete command found at '^' position.
  8. [Huawei]sys sw6
  9. [sw6]vlan batch 10 20 30 40 50 60 100 101
  10. Info: This operation may take a few seconds. Please wait for a moment...done.
  11. [sw6]stp enable
  12. [sw6]stp enable
  13. [sw6]stp region-configuration
  14. [sw6-mst-region]region-name huawei
  15. [sw6-mst-region]region-name huawei
  16. [sw6-mst-region]revision-level 5
  17. [sw6-mst-region]instance 1 vlan 10 20 30 100
  18. [sw6-mst-region]instance 2 vlan 40 50 60
  19. [sw6-mst-region]active region-configuration
  20. Info: This operation may take a few seconds. Please wait for a moment...done.
  21. [sw6-mst-region]q
  22. [sw6]int g
  23. [sw6]int GigabitEthernet 0/0/1
  24. [sw6-GigabitEthernet0/0/1]port link-type trunk
  25. [sw6-GigabitEthernet0/0/1]port trunk allow-pass vlan all
  26. [sw6-GigabitEthernet0/0/1]int g
  27. [sw6-GigabitEthernet0/0/1]int g0/0/2
  28. [sw6-GigabitEthernet0/0/2]port link-type trunk
  29. [sw6-GigabitEthernet0/0/2]port trunk allow-pass vlan all
  30. [sw6-GigabitEthernet0/0/2]int e0/0/1
  31. [sw6-Ethernet0/0/1]port link-type access
  32. v
  33. [sw6-Ethernet0/0/1]port default vlan 40
  34. [sw6-Ethernet0/0/1]int e0/0/2
  35. [sw6-Ethernet0/0/2]port link-type access
  36. [sw6-Ethernet0/0/2]port default vlan 40
  37. [sw6-Ethernet0/0/2]

Sw7:

The device is running!:

  1. <Huawei>
  2. <Huawei>sys
  3. Enter system view, return user view with Ctrl+Z.
  4. [Huawei]in un en
  5. ^
  6. Error:Ambiguous command found at '^' position.
  7. [Huawei]un in en
  8. Info: Information center is disabled.
  9. [Huawei]sys sw7
  10. [sw7]vlan batch 10 20 30 40 50 60 100 101
  11. [sw7]
  12. [sw7]vlan batch 10 20 30 40 50 60 100 101
  13. [sw7]vlan batch 10 20 30 40 50 60 100 101
  14. Info: This operation may take a few seconds. Please wait for a moment...done.
  15. [sw7]stp enable
  16. [sw7]stp enable
  17. [sw7]stp region-configuration
  18. [sw7-mst-region]region-name huawei
  19. [sw7-mst-region]region-name huawei
  20. [sw7-mst-region]revision-level 5
  21. [sw7-mst-region]instance 1 vlan 10 20 30 100
  22. [sw7-mst-region]instance 2 vlan 40 50 60
  23. [sw7-mst-region]active region-configuration
  24. Info: This operation may take a few seconds. Please wait for a moment...done.
  25. [sw7-mst-region]q
  26. [sw7]int g
  27. [sw7]int GigabitEthernet 0/0/1
  28. [sw7-GigabitEthernet0/0/1]port link-type trunk
  29. [sw7-GigabitEthernet0/0/1]port trunk allow-pass vlan all
  30. [sw7-GigabitEthernet0/0/1]int g0/0/2
  31. [sw7-GigabitEthernet0/0/2]port link-type trunk
  32. [sw7-GigabitEthernet0/0/2]port trunk allow-pass vlan all
  33. [sw7-GigabitEthernet0/0/2]int e0/0/1
  34. [sw7-Ethernet0/0/1]port link-type access
  35. [sw7-Ethernet0/0/1]port default vlan 50
  36. [sw7-Ethernet0/0/1]int e0/0/2
  37. [sw7-Ethernet0/0/2]port link-type access
  38. [sw7-Ethernet0/0/2]port default vlan 50
  39. [sw7-Ethernet0/0/2]

Sw8:

The device is running!

  1. <Huawei>
  2. <Huawei>sys
  3. Enter system view, return user view with Ctrl+Z.
  4. [Huawei]un in en
  5. Info: Information center is disabled.
  6. [Huawei]sys sw8
  7. [sw8]v
  8. [sw8]vlan b
  9. [sw8]vlan batch 10 20 30 40 50 60 100 101
  10. Info: This operation may take a few seconds. Please wait for a moment...done.
  11. [sw8]stp enable
  12. [sw8]stp enable
  13. [sw8]stp region-configuration
  14. [sw8-mst-region]region-name huawei
  15. [sw8-mst-region]region-name huawei
  16. [sw8-mst-region]revision-level 5
  17. [sw8-mst-region]instance 1 vlan 10 20 30 100
  18. [sw8-mst-region]instance 2 vlan 40 50 60
  19. [sw8-mst-region]active region-configuration
  20. Info: This operation may take a few seconds. Please wait for a moment...done.
  21. [sw8-GigabitEthernet0/0/2]port link-type trunk
  22. [sw8-GigabitEthernet0/0/2]port trunk allow-pass vlan all
  23. [sw8-GigabitEthernet0/0/2]int e
  24. [sw8-GigabitEthernet0/0/2]int e0/0/1
  25. [sw8-Ethernet0/0/1]port link-type access
  26. [sw8-Ethernet0/0/1]port default vlan 60
  27. [sw8-Ethernet0/0/1]int e0/0/2
  28. [sw8-Ethernet0/0/2]port link-type access
  29. [sw8-Ethernet0/0/2]port default vlan 60
  30. [sw8-Ethernet0/0/2]q
  31. [sw8]

AC1:

The device is running!

  1. <AC6605>sys
  2. Enter system view, return user view with Ctrl+Z.
  3. [AC6605]sys AC1
  4. [AC1]v
  5. [AC1]vl
  6. [AC1]vlan 100 101
  7. ^
  8. Error: Too many parameters found at '^' position.
  9. [AC1]vl
  10. [AC1]vlan b
  11. [AC1]vlan batch 100 101
  12. Info: This operation may take a few seconds. Please wait for a moment...done.
  13. [AC1]int v
  14. [AC1]int Vlanif 100
  15. [AC1-Vlanif100]ip ad 192.168.100.1 24
  16. [AC1-Vlanif100]q
  17. [AC1]dhcp enable (开启DHCP功能)
  18. Info: The operation may take a few seconds. Please wait for a moment.done.
  19. [AC1]int v
  20. [AC1]int Vlanif 100(进入vlan100)
  21. [AC1-Vlanif100]dhcp select global (DHCP配置指向全局)
  22. [AC1-Vlanif100]q
  23. [AC1]int v
  24. [AC1]int Vlanif 101
  25. [AC1-Vlanif101]ip ad 192.168.101.1 24(配置IP)
  26. [AC1-Vlanif101]dhcp select interface (DHCP配置指向全局)
  27. [AC1-Vlanif101]q
  28. [AC1]ip poo
  29. [AC1]ip pool v
  30. [AC1]ip pool vlan100(创建地址池)
  31. Info: It is successful to create an IP address pool.
  32. [AC1-ip-pool-vlan100]ga
  33. [AC1-ip-pool-vlan100]gateway-list 192.168.100.254(配置网关)
  34. [AC1-ip-pool-vlan100]netw
  35. [AC1-ip-pool-vlan100]network 192.168.100.0(配置地址池网段)
  36. [AC1-ip-pool-vlan100]dn
  37. [AC1-ip-pool-vlan100]dns-list 192.168.200.4(配置DNS)
  38. [AC1-ip-pool-vlan100]ex
  39. [AC1-ip-pool-vlan100]excluded-ip-address 192.168.100.1(配置排除地址)
  40. [AC1-ip-pool-vlan100]q
  41. [AC1-wlan-view]ap-group name ap-huawei(建立AP组创建名字)
  42. Info: This operation may take a few seconds. Please wait for a moment.done.
  43. [AC1-wlan-ap-group-ap-huawei]q
  44. [AC1-wlan-view]re
  45. [AC1-wlan-view]regulatory-domain-profile n
  46. [AC1-wlan-view]regulatory-domain-profile name huawei-domin(指定域管理模块并设置域管理名)
  47. [AC1-wlan-regulate-domain-huawei-domin]cou
  48. [AC1-wlan-regulate-domain-huawei-domin]country-code cn (选择国家代码进行配置设定)
  49. [AC1-wlan-regulate-domain-huawei-domin]country-code CN
  50. Info: The current country code is same with the input country code.
  51. [AC1-wlan-regulate-domain-huawei-domin]q
  52. [AC1-wlan-view]ap-group name ap-huawei(创建ap组命名)
  53. [AC1-wlan-ap-group-ap-huawei]re
  54. [AC1-wlan-ap-group-ap-huawei]regulatory-domain-profile huawei-domin
  55. Warning: Modifying the country code will clear channel, power and antenna gain c
  56. onfigurations of the radio and reset the AP. Continue?[Y/N]:y
  57. [AC1-wlan-ap-group-ap-huawei]q
  58. [AC1-wlan-view]q
  59. [AC1]capwap source interface Vlanif 101(配置原接口或源地址与AP建隧道)
  60. [AC1]w
  61. [AC1]wl
  62. [AC1]wlan ap
  63. [AC1]wlan
  64. [AC1-wlan-view]ap-id 0 ap-mac 00e0-fc89-0220(ap接入控制,这里是mac认证)
  65. [AC1-wlan-ap-0]ap-id 0 ap-mac 00e0-fc89-0220(配置AP认证模式:离线)
  66. [AC1-wlan-ap-0]ap
  67. [AC1-wlan-ap-0]ap-name area-1(创建AP的名字)
  68. [AC1-wlan-ap-0]ap
  69. [AC1-wlan-ap-0]ap-system-profile
  70. ^
  71. Error: Incomplete command found at '^' position.
  72. [AC1-wlan-ap-0]ap-system-profile
  73. ^
  74. Error: Incomplete command found at '^' position.
  75. [AC1-wlan-ap-0]ap-group ap-huawei
  76. Warning: This operation may cause AP reset. If the country code changes, it will
  77. clear channel, power and antenna gain configurations of the radio, Whether to c
  78. ontinue? [Y/N]:y
  79. Info: This operation may take a few seconds. Please wait for a moment.. done.
  80. [AC1-wlan-ap-0]
  81. [AC1-wlan-ap-0]q
  82. [AC1-wlan-view]q
  83. [AC1]dis
  84. [AC1]display ap
  85. [AC1]display ap-
  86. [AC1]display ap-g
  87. [AC1]display ap-group
  88. ^
  89. Error: Incomplete command found at '^' position.
  90. [AC1]display ap a
  91. [AC1]display ap all
  92. Info: This operation may take a few seconds. Please wait for a moment.done.
  93. Total AP information:
  94. idle : idle [1]
  95. --------------------------------------------------------------------------------
  96. ---
  97. ID MAC Name Group IP Type State STA Uptime
  98. --------------------------------------------------------------------------------
  99. ---
  100. 0 00e0-fc89-0220 area-1 ap-huawei - - idle 0 -
  101. --------------------------------------------------------------------------------
  102. ---
  103. Total: 1
  104. [AC1]int g
  105. [AC1]int GigabitEthernet 0/0/1(进入接口1)
  106. [AC1-GigabitEthernet0/0/1]port link-type trunk(配置为通道模式)
  107. [AC1-GigabitEthernet0/0/1]port trunk allow-pass vlan all (允许所有vlan通过)
  108. [AC1-GigabitEthernet0/0/1]
  109. [AC1]w
  110. [AC1]wlan
  111. [AC1-wlan-view]se
  112. [AC1-wlan-view]security-profile n
  113. [AC1-wlan-view]security-profile name sec(配置安全模板)
  114. [AC1-wlan-sec-prof-sec]security wpa2 psk pass-phrase huawei@123 aes(配置安全模板的密码)
  115. [AC1-wlan-sec-prof-sec]q
  116. [AC1-wlan-view]ssid-profile name ssid-1(配置SSID模板名称)
  117. [AC1-wlan-ssid-prof-ssid-1]ss
  118. [AC1-wlan-ssid-prof-ssid-1]ssid huawei(配置SSID名称)
  119. Info: This operation may take a few seconds, please wait.done.
  120. [AC1-wlan-ssid-prof-ssid-1]q
  121. [AC1-wlan-view]
  122. [AC1-wlan-view]v
  123. [AC1-wlan-view]venue-name-profile
  124. [AC1-wlan-view]vap-profile n
  125. [AC1-wlan-view]vap-profile name vap-1 (VAP名称)
  126. [AC1-wlan-vap-prof-vap-1]forward-mode tunnel
  127. Info: This operation may take a few seconds, please wait.done.
  128. [AC1-wlan-vap-prof-vap-1]se
  129. [AC1-wlan-vap-prof-vap-1]security-profile
  130. [AC1-wlan-vap-prof-vap-1]service-mode
  131. [AC1-wlan-vap-prof-vap-1]service-vlan v
  132. [AC1-wlan-vap-prof-vap-1]service-vlan vlan-id 100
  133. Info: This operation may take a few seconds, please wait.done.
  134. [AC1-wlan-vap-prof-vap-1]s
  135. [AC1-wlan-vap-prof-vap-1]security-profile se
  136. [AC1-wlan-vap-prof-vap-1]security-profile sec
  137. Info: This operation may take a few seconds, please wait.done.
  138. [AC1-wlan-vap-prof-vap-1]se
  139. [AC1-wlan-vap-prof-vap-1]service-vlan
  140. [AC1-wlan-vap-prof-vap-1]security-profile
  141. [AC1-wlan-vap-prof-vap-1]service-mode
  142. [AC1-wlan-vap-prof-vap-1]service-vlan
  143. [AC1-wlan-vap-prof-vap-1]security-profile
  144. [AC1-wlan-vap-prof-vap-1]ss
  145. [AC1-wlan-vap-prof-vap-1]ssid-profile ssid-1
  146. Info: This operation may take a few seconds, please wait.done.
  147. [AC1-wlan-vap-prof-vap-1]q
  148. [AC1-wlan-view]ap
  149. [AC1-wlan-view]ap-
  150. [AC1-wlan-view]ap-group n
  151. [AC1-wlan-view]ap-group name ap
  152. [AC1-wlan-view]ap-group name ap-huawei(创建AP组名称)
  153. [AC1-wlan-ap-group-ap-huawei]vap-profile vap-1 wlan 1 radio 0(VAP模板名称)
  154. Info: This operation may take a few seconds, please wait...done.
  155. [AC1-wlan-ap-group-ap-huawei]q
  156. [AC1-wlan-view]q
  157. [AC1]

R1:

  1. [Huawei]un in en
  2. Info: Information center is disabled.
  3. [Huawei]sys R1
  4. [R1]int g
  5. [R1]int GigabitEthernet 0/0/2
  6. [R1-GigabitEthernet0/0/2]ip ad
  7. [R1-GigabitEthernet0/0/2]ip address 192.168.5.1 24
  8. [R1-GigabitEthernet0/0/2]int g
  9. [R1-GigabitEthernet0/0/2]int g0/0/1
  10. [R1-GigabitEthernet0/0/1]ip ad
  11. [R1-GigabitEthernet0/0/1]ip address 192.168.4.1 24
  12. [R1-GigabitEthernet0/0/1]int g0/0/0
  13. [R1-GigabitEthernet0/0/0]ip ad
  14. [R1-GigabitEthernet0/0/0]ip address 192.168.2.2 24
  15. [R1-GigabitEthernet0/0/0]
  16. <R1>
  17. <R1>
  18. <R1>

R2:

  1. <Huawei>sys
  2. Enter system view, return user view with Ctrl+Z.
  3. [Huawei]un in en
  4. Info: Information center is disabled.
  5. [Huawei]sys R2
  6. [R2]int g
  7. [R2]int GigabitEthernet 0/0/0
  8. [R2-GigabitEthernet0/0/0]dis
  9. [R2-GigabitEthernet0/0/0]discardth
  10. [R2-GigabitEthernet0/0/0]disp
  11. [R2-GigabitEthernet0/0/0]display th
  12. [R2-GigabitEthernet0/0/0]display this
  13. [V200R003C00]
  14. #
  15. interface GigabitEthernet0/0/0
  16. #
  17. return
  18. [R2-GigabitEthernet0/0/0]
  19. [R2-GigabitEthernet0/0/0]
  20. [R2-GigabitEthernet0/0/0]q
  21. [R2]int g
  22. [R2]int GigabitEthernet 1/0/0
  23. [R2-GigabitEthernet1/0/0]ip ad
  24. [R2-GigabitEthernet1/0/0]ip address 192.168.7.1
  25. ^
  26. Error:Incomplete command found at '^' position.
  27. [R2-GigabitEthernet1/0/0]ip address 192.168.7.1 24
  28. [R2-GigabitEthernet1/0/0]int g
  29. [R2-GigabitEthernet1/0/0]int g0/0/0
  30. [R2-GigabitEthernet0/0/0]ip ad
  31. [R2-GigabitEthernet0/0/0]ip address 192.168.4.2 24
  32. [R2-GigabitEthernet0/0/0]int g0/0/1
  33. [R2-GigabitEthernet0/0/1]ip ad
  34. [R2-GigabitEthernet0/0/1]ip address 192.168.3.2 24
  35. [R2-GigabitEthernet0/0/1]int g0/0/2
  36. [R2-GigabitEthernet0/0/2]ip address 192.168.8.1 24
  37. [R2-GigabitEthernet0/0/2]
  38. [R2-GigabitEthernet0/0/2]

防火墙的配置:

FW1:

<USG6000V1>
  1. <USG6000V1>sys
  2. Enter system view, return user view with Ctrl+Z.
  3. [USG6000V1]sys
  4. ^
  5. Error: Unrecognized command found at '^' position.
  6. [FW1-GigabitEthernet1/0/0]int g1/0/1
  7. [FW1-GigabitEthernet1/0/1]ip ad 192.168.3.1 24
  8. [FW1-GigabitEthernet1/0/1]int g0/0/0
  9. [FW1-GigabitEthernet0/0/0]ip ad 192.168.200.1 24
  10. [FW1-GigabitEthernet0/0/0]int g1/0/2
  11. [FW1-GigabitEthernet1/0/2]ip ad 200.10.10.1 30
  12. [FW1-GigabitEthernet1/0/2]q
  13. [FW1]f
  14. [FW1]firewall z
  15. [FW1]firewall zone
  16. [FW1]firewall zone t
  17. [FW1]firewall zone trust (配置策略:新任)
  18. [FW1-zone-trust]add interface g1/0/0(加入接口)
  19. [FW1-zone-trust]add interface g1/0/1
  20. [FW1-zone-trust]f
  21. [FW1-zone-trust]firewall z
  22. [FW1-zone-trust]firewall z
  23. [FW1-zone-trust]q
  24. [FW1]f
  25. [FW1]firewall z
  26. [FW1]firewall zone u
  27. [FW1]firewall zone untrust (创建不信任策略)
  28. [FW1-zone-untrust]ad
  29. [FW1-zone-untrust]add i
  30. [FW1-zone-untrust]add interface g1/0/2(加入端口)
  31. [FW1-zone-untrust]q
  32. [FW1]f
  33. [FW1]firewall d
  34. [FW1]firewall dns
  35. [FW1]firewall detect
  36. [FW1]firewall defend
  37. [FW1]firewall zone dmz (创建DMZ区域)
  38. [FW1-zone-dmz]ad
  39. [FW1-zone-dmz]add int g0/0/0(加入接口)
  40. Error: The interface has been added to trust security zone.
  41. [FW1-zone-dmz]q
  42. [FW1]se
  43. [FW1]security-policy(进入安全策略)
  44. [FW1-policy-security-rule-tr-untr]source-zone trust
  45. [FW1-policy-security-rule-tr-untr]source-address 192.168.0.0 m
  46. [FW1-policy-security-rule-tr-untr]source-address 192.168.0.0 0.0.255.255(加入源IP)
  47. [FW1-policy-security-rule-tr-untr]destination-zone untrust (进入目的区域)
  48. [FW1-policy-security-rule-tr-untr]action permit (运行允许)
  49. [FW1-policy-security-rule-tr-untr]q
  50. [FW1-policy-security]q
  51. [FW1]int g1/0/0
  52. [FW1-GigabitEthernet1/0/0]service-manage all permit (开启服务管理权限)
  53. [FW1-GigabitEthernet1/0/0]int g
  54. [FW1-GigabitEthernet1/0/0]int g1/0/1
  55. [FW1-GigabitEthernet1/0/1]service-manage all permit
  56. [FW1]int g0/0/0
  57. [FW1-GigabitEthernet0/0/0]service-manage all permit
  58. [FW1-GigabitEthernet0/0/0]q
  59. [FW1]
  60. [FW1]
  61. R1:
  62. [R1]os
  63. [R1]ospf 30(创建动态路由)
  64. [R1-ospf-30]area 0(创建区域)
  65. [R1-ospf-30-area-0.0.0.0]network 192.168.5.0 0.0.0.255(加入配置的IP网段)
  66. [R1-ospf-30-area-0.0.0.0]network 192.168.6.0 0.0.0.255
  67. [R1-ospf-30-area-0.0.0.0]network 192.168.4.0 0.0.0.255
  68. [R1-ospf-30-area-0.0.0.0]network 192.168.2.0 0.0.0.255
  69. Sw1:
  70. <sw1>sys
  71. Enter system view, return user view with Ctrl+Z.
  72. [sw1]os
  73. [sw1]ospf 10
  74. [sw1-ospf-10]ar
  75. [sw1-ospf-10]area 0
  76. [sw1-ospf-10-area-0.0.0.0]netw
  77. [sw1-ospf-10-area-0.0.0.0]network 192.168.10.0 0.0.0.255
  78. [sw1-ospf-10-area-0.0.0.0]network 192.168.20.0 0.0.0.255
  79. [sw1-ospf-10-area-0.0.0.0]network 192.168.30.0 0.0.0.255
  80. [sw1-ospf-10-area-0.0.0.0]network 192.168.40.0 0.0.0.255
  81. [sw1-ospf-10-area-0.0.0.0]network 192.168.50.0 0.0.0.255
  82. [sw1-ospf-10-area-0.0.0.0]network 192.168.60.0 0.0.0.255
  83. [sw1-ospf-10-area-0.0.0.0]network 192.168.100.0 0.0.0.255
  84. [sw1-ospf-10-area-0.0.0.0]network 192.168.5.0 0.0.0.255
  85. [sw1-ospf-10-area-0.0.0.0]network 192.168.7.0 0.0.0.255
  86. [sw1-ospf-10-area-0.0.0.0]
  87. [sw1-ospf-10-area-0.0.0.0]
  88. Sw2:
  89. [sw2]os
  90. [sw2]ospf 20
  91. [sw2-ospf-20]ar
  92. [sw2-ospf-20]area 0
  93. [sw2-ospf-20-area-0.0.0.0]netw
  94. [sw2-ospf-20-area-0.0.0.0]network 192.168.10.0 0.0.0.255
  95. [sw2-ospf-20-area-0.0.0.0]network 192.168.20.0 0.0.0.255
  96. [sw2-ospf-20-area-0.0.0.0]network 192.168.30.0 0.0.0.255
  97. [sw2-ospf-20-area-0.0.0.0]network 192.168.40.0 0.0.0.255
  98. [sw2-ospf-20-area-0.0.0.0]network 192.168.50.0 0.0.0.255
  99. [sw2-ospf-20-area-0.0.0.0]network 192.168.60.0 0.0.0.255
  100. [sw2-ospf-20-area-0.0.0.0]network 192.168.6.0 0.0.0.255
  101. [sw2-ospf-20-area-0.0.0.0]network 192.168.8.0 0.0.0.255
  102. [sw2-ospf-20-area-0.0.0.0]
  103. [sw2-ospf-20-area-0.0.0.0]
  104. <sw2>
  105. Fw:
  106. <FW1>sys
  107. Enter system view, return user view with Ctrl+Z.
  108. [FW1]os
  109. [FW1]ospf 50
  110. [FW1-ospf-50]are
  111. [FW1-ospf-50]area 0
  112. [FW1-ospf-50-area-0.0.0.0]netw
  113. [FW1-ospf-50-area-0.0.0.0]network 192.168.2.0 0.0.0.255
  114. [FW1-ospf-50-area-0.0.0.0]network 192.168.3.0 0.0.0.255
  115. [FW1-ospf-50-area-0.0.0.0]network 192.168.200.0 0.0.0.255
  116. [FW1-ospf-50-area-0.0.0.0]de
  117. [FW1-ospf-50-area-0.0.0.0]default-cost
  118. [FW1-ospf-50-area-0.0.0.0]description
  119. [FW1-ospf-50-area-0.0.0.0]default-r
  120. [FW1-ospf-50-area-0.0.0.0]q
  121. [FW1-ospf-50]default-route-advertise always
  122. [FW1-ospf-50]q
  123. [FW1]ip route-static 0.0.0.0 0.0.0.0 200.10.10.2(配置静态IP)
  124. [FW1]

R3:

<Huawei>sys

  1. [Huawei]sys R2
  2. [R2]
  3. <Huawei>sys
  4. Enter system view, return user view with Ctrl+Z.
  5. [Huawei]sys
  6. [Huawei]sysname R2
  7. [R2]int g0/0/0
  8. [R2-GigabitEthernet0/0/0]ip ad 200.10.10.2 30
  9. May 15 2022 11:36:00-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
  10. on the interface GigabitEthernet0/0/0 has entered the UP state.
  11. [R2-GigabitEthernet0/0/0]
  12. [R2-GigabitEthernet0/0/0]q
  13. [R2]un in en
  14. Info: Information center is disabled.
  15. [R2]int g0/0/1
  16. [R2-GigabitEthernet0/0/1]ip ad 200.10.20.1 28
  17. [R2-GigabitEthernet0/0/1]

R1:

  1. R1]dh
  2. [R1]dhcp en
  3. [R1]dhcp enable
  4. Info: The operation may take a few seconds. Please wait for a moment.done.
  5. [R1]ip poo
  6. [R1]ip pool vlan10
  7. Info: It's successful to create an IP address pool.
  8. [R1-ip-pool-vlan10]netw
  9. [R1-ip-pool-vlan10]network 192.168.10.0 ma
  10. [R1-ip-pool-vlan10]network 192.168.10.0 mask 24
  11. [R1-ip-pool-vlan10]g
  12. [R1-ip-pool-vlan10]gateway-list 192.168.10.254
  13. [R1-ip-pool-vlan10]dns
  14. [R1-ip-pool-vlan10]dns-list 114.114.114.114
  15. [R1-ip-pool-vlan10]q
  16. [R1]ip poo
  17. [R1]ip pool vlan
  18. [R1]ip pool vlan20
  19. Info: It's successful to create an IP address pool.
  20. [R1-ip-pool-vlan20]netw
  21. [R1-ip-pool-vlan20]network 192.168.20.0 ma
  22. [R1-ip-pool-vlan20]network 192.168.20.0 mask 24
  23. [R1-ip-pool-vlan20]g
  24. [R1-ip-pool-vlan20]gateway-list 192.168.20.254
  25. [R1-ip-pool-vlan20]dns
  26. [R1-ip-pool-vlan20]dns-list 114.114.114.114
  27. [R1-ip-pool-vlan20]ex
  28. [R1-ip-pool-vlan20]excluded-ip-address 192.168.20.1 192.168.20.100
  29. [R1-ip-pool-vlan20]q
  30. [R1]ip pooo
  31. [R1]ip poo
  32. [R1]ip pool valn
  33. [R1]ip pool va
  34. [R1]ip pool vla
  35. [R1]ip pool vlan30
  36. Info: It's successful to create an IP address pool.
  37. [R1-ip-pool-vlan30]netw
  38. [R1-ip-pool-vlan30]network 192.168.30.0 ma
  39. [R1-ip-pool-vlan30]network 192.168.30.0 mask 24
  40. [R1-ip-pool-vlan30]g
  41. [R1-ip-pool-vlan30]gateway-list 192.168.30.254
  42. [R1-ip-pool-vlan30]dns
  43. [R1-ip-pool-vlan30]dns-list 114.114.114.114
  44. [R1-ip-pool-vlan30]ex
  45. [R1-ip-pool-vlan30]excluded-ip-address 192.168.30.1
  46. [R1-ip-pool-vlan30]q
  47. [R1]ip poo
  48. [R1]ip pool vlan
  49. [R1]ip pool vlan40
  50. Info: It's successful to create an IP address pool.
  51. [R1-ip-pool-vlan40]netw
  52. [R1-ip-pool-vlan40]network 192.168.40.0 ma
  53. [R1-ip-pool-vlan40]network 192.168.40.0 mask 24
  54. [R1-ip-pool-vlan40]g
  55. [R1-ip-pool-vlan40]gateway-list 192.168.40.254
  56. [R1-ip-pool-vlan40]dns
  57. [R1-ip-pool-vlan40]dns-list 114.114.114.114
  58. [R1-ip-pool-vlan40]ex
  59. [R1-ip-pool-vlan40]excluded-ip-address 192.168.40.1
  60. [R1-ip-pool-vlan40]q
  61. [R1]ip poo
  62. [R1]ip pool vlan50
  63. Info: It's successful to create an IP address pool.
  64. [R1-ip-pool-vlan50]netw
  65. [R1-ip-pool-vlan50]network 192.168.50.0 ma
  66. [R1-ip-pool-vlan50]network 192.168.50.0 mask 24
  67. [R1-ip-pool-vlan50]g
  68. [R1-ip-pool-vlan50]gateway-list 192.168.50.254
  69. [R1-ip-pool-vlan50]dns
  70. [R1-ip-pool-vlan50]dns-list 114.114.114.114
  71. [R1-ip-pool-vlan50]ex
  72. [R1-ip-pool-vlan50]excluded-ip-address 192.168.50.1
  73. [R1-ip-pool-vlan50]q
  74. [R1]ip pool vlan60
  75. Info: It's successful to create an IP address pool.
  76. [R1-ip-pool-vlan60]netw
  77. [R1-ip-pool-vlan60]network 192.168.60.0 ma
  78. [R1-ip-pool-vlan60]network 192.168.60.0 mask 24
  79. [R1-ip-pool-vlan60]g
  80. [R1-ip-pool-vlan60]gateway-list 192.168.60.254
  81. [R1-ip-pool-vlan60]dns
  82. [R1-ip-pool-vlan60]dns-list 114.114.114.114
  83. [R1-ip-pool-vlan60]ex
  84. [R1-ip-pool-vlan60]excluded-ip-address 192.168.60.1
  85. [R1-ip-pool-vlan60]q
  86. [R1]

Sw1配置dhcp:

  1. <sw1>
  2. <sw1>
  3. <sw1>
  4. <sw1>sys
  5. Enter system view, return user view with Ctrl+Z.
  6. [sw1]
  7. [sw1]ip pool vlan10
  8. Info:It's successful to create an IP address pool.
  9. [sw1-ip-pool-vlan10]netw
  10. [sw1-ip-pool-vlan10]network 192.168.10.0 ma
  11. [sw1-ip-pool-vlan10]network 192.168.10.0 mask 24
  12. [sw1-ip-pool-vlan10]g
  13. [sw1-ip-pool-vlan10]gateway-list 192.168.10.252
  14. [sw1-ip-pool-vlan10]dns
  15. [sw1-ip-pool-vlan10]dns-list 114.114.114.114
  16. [sw1-ip-pool-vlan10]ex
  17. [sw1-ip-pool-vlan10]excluded-ip-address 192.168.10.100 192.168.10.150
  18. [sw1-ip-pool-vlan10]dhc
  19. [sw1-ip-pool-vlan10]q
  20. [sw1]int vl
  21. [sw1]int Vlanif 10
  22. [sw1-Vlanif10]dhcp select global
  23. [sw1-Vlanif10]q
  24. [sw1]ip poo
  25. [sw1]ip pool vlan
  26. [sw1]ip pool vlan20
  27. Info:It's successful to create an IP address pool.
  28. [sw1-ip-pool-vlan20]netw
  29. [sw1-ip-pool-vlan20]network 192.168.20.0 ma
  30. [sw1-ip-pool-vlan20]network 192.168.20.0 mask 24
  31. [sw1-ip-pool-vlan20]g
  32. [sw1-ip-pool-vlan20]gateway-list 192.168.20.252
  33. [sw1-ip-pool-vlan20]dns
  34. [sw1-ip-pool-vlan20]dns-list 114.114.114.114
  35. [sw1-ip-pool-vlan20]ex
  36. [sw1-ip-pool-vlan20]excluded-ip-address 192.168.20.100 192.168.20.150
  37. [sw1-ip-pool-vlan20]q
  38. [sw1]int vlan
  39. [sw1]int Vlanif 20
  40. [sw1-Vlanif20]dhcp select global
  41. [sw1-Vlanif20]q
  42. [sw1]
  43. [sw1]ip pool vlan30
  44. Info:It's successful to create an IP address pool.
  45. [sw1-ip-pool-vlan30]netw
  46. [sw1-ip-pool-vlan30]network 192.168.30.0 mask 24
  47. [sw1-ip-pool-vlan30]g
  48. [sw1-ip-pool-vlan30]gateway-list 192.168.30.252
  49. [sw1-ip-pool-vlan30]dns
  50. [sw1-ip-pool-vlan30]dns-list 114.114.114.114
  51. [sw1-ip-pool-vlan30]ex
  52. [sw1-ip-pool-vlan30]excluded-ip-address 192.168.30.100 192.168.30.150
  53. [sw1-ip-pool-vlan30]q
  54. [sw1]int v
  55. [sw1]int Vlanif 30
  56. [sw1-Vlanif30]dhcp select global
  57. [sw1-Vlanif30]q
  58. [sw1]ip poo
  59. [sw1]ip pool vlan
  60. [sw1]ip pool vlan40
  61. Info:It's successful to create an IP address pool.
  62. [sw1-ip-pool-vlan40]network 192.168.40.0 mask 24
  63. [sw1-ip-pool-vlan40]dns
  64. [sw1-ip-pool-vlan40]dns-list 114.114.114.114
  65. [sw1-ip-pool-vlan40]g
  66. [sw1-ip-pool-vlan40]gateway-list 192.168.40.252
  67. [sw1-ip-pool-vlan40]ex
  68. [sw1-ip-pool-vlan40]excluded-ip-address 192.168.40.100 192.168.40.150
  69. [sw1-ip-pool-vlan40]q
  70. [sw1]int v
  71. [sw1]int Vlanif 40
  72. [sw1-Vlanif40]dhcp select global
  73. [sw1-Vlanif40]q
  74. [sw1]ip poo
  75. [sw1]ip pool v
  76. [sw1]ip pool vlan
  77. [sw1]ip pool vlan50
  78. Info:It's successful to create an IP address pool.
  79. [sw1-ip-pool-vlan50]network 192.168.50.0 mask 24
  80. [sw1-ip-pool-vlan50]g
  81. [sw1-ip-pool-vlan50]gateway-list 192.168.50.252
  82. [sw1-ip-pool-vlan50]dns
  83. [sw1-ip-pool-vlan50]dns-list 114.114.114.114
  84. [sw1-ip-pool-vlan50]ex
  85. [sw1-ip-pool-vlan50]excluded-ip-address 192.168.50.100 192.168.50.150
  86. [sw1-ip-pool-vlan50]q
  87. [sw1]int v
  88. [sw1]int Vlanif 50
  89. [sw1-Vlanif50]dhcp select global
  90. [sw1-Vlanif50]q
  91. [sw1]int vlan
  92. [sw1]ip poo
  93. [sw1]ip pool v
  94. [sw1]ip pool vlan60
  95. Info:It's successful to create an IP address pool.
  96. [sw1-ip-pool-vlan60]netw
  97. [sw1-ip-pool-vlan60]network 192.168.60.0 ma
  98. [sw1-ip-pool-vlan60]network 192.168.60.0 mask 24
  99. [sw1-ip-pool-vlan60]g
  100. [sw1-ip-pool-vlan60]gateway-list 192.168.60.252
  101. [sw1-ip-pool-vlan60]dns
  102. [sw1-ip-pool-vlan60]dns-list 114.114.114.114
  103. [sw1-ip-pool-vlan60]ex
  104. [sw1-ip-pool-vlan60]excluded-ip-address 192.168.60.100 192.168.60.150
  105. [sw1-ip-pool-vlan60]q
  106. [sw1]int v
  107. [sw1]int Vlanif 60
  108. [sw1-Vlanif60]dhcp select global
  109. [sw1-Vlanif60]q
  110. [sw1]

Sw2dhcp配置:

The device is running!

  1. <sw2>sys
  2. Enter system view, return user view with Ctrl+Z.
  3. [sw2]ip poo
  4. [sw2]ip pool vlan
  5. [sw2]ip pool vlan10
  6. Info:It's successful to create an IP address pool.
  7. [sw2-ip-pool-vlan10]network 192.168.10.0 mask 24
  8. [sw2-ip-pool-vlan10]g
  9. [sw2-ip-pool-vlan10]gateway-list 192.168.10.252
  10. [sw2-ip-pool-vlan10]dns
  11. [sw2-ip-pool-vlan10]dns-list 114.114.114.114
  12. [sw2-ip-pool-vlan10]ex
  13. [sw2-ip-pool-vlan10]excluded-ip-address 192.168.10.100 192.168.10.150
  14. [sw2-ip-pool-vlan10]q
  15. [sw2]int v
  16. [sw2]int Vlanif 10
  17. [sw2-Vlanif10]dhcp select global
  18. Error: Please enable DHCP in the global view first.
  19. [sw2-Vlanif10]q
  20. [sw2]dh
  21. [sw2]dhcp enn
  22. [sw2]dhcp en
  23. [sw2]int Vlanif 10
  24. [sw2-Vlanif10]dhcp select global
  25. [sw2-Vlanif10]q
  26. [sw2]ip poo
  27. [sw2]ip pool vlan
  28. [sw2]ip pool vlan20
  29. Info:It's successful to create an IP address pool.
  30. [sw2-ip-pool-vlan20]network 192.168.20.0 mask 24
  31. [sw2-ip-pool-vlan20]dns
  32. [sw2-ip-pool-vlan20]dns-list 114.114.114.114
  33. [sw2-ip-pool-vlan20]dns
  34. [sw2-ip-pool-vlan20]dns-list 114.114.114.114
  35. Error:Part of the domain-name-server IP has already exist.
  36. [sw2-ip-pool-vlan20]dis
  37. [sw2-ip-pool-vlan20]display th
  38. [sw2-ip-pool-vlan20]display this
  39. #
  40. ip pool vlan20
  41. network 192.168.20.0 mask 255.255.255.0
  42. dns-list 114.114.114.114
  43. #
  44. return
  45. [sw2-ip-pool-vlan20]g
  46. [sw2-ip-pool-vlan20]gateway-list 192.168.20.252
  47. [sw2-ip-pool-vlan20]ex
  48. [sw2-ip-pool-vlan20]excluded-ip-address 192.168.20.100 192.168.20.150
  49. [sw2-ip-pool-vlan20]q
  50. [sw2]int v
  51. [sw2]int Vlanif 20
  52. [sw2-Vlanif20]dh
  53. [sw2-Vlanif20]dhcp se
  54. [sw2-Vlanif20]dhcp select g
  55. [sw2-Vlanif20]dhcp select global
  56. [sw2-Vlanif20]q
  57. [sw2]ip poo
  58. [sw2]ip pool v
  59. [sw2]ip pool vlan30
  60. Info:It's successful to create an IP address pool.
  61. [sw2-ip-pool-vlan30]network 192.168.30.0 mask 24
  62. [sw2-ip-pool-vlan30]dns
  63. [sw2-ip-pool-vlan30]dns-list 114.114.114.114
  64. [sw2-ip-pool-vlan30]g
  65. [sw2-ip-pool-vlan30]gateway-list 192.168.30.252
  66. [sw2-ip-pool-vlan30]ex
  67. [sw2-ip-pool-vlan30]excluded-ip-address 192.168.30.100 192.168.30.150
  68. [sw2-ip-pool-vlan30]q
  69. [sw2]int v
  70. [sw2]int Vlanif 30
  71. [sw2-Vlanif30]dhcp select global
  72. [sw2-Vlanif30]q
  73. [sw2]ip pool vlan40
  74. Info:It's successful to create an IP address pool.
  75. [sw2-ip-pool-vlan40]network 192.168.40.0 mask 24
  76. [sw2-ip-pool-vlan40]g
  77. [sw2-ip-pool-vlan40]gateway-list 192.168.40.252
  78. [sw2-ip-pool-vlan40]dns
  79. [sw2-ip-pool-vlan40]dns-list 114.114.114.114
  80. [sw2-ip-pool-vlan40]ex
  81. [sw2-ip-pool-vlan40]excluded-ip-address 192.168.40.100 192.168.40.150
  82. [sw2-ip-pool-vlan40]q
  83. [sw2]int v
  84. [sw2]int Vlanif 40
  85. [sw2-Vlanif40]dhcp select global
  86. [sw2-Vlanif40]q
  87. [sw2]ip poo
  88. [sw2]ip pool v
  89. [sw2]ip pool vlan50
  90. Info:It's successful to create an IP address pool.
  91. [sw2-ip-pool-vlan50]netw
  92. [sw2-ip-pool-vlan50]network 192.168.50.0ma
  93. [sw2-ip-pool-vlan50]network 192.168.50.0 ma
  94. [sw2-ip-pool-vlan50]network 192.168.50.0 mask 24
  95. [sw2-ip-pool-vlan50]g
  96. [sw2-ip-pool-vlan50]gateway-list 192.168.50.252
  97. [sw2-ip-pool-vlan50]dns
  98. [sw2-ip-pool-vlan50]dns-list 114.114.114.114.
  99. ^
  100. Error: Wrong parameter found at '^' position.
  101. [sw2-ip-pool-vlan50]dns-list 114.114.114.114
  102. [sw2-ip-pool-vlan50]ex
  103. [sw2-ip-pool-vlan50]excluded-ip-address 192.168.50.100 192.168.50.150
  104. [sw2-ip-pool-vlan50]q
  105. [sw2]int v
  106. [sw2]int Vlanif 50
  107. [sw2-Vlanif50]dh
  108. [sw2-Vlanif50]dhcp se
  109. [sw2-Vlanif50]dhcp select g
  110. [sw2-Vlanif50]dhcp select global
  111. [sw2-Vlanif50]q
  112. [sw2]ip pool vlan60
  113. Info:It's successful to create an IP address pool.
  114. [sw2-ip-pool-vlan60]netw
  115. [sw2-ip-pool-vlan60]network 192.168.60.0 ma
  116. [sw2-ip-pool-vlan60]network 192.168.60.0 mask 24
  117. [sw2-ip-pool-vlan60]g
  118. [sw2-ip-pool-vlan60]gateway-list 192.168.60.252
  119. [sw2-ip-pool-vlan60]dns
  120. [sw2-ip-pool-vlan60]dns-list 114.114.114.114
  121. [sw2-ip-pool-vlan60]ex
  122. [sw2-ip-pool-vlan60]excluded-ip-address 192.168.60.100 192.168.60.150
  123. [sw2-ip-pool-vlan60]q
  124. [sw2]int v
  125. [sw2]int Vlanif 60
  126. [sw2-Vlanif60]dh
  127. [sw2-Vlanif60]dhcp se
  128. [sw2-Vlanif60]dhcp select g
  129. [sw2-Vlanif60]dhcp select global
  130. [sw2-Vlanif60]q
  131. [sw2]

Telnet远程控制:

R2:

  1. [R2]int v
  2. [R2]int vt
  3. [R2]us
  4. [R2]user-i
  5. [R2]user-interface v
  6. [R2]user-interface vty 0 4(进入vty模式)
  7. [R2-ui-vty0-4]au
  8. [R2-ui-vty0-4]authentication-mode pa
  9. [R2-ui-vty0-4]authentication-mode password (进入配置密码)
  10. Please configure the login password (maximum length 16):wanglong
  11. [R2-ui-vty0-4]us
  12. [R2-ui-vty0-4]user l
  13. [R2-ui-vty0-4]user le
  14. [R2-ui-vty0-4]user pr
  15. [R2-ui-vty0-4]user privilege l
  16. [R2-ui-vty0-4]user privilege level 3(设置权限)
  17. [R2-ui-vty0-4]
  18. [R2-ui-vty0-4]
  19. R1:

结果:

R1:

  1. [R1]us
  2. [R1]user-in
  3. [R1]user-interface v
  4. [R1]user-interface vty 0 4
  5. [R1-ui-vty0-4]au
  6. [R1-ui-vty0-4]authentication-mode pa
  7. [R1-ui-vty0-4]authentication-mode password si
  8. [R1-ui-vty0-4]authentication-mode password s
  9. [R1-ui-vty0-4]authentication-mode password
  10. Please configure the login password (maximum length 16):wanglong
  11. [R1-ui-vty0-4]us
  12. [R1-ui-vty0-4]user p
  13. [R1-ui-vty0-4]user privilege l
  14. [R1-ui-vty0-4]user privilege level 3
  15. [R1-ui-vty0-4]q
  16. [R1]

Sw14:

  1. <Huawei>
  2. <Huawei>sys
  3. Enter system view, return user view with Ctrl+Z.
  4. [Huawei]int g
  5. [Huawei]int GigabitEthernet 0/0/1
  6. [Huawei-GigabitEthernet0/0/1]dis
  7. [Huawei-GigabitEthernet0/0/1]display th
  8. [Huawei-GigabitEthernet0/0/1]display this
  9. #
  10. interface GigabitEthernet0/0/1
  11. #
  12. return
  13. [Huawei-GigabitEthernet0/0/1]q
  14. [Huawei]po
  15. [Huawei]port lin
  16. [Huawei]int g
  17. [Huawei]int GigabitEthernet 0/0/1
  18. [Huawei-GigabitEthernet0/0/1]port link-type access
  19. [Huawei-GigabitEthernet0/0/1]port default vlan 10
  20. May 17 2022 16:14:41-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
  21. .25.191.3.1 configurations have been changed. The current change number is 4, th
  22. e change loop count is 0, and the maximum number of records is 4095.
  23. [Huawei-GigabitEthernet0/0/1]port default vlan 10
  24. Error: The VLAN does not exist.
  25. [Huawei-GigabitEthernet0/0/1]q
  26. [Huawei]vlan 10
  27. [Huawei-vlan10]q
  28. [Huawei]int g
  29. May 17 2022 16:15:01-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
  30. .25.191.3.1 configurations have been changed. The current change number is 5, th
  31. e change loop count is 0, and the maximum number of records is 4095.
  32. [Huawei]int GigabitEthernet 0/0/1
  33. [Huawei-GigabitEthernet0/0/1]port link-type access
  34. [Huawei-GigabitEthernet0/0/1]port default vlan 10
  35. [Huawei-GigabitEthernet0/0/1]
  36. May 17 2022 16:15:28-08:00 Huawei %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif1 h
  37. as turned into DOWN state.
  38. [Huawei-GigabitEthernet0/0/1]
  39. May 17 2022 16:15:31-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
  40. .25.191.3.1 configurations have been changed. The current change number is 6, th
  41. e change loop count is 0, and the maximum number of records is 4095.int
  42. [Huawei-GigabitEthernet0/0/1]int vlan10
  43. [Huawei-Vlanif10]
  44. May 17 2022 16:15:41-08:00 Huawei %%01IFNET/4/IF_STATE(l)[1]:Interface Vlanif10
  45. has turned into UP state.
  46. [Huawei-Vlanif10]ip address 10.1.1.2 24
  47. [Huawei-Vlanif10]
  48. May 17 2022 16:15:58-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
  49. IP on the interface Vlanif10 has entered the UP state.
  50. May 17 2022 16:16:01-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
  51. .25.191.3.1 configurations have been changed. The current change number is 7, th
  52. e change loop count is 0, and the maximum number of records is 4095.
  53. [Huawei-Vlanif10]q
  54. [Huawei]user-interface vty 0 4
  55. [Huawei-ui-vty0-4]authentication-mode password
  56. [Huawei-ui-vty0-4]set authentication password simple wanglong
  57. [Huawei-ui-vty0-4]q
  58. [Huawei]
  59. May 17 2022 16:17:12-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
  60. .25.191.3.1 configurations have been changed. The current change number is 8, th
  61. e change loop count is 0, and the maximum number of records is 4095.
  62. [Huawei]

测试结果都没有问题主要实现了远程控制,动态路由,DHCP,无线,防火墙,服务器集群的配置,网络规划,服务器的配置和设置后续发,有问题或者想要拓扑图的留邮箱就行,本人也才大学,不太会写,想讨论的可以说,也可以留下问题。


本文转载自: https://blog.csdn.net/qq_62466609/article/details/125030330
版权归原作者 WXWJCJ 所有, 如有侵权,请联系我们删除。

“用ENSP华为模拟器组建一个完整的校园网”的评论:

还没有评论