华为实验综合小练习
描述:
1 内网有A、B、C 三个部门。所在网段如图所示。
2 内网服务器配置静态IP,网关192.168.100.1。
3 sw1和R1之间使用vlan200 192.168.200.0/30 互联。
4 R1向运营商申请企业宽带并申请了5个公网IP:200.1.1.1-.5
子网掩码 255.255.255.248,网关200.1.1.6,DNS 223.5.5.5和114.114.114.114。
5 外网服务器7.7.7.7 模拟外网服务。
6 内网交换机 管理vlan 255 管理IP:192.168.255.0/24
实验要求:
① 企业内网划分多个vlan ,减少广播域大小,提高网络稳定性。
② 核心交换机sw1 配置vlanif接口作为终端网关。
③ 内网用户均DHCP获取IP地址。
④ 出口配置NAT,使得相关用户可以访问外网
⑤ 为方便运维,内网设备,在任何位置都可以telnet远程管理,用户aa 密码Huawei@123
⑥ 为了避免局域网病毒扩散,A、B、C 三个部门禁止互访。
⑦ 在不使用traffic-filter的前提下,禁止B部门的用户访问外网(提示:NAT)
⑧ 确保外网用户可以通过访问200.1.1.2的80端口来访问内网server A的http服务。
⑨ 企业内网server B,只允许C部门的员工访问。
⑩ 为方便出差工程师直接远程调试sw1,需将sw1 telnet服务映射到公网IP:200.1.1.2。
关键配置A:
① 企业内网划分多个vlan ,减少广播域大小,提高网络稳定性。
sw2:
vlan batch 10 20
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2port link-type accessport default vlan 10
#
interface GigabitEthernet0/0/3port link-type accessport default vlan 20sw3:
vlan batch 30
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 30
#
interface GigabitEthernet0/0/2port link-type accessport default vlan 30
#
interface GigabitEthernet0/0/3port link-type accessport default vlan 30sw1:
vlan batch 10 20 30 100 200
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 30
#
interface GigabitEthernet0/0/3port link-type accessport default vlan 200
#
interface GigabitEthernet0/0/4port link-type accessport default vlan 100
#
interface GigabitEthernet0/0/5port link-type accessport default vlan 100
关键配置B:
② 核心交换机sw1 配置vlanif接口作为终端网关。
③ 内网用户均DHCP获取IP地址。
sw1:
dhcp enableinterface Vlanif10ip address 192.168.10.1 255.255.255.0dhcp select interfacedhcp server dns-list 223.5.5.5 114.114.114.114
#
interface Vlanif20ip address 192.168.20.1 255.255.255.0dhcp select interfacedhcp server dns-list 223.5.5.5 114.114.114.114
#
interface Vlanif30ip address 192.168.30.1 255.255.255.0dhcp select interfacedhcp server dns-list 223.5.5.5 114.114.114.114
#
interface Vlanif100ip address 192.168.100.1 255.255.255.0
#
interface Vlanif200ip address 192.168.200.1 255.255.255.252
关键配置C:
④ 出口配置NAT,使得相关用户可以访问外网
⑦ 在不使用traffic-filter的前提下,禁止B部门的用户访问外网(提示:NAT)
sw1:
ip route-static 0.0.0.0 0.0.0.0 192.168.200.2R1:
ip route-static 0.0.0.0 0.0.0.0 200.1.1.6
ip route-static 192.168.0.0 255.255.0.0 192.168.200.1acl number 2000 rule 2 deny source 192.168.20.0 0.0.0.255 rule 5 permit source 192.168.0.0 0.0.255.255interface GigabitEthernet0/0/1ip address 200.1.1.1 255.255.255.0 nat outbound 2000
关键配置D:
⑤ 为方便运维,内网设备,在任何位置都可以telnet远程管理
sw1 & sw2 & sw3 & R1:
aaalocal-user aa password cipher Huawei@123local-user aa privilege level 3local-user aa service-type telnetuser-interface vty 0 4authentication-mode aaaprotocol inbound telnet sw1:
vlan 255
int vlanif 255ip add 192.168.255.1 24
int gi 0/0/1port trunk allow-pass vlan 255
int gi 0/0/2port trunk allow-pass vlan 255 sw2:
vlan 255
int vlanif 255ip add 192.168.255.2 24ip route-static 0.0.0.0 0 192.168.255.1sw3:
vlan 255
int vlanif 255ip add 192.168.255.3 24ip route-static 0.0.0.0 0 192.168.255.1
关键配置E:
⑧ 确保外网用户可以通过访问200.1.1.2的80端口来访问内网server A的http服务。
⑩ 为方便出差工程师远程调试sw1,需将sw1 telnet服务映射到公网IP:200.1.1.2。
R1:
int gi 0/0/1nat server protocol tcp global 200.1.1.2 www inside 192.168.100.2 wwwnat server protocol tcp global 200.1.1.2 telnet inside 192.168.255.1 telnet
关键配置F:
⑥ 为了避免局域网病毒扩散,A、B、C 三个部门禁止互访(禁止部门间互访)。
⑨ 企业内网server B,只允许C部门的员工访问。
sw1:
acl number 3000rule 1 permit ip source 192.168.255.0 0.0.0.255rule 2 permit ip destination 192.168.0.1 0.0.255.0rule 3 permit ip destination 192.168.200.0 0.0.0.255rule 4 permit ip destination 192.168.255.0 0.0.0.255rule 5 permit ip destination 192.168.100.0 0.0.0.255rule 10 deny ip source 192.168.0.0 0.0.255.255 destination 192.168.0.0 0.0.255.255interface GigabitEthernet0/0/1traffic-filter inbound acl 3000interface GigabitEthernet0/0/2traffic-filter inbound acl 3000sw1:
acl number 3001rule 5 permit ip source 192.168.30.0 0.0.0.255 destination 192.168.100.3 0rule 10 deny ip source 192.168.0.0 0.0.255.255 destination 192.168.100.3 0interface GigabitEthernet0/0/5traffic-filter outbound acl 3001