项目案例实验一(实验方案例子)

网友投稿 328 2022-09-17


项目案例实验一(实验方案例子)

实验目的:

掌握中小型园区网络的基本部署。熟悉中小型园区网络的部署流程、排错思路等。

实验拓扑:

实验要求:

一、设备管理

依据图中拓扑,为不同设备定义主机名。全局关闭域名解析Console和VTY线路下关闭线路超时并开启输出同步。为实现安全登录,要求创建本地用户名bdqn,密码benet,并将其调用到console和vty线路下;要求设置特权密码benet,并要求加密存储。所有交换机管理vlan为vlan1,所在网段为192.168.1.0/24,其中sw1的管理IP为192.168.1.1/24,sw2为192.168.1.2/24,sw3为192.168.1.3/24,要求能够实现远程管理。

二、交换技术

1、Trunk技术

所有交换机之间强制启用Trunk,并采用802.1Q进行封装。全局native vlan定义为vlan10。要求Trunk上只允许vlan1、10、20的数据通过。

2、VTP技术

sw1为Server,其他交换机为client。vtp管理域为bdqn,密码为benet全局开启vtp修剪在sw1上创建vlan10/20,并要求同步将不同用户接口放入相应的vlan中。

3、STP技术

部署PVST,要求sw1为vlan10的root,vlan20的secondary,sw2为vlan20的root,vlan10的secondary,实现负载均衡。开启Portfast,加速用户接入网络接口开启Uplinkfast,加速直连链路收敛开启Backbonefast,加速骨干链路收敛

4、L3Switching技术

sw1作为vlan10的主网关,vlan20的备网关,其中vlan10地址为192.168.10.252/24,vlan20地址为192.168.20.252/24;sw2作为vlan20的主网关,vlan10的备网关,其中vlan10网关为192.168.10.253/24,vlan20网关为192.168.20.253/24.在sw1和sw2上部署HSRP,vlan10的网关为192.168.10.254,vlan20的网关为192.168.20.254.在sw1部署DHCP服务,方便不同vlan的主机接入网络,其中主dns为202.96.128.86,备用dns为119.29.29.29在三层交换机上开启三层路由功能,并要求vlan间主机能够互相通信

5、Ethernetchannel技术

为实现链路冗余并提供网络带宽,要求在汇聚层交换机之间部署L2 Ethernetchannel技术。

6、Port-Security技术

为实现用户接入安全,要求所有用户接入接口启用端口安全技术。开启地址学习,并定义最大MAC数为1.定义用户违反规则为shutdown模式,并要求在30s后自动恢复

三、路由技术

在三层交换机sw1、sw2和R1上部署动态路由协议OSPF,并通告到骨干区域中。在边缘路由器R1上部署默认路由,用于访问互联网。

四、安全策略

要求只允许管理员地址192.168.10.1/24能够远程访问边缘路由器R1。为实现内网主机访问互联网,要求部署PAT技术。

实验配置:

(本实验使用GNS3模拟,用路由器模拟PC,默认初始进入特权模式)

设备管理:

config terminalhostname SW1 //定义主机名no ip domain-lookup //关闭域名解析line con 0 //进入console口logging synchronous //输出同步exec-timeout 0 0 //关闭线路超时login local //只允许本地登录exitline vty 0 4 //进入vty口logging synchronousexec-timeout 0 0login localtransport input telnet //通过telnet连接exitusername bdqn privilege 15 password benet //配置用户名、密码enable secret benet //加密存储密码

(上述代码路由交换设备通用,以SW1举例)

SW1:

interface vlan 1ip address 192.168.1.1 255.255.255.0no shutdownexit

SW2:

interface vlan 1ip address 192.168.1.2 255.255.255.0no shutdownexit

SW3:

interface vlan 1ip address 192.168.1.3 255.255.255.0no shutdownexit

交换技术:

Trun技术:

SW1:

interface range e 0/1 - 3switchport trunk encapsulation dot1qswitchport mode trunkswitchport trunk allowed vlan 1,10,20 //只允许VLAN1,10,20通过trunk链路switchport trunk native vlan 10 //配置trunk本征VLAN为VLAN10exit

SW2:

interface range e 0/1 - 3switchport trunk encapsulation dot1qswitchport mode trunkswitchport trunk allowed vlan 1,10,20switchport trunk native vlan 10exit

SW3:

interface range e 0/0 - 1switchport trunk encapsulation dot1qswitchport mode trunk switchport trunk allowed vlan 1,10,20switchport trunk native vlan 10exit

VTP技术:

SW1:

vlan 10,20 //创建VLANvtp domain bdqn //创建域名vtp mode server //配置vtp 服务器模式vtp password benet //配置vtp密码vtp pruning //配置vtp修剪

SW2:

vtp domain bdqnvtp mode clientvtp password benet

SW3:

vtp domain bdqnvtp mode clientvtp password benet

查看VLAN,可以看到SW2和SW3学习到VLAN10和VLAN20

STP技术:

SW1:

spanning-tree mode pvstspanning-tree vlan 10 root primaryspanning-tree vlan 20 root secondaryspanning-tree backbonefast //开启backbonefast

SW2:

spanning-tree mode pvstspanning-tree vlan 10 root secondaryspanning-tree vlan 20 root primaryspanning-tree backbonefast

SW3:

查看生成树:

show spanning-tree vlan 10show spanning-tree vlan 20

配置STP:

nterface e0/2switchport mode accessswitchport access vlan 10spanning-tree portfast edgeexitinterface e0/3switchport mode access switchport access vlan 20spanning-tree portfast edge //配置速端口exitspanning-tree uplinkfast //开启uplinkfastspanning-tree backbonefast

HSRP:

SW1:

track 100 interface e0/0 line-protocolinterface vlan 10ip address 192.168.10.252 255.255.255.0standby 10 ip 192.168.10.254standby 10 priority 110standby 10 preemptstandby 10 track 100 decrement 30no shutdowninterface vlan 20ip address 192.168.20.252 255.255.255.0standby 20 ip 192.168.20.254standby 20 priority 90standby 20 preemptno shutdowninterface loopback 0ip address 2.2.2.2 255.255.255.255no shutdownexit

SW2:

track 100 interface e0/0 line-protocolinterface vlan 10ip address 192.168.10.253 255.255.255.0standby 10 ip 192.168.10.254standby 10 priority 90standby 10 preemptno shutdowninterface vlan 20ip address 192.168.20.253 255.255.255.0standby 20 ip 192.168.20.254standby 20 priority 110standby 20 preemptstandby 20 track 100 decrement 30no shutdowninterface loopback 0ip address 3.3.3.3 255.255.255.255no shutdownexit

DHCP:

SW1:

ip dhcp pool vlan10network 192.168.10.0 /24default-router 192.168.10.254dns-server 8.8.8.8exitip dhcp pool vlan20network 192.168.20.0 /24default-router 192.168.20.254dns-server 8.8.8.8exit

配置路由:

SW1:

interface e0/0no switchportip address 172.16.1.2 255.255.255.0no shutdownexitip routingip route 0.0.0.0 0.0.0.0 172.16.1.1

SW2:

interface e0/0no switchportip address 172.16.2.2 255.255.255.0no shutdownexitip routingip route 0.0.0.0 0.0.0.0 172.16.2.1

Ethernetchannel技术 :

SW1:

interface range e0/1 - 2channel-group 1 mode onexitinterface port-channel 1switchport trunk encapsulation dot1qswitchport mode trunkswitchport trunk native vlan 10switchport trunk allowed vlan 1,10,20exit

SW2:

interface range e0/1 - 2channel-group 1 mode onexitinterface port-channel 1switchport trunk encapsulation dot1qswitchport mode trunkswitchport trunk native vlan 10switchport trunk allowed vlan 1,10,20exit

Port-Security技术:

SW3:

interface range e0/2 - 3switchport port-securityswitchport port-security mac-address stickyswitchport port-security maximum 1 //最大MAC地址为1switchport port-security violation shutdown //违反则关闭端口exiterrdisable recovery cause allerrdisable recovery interval 60 //60秒后恢复

路由技术:

端口配置:

R1:

config terminalinterface e0/1ip address 172.16.1.1 255.255.255.0duplex fullno shutdowninterface e0/2ip address 172.16.2.1 255.255.255.0duplex fullno shutdownexitinterface e0/0ip address 100.1.1.1 255.255.255.0no shutdowninterface loopback 0ip address 1.1.1.1 255.255.255.255no shutdownexit

R2:

config terminalinterface e0/0ip address 100.1.1.2 255.255.255.0no shutdowninterface loopback 0ip address 202.96.128.86 255.255.255.0no shutdownexit

配置OSPF:

R1:

router ospf 1router-id 1.1.1.1network 172.16.1.0 0.0.0.255 area 0network 172.16.2.0 0.0.0.255 area 0network 1.1.1.1 0.0.0.0 area 0default-information originate always //重分发默认路由exitip route 0.0.0.0 0.0.0.0 100.1.1.2

SW1:

router ospf 1router-id 2.2.2.2network 172.16.1.0 0.0.0.255 area 0network 2.2.2.2 0.0.0.0 area 0redistribute connected subnets //重分发直连路由exit

SW2:

router ospf 1router-id 3.3.3.3network 3.3.3.3 0.0.0.0 area 0network 172.16.2.0 0.0.0.255 area 0redistribute connected subnetsexit

安全策略:

R1:

access-list 1 permit host 192.168.10.1 //配置标准ACLline vty 0 4access-class 1 in //应用端口exitaccess-list 2 permit 192.168.10.0 0.0.0.255access-list 2 permit 192.168.20.9 0.0.0.255ip nat inside source list 2 interface e0/0 overloadinterface e0/0ip nat outsideinterface e0/1ip nat insideint e0/2ip nat insideexit

测试结果:

配置成功,实验结束

(如有疏漏,还请读者指出)


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:项目实验(项目实验员是干嘛的)
下一篇:Java中Map集合的常用方法详解
相关文章

 发表评论

暂时没有评论,来抢沙发吧~