华为交换机配置DHCP, NAT, 互联vlan

eNSP 华为交换机配置DHCP, NAT, 互联vlan

Ⅰ: 网络拓扑图
在这里插入图片描述
Ⅱ:配置部分
PC1-2-3-4: 地址获取选择DHCP
SW2:

sysname Huawei
undo info-center enable
vlan batch 10 20
#
interface Eth-Trunk0
 port link-type trunk
 port trunk allow-pass vlan 10 20
 #
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/1
 eth-trunk 0
interface GigabitEthernet0/0/2
 eth-trunk 0
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 10
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 20
 #
interface GigabitEthernet0/0/5
 eth-trunk 1
 #
interface GigabitEthernet0/0/6
 eth-trunk 1

SW3:

sysname Huawei
undo info-center enable
vlan batch 10 20
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface Eth-Trunk2
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 10
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 20
#
interface GigabitEthernet0/0/3
 eth-trunk 2
#
interface GigabitEthernet0/0/4
 eth-trunk 2
#
interface GigabitEthernet0/0/5
 eth-trunk 1
#
interface GigabitEthernet0/0/6
 eth-trunk 1

SW1:

#
sysname Huawei
#
undo info-center enable
#
vlan batch 10 20 195
#
dhcp enable
#
ip pool 1
 gateway-list 192.168.1.1
 network 192.168.1.0 mask 255.255.255.0
 excluded-ip-address 192.168.1.200 192.168.1.254
 dns-list 8.8.8.8
#
ip pool 2
 gateway-list 192.168.2.1
 network 192.168.2.0 mask 255.255.255.0
 excluded-ip-address 192.168.2.200 192.168.2.254
 dns-list 8.8.8.8
#
interface Vlanif10
 ip address 192.168.1.1 255.255.255.0
 dhcp select global
#
interface Vlanif20
 ip address 192.168.2.1 255.255.255.0
 dhcp select global
#
interface Vlanif195
 ip address 195.1.1.1 255.255.255.0
#
interface Eth-Trunk0
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface Eth-Trunk2
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/1
 eth-trunk 0
#
interface GigabitEthernet0/0/2
 eth-trunk 0
#
interface GigabitEthernet0/0/3
 eth-trunk 2
#
interface GigabitEthernet0/0/4
 eth-trunk 2
#
interface GigabitEthernet0/0/5
 port link-type access
 port default vlan 195

AR3:

#
 undo info-center enable
#
acl number 2000  
 rule 5 permit source 192.168.1.0 0.0.0.255 
 rule 10 permit source 192.168.2.0 0.0.0.255 
#
 nat address-group 1 60.1.1.2 60.1.1.10
#
interface GigabitEthernet0/0/0
 ip address 195.1.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 60.1.1.1 255.255.255.0 
 nat outbound 2000 address-group 1 
 / nat outbound 2000 , 表示从该端口出,共用端口IP 地址//
 / nat static global 192.168.1.0 inside 60.1.1.1 , 静态端口配置///
#
interface NULL0
#
ip route-static 192.168.1.0 255.255.255.0 195.1.1.1
ip route-static 192.168.2.0 255.255.255.0 195.1.1.1
#

R3:

#
sysname Huawei
#
undo info-center enable
#
interface Ethernet0/0/0
 ip address 60.1.1.100 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 60.1.1.1
#

Ⅲ 验证部分:
PC1:

ping 60.1.1.100
Ping 60.1.1.100: 32 data bytes, Press Ctrl_C to break
From 60.1.1.100: bytes=32 seq=1 ttl=253 time=203 ms
From 60.1.1.100: bytes=32 seq=2 ttl=253 time=62 ms
From 60.1.1.100: bytes=32 seq=3 ttl=253 time=94 ms
From 60.1.1.100: bytes=32 seq=4 ttl=253 time=94 ms
From 60.1.1.100: bytes=32 seq=5 ttl=253 time=93 ms
--- 60.1.1.100 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 62/109/203 ms

R3:

