描述:
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/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
sw3:
vlan batch 30
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 30
sw1:
vlan batch 10 20 30 100 200
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 200
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 100
#
interface GigabitEthernet0/0/5
port link-type access
port default vlan 100
关键配置B:
② 核心交换机sw1 配置vlanif接口作为终端网关。
③ 内网用户均DHCP获取IP地址。
sw1:
dhcp enable
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
dhcp select interface
dhcp server dns-list 223.5.5.5 114.114.114.114
#
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
dhcp select interface
dhcp server dns-list 223.5.5.5 114.114.114.114
#
interface Vlanif30
ip address 192.168.30.1 255.255.255.0
dhcp select interface
dhcp server dns-list 223.5.5.5 114.114.114.114
#
interface Vlanif100
ip address 192.168.100.1 255.255.255.0
#
interface Vlanif200
ip 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.2
R1:
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.1
acl 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.255
interface GigabitEthernet0/0/1
ip address 200.1.1.1 255.255.255.0
nat outbound 2000
关键配置D:
⑤ 为方便运维,内网设备,在任何位置都可以telnet远程管理
sw1 & sw2 & sw3 & R1:
aaa
local-user aa password cipher Huawei@123
local-user aa privilege level 3
local-user aa service-type telnet
user-interface vty 0 4
authentication-mode aaa
protocol inbound telnet
sw1:
vlan 255
int vlanif 255
ip add 192.168.255.1 24
int gi 0/0/1
port trunk allow-pass vlan 255
int gi 0/0/2
port trunk allow-pass vlan 255
sw2:
vlan 255
int vlanif 255
ip add 192.168.255.2 24
ip route-static 0.0.0.0 0 192.168.255.1
sw3:
vlan 255
int vlanif 255
ip add 192.168.255.3 24
ip 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/1
nat server protocol tcp global 200.1.1.2 www inside 192.168.100.2 www
nat 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 3000
rule 1 permit ip source 192.168.255.0 0.0.0.255
rule 2 permit ip destination 192.168.0.1 0.0.255.0
rule 3 permit ip destination 192.168.200.0 0.0.0.255
rule 4 permit ip destination 192.168.255.0 0.0.0.255
rule 5 permit ip destination 192.168.100.0 0.0.0.255
rule 10 deny ip source 192.168.0.0 0.0.255.255 destination 192.168.0.0 0.0.255.255
interface GigabitEthernet0/0/1
traffic-filter inbound acl 3000
interface GigabitEthernet0/0/2
traffic-filter inbound acl 3000
sw1:
acl number 3001
rule 5 permit ip source 192.168.30.0 0.0.0.255 destination 192.168.100.3 0
rule 10 deny ip source 192.168.0.0 0.0.255.255 destination 192.168.100.3 0
interface GigabitEthernet0/0/5
traffic-filter outbound acl 3001