用ENSP华为模拟器做图书馆得网络配置和设计

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

文章目录


目录:

摘要:

随着网络的发展,校园网已经普及到各大校园。图书馆里作为一个纷繁复杂的工作,必须提高其管理网络的机制,规划一个好的网络组建方案,因此本课程设计以实例的形式对校园图书馆网络的设计方案进行分析并给出校园图书馆网络关键设备的配置步骤、配置命令以及拓扑结构和网络安全的方法。本次设计是以宁夏大学新华学院的图书馆为主体建筑而进行的,围绕其各个楼层不同的功能和不同的环境,来进行有目的的网络规划和网络布局,合理有效的选择所需的网络设备及进行网络布线,并最终完成一个可以真正完善且合理的网络组网方案设计。

一、图书馆拓扑图和早期概念图

我们先看一下整个设计拓扑


二、核心代码展示

配置思路和布局:

Sw1:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]sys sw1(改名)

[sw1]un in EN(关闭信息提示)

Info: Information center is disabled.

[sw1]VLAN batch 10 20 30 40 50 60 100 101(创建vlan)

[sw1]int Vlanif 10(进入vlan10)

[sw1-Vlanif10]ip ad 192.168.10.254 24(配置IP,做后面配置的网关)

[sw1-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.252(配置VRRP协议的虚拟IP地址)

[sw1-Vlanif10]vrrp vrid  10 priority 120(配置优先级)

[sw1-Vlanif10]vrrp vrid 10 track interface GigabitEthernet 0/0/1(创建监视端口实现快速主备切换)

[sw1-Vlanif10]vrrp vrid 10 track interface GigabitEthernet 0/0/2(创建监视端口实现快速主备切换)

[sw1-Vlanif10]q(推出)

[sw1]int Vlanif 20(进入vlan20)

[sw1-Vlanif20]ip address 192.168.20.254 24(配置IP)

[sw1-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.252(配置虚拟IP)

[sw1-Vlanif20]vrrp vrid 20 priority 120(配置优先级)

[sw1-Vlanif20]vrrp vrid 20 track interface GigabitEthernet 0/0/1(创建监视端口实现快速主备切换)

[sw1-Vlanif20]vrrp vrid 20 track interface GigabitEthernet 0/0/2(创建监视端口实现快速主备切换)

[sw1-Vlanif20]q

[sw1]int Vlanif 30

[sw1-Vlanif30]ip ad 192.168.30.254 24

[sw1-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.252

[sw1-Vlanif30]vrrp vrid 30 priority 120

[sw1-Vlanif30]vrrp vrid 30 track interface GigabitEthernet 0/0/1

[sw1-Vlanif30]vrrp vrid 30 track interface GigabitEthernet 0/0/2

[sw1-Vlanif30]q

[sw1-Vlanif40]vrrp vrid 40 priority 120[sw1-Vlanif40]vrrp vrid 40 track interface GigabitEthernet 0/0/1

[sw1-Vlanif40]vrrp vrid 40 track interface GigabitEthernet 0/0/2

[sw1-Vlanif40]q

[sw1]int Vlanif 50

[sw1-Vlanif50]ip ad 192.168.50.254 24

[sw1-Vlanif50]vrrp vrid 50 virtual-ip 192.168.50.252

[sw1-Vlanif50]vrrp vrid 50 track interface GigabitEthernet 0/0/1

[sw1-Vlanif50]vrrp vrid 50 track interface GigabitEthernet 0/0/2

[sw1-Vlanif50]q

[sw1]int Vlanif 60

[sw1-Vlanif60]

[sw1-Vlanif60]ip address 192.168.60.254 24

[sw1-Vlanif60]vrrp vrid 60 virtual-ip 192.168.60.252

[sw1-Vlanif60]vrrp vrid 60 track interface GigabitEthernet 0/0/1

[sw1-Vlanif60]vrrp vrid 60 track interface GigabitEthernet 0/0/2

[sw1-Vlanif60]q

[sw1]int Vlanif 70

Error: The VLAN does not exist.

[sw1]int Vlanif 100

[sw1-Vlanif100]ip ad 192.168.100.254 24

[sw1-Vlanif100]undo shutdown

Info: Interface Vlanif100 is not shutdown.

[sw1-Vlanif100]

[sw1-Vlanif100]q

[sw1]vlan batch 5 7(创建vlan)

Info: This operation may take a few seconds. Please wait for a moment...done.

[sw1]int Vlanif 5

[sw1-Vlanif5]ip ad 192.168.5.2 24

[sw1-Vlanif5]int vlan7

[sw1-Vlanif7]ip ad 192.168.7.2 24

[sw1-Vlanif7]q

[sw1]int g

[sw1]int GigabitEthernet 0/0/1

[sw1-GigabitEthernet0/0/1]port link-type access (配置接口类型为接入模式)

[sw1-GigabitEthernet0/0/1]port default vlan 5(允许通过vlan5)

[sw1-GigabitEthernet0/0/1]int g

[sw1-GigabitEthernet0/0/1]q

[sw1]int g

[sw1]int GigabitEthernet 0/0/2

[sw1-GigabitEthernet0/0/2]port link-type access

[sw1-GigabitEthernet0/0/2]port default vlan 7

[sw1-GigabitEthernet0/0/2]q

[sw1] User interface con0 is available

[sw1]int e

[sw1]int Eth-Trunk 1(创建链路聚合端口)

[sw1-Eth-Trunk1]port link-type trunk (改为通道模式)

[sw1-Eth-Trunk1]port trunk allow-pass vlan all (允许所有vlan通过)

[sw1-Eth-Trunk1]trunkport GigabitEthernet 0/0/3(加入trunk口)

[sw1-Eth-Trunk1]trunkport GigabitEthernet 0/0/4

[sw1]int g

[sw1]int GigabitEthernet 0/0/5

[sw1-GigabitEthernet0/0/5]port link-type trunk

[sw1-GigabitEthernet0/0/5]port trunk allow-pass vlan all

[sw1-GigabitEthernet0/0/5]int GigabitEthernet 0/0/6

[sw1-GigabitEthernet0/0/6]port link-type trunk

[sw1-GigabitEthernet0/0/6]port trunk allow-pass vlan all

[sw1-GigabitEthernet0/0/6]int GigabitEthernet 0/0/7

[sw1-GigabitEthernet0/0/7]port link-type trunk

[sw1-GigabitEthernet0/0/7]port trunk allow-pass vlan all

[sw1-GigabitEthernet0/0/7]int GigabitEthernet 0/0/10

[sw1-GigabitEthernet0/0/10]port link-type trunk

[sw1-GigabitEthernet0/0/10]port trunk allow-pass vlan all

[sw1-GigabitEthernet0/0/10]q

[sw1]int GigabitEthernet 0/0/11

[sw1-GigabitEthernet0/0/11]port link-type trunk

[sw1-GigabitEthernet0/0/11]port trunk allow-pass vlan all

[sw1-GigabitEthernet0/0/11]int GigabitEthernet 0/0/12

[sw1-GigabitEthernet0/0/12]port link-type trunk

[sw1-GigabitEthernet0/0/12]port trunk allow-pass vlan all

[sw1-GigabitEthernet0/0/12]int GigabitEthernet 0/0/9

[sw1-GigabitEthernet0/0/9]port link-type trunk

[sw1-GigabitEthernet0/0/9]port trunk allow-pass vlan all

[sw1-GigabitEthernet0/0/9]int GigabitEthernet 0/0/8

[sw1-GigabitEthernet0/0/8]port link-type trunk

[sw1-GigabitEthernet0/0/8]port trunk allow-pass vlan all

[sw1-GigabitEthernet0/0/8]port trunk pvid vlan 101

[sw1-GigabitEthernet0/0/8]

[sw1]stp en

[sw1]stp enable (配置生成树)

[sw1]stp region-configuration进入生成树配置模式) 

[sw1-mst-region]re

[sw1-mst-region]region-name huawei(改名)

[sw1-mst-region]re

[sw1-mst-region]region-name

[sw1-mst-region]revision-level 5(配置生成树的权限)

[sw1-mst-region]instance 1 vlan 10 20 30 100(把vlan划分到实例中)

[sw1-mst-region]instance 2 vlan 40 50 60

[sw1-mst-region]active region-configuration (激活实例)

Info: This operation may take a few seconds. Please wait for a moment...done.

[sw1]stp instance 1 root primary (配置实例的优先级的主次)

[sw1]stp instance 2 root secondary (配置实例的优先级的主次)

[sw1]

Sw2:

[sw2]

[sw2]un in en

Info: Information center is disabled.

[sw2]vlan batch 10 20 30 40 50 60 100 101 6 8(创建vlan)

Info: This operation may take a few seconds. Please wait for a moment...done.

[sw2]int vlan

[sw2]int Vlanif 10

[sw2]int vl

[sw2]int Vlanif 20

[sw2-Vlanif20]ip address 192.168.20.253 24

[sw2-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.252

[sw2-Vlanif20]vrrp vrid 20 track interface GigabitEthernet 0/0/1

[sw2-Vlanif20]vrrp vrid 20 track interface GigabitEthernet 0/0/2

[sw2-Vlanif20]q

[sw2]int Vlanif 30

[sw2-Vlanif30]ip ad 192.168.30.253 24

[sw2-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.252

[sw2-Vlanif30]vrrp vrid 30 track interface GigabitEthernet 0/0/1

[sw2-Vlanif30]vrrp vrid 30 track interface GigabitEthernet 0/0/2

[sw2-Vlanif30]q

[sw2]int Vlanif 40

[sw2-Vlanif40]ip ad 192.168.40.253 24

[sw2-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.252

[sw2-Vlanif40]vrrp vrid 40 track interface GigabitEthernet 0/0/1

[sw2-Vlanif40]vrrp vrid 40 track interface GigabitEthernet 0/0/2

[sw2-Vlanif40]q

[sw2]int Vlanif 50

[sw2-Vlanif50]q

[sw2]int Vlanif 40

[sw2-Vlanif40]display this

#

interface Vlanif40

 ip address 192.168.40.253 255.255.255.0

 vrrp vrid 40 virtual-ip 192.168.40.252

 vrrp vrid 40 track interface GigabitEthernet0/0/1

 vrrp vrid 40 track interface GigabitEthernet0/0/2

#

return

[sw2-Vlanif40]vrrp vrid 40 priority 120

[sw2-Vlanif40]display this

#

interface Vlanif40

 ip address 192.168.40.253 255.255.255.0

 vrrp vrid 40 virtual-ip 192.168.40.252

 vrrp vrid 40 priority 120

 vrrp vrid 40 track interface GigabitEthernet0/0/1

 vrrp vrid 40 track interface GigabitEthernet0/0/2

#

return

[sw2-Vlanif40]q

[sw2]int v

[sw2]int Vlanif 50

[sw2-Vlanif50]ip ad 192.168.50.253 24

[sw2-Vlanif50]vrrp vrid 50 virtual-ip 192.168.50.252

[sw2-Vlanif50]vrrp vrid 50 priority 120

[sw2-Vlanif50]vrrp vrid 50 track interface GigabitEthernet 0/0/1

[sw2-Vlanif50]vrrp vrid 50 track interface GigabitEthernet 0/0/2

[sw2-Vlanif50]q

[sw2]int vlna

[sw2]int vl

[sw2]int Vlanif 60

[sw2-Vlanif60]ip ad 192.168.60.253 24

[sw2-Vlanif60]vrrp vrid 60 virtual-ip 192.168.60.252

[sw2-Vlanif60]vrrp vrid 60 priority 120

[sw2-Vlanif60]vrrp vrid 60 track interface GigabitEthernet 0/0/1

[sw2-Vlanif60]vrrp vrid 60 track interface GigabitEthernet 0/0/2

[sw2-Vlanif60]

[sw2-Vlanif60]q

[sw2][sw2-Vlanif60]

[sw2-Vlanif60]q

[sw2]int Vlanif 6

[sw2-Vlanif6]ip ad 192.168.6.2 24

[sw2-Vlanif6]q

[sw2]int Vlanif 8

[sw2-Vlanif8]ip ad 192.168.8.2 24

[sw2-Vlanif8]q

[sw2]int g

[sw2]int GigabitEthernet 0/0/1

[sw2-GigabitEthernet0/0/1]port link-type access

[sw2-GigabitEthernet0/0/1]port default vlan 8

[sw2-GigabitEthernet0/0/1]int g0/0/2

[sw2-GigabitEthernet0/0/2]port link-type access

[sw2-GigabitEthernet0/0/2]port default vlan 6

[sw2-GigabitEthernet0/0/2]q

[sw2]int e

[sw2]int Eth-Trunk

[sw2]int Eth-Trunk 1

[sw2-Eth-Trunk1]port link-type trunk

[sw2-Eth-Trunk1]port trunk allow-pass vlan all

[sw2-Eth-Trunk1]trunkport GigabitEthernet 0/0/3

Info: This operation may take a few seconds. Please wait for a moment...done.

[sw2-Eth-Trunk1]trunkport GigabitEthernet 0/0/4

[sw2-Eth-Trunk1]q

[sw2]int g

[sw2]int GigabitEthernet 0/0/6

[sw2-GigabitEthernet0/0/6]port link-type trunk

[sw2-GigabitEthernet0/0/6]port trunk allow-pass vlan all

[sw2-GigabitEthernet0/0/6]int GigabitEthernet 0/0/7

[sw2-GigabitEthernet0/0/7]port link-type trunk

[sw2-GigabitEthernet0/0/7]p

[sw2-GigabitEthernet0/0/7]port trunk allow-pass vlan all

[sw2-GigabitEthernet0/0/7]int GigabitEthernet 0/0/5

[sw2-GigabitEthernet0/0/10]int GigabitEthernet 0/0/10

[sw2-GigabitEthernet0/0/10]int GigabitEthernet 0/0/9

[sw2-GigabitEthernet0/0/9]port link-type trunk

[sw2-GigabitEthernet0/0/9]port trunk allow-pass vlan all

[sw2-GigabitEthernet0/0/9]int GigabitEthernet 0/0/11

[sw2-GigabitEthernet0/0/11]port link-type trunk

[sw2-GigabitEthernet0/0/11]port trunk allow-pass vlan all

[sw2-GigabitEthernet0/0/11]

[sw2]st

[sw2]stp en

[sw2]stp enable

[sw2]st

[sw2]stp re

[sw2]stp region-configuration

[sw2-mst-region]re

[sw2-mst-region]region-name huawei

[sw2-mst-region]re

[sw2-mst-region]region-name

[sw2-mst-region]revision-level 5

[sw2-mst-region]instance 1 vlan 10 20 30

[sw2-mst-region]instance 2 vlan 40 50 60

[sw2-mst-region]undo instance 1 vlan 10 20 30

[sw2-mst-region]instance 1 vlan 10 20 30 100

[sw2]stp instance 1 root secondary

[sw2]stp instance 2 root primary

[sw2]

Sw3:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]sys sw3

[sw3]un in en

Info: Information center is disabled.

[sw3]vlan batch vlan 10 20 30 40 50 60 100 101

[sw3]stp enable

[sw3]st

[sw3]stp re

[sw3]stp region-configuration

[sw3-mst-region]re

[sw3-mst-region]region-name huawei

[sw3-mst-region]re

[sw3-mst-region]region-name

[sw3-mst-region]revision-level 5

[sw3-mst-region]in

[sw3-mst-region]instance 1 v

[sw3-mst-region]instance 1 vlan 10 20 30 100

[sw3-mst-region]in

[sw3-mst-region]instance 2 v

[sw3-mst-region]instance 2 vlan 40 50 60

[sw3-mst-region]active region-configuration

[sw3-mst-region]q

[sw3]int g

[sw3]int GigabitEthernet 0/0/1

[sw3-GigabitEthernet0/0/1]port link-type trunk

[sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan al

[sw3-GigabitEthernet0/0/1]int g0/0/2

[sw3-GigabitEthernet0/0/2]port link-type trunk

[sw3-GigabitEthernet0/0/2]po

[sw3-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[sw3-GigabitEthernet0/0/2]int e0/0/1

[sw3-Ethernet0/0/1]port link-type access

[sw3-Ethernet0/0/1]port default vlan 10

[sw3-Ethernet0/0/1]int e0/0/2

[sw3-Ethernet0/0/2]port link-type access

[sw3-Ethernet0/0/2]port default vlan 10

[sw3-Ethernet0/0/2]q

[sw3]

Sw4:

The device is running!

<Huawei>

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]un in en

Info: Information center is disabled.

[Huawei]sys sw4

[sw4]vlan batch 10 20 30 40 50 60 100 101

Info: This operation may take a few seconds. Please wait for a moment...done.

[sw4]stp enable

[sw4]stp enable

[sw4]stp region-configuration

[sw4-mst-region]region-name huawei

[sw4-mst-region]region-name huawei

[sw4-mst-region]revision-level 5

[sw4-mst-region]instance 1 vlan 10 20 30 100

[sw4-mst-region]display this

#

stp region-configuration

 region-name huawei

 revision-level 5

 instance 1 vlan 10 20 30 100

 instance 2 vlan 40 50 60

 active region-configuration

#

return

[sw4-mst-region]st

[sw4-mst-region]stp re

[sw4-mst-region]q

[sw4]st

[sw4]stp re

[sw4]stp region-configuration

[sw4-mst-region]q

[sw4]int g

[sw4]int GigabitEthernet 0/0/1

[sw4-GigabitEthernet0/0/1]port link-type trunk

[sw4-GigabitEthernet0/0/1]port trunk allow-pass vlan all

[sw4-GigabitEthernet0/0/1]int g0/0/2

[sw4-GigabitEthernet0/0/2]port link-type trunk

[sw4-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[sw4-GigabitEthernet0/0/2]q

[sw4]int e

[sw4]int Eth

[sw4]int Ethernet0/0/1

[sw4-Ethernet0/0/1]port link-type access

[sw4-Ethernet0/0/1]port default vlan 20

[sw4-Ethernet0/0/1]int e0/0/2

[sw4-Ethernet0/0/2]port link-type ac

[sw4-Ethernet0/0/2]port default vlan 20

[sw4-Ethernet0/0/2]q

[sw4]q

<sw4>save

Sw5:

The device is running!

<Huawei>

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]un in en

Info: Information center is disabled.

[Huawei]sys sw5

[sw5]vlan batch 10 20 30 40 50 60 100 101

[sw5]vlan batch 10 20 30 40 50 60 100 101

Info: This operation may take a few seconds. Please wait for a moment...done.

[sw5]stp enable

[sw5]stp region-configuration

[sw5-mst-region]region-name huawei

[sw5-mst-region]revision-level 5

[sw5-mst-region]instance 1 vlan 10 20 30 100

[sw5-mst-region]instance 2 vlan 40 50 60

[sw5-mst-region]active region-configuration

[sw5-GigabitEthernet0/0/2]port link-type trunk

[sw5-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[sw5-GigabitEthernet0/0/2]int e

[sw5-GigabitEthernet0/0/2]int e0/0/1

[sw5-Ethernet0/0/1]port link-type access

[sw5-Ethernet0/0/1]port default vlan 30

[sw5-Ethernet0/0/1]int e0/0/2

[sw5-Ethernet0/0/2]port link-type access

[sw5-Ethernet0/0/2]port default vlan 30

[sw5-Ethernet0/0/2]

AC1:

The device is running!

<AC6605>sys

Enter system view, return user view with Ctrl+Z.

[AC6605]sys AC1

[AC1]v

[AC1]vl

[AC1]vlan 100 101

              ^

Error: Too many parameters found at '^' position.

[AC1]vl

[AC1]vlan b

[AC1]vlan batch 100 101

Info: This operation may take a few seconds. Please wait for a moment...done.

[AC1]int v

[AC1]int Vlanif 100

[AC1-Vlanif100]ip ad 192.168.100.1 24

[AC1-Vlanif100]q

[AC1]dhcp enable (开启DHCP功能)

Info: The operation may take a few seconds. Please wait for a moment.done.

[AC1]int v

[AC1]int Vlanif 100(进入vlan100)

[AC1-Vlanif100]dhcp select global (DHCP配置指向全局)

[AC1-Vlanif100]q

[AC1]int v

[AC1]int Vlanif 101

[AC1-Vlanif101]ip ad 192.168.101.1 24(配置IP)

[AC1-Vlanif101]dhcp select interface (DHCP配置指向全局)

[AC1-Vlanif101]q

[AC1]ip poo

[AC1]ip pool v

[AC1]ip pool vlan100(创建地址池)

Info: It is successful to create an IP address pool.

[AC1-ip-pool-vlan100]ga

[AC1-ip-pool-vlan100]gateway-list 192.168.100.254(配置网关)

[AC1-ip-pool-vlan100]netw

[AC1-ip-pool-vlan100]network 192.168.100.0(配置地址池网段)

[AC1-ip-pool-vlan100]dn

[AC1-ip-pool-vlan100]dns-list 192.168.200.4(配置DNS)

[AC1-ip-pool-vlan100]ex

[AC1-wlan-view]re

[AC1-wlan-view]regulatory-domain-profile n

[AC1-wlan-view]regulatory-domain-profile name huawei-domin(指定域管理模块并设置域管理名)

[AC1-wlan-regulate-domain-huawei-domin]cou

[AC1-wlan-regulate-domain-huawei-domin]country-code cn (选择国家代码进行配置设定)

[AC1-wlan-regulate-domain-huawei-domin]country-code CN

Info: The current country code is same with the input country code.

[AC1-wlan-regulate-domain-huawei-domin]q

[AC1-wlan-view]ap-group name ap-huawei(创建ap组命名)

[AC1-wlan-ap-group-ap-huawei]re

[AC1-wlan-ap-group-ap-huawei]regulatory-domain-profile huawei-domin

Warning: Modifying the country code will clear channel, power and antenna gain c

onfigurations of the radio and reset the AP. Continue?[Y/N]:y

[AC1-wlan-ap-group-ap-huawei]q

[AC1-wlan-view]q

[AC1]capwap source interface Vlanif 101(配置原接口或源地址与AP建隧道)

[AC1]w

[AC1]wl

[AC1]wlan ap

[AC1]wlan

[AC1-wlan-view]ap-id 0 ap-mac 00e0-fc89-0220(ap接入控制,这里是mac认证)

[AC1-wlan-ap-0]ap-id 0 ap-mac 00e0-fc89-0220(配置AP认证模式:离线)

[AC1-wlan-ap-0]ap

[AC1-wlan-ap-0]ap-name area-1(创建AP的名字)

[AC1-wlan-ap-0]ap

[AC1-wlan-ap-0]ap-system-profile

                                 ^

Error: Incomplete command found at '^' position.

[AC1-wlan-ap-0]ap-system-profile

                                 ^

ations of the radio, Whether to c

ontinue? [Y/N]:y

Info: This operation may take a few seconds. Please wait for a moment.. done.

[AC1-wlan-ap-0]

[AC1-wlan-ap-0]q

[AC1-wlan-view]q

[AC1]dis

[AC1]display ap

[AC1]display ap-

[AC1]display ap-g

[AC1]display ap-group

                      ^

Error: Incomplete command found at '^' position.

[AC1]display ap a

[AC1]display ap all

Info: This operation may take a few seconds. Please wait for a moment.done.

Total AP information:

idle : idle            [1]

--------------------------------------------------------------------------------

---

ID   MAC            Name   Group     IP Type            State STA Uptime

--------------------------------------------------------------------------------

---

0    00e0-fc89-0220 area-1 ap-huawei -  -               idle  0   -

--------------------------------------------------------------------------------

---

Total: 1

[AC1]int g

[AC1]int GigabitEthernet 0/0/1(进入接口1)

[AC1-GigabitEthernet0/0/1]port link-type trunk(配置为通道模式) 

[AC1-GigabitEthernet0/0/1]port trunk allow-pass vlan all (允许所有vlan通过)

[AC1-GigabitEthernet0/0/1]

[AC1]w

[AC1]wlan

[AC1-wlan-view]se

[AC1-wlan-view]security-profile n

[AC1-wlan-view]security-profile name sec(配置安全模板)

[AC1-wlan-sec-prof-sec]security wpa2 psk pass-phrase huawei@123 aes(配置安全模板的密码)

[AC1-wlan-sec-prof-sec]q

[AC1-wlan-view]ssid-profile name ssid-1(配置SSID模板名称)

[AC1-wlan-ssid-prof-ssid-1]ss

[AC1-wlan-ssid-prof-ssid-1]ssid huawei(配置SSID名称)

Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-ssid-prof-ssid-1]q

[AC1-wlan-view]

[AC1-wlan-view]v

[AC1-wlan-view]venue-name-profile

[AC1-wlan-view]vap-profile n

[AC1-wlan-view]vap-profile name vap-1 (VAP名称)

[AC1-wlan-vap-prof-vap-1]forward-mode tunnel

Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-vap-1]se

[AC1-wlan-vap-prof-vap-1]security-profile

[AC1-wlan-vap-prof-vap-1]s

[AC1-wlan-vap-prof-vap-1]security-profile se

[AC1-wlan-vap-prof-vap-1]security-profile sec

Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-vap-1]se

[AC1-wlan-vap-prof-vap-1]service-vlan

[AC1-wlan-vap-prof-vap-1]security-profile

[AC1-wlan-vap-prof-vap-1]service-mode

[AC1-wlan-vap-prof-vap-1]service-vlan

[AC1-wlan-vap-prof-vap-1]security-profile

[AC1-wlan-vap-prof-vap-1]ss

[AC1-wlan-vap-prof-vap-1]ssid-profile ssid-1

Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-vap-1]q

[AC1-wlan-view]ap

[AC1-wlan-view]ap-

[AC1-wlan-view]ap-group n

[AC1-wlan-view]ap-group name ap

[AC1-wlan-view]ap-group name ap-huawei(创建AP组名称)

[AC1-wlan-ap-group-ap-huawei]vap-profile vap-1 wlan 1 radio 0(VAP模板名称)

Info: This operation may take a few seconds, please wait...done.

[AC1-wlan-ap-group-ap-huawei]q

[AC1-wlan-view]q

[AC1]

R2:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]un in en

Info: Information center is disabled.

[Huawei]sys R2

[R2]int g

[R2]int GigabitEthernet 0/0/0

[R2-GigabitEthernet0/0/0]dis

[R2-GigabitEthernet0/0/0]discardth

[R2-GigabitEthernet0/0/0]disp

[R2-GigabitEthernet0/0/0]display th

[R2-GigabitEthernet0/0/0]display this

[V200R003C00]

#

interface GigabitEthernet0/0/0

#

return

[R2-GigabitEthernet0/0/0]

[R2-GigabitEthernet0/0/0]

[R2-GigabitEthernet0/0/0]q

[R2]int g

[R2]int GigabitEthernet 1/0/0

[R2-GigabitEthernet1/0/0]ip ad

[R2-GigabitEthernet1/0/0]ip address 192.168.7.1

                                                ^

Error:Incomplete command found at '^' position.

[R2-GigabitEthernet1/0/0]ip address 192.168.7.1 24

[R2-GigabitEthernet1/0/0]int g

[R2-GigabitEthernet1/0/0]int g0/0/0

[R2-GigabitEthernet0/0/0]ip ad

[R2-GigabitEthernet0/0/0]ip address 192.168.4.2 24

[R2-GigabitEthernet0/0/0]int g0/0/1

[R2-GigabitEthernet0/0/1]ip ad

[R2-GigabitEthernet0/0/1]ip address 192.168.3.2 24

[R2-GigabitEthernet0/0/1]int g0/0/2

[R2-GigabitEthernet0/0/2]ip address 192.168.8.1 24

[R2-GigabitEthernet0/0/2]

[R2-GigabitEthernet0/0/2]

Sw1:

<sw1>sys

Enter system view, return user view with Ctrl+Z.

[sw1]os

[sw1]ospf 10

[sw1-ospf-10]ar

[sw1-ospf-10]area 0

[sw1-ospf-10-area-0.0.0.0]netw

[sw1-ospf-10-area-0.0.0.0]network 192.168.10.0 0.0.0.255

[sw1-ospf-10-area-0.0.0.0]network 192.168.20.0 0.0.0.255

[sw1-ospf-10-area-0.0.0.0]network 192.168.30.0 0.0.0.255

[sw1-ospf-10-area-0.0.0.0]network 192.168.40.0 0.0.0.255

[sw1-ospf-10-area-0.0.0.0]

[sw1-ospf-10-area-0.0.0.0]

Sw2:

[sw2]os

[sw2]ospf 20

[sw2-ospf-20]ar

[sw2-ospf-20]area 0

[sw2-ospf-20-area-0.0.0.0]netw

[sw2-ospf-20-area-0.0.0.0]network 192.168.10.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.20.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.30.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.40.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.50.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.60.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.6.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.8.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]

