华为路由交换由浅入深系列(十二):ENSP2.0模拟NAT+Firewall+DNS+DHCP功能 | 网络之路博客(公众号同名)(其他平台网络之路Blog)
登录
  • 欢迎网络之路博客网站,分享有用的知识点,公众号:网络之路博客,B站:网络之路Blog
  • 如果您觉得本站对您有帮助,那么赶紧使用Ctrl+D 收藏吧,支持我们下
  • 远程技术支持的淘宝店铺已经开张了哦,传送门:需要的朋友可以点击查看

华为路由交换由浅入深系列(十二):ENSP2.0模拟NAT+Firewall+DNS+DHCP功能

【汇总】华为路由交换由浅入深系列

文档帖子汇总学习视频实战系列学习必备软件
    博主也只是业余时间写写技术文档,请大家见谅,大家觉得不错的话,可以推荐给朋友哦,博主会努力推出更好的系列文档的。如果大家有任何疑问或者文中有错误跟疏忽的地方,欢迎大家留言指出,博主看到后会第一时间修改,谢谢大家的支持,更多技术文章尽在网络之路博客,http://ccieh3c.com

说明

ENSP2.0模拟NAT+Firewall+DNS+DHCP功能,主要涉及在华为路由器上面,如何实现防火墙特性、NATDNSDHCP功能。

掌握目标

1、路由器DHCP客户端配置(模拟PC)
2、防火墙特性配置
3、NAT配置
4、DNSDHCP的配置掌握

一、实验拓扑:

huawei

二、PC的配置

#
sysname PC
dhcp enable
dns resolve
dns server 8.8.8.8
#
interface GigabitEthernet0/0/0
ip address dhcp-alloc

三、网关路由器的配置

#
sysname GW
#
dhcp enable
dns resolve
dns server 8.8.8.8
#
acl number 3000
rule 5 permit ip source 192.168.10.0 0.0.0.255
acl number 3001
rule 5 deny icmp icmp-type echo
rule 10 permit ip
#
firewall zone trust
priority 10
#
firewall zone untrust
priority 5
#
firewall zone Local
priority 15
#
firewall interzone trust untrust
firewall enable
packet-filter 3001 inbound
detect aspf ftp
detect aspf sip
detect aspf rtsp
detect aspf http
detect aspf http java-blocking
detect aspf http activex-blocking
#
interface GigabitEthernet0/0/0
ip address 192.168.10.1 255.255.255.0
zone trust
dhcp select interface
dhcp server dns-list 8.8.8.8
#
interface GigabitEthernet0/0/1
ip address 211.1.1.2 255.255.255.0
nat outbound 3000
zone untrust
#
ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet0/0/1 211.1.1.1
#
user-interface vty 0 4
authentication-mode password
set authentication password cipher huawei
user privilege level 3

四、公网路由器的配置

#
sysname INTERNET
#
ip host www.baidu.com 100.100.100.100
ip host www.google.com 200.200.200.200
#
dns resolve
dns server 8.8.8.8
dns proxy enable
#
interface GigabitEthernet0/0/0
ip address 211.1.1.1 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 100.100.100.100 255.255.255.0
#
interface LoopBack1
ip address 200.200.200.200 255.255.255.0
#
interface LoopBack100
ip address 8.8.8.8 255.255.255.0
#
user-interface vty 0 4
authentication-mode password
set authentication password cipher huawei
user privilege level 3
#

五、测试PC上网

ping www.google.com
PING www.google.com: 56 data bytes, press CTRL_C to break
Reply from 200.200.200.200: bytes=56 Sequence=1 ttl=254 time=20 ms
Reply from 200.200.200.200: bytes=56 Sequence=2 ttl=254 time=20 ms
Reply from 200.200.200.200: bytes=56 Sequence=3 ttl=254 time=10 ms
Reply from 200.200.200.200: bytes=56 Sequence=4 ttl=254 time=10 ms
Reply from 200.200.200.200: bytes=56 Sequence=5 ttl=254 time=30 ms
— www.google.com ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/18/30 ms

telnet www.baidu.com
Press CTRL_] to quit telnet mode
Trying 100.100.100.100 …
Connected to 100.100.100.100 …
Login authentication
Password:huawei
dis access-user
Info: No online user.

