本实验重点考核大家对VRRP、DHCP、OSPF、ACL、NAT的综合应用和掌握情况。

实验要求如下:
1.PC1和Client1在vlan 10,PC2在vlan 20,DHCP服务器在vlan 66;
2.SW1为vlan 10的主网关,vlan 20的备份网关;
3.SW2为vlan 20的主网关,vlan 10的备份网关;
4.DHCP服务器在vlan 66,网关在SW2上面;
5.PC1、PC2自动获取ip地址且可以互相ping通;
6.企业内网运行OSPF协议;
7.仅允许Client1所在网络可以访问Server1服务器的web服务;
8.企业内网设备仅允许被DHCP服务器远程管理。

实验拓扑如下:其中红色区域为互联网供应商网络,蓝色区域为企业内网。

网络工程师TCNE阶段综合实验一详解

第一步:配置企业内部基本网络;

配置命令如下:
SW1配置
sysname SW1
vlan batch 10 20 66 100
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
interface GigabitEthernet0/0/3
port link-type access
port default vlan 100
interface GigabitEthernet0/0/10
port link-type trunk
port trunk allow-pass vlan all
interface Vlanif10
ip address 192.168.10.251 255.255.255.0
interface Vlanif20
ip address 192.168.20.251 255.255.255.0
interface Vlanif100
ip address 192.168.100.2 255.255.255.0
SW2配置
sysname SW2
vlan batch 10 20 66 200
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
interface GigabitEthernet0/0/3
port link-type access
port default vlan 200
interface GigabitEthernet0/0/10
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/11
port link-type access
port default vlan 66
interface Vlanif10
ip address 192.168.10.252 255.255.255.0
interface Vlanif20
ip address 192.168.20.252 255.255.255.0
interface Vlanif66
ip address 192.168.66.1 255.255.255.0
interface Vlanif200
ip address 192.168.200.2 255.255.255.0
R1配置
sysname R1
interface g0/0/0
ip address 100.1.1.1 24
interface g0/0/1
ip address 192.168.100.1 24
interface g0/0/2
ip address 192.168.200.1 24
DHCP配置
sysname DHCP
interface GigabitEthernet0/0/0
ip address 192.168.66.2 255.255.255.0

第二步,配置VRRP;

SW1配置
interface Vlanif10
vrrp vrid 10 virtual-ip 192.168.10.250
vrrp vrid 10 priority 200
interface Vlanif20
vrrp vrid 20 virtual-ip 192.168.20.250
SW2配置
interface Vlanif10
vrrp vrid 10 virtual-ip 192.168.10.250
interface Vlanif20
vrrp vrid 20 virtual-ip 192.168.20.250
vrrp vrid 20 priority 200
VRRP验证如下:
查看SW1如下:
网络工程师TCNE阶段综合实验一详解
查看SW2如下:
网络工程师TCNE阶段综合实验一详解

 第三步:配置OSPF保证企业内网互通;

R1配置路由重发布
ip route-static 0.0.0.0 0.0.0.0 100.1.1.2
ospf 1
default-route-advertise always
area 0
network 192.168.100.0
network 192.168.200.0
SW1配置
ospf 1
area 0
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 192.168.100.0 0.0.0.255
SW2配置
ospf 1
area 0
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 192.168.60.0 0.0.0.255
network 192.168.200.0 0.0.0.255
DHCP配置
ospf 1
area 0
network 192.168.66.0 0.0.0.255
测试内网网络互通(DHCP上ping路由器R1)如下:
网络工程师TCNE阶段综合实验一详解

第四步:配置DHCP,使得内网设备可以自动获取ip地址;

DHCP配置
dhcp enable
interface GigabitEthernet0/0/0
dhcp select global
ip pool p1
gateway-list 192.168.10.250
network 192.168.10.0 mask 255.255.255.0
dns-list 8.8.8.8
ip pool p2
gateway-list 192.168.20.250
network 192.168.20.0 mask 255.255.255.0
dns-list 8.8.8.8
SW1配置
dhcp enable
interface Vlanif10
dhcp select relay
dhcp relay server-ip 192.168.66.2
interface Vlanif20
dhcp select relay
dhcp relay server-ip 192.168.66.2
SW2配置
dhcp enable
interface Vlanif10
dhcp select relay
dhcp relay server-ip 192.168.66.2
interface Vlanif20
dhcp select relay
dhcp relay server-ip 192.168.66.2
验证PC1和PC2均可以自动获取ip地址,如下如:
查看PC1
网络工程师TCNE阶段综合实验一详解
查看PC2
网络工程师TCNE阶段综合实验一详解

第五步:进行地址转换和设备Telnet远程设置,配置如下:

R1配置
acl 2000
rule 10 permit source 192.168.10.0 0.0.0.255
quit
interface GigabitEthernet0/0/0
nat outbound 2000
quit
acl number 3000
rule 10 permit tcp source 192.168.66.2 0 destination-port eq telnet
user-interface vty 0 4
acl 3000 inbound
authentication-mode password
123456

最后,进行验证设置。。。。。。。。,如下图:

验证Client1所在网络可以访问Server1服务器的web服务,如下图:

网络工程师TCNE阶段综合实验一详解
验证企业内网设备仅允许被DHCP服务器远程管理,如下图:
网络工程师TCNE阶段综合实验一详解

     至此,所有项目任务完成!!!!!!!!!!!!!!