[sw2-ospf-20-area-0.0.0.0]

<sw2>

Sw1配置dhcp:

<sw1>

<sw1>

<sw1>

<sw1>

<sw1>sys

Enter system view, return user view with Ctrl+Z.

[sw1]

[sw1]ip pool vlan10

Info:It's successful to create an IP address pool.

[sw1-ip-pool-vlan10]netw

[sw1-ip-pool-vlan10]network 192.168.10.0 ma

[sw1-ip-pool-vlan10]network 192.168.10.0 mask 24

[sw1-ip-pool-vlan10]g

[sw1-ip-pool-vlan10]gateway-list 192.168.10.252

[sw1-ip-pool-vlan10]dns

[sw1-ip-pool-vlan10]dns-list 114.114.114.114

[sw1-ip-pool-vlan10]ex

[sw1-ip-pool-vlan10]excluded-ip-address 192.168.10.100 192.168.10.150

[sw1-ip-pool-vlan10]dhc

[sw1-ip-pool-vlan10]q

[sw1]int vl

[sw1]int Vlanif 10

[sw1-Vlanif10]dhcp select global

[sw1-Vlanif10]q

[sw1]ip poo

[sw1]ip pool vlan

[sw1]ip pool vlan20

Info:It's successful to create an IP address pool.