dis ip inter bri
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 211.1.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
LoopBack0 100.100.100.100/24 up up(s)
LoopBack1 200.200.200.200/24 up up(s)
LoopBack100 8.8.8.8/24 up up(s)
NULL0 unassigned up up(s)

六、测试网关的状态

[GW]dis nat session all
NAT Session Table Information:
Protocol : ICMP(1)
SrcAddr Vpn : 192.168.10.254
DestAddr Vpn : 200.200.200.200
Type Code IcmpId : 0 8 43997
NAT-Info
New SrcAddr : 211.1.1.2
New DestAddr : —-
New IcmpId : 10255
Protocol : TCP(6)
SrcAddr Port Vpn : 192.168.10.254 46273
DestAddr Port Vpn : 100.100.100.100 5888
NAT-Info
New SrcAddr : 211.1.1.2
New SrcPort : 10253
New DestAddr : —-
New DestPort : —-
Protocol : UDP(17)
SrcAddr Port Vpn : 192.168.10.254 7109
DestAddr Port Vpn : 8.8.8.8 13568
NAT-Info

[GW]dis firewall session all
Firewall Session Table Information:
Protocol : TCP(6)
SrcAddr Port Vpn : 192.168.10.254 46273
DestAddr Port Vpn : 100.100.100.100 5888
Firewall-Info
InZone : trust
OutZone : untrust
Protocol : UDP(17)
SrcAddr Port Vpn : 192.168.10.254 7109
DestAddr Port Vpn : 8.8.8.8 13568
Firewall-Info
InZone : trust
OutZone : untrust
Protocol : UDP(17)
SrcAddr Port Vpn : 192.168.10.254 2245
DestAddr Port Vpn : 8.8.8.8 13568
Firewall-Info
InZone : trust
OutZone : untrust
Protocol : UDP(17)
SrcAddr Port Vpn : 192.168.10.254 33990
DestAddr Port Vpn : 8.8.8.8 13568
Firewall-Info
InZone : trust
OutZone : untrust
Protocol : UDP(17)
SrcAddr Port Vpn : 192.168.10.254 4806
DestAddr Port Vpn : 8.8.8.8 13568
Firewall-Info
InZone : trust
OutZone : untrust
Protocol : UDP(17)
SrcAddr Port Vpn : 192.168.10.254 4038
DestAddr Port Vpn : 8.8.8.8 13568
Firewall-Info
InZone : trust
OutZone : untrust
Protocol : TCP(6)
SrcAddr Port Vpn : 192.168.10.254 21700
DestAddr Port Vpn : 100.100.100.100 5888
Firewall-Info

下载对应文档

百度盘下载博客资源汇总与学习思路
如果下载地址失效,请联系博主或者在下面留言,谢谢。下面也有其他您需要的资源推荐哦

关于博客资源下载说明

首先,感谢大家对网络之路博客的支持,本站所有资源都是开放下载,不做任何限制,资源都是上传在百度盘,分为两种类型:
(1)第一种是书籍PDF与视频类,全部放在博客分享,觉得对大家学习有帮助的博主会收集好、然后以博主的经验整理分类后排序好分享出来。
(2)第二种是技术性文章与视频,全部放在公众号(网络之路博客)/B站(网络之路Blog)发布,以博主原创为主,主要分享系列为主,由浅入深的带大家了解工作中常用到的一些网络技术,当然也会分享一些比较经典的案例。
(3)分享资源有涉及到您的利益以及版权问题,请联系博主,24小时候内删除。
想第一时间收到最新更新内容吗,点击获取~~~

点击查看详情

(广告)博主自主原创最新实战课程

点击查看详情


(广告)远程技术支持(设备调试),有搞不定的找我,价格实惠,为您解决实际工作上的问题

远程技术调试与技术支持,点击查看详情


原创与收集的内容,允许转载,转载时请务必以超链接形式标明文章原始出处,博客地址http://ccieh3c.com。

喜欢 (6)
[]
分享 (0)
公众号:网络之路博客(其他平台网络之路Blog)
分享一些自己懂的技术知识点,希望对大家有帮助。
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

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