DHCP与DNS与NAT配置–华为设备–ENSP模拟器–内外访问外网

实验拓扑
在这里插入图片描述
获取地址
项目连接
实验步骤
SW1
配置的接口
配置的DHCP
配置缺省路由

 interface GigabitEthernet0/0/1 port link-type access port default vlan 10  interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 2 to 4094  DHCP配置在交换机SW2上 1.dhcp enable 2.ip pool 1 network 192.168.1.0 mask 255.255.255.0 dns-list 192.168.4.1 gateway-list 192.168.1.254    3.vlan batch 10 20 4.int vlanif 10 ip address 192.168.1.254 255.255.255.0 dhcp select global 5.display ip pool 

AR1
配置接口
配置nat
配置地址组
配置acl
进入端口使用acl
配置缺省路由
配置静态路由

 acl number 2000 rule 5 permit source 192.168.0.0 0.0.255.255 nat address-group 1 202.1.1.3 202.1.1.5  interface GigabitEthernet0/0/0 ip address 192.168.3.2 255.255.255.0  interface GigabitEthernet0/0/1 ip address 202.1.1.1 255.255.255.0 nat outbound 2000 address-group 1  ip route 0.0.0.0 0.0.0.0 202.1.1.2 ip route 192.168.0.0 16 192.168.3.1 SW2  interface Vlanif1  interface Vlanif10 ip address 192.168.1.254 255.255.255.0 dhcp select global  interface Vlanif20 ip address 192.168.2.254 255.255.255.0 dhcp select global  interface Vlanif30 ip address 192.168.3.1 255.255.255.0  interface Vlanif40 ip address 192.168.4.254 255.255.255.0  interface MEth0/0/1  interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 2 to 4094  interface GigabitEthernet0/0/2 port link-type access port default vlan 30  interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 2 to 4094  interface GigabitEthernet0/0/4 port link-type access port default vlan 40  ip route-static 0.0.0.0 0.0.0.0 192.168.3.2 

SW4

interface Vlanif10 ip address 202.1.1.2 255.255.255.0  interface Vlanif20 ip address 66.66.66.254 255.0.0.0  interface MEth0/0/1  interface GigabitEthernet0/0/1 port link-type access port default vlan 10  interface GigabitEthernet0/0/2 port link-type access port default vlan 20  ip route-static 202.1.1.0 24 66.66.66.254 

sw3

interface GigabitEthernet0/0/1 port link-type access port default vlan 20  interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 2 to 4094  

DNS配置
在这里插入图片描述

DHCP 抓包
在这里插入图片描述

pc5 ping www.baicu.com
在这里插入图片描述

原文链接:https://blog.csdn.net/weixin_45640148/article/details/124871759

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享