[sw1-ip-pool-vlan20]netw

[sw1-ip-pool-vlan20]network 192.168.20.0 ma

[sw1-ip-pool-vlan20]network 192.168.20.0 mask 24

[sw1-ip-pool-vlan20]g

[sw1-ip-pool-vlan20]gateway-list 192.168.20.252

[sw1-ip-pool-vlan20]dns

[sw1-ip-pool-vlan20]dns-list 114.114.114.114

[sw1-ip-pool-vlan20]ex

[sw1-ip-pool-vlan20]excluded-ip-address 192.168.20.100 192.168.20.150

[sw1-ip-pool-vlan20]q

[sw1]int vlan

[sw1]int Vlanif 20

[sw1-Vlanif20]dhcp select global

[sw1-Vlanif20]q

[sw1]

[sw1]ip pool vlan30

Info:It's successful to create an IP address pool.

[sw1-ip-pool-vlan30]netw

[sw1-ip-pool-vlan30]network 192.168.30.0 mask 24

[sw1-ip-pool-vlan30]g

[sw1-ip-pool-vlan30]gateway-list 192.168.30.252

[sw1-ip-pool-vlan30]dns

[sw1-ip-pool-vlan30]dns-list 114.114.114.114

[sw1-ip-pool-vlan30]ex

