企業私有網絡構建運維


企業私有網絡構建運維

交換網絡的構建與配置

規划拓撲

拓撲描述

部門1網絡為子網1:192.168.1.0/24,對應VLAN10

部門2網絡為子網2:192.168.2.0/24,對應VLAN20

部門1、部門2的計算機分別通過交換機SW2、SW3接入,然后通過總交換機SW1互連

拓撲圖

將所有設備啟動

配置各個設備

配置過程說明

SW1:需要創建vlan、配置access和trunk接口、並將相應接口加入對應vlan10、vlan20中

SW2:需要創建vlan、配置access和trunk接口、並將相應接口加入對應vlan10、vlan20中

SW3:需要創建vlan、配置access和trunk接口、並將相應接口加入對應vlan10、vlan20中

S1配置步驟

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.

[Huawei]sysname SW1

[SW1]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.

[SW1]interface GigabitEthernet 0/0/1

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

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

[SW1-GigabitEthernet0/0/1]quit

[SW1]interface GigabitEthernet 0/0/2

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

[SW1-GigabitEthernet0/0/2]port default vlan 20

[SW1-GigabitEthernet0/0/2]quit

[SW1]interface GigabitEthernet 0/0/3

[SW1-GigabitEthernet0/0/3]port link-type trunk

[SW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20

[SW1-GigabitEthernet0/0/3]quit

[SW1]interface GigabitEthernet 0/0/4

[SW1-GigabitEthernet0/0/4]port link-type trunk

[SW1-GigabitEthernet0/0/4]port trunk allow-pass vlan 10 20

[SW1-GigabitEthernet0/0/4]quit

S2配置步驟

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.

[Huawei]sysname SW2

[SW2]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.

[SW2]interface GigabitEthernet 0/0/1

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

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

[SW2-GigabitEthernet0/0/1]quit

[SW2]interface GigabitEthernet 0/0/2

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

[SW2-GigabitEthernet0/0/2]port default vlan 20

[SW2-GigabitEthernet0/0/2]quit

[SW2]interface GigabitEthernet 0/0/3

[SW2-GigabitEthernet0/0/3]port link-type trunk

[SW2-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20

[SW2-GigabitEthernet0/0/3]quit

S3配置步驟

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.

[Huawei]sysname SW3

[SW3]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.

[SW3]interface GigabitEthernet 0/0/1

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

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

[SW3-GigabitEthernet0/0/1]quit

[SW3]interface GigabitEthernet 0/0/2

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

[SW3-GigabitEthernet0/0/2]port default vlan 20

[SW3-GigabitEthernet0/0/2]quit

[SW3]interface GigabitEthernet 0/0/3

[SW3-GigabitEthernet0/0/3]port link-type trunk

[SW3-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20

[SW3-GigabitEthernet0/0/3]quit

配置PC地址

PC1  192.168.1.1/24

PC2  192.168.2.2/24

PC3  192.168.1.3/24

PC4  192.168.2.4/24

PC5  192.168.1.5/24

PC6  192.168.2.6/24

配置PC1地址

配置PC1地址為192.168.1.1/24

配置PC2地址 

配置PC2地址為192.168.2.2/24

配置PC3地址

配置PC3地址為192.168.1.3/24

配置PC4地址 

配置PC4地址為192.168.2.4/24

配置PC5地址 

配置PC5地址為192.168.1.5/24

配置PC6地址

配置PC6地址為192.168.2.6/24

 

網絡連通性測試

打開PC1命令行,通過ping命令對其他PC機進行連通測試

路由網絡的構建與配置

規划拓撲

架構分析

在構建的局域網中,通過路由器間配置靜態路由,實現PC1和PC2主機直接連通,主機網段不能與路由器直接互聯網段通信

拓撲描述

路由器之間通過靜態路由設置路由策略。通過配置Cloud設備,R1和R2路由器之間建立通信

R1路由器:配置指向192.168.2.0/24網絡的靜態路由,下一跳為R2接口地址。配置指向192.168.1.0/24網絡的靜態路由,下一跳為R3接口地址

R2路由器:配置指向192.168.1.0/24網絡的靜態路由,下一跳為R1接口地址。配置指向192.168.2.0/24網絡的靜態路由,下一跳為R4接口地址

R3路由器:配置指向192.168.2.0/24網絡的靜態路由,下一跳為R1接口地址

R4路由器:配置指向192.168.1.0/24網絡的靜態路由,下一跳為R2接口地址

拓撲圖

路由器使用AR2220

 

配置cloud 

添加cloud設備

將cloud設備拖入拓撲中,雙擊進行配置,增加UDP端口,UDP端口為Cloud設備與虛擬設備的連接端

添加端口映射 

添加端口映射,入端口編號為UDP1端口編號,出端口編號為UDP2編號,勾選“雙向通道”復選框,單擊下方“增加”按鈕,可以在端口映射表中查看添加的端口映射關系

連接cloud和路由器 

配置路由器

R1路由器配置

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.

[Huawei]sysname R1

[R1]interface GigabitEthernet 0/0/0

[R1-GigabitEthernet0/0/0]ip address 12.12.12.1 30
May 13 2020 18:38:44-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.

[R1-GigabitEthernet0/0/0]quit

[R1]interface GigabitEthernet 0/0/1

[R1-GigabitEthernet0/0/1]ip address 192.168.101.1 30
May 13 2020 18:40:16-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.

[R1-GigabitEthernet0/0/1]quit

[R1]ip route-static 192.168.2.0 24 12.12.12.2

[R1]ip route-static 192.168.1.0 24 192.168.101.2

R2路由器配置

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.

[Huawei]sysname R2

[R2]interface GigabitEthernet 0/0/0

[R2-GigabitEthernet0/0/0]ip address 12.12.12.2 30
May 13 2020 18:45:20-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.

[R2-GigabitEthernet0/0/0]quit

[R2]interface GigabitEthernet 0/0/1

[R2-GigabitEthernet0/0/1]ip address 192.168.101.5 30
May 13 2020 18:45:59-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.

[R2-GigabitEthernet0/0/1]quit

[R2]ip route-static 192.168.1.0 24 12.12.12.1

[R2]ip route-static 192.168.2.0 24 192.168.101.6

R3路由器配置

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.

[Huawei]sysname R3

[R3]interface GigabitEthernet 0/0/0

[R3-GigabitEthernet0/0/0]ip address 192.168.101.2 30
May 13 2020 18:51:11-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.

[R3-GigabitEthernet0/0/0]quit

[R3]interface GigabitEthernet 0/0/1

[R3-GigabitEthernet0/0/1]ip address 192.168.1.1 24
May 13 2020 18:51:40-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.

[R3-GigabitEthernet0/0/1]quit

[R3]ip route-static 192.168.2.0 24 192.168.101.1

R4路由器配置

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.

[Huawei]sysname R4

[R4]interface GigabitEthernet 0/0/0

[R4-GigabitEthernet0/0/0]ip address 192.168.101.6 30
May 13 2020 18:54:42-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.

[R4-GigabitEthernet0/0/0]quit

[R4]interface GigabitEthernet 0/0/1

[R4-GigabitEthernet0/0/1]ip address 192.168.2.1 24
May 13 2020 18:55:09-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.

[R4-GigabitEthernet0/0/1]quit

[R4]ip route-static 192.168.1.0 24 192.168.101.5

PC配置IP地址

PC1配置IP地址

配置PC1地址為192.168.1.2/24,網關地址為192.168.1.1

 

PC2配置IP地址 

配置PC2地址為192.168.2.2/24,網關地址為192.168.2.1

 

PC1連通測試 

在PC1上進入命令行模式,通過PING命令對PC2 IP地址和R4路由器上行端口IP地址進行測試

 

 

PC2連通測試 

在PC2上進入命令行模式,通過PING命令對PC1 IP地址和R3路由器上行端口IP地址進行測試

 

 

使用模擬器配置無線網絡 

規划拓撲

拓撲分析

對於小型局域網中,鑒於接入設備的需求,需要在局域網中部署無線網絡,通過無線控制器AC管理網絡中所有的無線AP設備,下發無線配置信息。無線網絡發布2.4G和5G信號,滿足不同設備的連接使用

拓撲描述

交換機配置vlan100為連接無線設備,網關地址為10.10.100.1/22。

AC控制器管理地址為172.16.101.1/24,設置vlan101為AC和AP之間管理VLAN,配置DHCP地址池,使AP可以自動獲取管理地址

拓撲圖

交換機使用S5700,AC使用AC6005,AP使用AP2050

配置設備 

SW1交換機配置

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.

[Huawei]sysname SW1

[SW1]vlan batch 100 101
Info: This operation may take a few seconds. Please wait for a moment...done.

[SW1]interface GigabitEthernet 0/0/1

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

[SW1-GigabitEthernet0/0/1]port trunk pvid vlan 101

[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101

[SW1-GigabitEthernet0/0/1]quit

[SW1]interface GigabitEthernet 0/0/2

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

[SW1-GigabitEthernet0/0/2]port trunk pvid vlan 101

[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 100 101

[SW1-GigabitEthernet0/0/2]quit

[SW1]interface GigabitEthernet 0/0/3

[SW1-GigabitEthernet0/0/3]port link-type trunk

[SW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 100 101

[SW1-GigabitEthernet0/0/3]quit

[SW1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.

[SW1]interface Vlanif 100

[SW1-Vlanif100]ip address 10.10.100.1 22

[SW1-Vlanif100]dhcp select interface

[SW1-Vlanif100]dhcp server dns-list 114.114.114.114 223.5.5.5

[SW1-Vlanif100]quit

AC1交換機配置

<AC6005>system-view
Enter system view, return user view with Ctrl+Z.

[AC6005]sysname AC1

[AC1]vlan batch 100 101
Info: This operation may take a few seconds. Please wait for a moment...done.

[AC1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.

[AC1]interface GigabitEthernet 0/0/1

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

[AC1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 101

[AC1-GigabitEthernet0/0/1]quit

[AC1]interface Vlanif 101

[AC1-Vlanif101]ip address 172.16.101.1 24

[AC1-Vlanif101]dhcp select interface

[AC1-Vlanif101]quit

[AC1]wlan

[AC1-wlan-view]ap-group name ap-group1
Info: This operation may take a few seconds. Please wait for a moment.done.

[AC1-wlan-ap-group-ap-group1]regulatory-domain-profile default
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-group1]quit

[AC1-wlan-view]quit

[AC1]capwap source interface Vlanif 101

[AC1]wlan

[AC1-wlan-view]ap auth-mode mac-auth 

[AC1-wlan-view]ap-id 0 ap-mac 00e0-fc41-4200         ##在AP1上用dis arp查詢MAC地址

[AC1-wlan-ap-0]ap-name area_1

[AC1-wlan-ap-0]ap-group ap-group1

Warning: This operation may cause AP reset. If the country code changes, it will
 clear channel, power and antenna gain configurations 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]quit

[AC1-wlan-view]ap-id 1 ap-mac 00e0-fcb8-7380

[AC1-wlan-ap-1]ap-name area_2

[AC1-wlan-ap-1]ap-group ap-group1

Warning: This operation may cause AP reset. If the country code changes, it will
 clear channel, power and antenna gain configurations 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-1]quit

[AC1-wlan-view]display ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
nor  : normal          [2]
--------------------------------------------------------------------------------
---------------
ID   MAC            Name   Group     IP             Type            State STA Up
time
--------------------------------------------------------------------------------
---------------
0    00e0-fc41-4200 area_1 ap-group1 172.16.101.252 AP2050DN        nor   0   2M
:0S
1    00e0-fcb8-7380 area_2 ap-group1 172.16.101.91  AP2050DN        nor   0   1M
:58S
--------------------------------------------------------------------------------
---------------
Total: 2

[AC1-wlan-view]security-profile name Internet

[AC1-wlan-sec-prof-Internet]security wpa-wpa2 psk pass-phrase a1234567 aes

[AC1-wlan-sec-prof-Internet]quit

[AC1-wlan-view]ssid-profile name Internet

[AC1-wlan-ssid-prof-Internet]ssid Internet
Info: This operation may take a few seconds, please wait.done.
[AC1-wlan-ssid-prof-Internet]quit

[AC1-wlan-view]vap-profile name Internet

[AC1-wlan-vap-prof-Internet]forward-mode direct-forward

[AC1-wlan-vap-prof-Internet]service-vlan vlan-id 100
Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-Internet]security-profile Internet
Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-Internet]ssid-profile Internet
Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-Internet]quit

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

[AC1-wlan-ap-group-ap-group1]vap-profile Internet wlan 1 radio 0
Info: This operation may take a few seconds, please wait...done.

[AC1-wlan-ap-group-ap-group1]vap-profile Internet wlan 1 radio 1
Info: This operation may take a few seconds, please wait...done.

[AC1-wlan-ap-group-ap-group1]quit

查看無線網絡信號

 

設備連接無線 

筆記本連接2.4G信號

打開STA1筆記本配置窗口,選擇信道1,輸入密碼,點擊確定,應用

 

連接完成后SSID顯示狀態為已連接

 

通過命令行查看電腦的無線ip地址,通過PING命令訪問網關地址10.10.100.1

> ifconfig

筆記本連接5G信號 

打開STA2筆記本配置窗口,選擇信道149,輸入密碼,點擊確定,應用

 

Vap列表顯示狀態為“已連接”

 

命令行模式查看當前WIFI獲取的IP地址,通過PING命令訪問STA1筆記本電腦地址為10.10.103.25

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM