思科模拟器CISCO/华为模拟器ENSP配置一个完整的校园网(网络安全、数据冗余)

前言

        中小型网络架构解决方案,这是我设计的我们学校的校园网,功能齐全,作为课程设计,我觉得还是可以拿出手的,如果作为毕业设计的话,还需要继续加东西,下面展示我的拓扑图和杂乱的代码和测试结果。visio图,思科拓扑图,具体教室的布线图,具体文档这些就不放在本文中了,有需求的可以加我,这篇文章里只放思科模拟器的。

 

文章目录

前言

一、课程设计目录(这个是教授给的模板,大家自己写的话可以参考里面的内容进行补充)

二、校园网拓扑图

三、网络配置(代码比较乱、有些没用的代码也没删、有些代码报错了调整完以后全部复制进来的)

1.相关交换机配置

2.路由器配置

3.“防火墙”路由器配置

4.服务器配置

5.无线网络配置

6.DHCP配置

7.DNS服务器配置

8.FTP服务器配置

四、网络测试

1、各个校区之间测试连通性

2、DHCP自动获取IP情况

3、NAT协议

4、web服务测试

5、DNS服务测试

总结


一、课程设计目录(这个是教授给的模板,大家自己写的话可以参考里面的内容进行补充)

1. 前言

1.1 选题背景

1.2 研究内容

1.3 存在的问题

1.4 需求分析

2. 系统设计原则和实现目

2.1 网络系统设计原则

2.2 系统建设目标

2.3 网络设计关键技术说明

3. 系统总体方案设计

3.1 网络拓扑结构设计

3.2 网络系统接入设计及安全设计

3.3 VLAN划分

3.4 IP地址分配

3.5 综合布线设计

4. 设备选型

5. 网络配置设计

5.1 相关交换机配置

5.2 路由器配置

5.3 “防火墙”路由器配置

5.4 服务器配置

5.5 配置无线网络

5.6 区域内部分主机IP的自动配置,测试dhcp服务器

5.7 在pc机上启动dhcp服务功能,完成ip地址自动配置

6. 服务器的搭建

6.1 DNS服务器配置

6.2 FTP服务器配置

7. 网络测试

7.1 各校区网络联通性测试

7.2 DHCP服务

7.3 NAT协议

7.4 WEB服务测试

7.5 DNS服务测试

8. 结论

参考文献


二、校园网拓扑图


三、网络配置(参考一下就行,大致思路是这样的,代码有点乱)

1.相关交换机配置