[sw1-ip-pool-vlan30]excluded-ip-address 192.168.30.100 192.168.30.150

[sw1-ip-pool-vlan30]q

[sw1]int v

[sw1]int Vlanif 30

[sw1-Vlanif30]dhcp select global

[sw1-Vlanif30]q

[sw1]ip poo

[sw1]ip pool vlan

[sw1]ip pool vlan40

Info:It's successful to create an IP address pool.

[sw1-ip-pool-vlan40]network 192.168.40.0 mask 24

[sw1-ip-pool-vlan40]dns

[sw1-ip-pool-vlan40]dns-list 114.114.114.114

[sw1-ip-pool-vlan40]g

[sw1-ip-pool-vlan40]gateway-list 192.168.40.252

[sw1-ip-pool-vlan40]ex

[sw1-ip-pool-vlan40]excluded-ip-address 192.168.40.100 192.168.40.150

[sw1-ip-pool-vlan40]q

[sw1]int v

[sw1]int Vlanif 40

[sw1-Vlanif40]dhcp select global

Info:It's successful to create an IP address pool.

[sw1-ip-pool-vlan50]dns

[sw1-ip-pool-vlan50]dns-list 114.114.114.114

[sw1-ip-pool-vlan50]ex

[sw1-ip-pool-vlan50]excluded-ip-address 192.168.50.100 192.168.50.150