[Huawei]ping 192.168.2.199
  PING 192.168.2.199: 56  data bytes, press CTRL_C to break
    Reply from 192.168.2.199: bytes=56 Sequence=1 ttl=126 time=130 ms
    Reply from 192.168.2.199: bytes=56 Sequence=2 ttl=126 time=90 ms
    Reply from 192.168.2.199: bytes=56 Sequence=3 ttl=126 time=110 ms
    Reply from 192.168.2.199: bytes=56 Sequence=4 ttl=126 time=90 ms
    Reply from 192.168.2.199: bytes=56 Sequence=5 ttl=126 time=90 ms
<p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(255,0,0);">本课程为帮主自主研发的独门课程,根据对实际工作中的使用情况、**版HCIA考试大纲、HCIA考试题库题目的研究把课程分为6大模块,将近30个知识点</span><strong><span style="color:rgb(255,0,0);">【更加注重的实际运用】,</span></strong><span style="color:rgb(255,0,0);">分别如下</span><strong><span style="color:rgb(255,0,0);">:</span></strong> </p> <p style="color:rgb(66,66,66);font-size:14px;"><strong><span style="color:rgb(255,0,0);">------------------------<br /></span></strong> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,112,192);"><strong>【第一模块:组建简单的网络】</strong></span><span style="color:rgb(0,112,192);"><br /></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">(初识网络,OSI参考模型讲解,TCP/IP协议栈上,TCP/IP协议栈下,IP地址子网划分,华为设备管理与配置)</span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">-------------------------------<br /></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span><strong><span style="color:rgb(0,112,192);">【第二模块:组建中型的路由网络】</span></strong></span><span><strong><span style="color:rgb(0,112,192);"></span></strong></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">(路由协议原理讲解,静态路由讲解与配置,RIP路由协议讲解与配置,OSPF路由协议讲解与配置)</span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">--------------------------------<br /></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span><strong><span style="color:rgb(0,112,192);">【第三模块:组建中型的交换网络】</span></strong></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">(交换机VLAN讲解,交换与STP讲解与配置,交换与VTP讲解与配置交换机链路聚合讲解与配置vlan间路由讲解与配置,端口安全讲解与配置)</span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">---------------------------------<br /></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span><strong><span style="color:rgb(0,112,192);">【第四模块:组建高效易用的网络】</span></strong></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">(DHCP讲解与配置,DNS讲解与配置,Syslog 讲解与配置,SNMP讲解与配置,NTP讲解与配置,Wireless网络构建与配置)</span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">---------------------------------<br /></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span><strong><span style="color:rgb(0,112,192);">【第五模块:组建安全的网络架构】</span></strong></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">(ACL讲解与配置,防火墙讲解与配置,AAA讲解与配置)</span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">---------------------------------<br /></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span><strong><span style="color:rgb(0,112,192);">【第六模块:连接到广域网链路】</span></strong></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">(初识广域网PPP,HDLC,PPPOE,NAT讲解与配置,IPv6讲解与配置,GRE讲解与配置)</span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">----------------------------------<br /></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span><strong><span style="color:rgb(0,112,192);">【第七模块:组建高可用的网络】</span></strong></span><span><strong><span style="color:rgb(0,112,192);"></span></strong></span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);">(VRRP讲解与配置,SDN讲解与配置,Vxlan讲解与配置)</span> </p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(0,176,80);"></span>-------------------------------- </p> <p style="color:rgb(66,66,66);font-size:14px;"><br /></p> <p style="color:rgb(66,66,66);font-size:14px;"><span style="color:rgb(192,0,0);"><strong>在这里,我不仅仅让每一位学员可以顺利通过考试,更多的是带给学员实际工作中最为常用的知识,课程中详细讲解每一个知识点的原理,并利用实验加以辅证,在课程中一直对学员强调:一定要掌握每个知识点的原理,我们不追求对命令的熟悉程度,因为我们知道我们学完该课程在实际工作中未必就一定接触的是思科的产品,所以命令再熟悉也不能体现个人的能力和价值,要想在工作中很好的体现自我价值,体现个人的能力和魅力,一定要将原理性的东西烂熟于心,否则本末倒置,得不偿失。好好学习,我会全力以赴让你赢在起跑线上。请相信我,也请相信你自己,加油!!!</strong></span> </p>
相关推荐
©️2020 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页