赞
踩
设备名称 | 管理地址 | |
行政楼汇聚交换机 | 172.16.1.250 | 255.255.255.0 |
行政楼1楼接入交换机 | 172.16.1.1 | 255.255.255.0 |
行政楼2楼接入交换机 | 172.16.1.2 | 255.255.255.0 |
教学楼汇聚交换机 | 172.16.1.251 | 255.255.255.0 |
教学楼1楼接入交换机 | 172.16.1.3 | 255.255.255.0 |
教学楼2楼接入交换机 | 172.16.1.4 | 255.255.255.0 |
学生宿舍汇聚交换机 | 172.16.1.252 | 255.255.255.0 |
学生宿舍1楼接入交换机 | 172.16.1.5 | 255.255.255.0 |
学生宿舍2楼接入交换机 | 172.16.1.6 | 255.255.255.0 |
服务器汇聚交换机 | 172.16.1.253 | 255.255.255.0 |
校园网核心交换机 | 172.16.1.254 | 255.255.255.0 |
区域 | IP地址段 | 子网掩码 |
行政楼区域1 | 192.168.10.0 | 255.255.255.0 |
行政楼区域2 | 192.168.20.0 | 255.255.255.0 |
教学楼 | 192.168.30.0 | 255.255.255.0 |
学生宿舍1 | 192.168.40.0 | 255.255.255.0 |
学生宿舍2 | 192.168.50.0 | 255.255.255.0 |
机房服务器 | 192.168.200.0 | 255.255.255.0 |
网段名称 | VLAN名称 | VLAN ID | 地址范围 |
行政楼区域1网段 | VLAN10 | VLAN 10 | 192.168.10.0/24 |
行政区域2网段 | VLAN20 | VLAN 20 | 192.168.20.0/24 |
教学楼网段 | VLAN30 | VLAN 30 | 192.168.30.0/24 |
学生宿舍1网段 | VLAN40 | VLAN 40 | 192.168.40.0/24 |
学生宿舍2网段 | VLAN50 | VLAN 50 | 192.168.50.0/24 |
机房服务器网段 | VLAN200 | VLAN 200 | 192.168.200.0/24 |
(1)行政楼1和2被分为区域1和区域2,所以每层接入交换机需要划分VLAN,即VLAN10和VLAN20.并将交换机的F0/1~F0/12划入VLAN10,将F0/13~F0/24划入VLAN20接入交换机上联汇聚交换机的端口需要配置TRUNK模式
(2)教学楼内所有终端需要被划入同一个VLAN,即VLAN30,所以将1楼和2楼都划入VLAN30。接入交换机上联汇聚交换机的端口需设置味TRUNK模式
(3)学生宿舍每层楼设置一个VLAN(1楼和2楼分别使用VLAN40和VLAN50),每层楼交换机上联汇聚交换机的端口设置味TRUNK模式
(4)网管机房内所有服务器需要被划入同一个VLAN,即VLAN200.3台服务器进行接入
行政楼1楼和2楼的接入交换机上均有VLAN划分,连接接入交换机的两个端口均设为TRUNK端口,同时为确保链路备份,将上联端口与和谐交换机的端口相连均设为TRUNK端口,并将其设为链路聚合口。在汇聚交换机设置VLAN10和VLAN20
将教学楼汇聚交换机的对应下联端口配置为TRUNK同时由于教学楼又视频监控的需求,需要的信道较宽,所以上联端口与核心交换机的三个端口设为一个链路汇聚聚合口,在汇聚交换机上创建VLAN30
汇聚交换机与接入交换机的下联端口设置为TRUNK模式,学生宿舍用户多业务多流量大,需要信道较宽,所以上联端口与和新交换机的三个端口设置为一个链路聚合口,在汇聚交换机上创建VLAN40和VLAN50
网管机房接入交换机直接与核心交换机相连,上联端口与核心交换机的三个端口设为一个链路汇聚聚合口在网管机房接入交换机创建VLAN200
核心交换机上需要设置4组汇聚端口分别对应汇聚层的四个汇聚交换机
根据汇聚层的VLAN设置,需要在核心交换机配置对应的VLAN10-50和VLAN200并对其配置相应的虚拟IP地址和子网掩码,为接入层提供网关,最后开通核心交换机的路由功能,提供整个校园网的路由功能,使用IP routing开启路由功能
(3)校园网核心交换机上配置DHCP功能,使其能够为校园网除了服务器外提供DHCP服务。
(1)根据IP地址规划,学校与Internet服务提供商ISP租用了210.28.180.0/24中的两个IP地址(210.28.180.100和210.28.180.200)
(2)校园网出口路由器使用210.28.180.10/24而外部网路由器使用210.28.180.20/24
(3)动态路由协议:核心交换机上配置动态路由协议;校园网出口路由器上配置动态路由协议;外部网路由器上配置动态路由协议
进行校园网内终端动态网络参数自动配置、交换机生成树配置、出口路由器NAT配置,以及WWW服务器和DNS服务器配置,实现校园网内部正常运行的同时,做到与外部网的适当隔离。
1.出口路由器的PAT配置:校园网出口路由器的PAT配置,主要完成出口地址池的建立,使得内部终端应用能够使用假定向ISP租用210.28.180.100和210.28.180.200地址,,所有内网地址全部转化为210.28.180.100的外网地址,通过端口映射将校园网的web服务器80端口映射为外部地址210.28.180.200的端口80,使得校园网的服务器能够被外部网访问。
2.在核心交换机使用扩展IP ACL禁止学生宿舍1访问校园网的FTP服务器,禁止学生宿舍2访问校园网的web服务器。
3.校园网生成树协议的配置:在实际应用中,为了防止环路,需要在各个交换机上打开生成树协议。将STP协议转换成RSTP协议。
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
xz2(config)#
xz2(config)#hostname xz1
xz1(config)#int vlan10
xz1(config-if)#ip address 192.168.10.254 255.255.255.0
xz1(config-if)#no shut
xz1(config-if)#exit
xz1(config)#int vlan 20
xz1(config-if)#ip add
xz1(config-if)#ip address 192.168.20.254 255.255.255.0
xz1(config-if)#no shut
xz1(config-if)#exit
xz1(config)#int f0/1
xz1(config-if)#switch access vlan 10
% Access VLAN does not exist. Creating vlan 10
xz1(config-if)#exit
xz1(config)#int f1/1
xz1(config-if)#sw acc vlan 20
% Access VLAN does not exist. Creating vlan 20
xz1(config-if)#int f3/1
xz1(config-if)#switch mode trunk
xz1(config-if)#end
Switch>enable
Switch#conf t
Switch(config)#hostname xz2
xz2(config)#int vlan10
xz2(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
xz2(config-if)#ip address 192.168.10.254 255.255.255.0
xz2(config-if)#no shut
xz2(config-if)#exit
xz2(config)#int vlan 20
xz2(config-if)#ip address 192.168.20.254 255.255.255.0
xz2(config-if)#no shut
xz2(config-if)#exit
xz2(config)#int f3/1
xz2(config-if)#sw mo acc
xz2(config-if)#sw ac vlan 10
xz2(config-if)#sw mo acc
xz2(config-if)#sw acc vlan 20
xz2(config-if)#
xz2(config-if)#exit
xz2(config)#int f2/1
xz2(config-if)#sw mo trunk
xz2(config-if)#end
xz>en
xz#conf t
xz(config)#int vlan 10
xz(config-if)#ip address 192.168.10.254 255.255.255.0
xz(config-if)#no shut
xz(config-if)#exit
xz(config)#int vlan 20
xz(config-if)#ip address 192.168.20.254 255.255.255.0
xz(config-if)#no shut
xz(config-if)#exit
xz(config)#int range f2/1,f3/1
xz(config-if-range)#sw mode trunk
xz(config-if-range)#exit
xz(config)#int range f1/1,f0/1
xz(config-if-range)#sw mo trunk
xz(config-if-range)#channel-g
xz(config-if-range)#channel-group 4 mode on
xz(config-if-range)#
Creating a port-channel interface Port-channel 4
xz(config-if-range)#end
Switch>en
Switch#conf
Switch(config)#hostname jx1
jx1(config)#int vlan 30
jx1(config-if)#ip address 192.168.30.254 255.255.255.0
jx1(config-if)#no shut
jx1(config-if)#exit
jx1(config)#int f1/1
jx1(config-if)#switch mo acc
jx1(config-if)#switch acc vlan 30
% Access VLAN does not exist. Creating vlan 30
jx1(config-if)#
jx1(config)#int f2/1
jx1(config-if)#switch mo acc
jx1(config-if)#switch acc vlan 30
jx1(config-if)#int f0/1
jx1(config-if)#sw mo tr
jx1(config-if)#sw mo trunk
jx1(config-if)#end
Switch>
Switch>en
Switch#conf
Switch(config)#host jx2
jx2(config)#int vlan 30
jx2(config-if)#ip address 192.168.30.254 255.255.255.0
jx2(config-if)#no shut
jx2(config-if)#exit
jx2(config)#int f1/1
jx2(config-if)#switch mode acc
jx2(config)#int f2/1
jx2(config-if)#switch mode acc
jx2(config-if)#switch acc vlan 30
% Access VLAN does not exist. Creating vlan 30
jx2(config-if)#int f1/2
%Invalid interface type and number
jx2(config)#int f1/1
jx2(config-if)#switch acc vlan 30
jx2(config-if)#int f0/1
jx2(config-if)#switch mode trunk
jx2(config-if)#end
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname jx
jx(config)#int vlan 30
jx(config-if)#ip address 192.168.30.254 255.255.255.0
jx(config-if)#no shut
jx(config-if)#int range f3/1,e9/1
jx(config-if-range)#sw mo trunk
jx(config-if-range)#ex
jx(config)#int range f0/1,f1/1,f2/1
jx(config-if-range)#sw mo trunk
jx(config-if-range)#channel-group 1 mode on
jx(config-if-range)#
Creating a port-channel interface Port-channel 1
jx(config-if-range)#end
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname ss1
ss1(config)#int vlan 40
ss1(config-if)#ip address 192.168.40.254 255.255.255.0
ss1(config-if)#no shut
ss1(config-if)#exit
ss1(config)#int f0/1
ss1(config-if)#switch mode acc
ss1(config-if)#sw acc vlan 40
% Access VLAN does not exist. Creating vlan 40
ss1(config-if)#int f1/1
ss1(config-if)#switch mode acc
ss1(config-if)#sw acc vlan 40
ss1(config-if)#int f3/1
ss1(config-if)#switch mode trunk
Switch>en
Switch#conf t
Switch(config)#hostname ss2
ss2(config)#int vlan50
ss2(config-if)#ip address 192.168.50.254 255.255.255.0
ss2(config-if)#no shut
ss2(config-if)#exit
ss2(config)#int f1/1
ss2(config-if)#sw mo acc
ss2(config-if)#sw acc vlan 50
% Access VLAN does not exist. Creating vlan 50
ss2(config-if)#
ss2(config-if)#int f2/1
ss2(config-if)#sw mode acc
ss2(config-if)#sw acc vlan 50
ss2(config-if)#exit
ss2(config)#int f0/1
ss2(config-if)#switch mode trunk
ss2(config-if)#end
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname ss
ss(config)#int vlan 40
ss(config-if)#ip address 192.168.40.254 255.255.255.0
ss(config-if)#no shut
ss(config-if)#ex
ss(config)#int vlan 50
ss(config-if)#ip address 192.168.50.254 255.255.255.0
ss(config-if)#no shut
ss(config-if)#ex
ss(config)#int range f3/1,e9/1
ss(config-if-range)#sw mo trunk
ss(config-if-range)#int range f0/1,f1/1,f2/1
ss(config-if-range)#sw mo trunk
ss(config-if-range)#channel-group 2 mode on
ss(config-if-range)#
Creating a port-channel interface Port-channel 2
end
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname jifang
jifang(config)#int vlan 200
jifang(config-if)#ip add 192.168.200.254 255.255.255.0
jifang(config-if)#no shut
jifang(config-if)#exit
jifang(config)#int range g9/1,g8/1,g7/1
jifang(config-if-range)#sw mo acc
jifang(config-if-range)#sw acc vlan 200
jifang(config-if-range)#exit
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int range f0/1,f1/1
Switch(config-if-range)#sw mo trunk
Switch(config-if-range)#channel-group 3 mode on
Switch(config-if-range)#
Creating a port-channel interface Port-channel 3
Switch(config-if-range)#end
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/11, changed state to up
Switch(config-if-range)#int range g1/0/4,g1/0/5,g1/0/6
Switch(config-if-range)#channel-group 1 mode on
Switch(config-if-range)#ex
Switch(config)#int range g1/0/10,g1/0/11
Switch(config-if-range)#channel-group 3 mod
Switch(config-if-range)#channel-group 3 mode on
Switch(config-if-range)#int range g1/0/7,g1/0/8,g1/0/9
Switch(config-if-range)# channel-group 2 mode on
Switch(config-if-range)#int range g1/0/2,g1/0/3
Switch(config-if-range)#channel-group 4 mode on
Switch(config-if-range)#
Creating a port-channel interface Port-channel 4
Switch(config-if-range)#ex
Switch(config)#end
Switch#conf
Switch(config)#int vlan 10
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#exit
Switch(config)#int vlan 20
Switch(config-if)#ip address 192.168.20.254 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#ex
Switch(config)#int vlan 30
Switch(config-if)#ip address 192.168.30.254 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#exit
Switch(config-if)#int vlan 40
Switch(config-if)#ip address 192.168.40.254 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 50
Switch(config-if)#ip address 192.168.50.254 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#exit
Switch(config)#int vlan 200
Switch(config-if)#ip address 192.168.255.254 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#exit
Switch(config)#int vlan 300
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#ex
Switch(config)#ip routing
Switch#
Switch#conf t
Switch(config)#service dhcp
Switch(config)#ip dhcp pool vlan10
Switch(dhcp-config)#network 192.168.10.0 255.255.255.0
Switch(dhcp-config)#dns-server 192.168.200.11
Switch(dhcp-config)#default-router 192.168.10.254
Switch(dhcp-config)#exit
Switch(config)#
Switch(config)#ip dhcp pool vlan20
Switch(dhcp-config)#network 192.168.20.0 255.255.255.0
Switch(dhcp-config)#dns-server 192.168.200.11
Switch(dhcp-config)#default-router 192.168.20.254
Switch(dhcp-config)#exit
Switch(config)#ip dhcp pool vlan30
Switch(dhcp-config)#network 192.168.30.0 255.255.255.0
Switch(dhcp-config)#dns-server 192.168.200.11
Switch(dhcp-config)#default-router 192.168.30.254
Switch(dhcp-config)#ex
Switch(config)#ip dhcp pool vlan40
Switch(dhcp-config)#network 192.168.40.0 255.255.255.0
Switch(dhcp-config)#dns-server 192.168.200.11
Switch(dhcp-config)#default-router 192.168.40.254
Switch(dhcp-config)#ex
Switch(config)#ip dhcp pool vlan50
Switch(dhcp-config)#network 192.168.50.0 255.255.255.0
Switch(dhcp-config)#dns-server 192.168.200.11
Switch(dhcp-config)#default-router 192.168.50.254
Switch(dhcp-config)#ex
Switch(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.10
Switch(config)#ip dhcp excluded-address 192.168.10.254 192.168.10.254
Switch(config)#ip dhcp excluded-address 192.168.20.1 192.168.20.21
Switch(config)#ip dhcp excluded-address 192.168.20.254 192.168.20.254
Switch(config)#ip dhcp excluded-address 192.168.30.1 192.168.30.32
Switch(config)#ip dhcp excluded-address 192.168.30.254 192.168.30.254
Switch(config)#ip dhcp excluded-address 192.168.40.1 192.168.40.43
Switch(config)#ip dhcp excluded-address 192.168.40.254 192.168.40.254
Switch(config)#ip dhcp excluded-address 192.168.50.1 192.168.50.54
Switch(config)#ip dhcp excluded-address 192.168.50.254 192.168.50.254
Switch(config)#end
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#router rip
Switch(config-router)#v 2
Switch(config-router)#network 192.168.10.0
Switch(config-router)#network 192.168.20.0
Switch(config-router)#network 192.168.30.0
Switch(config-router)#network 192.168.40.0
Switch(config-router)#network 192.168.50.0
Switch(config-router)#network 192.168.200.0
Switch(config-router)#network 192.168.1.0
Switch(config-router)#network 210.28.180.0
Switch(config-router)#network 10.10.10.0
Switch(config-router)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#access-list 110 deny tcp 192.168.40.0 0.0.0.255 host 192.168.200.22 eq 20
Switch(config)#access-list 110 deny tcp 192.168.40.0 0.0.0.255 host 192.168.200.22 eq 21
Switch(config)#access-list 110 deny tcp 192.168.50.0 0.0.0.255 host 192.168.200.33 eq 80
Switch(config)#access-list 110 deny tcp 192.168.50.0 0.0.0.255 host 192.168.200.33 eq 443
Switch(config)#access-list 110 permit ip any any
Switch(config)#int vlan 200
Switch(config-if)#ip access-group 110 out
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname out
out(config)#int f0/0
out(config-if)#ip address 192.168.1.2 255.255.255.0
out(config-if)#no shut
out(config-if)#ex
out(config)#int f1/0
out(config-if)#ip address 210.28.108.10 255.255.255.0
out(config-if)#no shut
out#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
out(config)#router rip
out(config-router)#v 2
out(config-router)#network 192.168.10.0
out(config-router)#network 210.28.180.0
out(config-router)#end
out#conf t
Enter configuration commands, one per line. End with CNTL/Z.
out(config)#int f0/0
out(config-if)#ip nat inside
out(config-if)#ex
out(config)#int f1/0
out(config-if)#ip nat outside
out(config-if)#ex
out(config)#ip nat pool test 210.28.180.100 210.28.180.100 netmask 255.255.255.0
out(config)#ip nat inside source list 10 pool test overload
out(config)#access-list 10 permit 192.168.10.0 0.0.0.255
out(config)#ip nat inside source list 20 pool test overload
out(config)#access-list 20 permit 192.168.20.0 0.0.0.255
out(config)#ip nat inside source list 30 pool test overload
out(config)#access-list 30 permit 192.168.30.0 0.0.0.255
out(config)#ip nat inside source list 40 pool test overload
out(config)#access-list 40 permit 192.168.40.0 0.0.0.255
out(config)#ip nat inside source list 50 pool test overload
out(config)#access-list 50 permit 192.168.50.0 0.0.0.255
配置外网只能通过210.28.180.200访问校园网web服务器
out(config)#ip nat inside source static tcp 192.168.200.33 80 210.28.180.200 80
out(config)#end
Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname outside
outside(config)#int f0/0
outside(config-if)#ip address 210.28.180.20 255.255.255.0
outside(config-if)#no shut
outside(config-if)#ex
outside(config)#int f1/0
outside(config-if)#ip address 10.10.10.1 255.255.255.0
outside(config-if)#no shut
outside(config)#
outside(config)#
outside(config)#router rip
outside(config-router)#v 2
outside(config-router)#network 210.28.180.0
outside(config-router)#network 10.10.10.0
outside(config-router)#end
outside#
%SYS-5-CONFIG_I: Configured from console by console
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。