[sw1-ip-pool-vlan50]q

[sw1]int v

[sw1]int Vlanif 50

[sw1-Vlanif50]dhcp select global

[sw1-Vlanif50]q

[sw1]int vlan

[sw1]ip poo

[sw1]ip pool v

[sw1]ip pool vlan60

Info:It's successful to create an IP address pool.

[sw1-ip-pool-vlan60]netw

[sw1-ip-pool-vlan60]network 192.168.60.0 ma

[sw1-ip-pool-vlan60]network 192.168.60.0 mask 24

[sw1-ip-pool-vlan60]g

[sw1-ip-pool-vlan60]gateway-list 192.168.60.252

[sw1-ip-pool-vlan60]dns

[sw1-ip-pool-vlan60]dns-list 114.114.114.114

[sw1-ip-pool-vlan60]ex

[sw1-ip-pool-vlan60]excluded-ip-address 192.168.60.100 192.168.60.150

[sw1-ip-pool-vlan60]q

[sw1]int v

[sw1]int Vlanif 60

[sw1-Vlanif60]dhcp select global

[sw1-Vlanif60]q

[sw1]

Sw2dhcp配置:

The device is running!

<sw2>sys

Enter system view, return user view with Ctrl+Z

[sw2-ip-pool-vlan10]g

