Top

NSD NETWORK DAY06

  1. 案例:综合网络搭建

1 案例:综合网络搭建

1.1 问题

现有网络问题分析:

现有网络需求:

1.2 方案

基于项目的需求,需要用到如下技术:

重新规划后的网络拓扑如图-1:

图-1

1.3 步骤

实现此案例需要按照如下步骤进行,为了配置过程中不被弹出信息干扰,可以关闭信息提示

步骤一:S3700交换机配置

  1. SW1配置
  2. <Huawei>system-view
  3. [Huawei]vlan batch 10 20 30 40
  4. [Huawei]port-group 1
  5. [Huawei-port-group-1]group-member Ethernet 0/0/1 to Ethernet 0/0/2
  6. [Huawei-port-group-1]port link-type trunk
  7. [Huawei-port-group-1]port trunk allow-pass vlan all
  8. [Huawei-port-group-1]quit
  9.  
  10. [Huawei]interface Ethernet 0/0/5
  11. [Huawei-Ethernet0/0/5] port link-type access
  12. [Huawei-Ethernet0/0/5] port default vlan 10
  13.  
  14.  
  15. SW2配置
  16. <Huawei>system-view
  17. [Huawei]vlan batch 10 20 30 40
  18. [Huawei]port-group 1
  19. [Huawei-port-group-1]group-member Ethernet 0/0/1 to Ethernet 0/0/2
  20. [Huawei-port-group-1]port link-type trunk
  21. [Huawei-port-group-1]port trunk allow-pass vlan all
  22. [Huawei-port-group-1]quit
  23.  
  24. [Huawei]interface Ethernet 0/0/5
  25. [Huawei-Ethernet0/0/5] port link-type access
  26. [Huawei-Ethernet0/0/5] port default vlan 20
  27.  
  28. SW3配置
  29. <Huawei>system-view
  30. [Huawei]vlan batch 10 20 30 40
  31. [Huawei]port-group 1
  32. [Huawei-port-group-1]group-member Ethernet 0/0/1 to Ethernet 0/0/2
  33. [Huawei-port-group-1]port link-type trunk
  34. [Huawei-port-group-1]port trunk allow-pass vlan all
  35. [Huawei-port-group-1]quit
  36.  
  37. [Huawei]interface Ethernet 0/0/5
  38. [Huawei-Ethernet0/0/5] port link-type access
  39. [Huawei-Ethernet0/0/5] port default vlan 30
  40.  
  41. SW4配置
  42. <Huawei>system-view
  43. [Huawei]vlan batch 10 20 30 40
  44. [Huawei]port-group 1
  45. [Huawei-port-group-1]group-member Ethernet 0/0/1 to Ethernet 0/0/2
  46. [Huawei-port-group-1]port link-type trunk
  47. [Huawei-port-group-1]port trunk allow-pass vlan all
  48. [Huawei-port-group-1]quit
  49.  
  50. [Huawei]interface Ethernet 0/0/5
  51. [Huawei-Ethernet0/0/5] port link-type access
  52. [Huawei-Ethernet0/0/5] port default vlan 40

