• ENSP网络综合实验(WALN+隧道+NAT)


    实验拓扑 https://wwa.lanzoub.com/ivTyH0w8vz6d 

    设备接入、汇聚交换机(S3700、S5700)、路由器(AR3200)为例。

    • 接入层:用户角色包括员工(接入方式包括有线和无线)和访客(仅能通过无线接入),办公WIFI密码认证,访客WIFI无认证。

    • 汇聚层:交换机链路聚合的方式,实现链路冗余。LSW1作为无线网络、AP管理网络的DHCP三层服务器,集中部署的方案。
    • 核心层:有线接入网络的DHCP中继服务器。设置访问流量静态路由,实现不同角色的用户的网络访问权限。
    • 员工家里主机PC1通过mac地址绑定 ,获取特定的IP地址访问公网。默认通过PPPOE、NAT实现隧道、访问公网。当拨号网络失效、切换链路,此时只能实现隧道。
    • 实现隧道协议实现跨公网访问。

    配置流程

    步骤

    配置思路

    配置基础网络互通

    1.配置链路聚合、IP地址、VLAN划分

    配置汇聚交换机和AC

    2. AP、AC上线。

    3. 配置三层VLAN网络。

    4. 配置DHCP中继。

    配置核心交换机


     

    6. 有线网络接入DHCP服务器。

    7.运行隧道协议、设置静态路由控制l流量进出。

    配置运营商网络

    8.配置PPPOE参数。

    配置员家里网络9.指定PC1获取的IP地址。
    10.运行隧道协议.设置静态路由控制l流量进出。

    VLAN业务数据划分 

    设备

    项目

    VLAN ID

    网段

    LSW1\ACLSW1、AC的互通VLANVLAN 88192.168.88.0/24

    LSW1

    LSW2

    LSW3

    AP的管理VLAN

    VLAN 100

    10.1.100.0/24

    无线用户的业务VLAN

    VLAN 102(office)

    10.1.102.0/24

    VLAN 101(Guest)

    10.1.101.0/24

    有线用户的业务VLAN

    VLAN 77

    10.1.77.0/24
    LSW1

    连接核心层的网段

    VLAN 99

     192.168.99.0/24

     AC无线业务数据规划

    项目

    员工

    访客

    安全模板

    sec2:WPA/WPA2-802.1X认证

    sec1:开放认证(缺省的安全策略)

    SSID模板

    ssid1:office

    ssid2:guest

    AP组

    ap-group1

    域管理模板

    domain1

    业务数据转发模式

    隧道直接转发模式

    VAP模板

    vap-office

    vap-guest

    配置步骤

    1.配置链路聚合、VLAN划分、IP地址。

    链路聚合

    1. 要求.LSW1、LSW2.LSW3链路聚合最大活跃数量1、端口号大的作为主链路。
    2. 相关配置命令
    3. trunk号有:121323 (其他同理)
    4. [LSW2]interface Eth-Trunk 12
    5. [LSW2-Eth-Trunk12]display this
    6. #
    7. interface Eth-Trunk12
    8. port link-type trunk
    9. port trunk allow-pass vlan 2 to 4094
    10. mode lacp-static
    11. lacp preempt enable
    12. max active-linknumber 1
    13. lacp preempt delay 10
    14. #
    15. interface GigabitEthernet0/0/1
    16. eth-trunk 12
    17. #
    18. interface GigabitEthernet0/0/2
    19. eth-trunk 12
    20. lacp priority 100
    21. #

     验证

     2.VLAN划分

    1. 1.链路多个vlan运行使用trunk、单个vlan运行使用access
    2. VLAN 88 99 分别是AC互通VLAN、上层核心互通VLAN
    3. [LSW1]display port vlan
    4. [LSW1]int g0/0/24
    5. [LSW1-GigabitEthernet0/0/24]display this
    6. #
    7. interface GigabitEthernet0/0/24
    8. port link-type access
    9. port default vlan 99
    10. #
    11. interface GigabitEthernet0/0/10
    12. port link-type access
    13. port default vlan 88
    14. #
    15. 2. LSW2、LSW3VLAN划分(相同)
    16. 有线接入VLAN77、无线接入VLAN101(访客)、VLAN101(办公室)
    17. AP有AC的管理VLAN100控制、业务数据流VLAN101\102、链路多个VLAN运行使用trunk
    18. #
    19. interface GigabitEthernet0/0/7
    20. port link-type access
    21. port default vlan 77
    22. #
    23. interface GigabitEthernet0/0/8
    24. port link-type access
    25. port default vlan 77
    26. #
    27. interface GigabitEthernet0/0/9
    28. #
    29. interface GigabitEthernet0/0/10
    30. port link-type trunk
    31. port trunk pvid vlan 100
    32. port trunk allow-pass vlan 2 to 4094
    33. #
    34. 3.AC也有VLAN划分
    35. [AC6005-GigabitEthernet0/0/1]dis this
    36. #
    37. interface GigabitEthernet0/0/1
    38. port link-type access
    39. port default vlan 88
    40. #

    3.IP地址

    1. Cloud云(模拟访问公网)
    2. IP地址设为61.128.1.10 /24 网关61.128.1.254 /24
    3. 方法:http://t.csdn.cn/hDuN0
    display ip interface brief

    配置汇聚交换机和AC

    AC/AP上线

    1. 1.S5700与AC6005互通的路由
    2. [AC6005]ip route-static 0.0.0.00.0.0.0 192.168.88.1
    3. 2、配置AP管理VLAN100(AP获取地址)
    4. DHCP option43字段主要是用来:AP可通过DHCP的Option 43属性直接获取无线控制器的IP地址,
    5. 从而完成在AC无线控制器上的注册。
    6. #
    7. ip pool vlan100
    8. gateway-list 10.1.100.1
    9. network 10.1.100.0 mask 255.255.255.0
    10. excluded-ip-address 10.1.100.2 10.1.100.45
    11. option 43 sub-option 2 ip-address 192.168.88.2
    12. #
    13. interface Vlanif100
    14. ip address 10.1.100.1 255.255.255.0
    15. dhcp select global
    16. #
    17. 2、配置无线业务 VLAN101102(用户获取地址)
    18. #
    19. ip pool vlan101
    20. gateway-list 10.1.101.1
    21. network 10.1.101.0 mask 255.255.255.0
    22. excluded-ip-address 10.1.101.240 10.1.101.254
    23. dns-list 114.114.114.114
    24. #
    25. interface Vlanif101
    26. ip address 10.1.101.1 255.255.255.0
    27. dhcp select global
    28. #
    29. interface Vlanif102
    30. ip address 10.1.102.1 255.255.255.0
    31. dhcp select global
    32. #
    33. ip pool vlan102
    34. gateway-list 10.1.102.1
    35. network 10.1.102.0 mask 255.255.255.0
    36. excluded-ip-address 10.1.102.250 10.1.102.254
    37. dns-list 114.114.114.114
    38. #
    39. 3、配置AP在AC上线
    40. 步骤1
    41. 在AC6005上创建域管理模板,名称为domain1,配置AC的国家码为中国CN,
    42. 然后创建AP组ap-group1,绑定域管理模板domain1到AP组ap-group1
    43. [AC6005]wlan
    44. regulatory-domain-profile name domain1
    45. country-code cn
    46. quit
    47. ap-group name ap-group1
    48. regulatory-domain-profile domain1
    49. 步骤2:配置AC的源接口(AC所在的VLAN)
    50. [AC6005]capwap source interface Vlanif 88
    51. 步骤3:配置AP认证方式
    52. MAC认证地址
    53. [LSW2]dis int g0/0/8 查看AP获得的硬件地址。
    54. [AC6005]wlan
    55. ap auth-mode mac-auth
    56. ap-mac 4c1f-ccb6-6e71 ap-id 0
    57. ap-group ap-group1
    58. quit
    59. ap-mac 4c1f-ccfa-3470 ap-id 1
    60. ap-group ap-group1
    61. 4、配置安全模板
    62. 步骤1:配置安全模板,名称为security-1,为open (访客)
    63. 名称为security-2,为WPA加密,密码是xxxxx。(办公室)
    64. [AC6005-wlan-view]security-profile name security-1
    65. security open
    66. quit
    67. security-profile name security-1
    68. security wpa psk pass-phrase xxxxxx aes
    69. 步骤2:配置SSID模板,名称为ssid-0,Ssid guest
    70. 名称为ssid-1配置SSID模板:名称为office。
    71. [AC6005]wlan
    72. ssid-profile name ssid-0
    73. ssid guest
    74. quit
    75. ssid-profile name ssid-1
    76. ssid office
    77. 步骤3:配置VAP模板
    78. vap-guest,设置转发方式为直接转发,设置无线业务VLAN为101
    79. 并绑定安全模板security-1和SSID模板ssid-0
    80. vap-office,设置转发方式为直接转发,设置无线业务VLAN为102
    81. 并绑定安全模板security-2和SSID模板ssid-1
    82. [AC6005]wlan
    83. vap-profile name vap-guest
    84. forward-mode direct
    85. service-vlan vlan-id 101
    86. security-profile security-1
    87. ssid-profile ssid-0
    88. quit
    89. vap-profile name vap-office
    90. forward-mode direct
    91. service-vlan vlan-id 102
    92. security-profile security-2
    93. ssid-profile ssid-1
    94. 步骤4:绑定两个VAP模板到AP组
    95. [AC6005]wlan
    96. ap-group name ap-group1
    97. vap-profile vap-guest wlan 1 radio all
    98. vap-profilevap-office wlan 2 radio all

     

     配置核心交换机

     

    有线网络接入DHCP服务器

    1. 1.LSW1配置去核心交换机的路由,以及中继VLAN77
    2. #
    3. interface Vlanif77
    4. ip address 10.1.77.1 255.255.255.0
    5. dhcp select relay
    6. dhcp relay server-ip 192.168.99.1
    7. #
    8. ip route-static 0.0.0.0 0.0.0.0 192.168.99.1
    9. #
    10. 2.AR1核心路由器创建地址池,以及回程路由,
    11. 排除的路由是固定终端IP的地址例如client、监控
    12. #
    13. ip pool vlan77
    14. gateway-list 10.1.77.1
    15. network 10.1.77.0 mask 255.255.255.0
    16. excluded-ip-address 10.1.77.10 10.1.77.15
    17. dns-list 114.114.114.114
    18. #
    19. ip route-static 10.1.77.0 255.255.255.0 192.168.99.2
    20. #

    运行隧道协议

    1. 1.AR1创建tunel隧道
    2. #
    3. interface Tunnel0/0/1
    4. ip address 50.1.1.1 255.255.255.0
    5. tunnel-protocol gre
    6. source 20.1.1.1
    7. destination 30.1.1.1
    8. #
    1. 设置静态路由控制流量进出
    2. 1.去往公网的IP地址的默认路由
    3. 2.去往员工家里的隧道路由
    4. 无线接入用户无法访问ftp、公网、核心层。
    5. #
    6. ip route-static 0.0.0.0 0.0.0.0 20.1.1.2
    7. ip route-static 192.168.0.0 255.255.255.0 Tunnel0/0/1 50.1.1.2
    8. #

     配置运营商网络

     

    PPPOE链路实现隧道、公网访问。

    固定链路只能实现隧道。

    当拨号网络链路失效、切换到固定链路g/0/0。

    PPPOE拨号 

    1. 1.AR2作为PPPoe的服务端提供认证、下发地址。
    2. #
    3. ip pool pppoe
    4. network 123.1.1.0 mask 255.255.255.0
    5. excluded-ip-address 123.1.1.250 123.1.1.252
    6. dns-list 114.114.114.114
    7. #
    8. interface Virtual-Template1
    9. ppp authentication-mode chap
    10. remote address pool pppoe
    11. ip address 123.1.1.1 255.255.255.0
    12. #
    13. interface GigabitEthernet0/0/2
    14. pppoe-server bind Virtual-Template 1
    15. #
    16. local-user test password cipher 你的密码
    17. local-user test service-type ppp
    18. #
    19. 2.AR3作为PPPoe的客户端挑战认证。
    20. #
    21. interface Dialer1
    22. link-protocol ppp
    23. ppp chap user test
    24. ppp chap password cipher 密码
    25. ip address ppp-negotiate
    26. dialer user test
    27. dialer bundle 1
    28. #
    29. #
    30. interface GigabitEthernet0/0/2
    31. pppoe-client dial-bundle-number 1
    32. #

    AR3实现链路切换 

    1. 1.当实际g0/0/2链路出现问题、dialer虚拟链路也失效。
    2. 2.默认dialer访问。
    3. #
    4. interface Dialer1
    5. dialer number 1 autodial
    6. #
    7. ip route-static 0.0.0.0 0.0.0.0 30.1.1.2
    8. ip route-static 0.0.0.0 0.0.0.0 Dialer1 preference 59
    9. #

    员工家里

    指定主机PC1获取的IP地址

    1. 绑定mac地址对应的IP地址
    2. PC1的mac地址54-89-98-A9-70-8A
    3. AR3
    4. #
    5. ip pool 1
    6. gateway-list 192.168.0.254
    7. network 192.168.0.0 mask 255.255.255.0
    8. static-bind ip-address 192.168.0.253 mac-address 5489-98a9-708a
    9. dns-list 114.114.114.114
    10. #
    11. interface GigabitEthernet0/0/1
    12. ip address 192.168.0.254 255.255.255.0
    13. dhcp select global
    14. #

     运行隧道协议、控制流量进出

    1. 1.AR3隧道协议、只能访问公司主机VLAN77
    2. #
    3. interface Tunnel0/0/0
    4. ip address 50.1.1.2 255.255.255.0
    5. tunnel-protocol gre
    6. source 30.1.1.1
    7. destination 20.1.1.1
    8. #
    9. ip route-static 10.1.77.0 255.255.255.0 Tunnel0/0/0
    10. #
    11. 2.ACL抓取PC1的IP地址,NAT访问公网
    12. #
    13. acl number 2000
    14. rule 5 permit source 192.168.0.253 0
    15. #
    16. interface Dialer1
    17. nat outbound 2000
    18. #

    结果验证 

    1、PC1/PC2   ping  通 10.1.77.0/24(公司主机)

          PC4           ping  通  192.168.0.253(员工家里)

    2、PC1           ping  通   61.128.1.10  (公网)

          int g0/0/2    shutdown   ping 不通公网

    3、Clinet4       可以访问ftp服务器 (公司)

          PC3/4        ping 通   192.168.77.1 (公司ftp)

    实验.zip - 蓝奏云    导入实验配置(.cfg)

    wifi密码admin123

     缓解焦虑最好的方法:每天感觉自己有输入有输出。

  • 相关阅读:
    交互式电子表格Baserow
    论文代码测试
    Activity生命周期递归问题查看
    索引【MySQL】
    深度学习部署
    Openstack云计算架构及前期服务搭建
    【使用 Python 实现算法】01 语言特性
    Java有根儿:Class文件以及类加载器
    jsp195ssm饭店餐饮管理系统hsg6034AHA5
    边用边充电影响寿命吗?看看计算机指令组成与操作类型
  • 原文地址:https://blog.csdn.net/qq_56095985/article/details/130675499