[sw2-ip-pool-vlan10]gateway-list 192.168.10.252

[sw2-ip-pool-vlan10]dns

[sw2-ip-pool-vlan10]dns-list 114.114.114.114

[sw2-ip-pool-vlan10]ex

[sw2-ip-pool-vlan10]excluded-ip-address 192.168.10.100 192.168.10.150

[sw2-ip-pool-vlan10]q

[sw2]int v

[sw2]int Vlanif 10

[sw2-Vlanif10]dhcp select global

Error: Please enable DHCP in the global view first.

[sw2-Vlanif10]q

[sw2]dh

[sw2]dhcp enn

[sw2]dhcp en

[sw2]int Vlanif 10

[sw2-Vlanif10]dhcp select global

[sw2-Vlanif10]q

[sw2]ip poo

[sw2]ip pool vlan

[sw2]ip pool vlan20

Info:It's successful to create an IP address pool.

[sw2-ip-pool-vlan20]network 192.168.20.0 mask 24

[sw2-ip-pool-vlan20]dns

[sw2-ip-pool-vlan20]dns-list 114.114.114.114

[sw2-ip-pool-vlan20]dns

#

ip pool vlan20

 network 192.168.20.0 mask 255.255.255.0

 dns-list 114.114.114.114

#

return

[sw2-ip-pool-vlan20]g