步骤二:S5700交换机配置

  1. MS1配置
  2.  
  3. <Huawei>system-view
  4. [Huawei]vlan batch 10 20 30 40 50 60
  5. [Huawei]port-group 1
  6. [Huawei-port-group-1]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/5
  7. [Huawei-port-group-1]port link-type trunk
  8. [Huawei-port-group-1]port trunk allow-pass vlan all
  9. [Huawei-port-group-1]quit
  10.  
  11. [Huawei]interface Vlanif 10
  12. [Huawei-Vlanif10]ip address 192.168.10.252 24
  13. [Huawei-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254
  14. [Huawei-Vlanif10]vrrp vrid 1 priority 110
  15. [Huawei]interface Vlanif 20
  16. [Huawei-Vlanif20]ip address 192.168.20.252 24
  17. [Huawei-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.254
  18. [Huawei-Vlanif20]vrrp vrid 2 priority 110
  19.  
  20. [Huawei]interface Vlanif 30
  21. [Huawei-Vlanif30]ip address 192.168.30.252 24
  22. [Huawei-Vlanif30]vrrp vrid 3 virtual-ip 192.168.30.254
  23. [Huawei]interface Vlanif 40
  24. [Huawei-Vlanif40]ip address 192.168.40.252 24
  25. [Huawei-Vlanif40]vrrp vrid 4 virtual-ip 192.168.40.254
  26.  
  27. [Huawei]interface Vlanif 50
  28. [Huawei-Vlanif50]ip address 192.168.50.2 24
  29. [Huawei]interface GigabitEthernet 0/0/23
  30. [Huawei-GigabitEthernet0/0/23]port link-type access
  31. [Huawei-GigabitEthernet0/0/23]port default vlan 50
  32.  
  33. [Huawei]interface Vlanif 60
  34. [Huawei-Vlanif60]ip address 192.168.60.2 24
  35. [Huawei]interface GigabitEthernet 0/0/24
  36. [Huawei-GigabitEthernet0/0/24]port link-type access
  37. [Huawei-GigabitEthernet0/0/24]port default vlan 60
  38.  
  39.  
  40. [Huawei]ospf    
  41. [Huawei-ospf-1]area 0
  42. [Huawei-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
  43. [Huawei-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
  44. [Huawei-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255
  45. [Huawei-ospf-1-area-0.0.0.0]network 192.168.40.0 0.0.0.255
  46. [Huawei-ospf-1-area-0.0.0.0]network 192.168.50.0 0.0.0.255
  47. [Huawei-ospf-1-area-0.0.0.0]network 192.168.60.0 0.0.0.255
  48.  
  49. MS2配置
  50. <Huawei>system-view
  51. [Huawei]vlan batch 10 20 30 40 70 80
  52. [Huawei]port-group 1
  53. [Huawei-port-group-1]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/5
  54. [Huawei-port-group-1]port link-type trunk
  55. [Huawei-port-group-1]port trunk allow-pass vlan all
  56. [Huawei-port-group-1]quit
  57.  
  58. [Huawei]interface Vlanif 10
  59. [Huawei-Vlanif10]ip address 192.168.10.253 24
  60. [Huawei-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254
  61. [Huawei]interface Vlanif 20
  62. [Huawei-Vlanif20]ip address 192.168.20.253 24
  63. [Huawei-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.254
  64.  
  65. [Huawei]interface Vlanif 30
  66. [Huawei-Vlanif30]ip address 192.168.30.253 24
  67. [Huawei-Vlanif30]vrrp vrid 3 virtual-ip 192.168.30.254
  68. [Huawei-Vlanif20]vrrp vrid 3 priority 110
  69. [Huawei]interface Vlanif 40
  70. [Huawei-Vlanif40]ip address 192.168.40.253 24
  71. [Huawei-Vlanif40]vrrp vrid 4 virtual-ip 192.168.40.254
  72. [Huawei-Vlanif20]vrrp vrid 4 priority 110
  73.  
  74. [Huawei]interface Vlanif 70
  75. [Huawei-Vlanif70]ip address 192.168.70.2 24
  76. [Huawei]interface GigabitEthernet 0/0/23
  77. [Huawei-GigabitEthernet0/0/23]port link-type access
  78. [Huawei-GigabitEthernet0/0/23]port default vlan 70
  79.  
  80. [Huawei]interface Vlanif 80
  81. [Huawei-Vlanif80]ip address 192.168.80.2 24
  82. [Huawei]interface GigabitEthernet 0/0/24
  83. [Huawei-GigabitEthernet0/0/24]port link-type access
  84. [Huawei-GigabitEthernet0/0/24]port default vlan 80
  85.  
  86. [Huawei]ospf    
  87. [Huawei-ospf-1]area 0
  88. [Huawei-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
  89. [Huawei-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
  90. [Huawei-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255
  91. [Huawei-ospf-1-area-0.0.0.0]network 192.168.40.0 0.0.0.255
  92. [Huawei-ospf-1-area-0.0.0.0]network 192.168.70.0 0.0.0.255
  93. [Huawei-ospf-1-area-0.0.0.0]network 192.168.80.0 0.0.0.255

然后测试目前网络是否可以达成全网互通

步骤三:路由器配置

按图-2为路由器与三层交换机相连的接口配置ip

注:50.1表示ip需要配置为192.168.50.1

图-2

  1. R1
  2. <Huawei>system-view
  3. [Huawei]acl 2000    
  4. [Huawei-acl-basic-2000]rule permit source any
  5. [Huawei]interface GigabitEthernet 0/0/0
  6. [Huawei-GigabitEthernet0/0/0]ip address 192.168.50.1 24
  7. [Huawei]interface GigabitEthernet 0/0/1
  8. [Huawei-GigabitEthernet0/0/1]ip address 192.168.70.1 24
  9. [Huawei]interface GigabitEthernet 0/0/2
  10. [Huawei-GigabitEthernet0/0/2]ip address 100.0.0.1 8
  11. [Huawei-GigabitEthernet0/0/2]nat outbound 2000
  12. [Huawei-GigabitEthernet0/0/2]quit
  13. [Huawei]ip route-static 0.0.0.0 0 100.0.0.10
  14.  
  15. [Huawei]ospf
  16. [Huawei-ospf-1]default-route-advertise //对外通告默认路由
  17. [Huawei-ospf-1]area 0
  18. [Huawei-ospf-1-area-0.0.0.0]network 192.168.50.0 0.0.0.255
  19. [Huawei-ospf-1-area-0.0.0.0]network 192.168.70.0 0.0.0.255
  20.  
  21. R2
  22. <Huawei>system-view
  23. [Huawei]acl 2000    
  24. [Huawei-acl-basic-2000]rule permit source any
  25. [Huawei]interface GigabitEthernet 0/0/0
  26. [Huawei-GigabitEthernet0/0/0]ip address 192.168.60.1 24
  27. [Huawei]interface GigabitEthernet 0/0/1
  28. [Huawei-GigabitEthernet0/0/1]ip address 192.168.80.1 24
  29. [Huawei]interface GigabitEthernet 0/0/2
  30. [Huawei-GigabitEthernet0/0/2]ip address 100.0.0.2 8
  31. [Huawei-GigabitEthernet0/0/0]nat outbound 2000
  32. [Huawei-GigabitEthernet0/0/2]quit
  33. [Huawei]ip route-static 0.0.0.0 0 100.0.0.10
  34.  
  35. [Huawei]ospf
  36. [Huawei-ospf-1]default-route-advertise
  37. [Huawei-ospf-1]area 0
  38. [Huawei-ospf-1-area-0.0.0.0]network 192.168.60.0 0.0.0.255
  39. [Huawei-ospf-1-area-0.0.0.0]network 192.168.80.0 0.0.0.255

三层交换机如果看不到从路由器学习来的默认路由就去检查路由器G0/2地址是否配置,之后验证从内网可以访问外网设备,ping通证明项目升级成功