华为eNSP——综合实验(静态NAT+动态NAT+EasyIP)

文章目录

  • 一、实验环境
  • 二、实验目的
  • 三、实验步骤
    • SW1
    • R1
    • R2

一、实验环境

3台路由器,1台交换机,4台PC机,1台服务器,1个云端服务器

二、实验目的

全网互通

三、实验步骤

华为eNSP——综合实验(静态NAT+动态NAT+EasyIP)_第1张图片

SW1

<Huawei>u t m	
<Huawei>system-view 	
[Huawei]sysname SW1
[SW1]v b 10 20 30 40
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]p l a
[SW1-GigabitEthernet0/0/1]p d v 10
[SW1-GigabitEthernet0/0/1]un sh
[SW1-GigabitEthernet0/0/1]q
[SW1]u t m
[SW1]int g0/0/2
[SW1-GigabitEthernet0/0/2]p l a
[SW1-GigabitEthernet0/0/2]p d v 20
[SW1-GigabitEthernet0/0/2]
[SW1]int g0/0/3
[SW1-GigabitEthernet0/0/3]p l a
[SW1-GigabitEthernet0/0/3]p d v 30
[SW1-GigabitEthernet0/0/3]un sh
[SW1-GigabitEthernet0/0/3]q
[SW1]int g0/0/2
[SW1-GigabitEthernet0/0/2]un sh
[SW1-GigabitEthernet0/0/2]q
[SW1]int g0/0/4
[SW1-GigabitEthernet0/0/4]p l a
[SW1-GigabitEthernet0/0/4]p d v 20
[SW1-GigabitEthernet0/0/4]un sh
[SW1-GigabitEthernet0/0/4]q
[SW1]int g0/0/5
[SW1-GigabitEthernet0/0/5]p l a
[SW1-GigabitEthernet0/0/5]p d v 40
[SW1-GigabitEthernet0/0/5]un sh
[SW1-GigabitEthernet0/0/5]q
[SW1]int g0/0/6
[SW1-GigabitEthernet0/0/6]p l a
[SW1-GigabitEthernet0/0/6]p d v 10
[SW1-GigabitEthernet0/0/6]un sh
[SW1-GigabitEthernet0/0/6]q
[SW1]int Vlanif 10
[SW1-Vlanif10]ip add 192.168.10.1 24
[SW1-Vlanif10]un sh
[SW1-Vlanif10]q	
[SW1]int Vlanif 20
[SW1-Vlanif20]ip add 192.168.20.1 24
[SW1-Vlanif20]un sh
[SW1-Vlanif20]q
[SW1]int Vlanif 30
[SW1-Vlanif30]ip add 192.168.30.1 24
[SW1-Vlanif30]un sh
[SW1-Vlanif30]q
[SW1]int Vlanif 40
[SW1-Vlanif40]ip add 11.0.0.2 24
[SW1-Vlanif40]un sh
[SW1-Vlanif40]q
[SW1]ip route-static 0.0.0.0 0.0.0.0 11.0.0.1

R1

<Huawei>u t m	
<Huawei>system-view 	
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 11.0.0.1 24
[R1-GigabitEthernet0/0/0]un sh
[R1-GigabitEthernet0/0/0]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 12.0.0.1 24
[R1-GigabitEthernet0/0/1]un sh
[R1-GigabitEthernet0/0/1]q	
[R1]ip route-static 192.168.10.0 24 11.0.0.2
[R1]ip route-static 192.168.20.0 24 11.0.0.2
[R1]ip route-static 192.168.30.0 24 11.0.0.2	
[R1]ip route-static 0.0.0.0 0.0.0.0 12.0.0.2	
[R1]nat static global 8.8.8.8 inside 192.168.10.10
[R1]int GigabitEthernet 0/0/1	
[R1-GigabitEthernet0/0/1]nat static enable 
[R1-GigabitEthernet0/0/1]q
[R1]nat address-group 1 212.0.0.100 212.0.0.200
[R1]acl 2000	
[R1-acl-basic-2000]rule permit source 192.168.20.0 0.0.0.255	
[R1-acl-basic-2000]rule permit source 11.0.0.0 0.0.0.255
[R1-acl-basic-2000]int g0/0/1	
[R1-GigabitEthernet0/0/1]nat outbound 2000 address-group 1 no-pat 
[R1-GigabitEthernet0/0/1]q
[R1]acl 3000	
[R1-acl-adv-3000]rule permit ip source 192.168.30.0 0.0.0.255
[R1-acl-adv-3000]int g0/0/1	
[R1-GigabitEthernet0/0/1]nat outbound 3000
[R1-GigabitEthernet0/0/1]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]nat server protocol tcp global 9.9.9.9 www inside 192.1
68.10.100 www

R2

<Huawei>u t m	
<Huawei>system-view 	
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[R2-GigabitEthernet0/0/0]un sh
[R2-GigabitEthernet0/0/0]q
[R2]int loo 0
[R2-LoopBack0]ip add 114.114.114.114 32
[R2]ip route-static 8.8.8.8 32 12.0.0.1	
[R2]ip route-static 212.0.0.0 24 12.0.0.1
[R2]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 13.0.0.1 24
[R2-GigabitEthernet0/0/2]un sh
[R2-GigabitEthernet0/0/2]q	
[R2]ip route-static 9.9.9.9 255.255.255.255 12.0.0.1

你可能感兴趣的:(NAT,网络,实验)