[sw2-ip-pool-vlan20]gateway-list 192.168.20.252

[sw2-ip-pool-vlan20]ex

[sw2-ip-pool-vlan20]excluded-ip-address 192.168.20.100 192.168.20.150

[sw2-ip-pool-vlan20]q

[sw2]int v

[sw2]int Vlanif 20

[sw2-Vlanif20]dh

[sw2-Vlanif20]dhcp se

[sw2-Vlanif20]dhcp select g

[sw2-Vlanif20]dhcp select global

[sw2-Vlanif20]q

[sw2]ip poo

[sw2]ip pool v

[sw2]ip pool vlan30

Info:It's successful to create an IP address pool.

[sw2-ip-pool-vlan30]network 192.168.30.0 mask 24

[sw2-ip-pool-vlan30]dns

[sw2-ip-pool-vlan30]dns-list 114.114.114.114

[sw2-ip-pool-vlan30]g

[sw2-ip-pool-vlan30]gateway-list 192.168.30.252

[sw2-ip-pool-vlan30]ex

[sw2-ip-pool-vlan30]excluded-ip-address 192.168.30.100 192.168.30.150

[sw2-ip-pool-vlan30]q

[sw2]int v

[sw2]int Vlanif 30

[sw2-ip-pool-vlan40]network 192.168.40.0 mask 24

[sw2-ip-pool-vlan40]g

[sw2-ip-pool-vlan40]gateway-list 192.168.40.252

[sw2-ip-pool-vlan40]dns

[sw2-ip-pool-vlan40]dns-list 114.114.114.114

[sw2-ip-pool-vlan40]ex

[sw2-ip-pool-vlan40]excluded-ip-address 192.168.40.100 192.168.40.150

[sw2-ip-pool-vlan40]q

[sw2]int v

[sw2]int Vlanif 40

[sw2-Vlanif40]dhcp select global

[sw2-Vlanif40]q

[sw2]ip poo

[sw2]ip pool v

[sw2]ip pool vlan50

Info:It's successful to create an IP address pool.

[sw2-ip-pool-vlan50]netw

[sw2-ip-pool-vlan50]network 192.168.50.0ma

[sw2-ip-pool-vlan50]network 192.168.50.0 ma

