欢迎光临
我们一直在努力

华为 eNSP 大型企业总分部网络综合实验(NAT+Telnet + 服务器访问)

实验需求:

  • 总分部出口路由器配置 NAT,内网 PC 可 ping 通对端外网接口;
  • 总分部、互联网用户均可访问内网 WEB 服务器;
  • 网管 VLAN200:10.1.200.0/24,模拟网管设备 Telnet 管理接入、汇聚、核心交换机。
  • 📍IP&VLAN 规划

    表格

    设备VLANIP 地址网关
    PC1 VLAN11 172.16.1.253/24 172.16.1.254
    PC2 VLAN12 172.16.2.253/24 172.16.2.254
    Server1 (内部服务器) VLAN13 172.16.3.253/24 172.16.3.254
    AR1 模拟网管 VLAN14 172.16.4.253/24 172.16.4.254
    PC4 VLAN15 172.16.5.253/24 172.16.5.254
    Client1 VLAN16 172.16.6.253/24 172.16.6.254
    SW‑ACC 接入 VLAN200 管理 10.1.200.1/24
    SW‑AGG1 汇聚 VLAN200 管理 10.1.200.2/24
    SW‑CORE1 核心 VLAN200 管理 10.1.200.254/24
    核心互联 VLAN100 VLAN100 172.16.100.0/24
    核心互联 VLAN101 VLAN101 172.16.101.0/24

    外网:

    • AR2 总部出口外网:202.96.10.0/24
    • AR5 分部出口外网:202.96.20.0/24
    • ISP1:202.96.10.2、202.96.20.1、113.100.10.1

    1、接入交换机 SW‑ACC

    sysname SW-ACC
    vlan batch 11 12 200
    #PC1
    interface Ethernet0/0/1
    port link-type access
    port default vlan 11
    #PC2
    interface Ethernet0/0/2
    port link-type access
    port default vlan 12
    #上联汇聚Trunk
    interface GigabitEthernet0/0/1
    port link-type trunk
    port trunk allow-pass vlan 11 12 200

    #管理VLANIF200
    interface Vlanif200
    ip address 10.1.200.1 255.255.255.0
    #默认路由指向汇聚管理地址
    ip route-static 0.0.0.0 0.0.0.0 10.1.200.2

    #Telnet AAA配置
    aaa
    local-user admin password cipher 123456
    local-user admin privilege level 15
    local-user admin service-type telnet
    quit
    user-interface vty 0 4
    authentication-mode aaa
    quit

    2、汇聚交换机 SW‑AGG1

    sysname SW-AGG1
    vlan batch 11 12 200 100
    #下联接入Trunk
    interface GigabitEthernet0/0/2
    port link-type trunk
    port trunk allow-pass vlan 11 12 200
    #上联核心Trunk
    interface GigabitEthernet0/0/1
    port link-type trunk
    port trunk allow-pass vlan 11 12 100 200

    #业务网关
    interface Vlanif11
    ip address 172.16.1.254 255.255.255.0
    interface Vlanif12
    ip address 172.16.2.254 255.255.255.0
    interface Vlanif100
    ip address 172.16.100.1 255.255.255.0
    #管理VLANIF200
    interface Vlanif200
    ip address 10.1.200.2 255.255.255.0

    #路由
    ip route-static 0.0.0.0 0.0.0.0 172.16.100.2
    ip route-static 10.1.200.254 255.255.255.255 172.16.100.2

    #Telnet AAA
    aaa
    local-user admin password cipher 123456
    local-user admin privilege level 15
    local-user admin service-type telnet
    quit
    user-interface vty 0 4
    authentication-mode aaa
    quit

    3、核心交换机 SW‑CORE1

    sys
    sysname SW-CORE1
    vlan batch 11 12 13 14 100 101 200
    #下联汇聚Trunk
    interface GigabitEthernet0/0/1
    port link-type trunk
    port trunk allow-pass vlan 11 12 100 200
    #连接AR1模拟网管路由器
    interface GigabitEthernet0/0/19
    port link-type trunk
    port trunk allow-pass vlan 14
    #接入内部服务器Server1
    interface GigabitEthernet0/0/0
    port link-type access
    port default vlan 13
    #上联总部出口AR2
    interface GigabitEthernet0/0/3
    port link-type access
    port de vlan 101

    #VLANIF网关
    interface Vlanif11
    ip address 172.16.1.254 255.255.255.0
    interface Vlanif12
    ip address 172.16.2.254 255.255.255.0
    interface Vlanif13
    ip address 172.16.3.254 255.255.255.0
    interface Vlanif14
    ip address 172.16.4.254 255.255.255.0
    interface Vlanif100
    ip address 172.16.100.2 255.255.255.0
    interface Vlanif101
    ip address 172.16.101.2 255.255.255.0
    interface Vlanif200
    ip address 10.1.200.254 255.255.255.0

    #静态路由
    ip route-static 172.16.1.0 255.255.255.0 172.16.100.1
    ip route-static 172.16.2.0 255.255.255.0 172.16.100.1
    ip route-static 0.0.0.0 0.0.0.0 172.16.101.1

    #Telnet AAA
    aaa
    local-user admin password cipher 123456
    local-user admin privilege level 15
    local-user admin service-type telnet
    quit
    user-interface vty 0 4
    authentication-mode aaa
    quit

    4、AR1(模拟网管路由器)

    sys
    sysname AR1
    interface GigabitEthernet0/0/1 #不考虑子接口的情况下
    ip address 172.16.4.253 24

    #访问网管VLAN200
    ip route-static 10.1.200.0 255.255.255.0 172.16.4.254

    5、AR2(总部出口路由器,NAT + 服务器映射)

    sysname AR2
    #对接核心交换机
    interface GigabitEthernet0/0/1
    ip address 172.16.101.1 255.255.255.0
    #对接ISP1外网口
    interface GigabitEthernet0/0/0
    ip address 202.96.10.1 255.255.255.0

    #NAT感兴趣流,整个企业内网网段
    acl number 3000
    rule permit ip source 172.16.0.0 0.0.255.255
    #NAT地址池
    nat address-group 1 202.96.10.10 202.96.10.20
    interface GigabitEthernet0/0/0
    nat outbound 3000 address-group 1 no-pat
    #NAT Server,外网访问内部服务器Server1 172.16.3.253
    nat server protocol tcp global 202.96.10.30 80 inside 172.16.3.253 80

    #路由
    ip route-static 172.16.0.0 255.255.0.0 172.16.101.2
    ip route-static 0.0.0.0 0.0.0.0 202.96.10.2

    6、ISP1 运营商路由器

    sysname ISP1
    interface GigabitEthernet0/0/0
    ip address 202.96.10.2 255.255.255.0
    interface GigabitEthernet0/0/2
    ip address 202.96.20.1 255.255.255.0
    interface GigabitEthernet0/0/1
    ip address 113.100.10.1 255.255.255.0

    #回指企业内网路由
    ip route-static 172.16.0.0 255.255.0.0 202.96.10.1

    7、AR5(分部出口路由器,NAT)

    sysname AR5
    #对接ISP1
    interface GigabitEthernet0/0/0
    ip address 202.96.20.2 255.255.255.0
    #对接分部交换机LSW3
    interface GigabitEthernet0/0/1
    ip address 172.16.5.254 255.255.255.0

    acl number 3000
    rule permit ip source 172.16.5.0 0.0.0.255
    rule permit ip source 172.16.6.0 0.0.0.255
    nat address-group 1 202.96.20.10 202.96.20.20
    interface GigabitEthernet0/0/0
    nat outbound 3000 address-group 1 no-pat

    #路由
    ip route-static 0.0.0.0 0.0.0.0 202.96.20.1
    ip route-static 172.16.0.0 255.255.0.0 202.96.20.1

    8、SW3 分部交换机

    sys
    sysname SW3
    vlan batch 15 16

    #PC4
    interface g0/0/1
    port link-type access
    port default vlan 15

    #Client1
    interface g0/0/2
    port link-type access
    port default vlan 16

    #上联AR5分部出口
    interface g0/0/19
    port link-type trunk
    port trunk allow-pass vlan 15 16

    interface Vlanif15
    ip address 172.16.5.254 255.255.255.0
    interface Vlanif16
    ip address 172.16.6.254 255.255.255.0

    9、ISP2 互联网路由器(可选)

    sysname ISP2
    interface GigabitEthernet0/0/0
    ip address 113.100.10.2 255.255.255.0
    interface GigabitEthernet0/0/2
    ip address 113.100.30.254 255.255.255.0
    interface GigabitEthernet0/0/1
    ip address 113.100.20.254 255.255.255.0

    ip route-static 0.0.0.0 0.0.0.0 113.100.10.1

    ✅实验验证

  • Telnet 网管测试:AR1(172.16.4.253)执行telnet 10.1.200.1,账号admin密码123456;依次登录接入、汇聚、核心交换机。


    SW-ACC


    SW-AGG1


    SW-CORE1

  • NAT 互通测试:总部 PC1 ping 分部外网口202.96.20.2;分部 PC4 ping 总部外网口202.96.10.1,通表示 NAT 配置正常。
  • WEB 服务器访问:
    • 内网 PC 直接访问172.16.3.253;
    • 互联网 PC 访问公网映射地址202.96.10.30;
    • 分部 PC4 也可以访问内网服务器。
  • 💡注意点:

  • 路由器二层口命令portlink‑mode layer2,eNSP 中 AR 系列路由器接口切换二层模式;
  • no‑pat 为多地址 NAT,也可替换为 easy‑ip;
  • Telnet 明文不安全,生产环境替换 SSH;
  • PC 和服务器关闭防火墙,开启 HTTP 服务。
  • 赞(0)
    未经允许不得转载:171主机测评 » 华为 eNSP 大型企业总分部网络综合实验(NAT+Telnet + 服务器访问)
    分享到: 更多 (0)

    评论 抢沙发

    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址