核心交换机1
Switch>en
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Core-SW1
Core-SW1(config)#vlan 10
Core-SW1(config-vlan)#vlan 20
Core-SW1(config-vlan)#vlan 30
Core-SW1(config-vlan)#vlan 40
Core-SW1(config-vlan)#exit
Core-SW1(config)#int vlan 10
Core-SW1(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

Core-SW1(config-if)#ip address 192.168.10.254 255.255.255.0
Core-SW1(config-if)#standby 10 ip 192.168.10.252
Core-SW1(config-if)#standby 10 priority 120
Core-SW1(config-if)#standby 10 pree
Core-SW1(config-if)#standby 10 preempt 
Core-SW1(config-if)#standby 10 track f0/1
Core-SW1(config-if)#standby 10 track f0/2
Core-SW1(config-if)#exit
Core-SW1(config)#int vlan 20
Core-SW1(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

Core-SW1(config-if)#ip address 192.168.20.254 255.255.255.0
Core-SW1(config-if)#standby 20 ip 192.168.20.252
Core-SW1(config-if)#standby 20 priority 120
Core-SW1(config-if)#standby 20 preempt
Core-SW1(config-if)#standby 20 track f0/1
Core-SW1(config-if)#standby 20 track f0/2
Core-SW1(config-if)#exit
Core-SW1(config)#int vlan 30
Core-SW1(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

Core-SW1(config-if)#ip address 192.168.30.254 255.255.255.0
Core-SW1(config-if)#standby 30 ip 192.168.30.252
Core-SW1(config-if)#standby 30 track f0/1
Core-SW1(config-if)#standby 30 track f0/2
Core-SW1(config-if)#exit
Core-SW1(config)#int vlan 40
Core-SW1(config-if)#
%LINK-5-CHANGED: Interface Vlan40, changed state to up

Core-SW1(config-if)#ip address 192.168.40.254 255.255.255.0
Core-SW1(config-if)#standby 40 ip 192.168.40.252
Core-SW1(config-if)#standby 40 track f0/1
Core-SW1(config-if)#standby 40 track f0/2
Core-SW1(config-if)#exit
Core-SW1(config)#int f0/1
Core-SW1(config-if)#no sw
Core-SW1(config-if)#no switchport 
Core-SW1(config-if)#ip address 192.168.4.2 255.255.255.0
Core-SW1(config-if)#no shu
Core-SW1(config-if)#no shutdown 
Core-SW1(config-if)#exit
Core-SW1(config)#int f0/2
Core-SW1(config-if)#no switchport 
Core-SW1(config-if)#ip address 192.168.6.2 255.255.255.0
Core-SW1(config-if)#no shutdown 
Core-SW1(config-if)#exit
Core-SW1(config)#ip routing
Core-SW1(config)#int port-channel 1
Core-SW1(config-if)#swit
Core-SW1(config-if)#switchport tr
Core-SW1(config-if)#switchport trunk e
Core-SW1(config-if)#switchport trunk encapsulation d
Core-SW1(config-if)#switchport trunk encapsulation dot1q 
Core-SW1(config-if)#sw
Core-SW1(config-if)#switchport m
Core-SW1(config-if)#switchport mode tr
Core-SW1(config-if)#switchport mode trunk 
Core-SW1(config-if)#exit
Core-SW1(config)#int range f
Core-SW1(config)#int range fastEthernet 0/3-4
Core-SW1(config-if-range)#sw
Core-SW1(config-if-range)#switchport tr
Core-SW1(config-if-range)#switchport trunk e
Core-SW1(config-if-range)#switchport trunk encapsulation d
Core-SW1(config-if-range)#switchport trunk encapsulation dot1q 
Core-SW1(config-if-range)#sw
Core-SW1(config-if-range)#switchport m
Core-SW1(config-if-range)#switchport mode t
Core-SW1(config-if-range)#switchport mode trunk 


Core-SW1(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up

Core-SW1(config-if-range)#channl
%HSRP-6-STATECHANGE: Vlan20 Grp 20 state Speak -> Standby

%HSRP-6-STATECHANGE: Vlan20 Grp 20 state Standby -> Active

%HSRP-6-STATECHANGE: Vlan30 Grp 30 state Speak -> Standby

%HSRP-6-STATECHANGE: Vlan10 Grp 10 state Speak -> Standby

%HSRP-6-STATECHANGE: Vlan10 Grp 10 state Standby -> Active

%HSRP-6-STATECHANGE: Vlan30 Grp 30 state Standby -> A
Core-SW1(config-if-range)#channel
%HSRP-6-STATECHANGE: Vlan40 Grp 40 state Speak -> Standby
-
%HSRP-6-STATECHANGE: Vlan40 Grp 40 state Standby -> Active
channel-g
Core-SW1(config-if-range)#channel
Core-SW1(config-if-range)#channel-g
Core-SW1(config-if-range)#channel-group 1 mode on
Core-SW1(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

Core-SW1(config-if-range)#
Core-SW1(config-if-range)#exit
Core-SW1(config)#spa
Core-SW1(config)#spanning-tree mode pvst
Core-SW1(config)#sp
Core-SW1(config)#spanning-tree vlan 10,20 root primary
Core-SW1(config)#sp
Core-SW1(config)#spanning-tree vlan 30,40 root se
Core-SW1(config)#spanning-tree vlan 30,40 root secondary 
Core-SW1(config)#










核心交换机2
Switch>
Switch>en
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ho
Switch(config)#hostname Core-SW2
Core-SW2(config)#vlan 10
Core-SW2(config-vlan)#vlan 20
Core-SW2(config-vlan)#vlan 30
Core-SW2(config-vlan)#vlan 40
Core-SW2(config-vlan)#exit
Core-SW2(config)#int vlan 10
Core-SW2(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

Core-SW2(config-if)#ip address 192.168.10.253 255.255.255.0
Core-SW2(config-if)#standby 10 ip 192.168.10.252
Core-SW2(config-if)#standby 10 track f0/1
Core-SW2(config-if)#standby 10 track f0/2
%HSRP-6-STATECHANGE: Vlan10 Grp 10 state Speak -> Standby

%HSRP-6-STATECHANGE: Vlan10 Grp 10 state Standby -> Active

Core-SW2(config-if)#exit
Core-SW2(config)#int vlan 20
Core-SW2(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

Core-SW2(config-if)#ip address 192.168.20.253 255.255.255.0
Core-SW2(config-if)#standby 20 ip 192.168.20.252
Core-SW2(config-if)#standby 20 track f0/1
Core-SW2(config-if)#standby 20 track f0/2
Core-SW2(config-if)#
%HSRP-6-STATECHANGE: Vlan20 Grp 20 state Speak -> Standby

Core-SW2(config-if)#exit
Core-SW2(config)#int vlan 30
Core-SW2(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

Core-SW2(config-if)#ip address 192.168.30.253 255.255.255.0
Core-SW2(config-if)#standby 30 ip 192.168.30.252
Core-SW2(config-if)#standby 30 priority 120
Core-SW2(config-if)#standby 30
%HSRP-6-STATECHANGE: Vlan30 Grp 30 state Speak -> Standby

%HSRP-6-STATECHANGE: Vlan30 Grp 30 state Standby -> Active

% Incomplete command.
Core-SW2(config-if)#standby 30 pr
Core-SW2(config-if)#standby 30 preempt
Core-SW2(config-if)#standby 30 track f0/1
Core-SW2(config-if)#standby 30 track f0/2
Core-SW2(config-if)#exit
Core-SW2(config)#
Core-SW2(config)#int vlan 40
Core-SW2(config-if)#
%LINK-5-CHANGED: Interface Vlan40, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up

Core-SW2(config-if)#ip address 192.168.40.253 255.255.255.0
Core-SW2(config-if)#standby 40 ip 192.168.40.252
Core-SW2(config-if)#standby 40 
%HSRP-6-STATECHANGE: Vlan40 Grp 40 state Speak -> Standby

% Incomplete command.
Core-SW2(config-if)#standby 40 priority 120
Core-SW2(config-if)#standby 40 preempt
Core-SW2(config-if)#
%HSRP-6-STATECHANGE: Vlan40 Grp 40 state Standby -> Active

Core-SW2(config-if)#standby 40 track f0/1
Core-SW2(config-if)#standby 40 track f0/2
Core-SW2(config-if)#exit
Core-SW2(config)#int f0/1
Core-SW2(config-if)#no switchport 
Core-SW2(config-if)#ip address 192.168.5.2
% Incomplete command.
Core-SW2(config-if)#ip address 192.168.5.2 255.255.255.0
Core-SW2(config-if)#no shutdown 
Core-SW2(config-if)#exit
Core-SW2(config)#int f0/2
Core-SW2(config-if)#no switchport 
Core-SW2(config-if)#ip address 192.168.7.2 255.255.255.0
Core-SW2(config-if)#no shutdown 
Core-SW2(config-if)#exit
Core-SW2(config)#ip routing
Core-SW2(config)#int port-channel 1
Core-SW2(config-if)#switchport trunk encapsulation dot1q 
Core-SW2(config-if)#switchport mode trunk 
Core-SW2(config-if)#exit
Core-SW2(config)#
Core-SW2(config)#int range fastEthernet 0/3-4
Core-SW2(config-if-range)#switchport trunk encapsulation dot1q 
Core-SW2(config-if-range)#switchport mode trunk 

Core-SW2(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up

Core-SW2(config-if-range)#channel-group 1 mode on
Core-SW2(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

Core-SW2(config-if-range)#
%HSRP-6-STATECHANGE: Vlan10 Grp 10 state Speak -> Standby

%HSRP-6-STATECHANGE: Vlan20 Grp 20 state Standby -> Active

%HSRP-6-STATECHANGE: Vlan10 Grp 10 state Standby -> Active

Core-SW2(config-if-range)#
%HSRP-6-STATECHANGE: Vlan20 Grp 20 state Speak -> Standby

%HSRP-6-STATECHANGE: Vlan10 Grp 10 state Speak -> Standby

Core-SW2(config-if-range)#exit
Core-SW2(config)#spanning-tree mode pvst
Core-SW2(config)#spanning-tree vlan 10,20 root se
Core-SW2(config)#spanning-tree vlan 10,20 root secondary 
Core-SW2(config)#spanning-tree vlan 30,40 root pri
Core-SW2(config)#spanning-tree vlan 30,40 root primary 
Core-SW2(config)#



Core-SW1>en
Core-SW1#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW1(config)#int range r
Core-SW1(config)#int range f
Core-SW1(config)#int range fastEthernet 0/5-8
Core-SW1(config-if-range)#sw
Core-SW1(config-if-range)#switchport t
Core-SW1(config-if-range)#switchport trunk e
Core-SW1(config-if-range)#switchport trunk encapsulation 
Core-SW1(config-if-range)#switchport trunk encapsulation dot1q
Core-SW1(config-if-range)#sw
Core-SW1(config-if-range)#switchport m
Core-SW1(config-if-range)#switchport mode t
Core-SW1(config-if-range)#switchport mode trunk 



核心交换机1把下端口设置为trunk
Core-SW1(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to up

Core-SW1(config-if-range)#



核心交换机2把下端口设置为trunk
Core-SW2#
Core-SW2#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW2(config)#
Core-SW2(config)#int range fastEthernet 0/5-8
Core-SW2(config-if-range)#switchport trunk encapsulation dot1q
Core-SW2(config-if-range)#switchport mode trunk 




Core-SW2(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to up

Core-SW2(config-if-range)#

汇聚交换机1端口聚合:
Switch>
Switch>en
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip routing
Switch(config)#int port-channel 1
Switch(config-if)#switchport trunk encapsulation dot1q 
Switch(config-if)#switchport mode trunk 
Switch(config-if)#exit
Switch(config)#int range fastEthernet 0/3-4
Switch(config-if-range)#switchport trunk encapsulation dot1q 
Switch(config-if-range)#switchport mode trunk 
Switch(config-if-range)#channel-group 1 mode on
Switch(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
汇聚交换机2端口聚合:
Switch>en
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip routing
Switch(config)#int port-channel 1
Switch(config-if)#switchport trunk encapsulation dot1q 
Switch(config-if)#switchport mode trunk 
Switch(config-if)#ex
Switch(config)#int range fastEthernet 0/3-4
Switch(config-if-range)#switchport trunk encapsulation dot1q 
Switch(config-if-range)#switchport mode trunk 
Switch(config-if-range)#channel-group 1 mode on
Switch(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

Switch(config-if-range)#


Sw1
Switch>
Switch>en
Switch#
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#h
Switch(config)#hostname sw1
sw1(config)#vlan 10
sw1(config-vlan)#vlan 20
sw1(config-vlan)#vlan 30
sw1(config-vlan)#vlan 40
sw1(config-vlan)#exit
sw1(config)#int r
sw1(config)#int range 
sw1(config)#int range f
sw1(config)#int range fastEthernet 0/1-2
sw1(config-if-range)#s
sw1(config-if-range)#sw
sw1(config-if-range)#switchport m
sw1(config-if-range)#switchport mode acc
sw1(config-if-range)#switchport mode access 
sw1(config-if-range)#%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/2 VLAN1.

%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/2 on VLAN0001. Inconsistent port type.

%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/1 VLAN1.

%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/1 on VLAN0001. Inconsistent port type.


sw1(config-if-range)#sw
sw1(config-if-range)#switchport mo
sw1(config-if-range)#switchport mode tr
sw1(config-if-range)#switchport mode trunk 


sw1(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

sw1(config-if-range)#exit
sw1(config)#int range fastEthernet 0/3-4
sw1(config-if-range)#switchport mode access 
sw1(config-if-range)#sw
sw1(config-if-range)#switchport acc
sw1(config-if-range)#switchport access vlan 10
sw1(config-if-range)#

Sw2
Switch>en
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
Switch(config-vlan)#vlan 30
Switch(config-vlan)#vlan 40
Switch(config-vlan)#exit
Switch(config)#int ran
Switch(config)#int range f
Switch(config)#int range fastEthernet 0/1-2
Switch(config-if-range)#sw
Switch(config-if-range)#switchport m
Switch(config-if-range)#switchport mode ac
Switch(config-if-range)#switchport mode access 
Switch(config-if-range)#%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/2 VLAN1.

%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/2 on VLAN0001. Inconsistent port type.

%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/1 VLAN1.

%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/1 on VLAN0001. Inconsistent port type.


Switch(config-if-range)#sw
Switch(config-if-range)#switchport m
Switch(config-if-range)#switchport mode t
Switch(config-if-range)#switchport mode t
Switch(config-if-range)#switchport mode trunk 


Switch(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

Switch(config-if-range)#exit
Switch(config)#int 
Switch(config)#int r
Switch(config)#int range f
Switch(config)#int range fastEthernet 0/3
Switch(config-if-range)#exit
Switch(config)#int f0/3
Switch(config-if)#swit
Switch(config-if)#switchport m
Switch(config-if)#switchport mode ac
Switch(config-if)#switchport mode access 
Switch(config-if)#sw
Switch(config-if)#switchport 
% Incomplete command.
Switch(config-if)#
Switch(config-if)#sw
Switch(config-if)#switchport ac
Switch(config-if)#switchport access vlan 20
Switch(config-if)#


Sw3
Switch>
Switch>EN
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname sw3
sw3(config)#vlan 10
sw3(config-vlan)#vlan 20
sw3(config-vlan)#vlan 30
sw3(config-vlan)#vlan 40
sw3(config-vlan)#exit
sw3(config)#int range fastEthernet 0/1-2
sw3(config-if-range)#switchport mode access 
sw3(config-if-range)#%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/2 VLAN1.

%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/2 on VLAN0001. Inconsistent port type.

%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/1 VLAN1.

%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/1 on VLAN0001. Inconsistent port type.


sw3(config-if-range)#switchport mode trunk 


sw3(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

sw3(config-if-range)#
sw3(config-if-range)#exit
sw3(config)#int f
sw3(config)#int fastEthernet 0/3
sw3(config-if)#switchport mode access 
sw3(config-if)#switchport access vlan 30
sw3(config-if)#


Sw4
Switch>en
Switch#
Switch#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#h
Switch(config)#hostname sw4
sw4(config)#vlan 10
sw4(config-vlan)#vlan 20
sw4(config-vlan)#vlan 30
sw4(config-vlan)#vlan 40
sw4(config-vlan)#int range fastEthernet 0/1-2
sw4(config-if-range)#switchport mode access 
sw4(config-if-range)#%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/2 VLAN1.

%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/2 on VLAN0001. Inconsistent port type.

%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/1 VLAN1.

%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/1 on VLAN0001. Inconsistent port type.


sw4(config-if-range)#switchport mode trunk 


sw4(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

sw4(config-if-range)#exit
sw4(config)#
sw4(config)#int fastEthernet 0/3
sw4(config-if)#switchport mode access 
sw4(config-if)#switchport access vlan 40
sw4(config-if)#

核心交换机1配置OSPF:
Core-SW1>
Core-SW1>en
Core-SW1#
Core-SW1#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW1(config)#router os
Core-SW1(config)#router ospf 10
Core-SW1(config-router)#net
Core-SW1(config-router)#network 192.168.10.0 0.0.0.255 area 0
Core-SW1(config-router)#network 192.168.20.0 0.0.0.255 area 0
Core-SW1(config-router)#network 192.168.30.0 0.0.0.255 area 0
^
% Invalid input detected at '^' marker.
Core-SW1(config-router)#new
Core-SW1(config-router)#net
Core-SW1(config-router)#network 192.168.30.0 0.0.0.255 area 0
Core-SW1(config-router)#network 192.168.40.0 0.0.0.255 area 0
Core-SW1(config-router)#network 192.168.4.0 0.0.0.255 area 0
Core-SW1(config-router)#network 192.168.6.0 0.0.0.255 area 0
Core-SW1(config-router)#

核心交换机2配置OSPF:
Core-SW2>
Core-SW2>en
Core-SW2#con
Core-SW2#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW2(config)#router ospf 20
Core-SW2(config-router)#net
Core-SW2(config-router)#network 192.168.10.0 0.0.0.255 area 0
Core-SW2(config-router)#
02:01:32: %OSPF-5-ADJCHG: Process 20, Nbr 192.168.40.254 on Vlan10 from LOADING to FULL, Loading Done

Core-SW2(config-router)#network 192.168.20.0 0.0.0.255 area 0
Core-SW2(config-router)#
02:02:27: %OSPF-5-ADJCHG: Process 20, Nbr 192.168.40.254 on Vlan20 from LOADING to FULL, Loading Done

Core-SW2(config-router)#network 192.168.30.0 0.0.0.255 area 0
Core-SW2(config-router)#network 192.168.
02:03:03: %OSPF-5-ADJCHG: Process 20, Nbr 192.168.40.254 on Vlan30 from LOADING to FULL, Loading Done

^
% Invalid input detected at '^' marker.
Core-SW2(config-router)#
Core-SW2(config-router)#network 192.168.40.0 0.0.0.255 area 0
Core-SW2(config-router)#
02:03:38: %OSPF-5-ADJCHG: Process 20, Nbr 192.168.40.254 on Vlan40 from LOADING to FULL, Loading Done

Core-SW2(config-router)#network 192.168.6.0 0.0.0.255 area 0
Core-SW2(config-router)#network 192.168.7.0 0.0.0.255 area 0
Core-SW2(config-router)#network 192.168.5.0 0.0.0.255 area 0
Core-SW2(config-router)#


2.路由器配置

核心路由器1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hi
Router(config)#ho
Router(config)#hostname Core-Router1
Core-Router1(config)#inf f
Core-Router1(config)#int f1/0
Core-Router1(config-if)#ip ad
Core-Router1(config-if)#ip address 192.168.4.1 255.255.255.0
Core-Router1(config-if)#no s
Core-Router1(config-if)#no sh
Core-Router1(config-if)#no shutdown 

Core-Router1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up

Core-Router1(config-if)#exit
Core-Router1(config)#int f1/1
Core-Router1(config-if)#ip add
Core-Router1(config-if)#ip address 192.168.5.1 255.255.255.0
Core-Router1(config-if)#no shu
Core-Router1(config-if)#no shutdown 

Core-Router1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/1, changed state to up

Core-Router1(config-if)#exit
Core-Router1(config)#int f0/1
Core-Router1(config-if)#ip add
Core-Router1(config-if)#ip address 192.168.3.1 255.255.255.0
Core-Router1(config-if)#no sh
Core-Router1(config-if)#no shutdown 

Core-Router1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Core-Router1(config-if)#exit
Core-Router1(config)#int f0/0
Core-Router1(config-if)#ip add
Core-Router1(config-if)#ip address 192.168.1.2 255.255.255.0
Core-Router1(config-if)#no sh
Core-Router1(config-if)#no shutdown 

Core-Router1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Core-Router1(config-if)#


核心路由器2
Router>en
Router#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho
Router(config)#hostname Core-Router2
Core-Router2(config)#int f1/0
Core-Router2(config-if)#ip add
Core-Router2(config-if)#ip address 192.168.7.1 255.255.255.0
Core-Router2(config-if)#no sh
Core-Router2(config-if)#no shutdown 

Core-Router2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up

Core-Router2(config-if)#ex
Core-Router2(config)#
Core-Router2(config)#
Core-Router2(config)#int f1/1
Core-Router2(config-if)#ip add
Core-Router2(config-if)#ip address 192.168.6.1 255.255.255.0
Core-Router2(config-if)#no sh
Core-Router2(config-if)#no shutdown 

Core-Router2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/1, changed state to up

Core-Router2(config-if)#exit
Core-Router2(config)#
Core-Router2(config)#int f0/1
Core-Router2(config-if)#ip add
Core-Router2(config-if)#ip address 192.168.3.2 255.255.255.0
Core-Router2(config-if)#no shu
Core-Router2(config-if)#no shutdown 

Core-Router2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Core-Router2(config-if)#exit
Core-Router2(config)#
Core-Router2(config)#int f0/0
Core-Router2(config-if)#ip ad
Core-Router2(config-if)#ip address 192.168.2.2 255.255.255.0
Core-Router2(config-if)#no s
Core-Router2(config-if)#no sh
Core-Router2(config-if)#no shutdown 

Core-Router2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Core-Router2(config-if)#

出口路由器:
Router>en
Router#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho
Router(config)#hostname CK-Router
CK-Router(config)#int f0/0
CK-Router(config-if)#ip add
CK-Router(config-if)#ip address 192.168.1.1 255.255.255.0
CK-Router(config-if)#no shu
CK-Router(config-if)#no shutdown 

CK-Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

CK-Router(config-if)#exit
CK-Router(config)#int f0/1
CK-Router(config-if)#ip add
CK-Router(config-if)#ip address 192.168.2.1 255.255.255.0
CK-Router(config-if)#no sh
CK-Router(config-if)#no shutdown 

CK-Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

CK-Router(config-if)#exit
CK-Router(config)#int s0/0/0
CK-Router(config-if)#ip 
CK-Router(config-if)#ip add
CK-Router(config-if)#ip address 200.10.1.1 255.255.255.240
CK-Router(config-if)#clock rate 64000
CK-Router(config-if)#no sh
CK-Router(config-if)#no shutdown 

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
CK-Router(config-if)#
CK-Router(config-if)#


核心路由器1ospf:
Core-Router1>en
Core-Router1#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-Router1(config)#router ospf 30
Core-Router1(config-router)#net
Core-Router1(config-router)#network 192.168.4.0 0.0.0.255 area 0
Core-Router1(config-router)#new
Core-Router1(config-router)#new
02:06:57: %OSPF-5-ADJCHG: Process 30, Nbr 192.168.40.254 on FastEthernet1/0 from LOADING to FULL, Loading Done
^
% Invalid input detected at '^' marker.
Core-Router1(config-router)#net
Core-Router1(config-router)#network 192.168.5.0 0.0.0.255 area 0
Core-Router1(config-router)#
02:07:36: %OSPF-5-ADJCHG: Process 30, Nbr 192.168.40.253 on FastEthernet1/1 from LOADING to FULL, Loading Done

Core-Router1(config-router)#net
Core-Router1(config-router)#network 192.168.3.0 0.0.0.255 area 0
Core-Router1(config-router)#net
Core-Router1(config-router)#network 192.168.1.0 0.0.0.255 area 0
Core-Router1(config-router)#

核心路由器2ospf:
Core-Router2>en
Core-Router2#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-Router2(config)#rou
Core-Router2(config)#router os
Core-Router2(config)#router ospf 40
Core-Router2(config-router)#net
Core-Router2(config-router)#network 192.168.2.0 0.0.0.255 area 0
Core-Router2(config-router)#
Core-Router2(config-router)#network 192.168.3.0 0.0.0.255 area 0
Core-Router2(config-router)#
02:11:10: %OSPF-5-ADJCHG: Process 40, Nbr 192.168.5.1 on FastEthernet0/1 from LOADING to FULL, Loading Done

Core-Router2(config-router)#network 192.168.6.0 0.0.0.255 area 0
Core-Router2(config-router)#
02:11:31: %OSPF-5-ADJCHG: Process 40, Nbr 192.168.40.254 on FastEthernet1/1 from LOADING to FULL, Loading Done

Core-Router2(config-router)#network 192.168.7.0 0.0.0.255 area 0
Core-Router2(config-router)#
02:12:12: %OSPF-5-ADJCHG: Process 40, Nbr 192.168.40.253 on FastEthernet1/0 from LOADING to FULL, Loading Done

出口路由器ospf:
CK-Router(config)#
CK-Router(config)#rou
CK-Router(config)#router os
CK-Router(config)#router ospf 50
CK-Router(config-router)#net
CK-Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
CK-Router(config-router)#
02:04:57: %OSPF-5-ADJCHG: Process 50, Nbr 192.168.5.1 on FastEthernet0/0 from LOADING to FULL, Loading Done

CK-Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
CK-Router(config-router)#
02:05:18: %OSPF-5-ADJCHG: Process 50, Nbr 192.168.7.1 on FastEthernet0/1 from LOADING to FULL, Loading Done

CK-Router(config-router)#


Isp配置
Router>en
Router#
Router#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho
Router(config)#hostname 
% Incomplete command.
Router(config)#ho
Router(config)#hostname ISP-Router
ISP-Router(config)#int s0/0/0
ISP-Router(config-if)#
ISP-Router(config-if)#ip add
ISP-Router(config-if)#ip address 200.10.1.2 255.255.255.240
ISP-Router(config-if)#no sh
ISP-Router(config-if)#no shutdown 

ISP-Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

ISP-Router(config-if)#int fo
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
^
% Invalid input detected at '^' marker.
ISP-Router(config-if)#int f0/0
ISP-Router(config-if)#ip add
ISP-Router(config-if)#ip address 100.10.1.1 255.255.255.240
ISP-Router(config-if)#no sh

ISP-Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

ISP-Router(config-if)#

3.“防火墙”路由器配置

出口路由器配置NAT、ACL:
Router>en
Router#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho
Router(config)#hostname CK-Router
CK-Router(config)#int f0/0
CK-Router(config-if)#ip add
CK-Router(config-if)#ip address 192.168.1.1 255.255.255.0
CK-Router(config-if)#no shu
CK-Router(config-if)#no shutdown 

CK-Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

CK-Router(config-if)#exit
CK-Router(config)#int f0/1
CK-Router(config-if)#ip add
CK-Router(config-if)#ip address 192.168.2.1 255.255.255.0
CK-Router(config-if)#no sh
CK-Router(config-if)#no shutdown 

CK-Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

CK-Router(config-if)#exit
CK-Router(config)#int s0/0/0
CK-Router(config-if)#ip 
CK-Router(config-if)#ip add
CK-Router(config-if)#ip address 200.10.1.1 255.255.255.240
CK-Router(config-if)#clock rate 64000
CK-Router(config-if)#no sh
CK-Router(config-if)#no shutdown 

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
CK-Router(config-if)#
CK-Router(config-if)#exit
CK-Router(config)#
CK-Router(config)#rou
CK-Router(config)#router os
CK-Router(config)#router ospf 50
CK-Router(config-router)#net
CK-Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
CK-Router(config-router)#
02:04:57: %OSPF-5-ADJCHG: Process 50, Nbr 192.168.5.1 on FastEthernet0/0 from LOADING to FULL, Loading Done

CK-Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
CK-Router(config-router)#
02:05:18: %OSPF-5-ADJCHG: Process 50, Nbr 192.168.7.1 on FastEthernet0/1 from LOADING to FULL, Loading Done

CK-Router(config-router)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

CK-Router(config-router)#exit
CK-Router(config)#int ra
CK-Router(config)#int range fa
CK-Router(config)#int range fastEthernet 0/0-1
CK-Router(config-if-range)#ip nat in
CK-Router(config-if-range)#ip nat inside 
CK-Router(config-if-range)#exit
CK-Router(config)#int s0/0/0
CK-Router(config-if)#ip nat out
CK-Router(config-if)#ip nat outside 
CK-Router(config-if)#exit
CK-Router(config)#ip route 0.0.0.0 0.0.0.0 200.10.1.2
CK-Router(config)#router os
CK-Router(config)#router ospf 50
CK-Router(config-router)#de
CK-Router(config-router)#default-information or
CK-Router(config-router)#default-information originate 
CK-Router(config-router)#exit
CK-Router(config)#ip nat pool DZC 200.10.1.3 200.10.1.6 netmask 255.255.255.240
CK-Router(config)#acces
CK-Router(config)#access-list 1 per
CK-Router(config)#access-list 1 permit 192.168.0.0 0.0.255.255
CK-Router(config)#ip nat in
CK-Router(config)#ip nat inside sou
CK-Router(config)#ip nat inside source list 1 pool DZC
CK-Router(config)#

4.服务器配置


5.无线网络配置


6.DHCP配置

核心交换机1DHCP:
Core-SW1>
Core-SW1>en
Core-SW1>en
Core-SW1#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW1(config)#int
Core-SW1(config)#interface vlan
Core-SW1(config)#interface vlan 20
Core-SW1(config-if)#ip ad
Core-SW1(config-if)#ip address 192.168.20.254
% Incomplete command.
Core-SW1(config-if)#ip address 192.168.20.254 255.255.255.0
Core-SW1(config-if)#ex
Core-SW1(config-if)#exit 
Core-SW1(config)#ise
Core-SW1(config)#se
Core-SW1(config)#service dh
Core-SW1(config)#service dhcp 
Core-SW1(config)#ip dh
Core-SW1(config)#ip dhcp po
Core-SW1(config)#ip dhcp pool vlna
Core-SW1(config)#ip dhcp pool vlan
Core-SW1(config)#ip dhcp pool vlan20
Core-SW1(dhcp-config)#netw
Core-SW1(dhcp-config)#network 192.168.20.0 255.255.255.0
Core-SW1(dhcp-config)#de
Core-SW1(dhcp-config)#default-router 192.168.20.254
Core-SW1(dhcp-config)#dns
Core-SW1(dhcp-config)#dns-server 192.168.10.2
Core-SW1(dhcp-config)#ex
Core-SW1(dhcp-config)#exit 
Core-SW1(config)#ip routing
Core-SW1(config)#end
Core-SW1#
%SYS-5-CONFIG_I: Configured from console by console

Core-SW1#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW1(config)#int vlan
Core-SW1(config)#int vlan 30
Core-SW1(config-if)#ip ad
Core-SW1(config-if)#ip address 192.168.30.254
% Incomplete command.
Core-SW1(config-if)#ip address 192.168.30.254 255.255.255.0
Core-SW1(config-if)#ex
Core-SW1(config-if)#exit 
Core-SW1(config)#se
Core-SW1(config)#service dh
Core-SW1(config)#service dhcp 
Core-SW1(config)#ip po
Core-SW1(config)#ip dh
Core-SW1(config)#ip dhcp po
Core-SW1(config)#ip dhcp pool vlan
Core-SW1(config)#ip dhcp pool vlan30
Core-SW1(dhcp-config)#netw
Core-SW1(dhcp-config)#network 192.168.30.0 255.255.255.0
Core-SW1(dhcp-config)#de
Core-SW1(dhcp-config)#default-router 192.168.30.254
Core-SW1(dhcp-config)#dns
Core-SW1(dhcp-config)#dns-server 192.168.10.2
Core-SW1(dhcp-config)#ex
Core-SW1(dhcp-config)#exit 
Core-SW1(config)#ip routing
Core-SW1(config)#end
Core-SW1#
%SYS-5-CONFIG_I: Configured from console by console

Core-SW1#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW1(config)#int vlan
Core-SW1(config)#int vlan 40
Core-SW1(config-if)#ip ad
Core-SW1(config-if)#ip address 192.168.40
^
% Invalid input detected at '^' marker.
Core-SW1(config-if)#ip address 192.168.40.254 255.255.255.0
Core-SW1(config-if)#ex
Core-SW1(config-if)#exit 
Core-SW1(config)#es
Core-SW1(config)#es
Core-SW1(config)#se
Core-SW1(config)#service dg
Core-SW1(config)#service dh
Core-SW1(config)#service dhcp 
Core-SW1(config)#int vlna
Core-SW1(config)#int vlan
Core-SW1(config)#ip dh
Core-SW1(config)#ip dhcp po
Core-SW1(config)#ip dhcp pool vlan
Core-SW1(config)#ip dhcp pool vlan40
Core-SW1(dhcp-config)#netw
Core-SW1(dhcp-config)#network 192.168.40.0 255.255.255.0
Core-SW1(dhcp-config)#de
Core-SW1(dhcp-config)#default-router 192.168.40.254
Core-SW1(dhcp-config)#dns
Core-SW1(dhcp-config)#dns-server 192.168.10.2
Core-SW1(dhcp-config)#ex
Core-SW1(dhcp-config)#exit 
Core-SW1(config)#ip rou
Core-SW1(config)#ip routing
Core-SW1(config)#end
Core-SW1#
%SYS-5-CONFIG_I: Configured from console by console

Core-SW1#


核心交换机2DHCP:
Core-SW2>en
Core-SW2#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW2(config)#interface vlan 20
Core-SW2(config-if)#ip address 192.168.20.254 255.255.255.0
Core-SW2(config-if)#
00:12:03: %OSPF-5-ADJCHG: Process 20, Nbr 192.168.40.254 on Vlan20 from FULL to DOWN, Neighbor Down: Interface down or detached
%IP-4-DUPADDR: Duplicate address 192.168.20.254 on Vlan20, sourced by 000C.8526.0302
%IP-4-DUPADDR: Duplicate address 192.168.20.254 on Vlan20, sourced by 000C.8526.0302

Core-SW2(config-if)#ip address 192.168.20.254 255.255.255.0
Core-SW2(config-if)#exit
Core-SW2(config)#service dhcp 
Core-SW2(config)#ip dhcp pool vlan20
Core-SW2(dhcp-config)#network 192.168.20.0 255.255.255.0
Core-SW2(dhcp-config)#default-router 192.168.20.254
Core-SW2(dhcp-config)#dns-server 192.168.10.2
Core-SW2(dhcp-config)#exit
Core-SW2(config)#ip routing
Core-SW2(config)#end
Core-SW2#
%SYS-5-CONFIG_I: Configured from console by console

Core-SW2#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW2(config)#int vlan 30
Core-SW2(config-if)#ip address 192.168.30.254
% Incomplete command.
Core-SW2(config-if)#ip address 192.168.30.254 255.255.255.0
Core-SW2(config-if)#
00:15:28: %OSPF-5-ADJCHG: Process 20, Nbr 192.168.40.254 on Vlan30 from FULL to DOWN, Neighbor Down: Interface down or detached
%IP-4-DUPADDR: Duplicate address 192.168.30.254 on Vlan30, sourced by 000C.8526.0303
%IP-4-DUPADDR: Duplicate address 192.168.30.254 on Vlan30, sourced by 000C.8526.0303

Core-SW2(config-if)#ip address 192.168.30.254 255.255.255.0
Core-SW2(config-if)#exit
Core-SW2(config)#service dhcp 
Core-SW2(config)#ip dhcp pool vlan30
Core-SW2(dhcp-config)#network 192.168.30.0 255.255.255.0
Core-SW2(dhcp-config)#default-router 192.168.30.254
Core-SW2(dhcp-config)#dns-server 192.168.10.2
Core-SW2(dhcp-config)#exit
Core-SW2(config)#ip routing
Core-SW2(config)#end
Core-SW2#
%SYS-5-CONFIG_I: Configured from console by console

Core-SW2#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line. End with CNTL/Z.
Core-SW2(config)#int vlan 40
Core-SW2(config-if)#ip address 192.168.40
^
% Invalid input detected at '^' marker.
Core-SW2(config-if)#ip address 192.168.40.254 255.255.255.0
Core-SW2(config-if)#
00:16:57: %OSPF-5-ADJCHG: Process 20, Nbr 192.168.40.254 on Vlan40 from FULL to DOWN, Neighbor Down: Interface down or detached
%IP-4-DUPADDR: Duplicate address 192.168.40.254 on Vlan40, sourced by 000C.8526.0304
%IP-4-DUPADDR: Duplicate address 192.168.40.254 on Vlan40, sourced by 000C.8526.0304

Core-SW2(config-if)#ip address 192.168.40.254 255.255.255.0
Core-SW2(config-if)#exit
Core-SW2(config)#service dhcp 
Core-SW2(config)#ip dhcp pool vlan40
Core-SW2(dhcp-config)#network 192.168.40.0 255.255.255.0
Core-SW2(dhcp-config)#default-router 192.168.40.254
Core-SW2(dhcp-config)#dns-server 192.168.10.2
Core-SW2(dhcp-config)#exit
Core-SW2(config)#ip routing
Core-SW2(config)#end
Core-SW2#
%SYS-5-CONFIG_I: Configured from console by console

Core-SW2#

7.DNS服务器配置


8.FTP服务器配置


四、网络测试

1、各个校区之间测试连通性


2、DHCP自动获取IP情况


3、NAT协议


4、web服务测试


5、DNS服务测试


总结

        本次校园网规划与设计,我以核心交换机、汇聚交换机、接入交换机三级网络结构为基础,对核心路由器、核心交换机、汇聚交换机进行冗余,从而在硬件层实现网络的冗余;其次采用快速生成树协议实现对链路的冗余;通过Vlan划分网段,隔离广播域,避免网络风暴的发生;接着通过链路聚合技术,捆绑核心交换机端口,实现带宽翻倍;在公网路由配置静态路由,既实现了路由选择的功能,也避免了因动态学习导致路由记录占有路由器内存,进而影响路由器的效率;同时我们还在路由器配NAT协议,实现内网和外网的地址转换,避免外网入侵内网;我们还使用了ACL协议,实现了数据的选择,保证了内网的安全性;最后配置DHCP协议,既节省了ip资源,同时也减少了管理者的工作量,对于Web、DNS等服务器的配置,老师和学生能够实现基本的上网需求。最后在网络时延和边界处的安全问题是我的不足之处,因为期末要交作业了,所有有些东西还是不够完善。