[sw2-ip-pool-vlan50]network 192.168.50.0 mask 24

[sw2-ip-pool-vlan50]g

[sw2-ip-pool-vlan50]gateway-list 192.168.50.252

[sw2]int Vlanif 50

[sw2-Vlanif50]dh

[sw2-Vlanif50]dhcp se

[sw2-Vlanif50]dhcp select g

[sw2-Vlanif50]dhcp select global

[sw2-Vlanif50]q

[sw2]ip pool vlan60

Info:It's successful to create an IP address pool.

[sw2-ip-pool-vlan60]netw

[sw2-ip-pool-vlan60]network 192.168.60.0 ma

[sw2-ip-pool-vlan60]network 192.168.60.0 mask 24

[sw2-ip-pool-vlan60]g

[sw2-ip-pool-vlan60]gateway-list 192.168.60.252

[sw2]int Vlanif 60

[sw2-Vlanif60]dh

[sw2-Vlanif60]dhcp se

[sw2-Vlanif60]dhcp select g

[sw2-Vlanif60]dhcp select global

[sw2-Vlanif60]q

[sw2]

Telnet远程控制:

R2:

[R2]int v

[R2]int vt

[R2]us

[R2]user-i

[R2]user-interface v

[R2]user-interface vty 0 4(进入vty模式)

[R2-ui-vty0-4]au

[R2-ui-vty0-4]authentication-mode pa

[R2-ui-vty0-4]authentication-mode password (进入配置密码)

Please configure the login password (maximum length 16):wanglong

[R2-ui-vty0-4]us

[R2-ui-vty0-4]user l

[R2-ui-vty0-4]user le

[R2-ui-vty0-4]user pr

[R2-ui-vty0-4]user privilege l

[R2-ui-vty0-4]user privilege level 3(设置权限)

[R2-ui-vty0-4]

[R2-ui-vty0-4]

Sw14:

<Huawei>

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]int g

[Huawei]int GigabitEthernet 0/0/1

#

interface GigabitEthernet0/0/1

#

return

[Huawei-GigabitEthernet0/0/1]q

[Huawei]po

[Huawei]port lin

D 1.3.6.1.4.1.2011.5

.25.191.3.1 configurations have been changed. The current change number is 4, th

e change loop count is 0, and the maximum number of records is 4095.

[Huawei-GigabitEthernet0/0/1]port default vlan 10

Error: The VLAN does not exist.

[Huawei-GigabitEthernet0/0/1]q

[Huawei]vlan 10

[Huawei-vlan10]q

[Huawei]int g

[Huawei-GigabitEthernet0/0/1]port link-type access

[Huawei-GigabitEthernet0/0/1]port default vlan 10

[Huawei-GigabitEthernet0/0/1]

May 17 2022 16:15:28-08:00 Huawei %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif1 h

as turned into DOWN state.

[Huawei-GigabitEthernet0/0/1]

May 17 2022 16:15:31-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5

.25.191.3.1 configurations have been changed. The current change number is 6, th

e change loop count is 0, and the maximum number of records is 4095.int

[Huawei-GigabitEthernet0/0/1]int vlan10

[Huawei-Vlanif10]

May 17 2022 16:15:41-08:00 Huawei %%01IFNET/4/IF_STATE(l)[1]:Interface Vlanif10

has turned into UP state.

[Huawei-Vlanif10]ip address 10.1.1.2 24

[Huawei-Vlanif10]

May 17 2022 16:15:58-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol

 IP on the interface Vlanif10 has entered the UP state.

May 17 2022 16:16:01-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5

.25.191.3.1 configurations have been changed. The current change number is 7, th

e change loop count is 0, and the maximum number of records is 4095.

[Huawei-Vlanif10]q

[Huawei]user-interface vty 0 4

[Huawei-ui-vty0-4]authentication-mode password

[Huawei-ui-vty0-4]set authentication password simple wanglong

  • 网络测试

Ping 命令是Windows 中集成的一个专用于TCP/IP 协议网络中的测试工具,Ping 命令是用于查看网络上的主机是否在工作,它是通过向该主机发送ICMPECHO_REQUEST包进行测试而达到目的的。一般凡是应用TCP/IP 协议的局域网,当用户端与客户端之间无法正常进行访问或者网络工作出现各种不稳定的情况时,一定要先试用Ping 这个命令来测试一下网络的通信是否正常,多数时候是可以一次奏效的。

总结

当然,在本次设计的过程中,我们也遇到了很多的问题,比如设备的选择问题,市场上设备鱼龙混杂,究竟该如何选择设备以实现最大的性价比呢?最终经过比较,在楼层接入设备和总交换机的选择上我都参考了中关村在线最受好评的设备,保证了此次组网的技术与经济可行性。

在本次的组网设计之前,我们以为做一个图书馆网络的规划很简单,但我们真正着手做的时候才发现并不是想象中的那样简单,在完成设计出方案以后,我们对组建的网络进行了检验,发现有些主机之间并没有连通,但经过几次的调试与修改最终使主机之间连通,完成了图书馆网络的组建。我们更加深刻的认识到,对待任何事,首先是在态度上应该重视,只有认真去对待,才有心思去做好,其次,也对网络主干的设计及子网的规划和配置有了更加深刻的了解。在此过程中,我们学到了更多更细的基础知识,必将为今后的学习和工作带来更多的帮助。

猜你喜欢

转载自blog.csdn.net/qq_62466609/article/details/127797590