蘇州某金融公司因擴大規(guī)模,需要對網(wǎng)絡進行升級改造,原有的拓撲及設(shè)備清單,如下圖所示:
一、需求分析
IT提出的升級改造要求如下:
1、原來的VLAN10留給綜合部使用;
2、VLAN12繼續(xù)為門禁監(jiān)控使用;
3、新建VLAN30、40、50、60、80給不同的部門使用;
4、新建VLAN90,給訪客專用,訪客的設(shè)備無論是有線網(wǎng)絡還是WIFI都連接到VLAN90,且只允許訪問外網(wǎng),不得訪問內(nèi)網(wǎng)資源;
二、配置過程
1、有道是:“有圖走遍天下,無圖寸步難行”,所以根據(jù)IT提出的要求,拓撲圖更新如下:
2、核心交換機的配置:
Sys CORE *設(shè)備交換機名稱為CORE
vlan bat 2 10 20 30 40 50 60 80 90 *創(chuàng)建這些VLAN
dhcp enable *開啟DHCP功能
dhcp snooping enable *開啟dhcp snooping功能
以下是配置各個vlanif接口IP
interface Vlanif2
ip address 192.168.1.2 255.255.255.0
dhcp select global
#
interface Vlanif10
ip address 192.168.8.1 255.255.255.0
dhcp select global
#
interface Vlanif20
ip address 192.168.12.1 255.255.255.0
dhcp select global
#
interface Vlanif30
ip address 192.168.200.1 255.255.255.0
dhcp select global
#
interface Vlanif40
ip address 192.168.204.1 255.255.255.0
#
interface Vlanif50
ip address 192.168.208.1 255.255.255.0
#
interface Vlanif60
ip address 192.168.212.1 255.255.255.0
#
interface Vlanif80
ip address 192.168.100.1 255.255.255.0
dhcp select global
#
interface Vlanif90
ip address 192.168.104.1 255.255.255.0
dhcp select global
#
以下是配置各個VLAN的DHCP地址池
ip pool vlan2
gateway-list 192.168.1.2
network 192.168.1.0 mask 255.255.255.0
excluded-ip-address 192.168.1.3 192.168.1.20
dns-list 114.114.114.114
#
ip pool vlan10
gateway-list 192.168.8.1
network 192.168.8.0 mask 255.255.255.0
excluded-ip-address 192.168.8.2 192.168.8.20
dns-list 114.114.114.114
#
ip pool vlan20
gateway-list 192.168.12.1
network 192.168.12.0 mask 255.255.255.0
excluded-ip-address 192.168.12.2 192.168.12.20
dns-list 114.114.114.114
#
ip pool vlan30
gateway-list 192.168.200.1
network 192.168.200.0 mask 255.255.255.0
excluded-ip-address 192.168.200.2 192.168.200.20
dns-list 114.114.114.114
#
ip pool vlan80
gateway-list 192.168.100.1
network 192.168.100.0 mask 255.255.255.0
excluded-ip-address 192.168.100.2 192.168.100.20
dns-list 114.114.114.114
#
ip pool vlan90
gateway-list 192.168.104.1
network 192.168.104.0 mask 255.255.255.0
excluded-ip-address 192.168.104.2 192.168.104.20
dns-list 114.114.114.114
#
以下是配置trunk模式的交換機接口,注意:級聯(lián)AP或者AP交換機的接口,必須配置port trunk pvid vlan x(x=AP所在管理VLAN)
interface GigabitEthernet0/0/2
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 2
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk pvid vlan 2
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/7
port link-type access
port default vlan 2
#
需要一條靜態(tài)路由,ip route-static 0.0.0.0 0.0.0.0 192.168.1.1,上外網(wǎng)從192.168.1.1出去
VLAN90為訪客專用網(wǎng)段,因此ACL配置如下:
acl 3001 *創(chuàng)建acl3001
rule 5 deny ip source 192.168.104.0 0.0.0.255 destination 192.168.0.0 0.0.255.255 *拒絕從192.168.104.0/24網(wǎng)段到192.168.0.0/16網(wǎng)段(內(nèi)網(wǎng)全部網(wǎng)段)的流量
rule 10 permit ip source 192.168.104.0 0.0.0.255 destination 0.0.0.0 0 *允許104網(wǎng)段上外網(wǎng)
traffic classifier vlan90 *創(chuàng)建流分類
if-match acl 3001 *將ACL與流分類關(guān)聯(lián)
q
[CORE]traffic behavior vlan90 *創(chuàng)建流行為
[CORE-behavior-vlan90]deny *配置流行為動作為拒絕報文通過
[CORE-behavior-vlan90]q
[CORE]traffic policy vlan90 *創(chuàng)建流策略
[CORE-trafficpolicy-vlan90]classifier vlan90 behavior vlan90 *將流分類vlan90與流行為vlan90關(guān)聯(lián)
[CORE]vlan 90 *注意,此處不是int vlan90,而是 vlan 90命令
[CORE-vlan90]traffic-policy vlan90 inbound *流策略應用在接口入方向
[CORE-vlan90]dis th
3、AC控制器的配置:
vlan bat 2 80 90 *創(chuàng)建VLAN2 80 90,其中2為AP管理,80為員工使用,90為訪客使用
dhcp enable
interface Vlanif2
ip address 192.168.1.3 255.255.255.0
dhcp select global
#
interface Vlanif80
dhcp select global
#
interface Vlanif90
dhcp select global
#
interface GigabitEthernet0/0/1
port link-type trunk
p t a v a
capwap source interface vlanif2 *配置AC建立CAPWAP隧道使用的接口,即interface vlanif2作為AC的源接口
Wlan *進入無線配置
dis ap unauthorized record *查看未通過認證的AP
regulatory-domain-profile name wlan *創(chuàng)建域管理模板
q
ap-group name aps *創(chuàng)建名為aps的ap組,目的是把AP添加進AP組里方便管理
regulatory-domain-profile wlan *AP組引用域管理模板
ap-id 0 ap-mac 00e0-xxxx-xx80 *導入該AP的mac,ap-id 0是手動為ap設(shè)置的順序編號,注意不可重復
ap-group aps *加入到AP組aps里
dis ap all *查看上線AP,狀態(tài):nor為正常工作,可能需要等2分鐘
dis ap unauthorized record *查看未通過認證的AP(備用命令)
ap-confirm all *確認未通過認證的ap,允許其上線(備用命令)
undo ap auth-mode *關(guān)閉AP認證,直接讓AP自動完成上線(備用命令)
ap-id 0 *進入編號為0的AP配置,這里通過display this查看當前配置信息,也可以通過ap-name給AP命名(備用命令)
security-profile name office *創(chuàng)建安全模板
security wpa-wpa2 psk pass-phrase 18913530333 aes *配置安全模式、WIFI密碼
security-profile name guest *創(chuàng)建安全模板
security wpa-wpa2 psk pass-phrase 123456789 aes *配置安全模式、WIFI密碼
ssid-profile name offic *創(chuàng)建ssid模板
ssid office *ssid名稱,即wifi名
ssid-profile name guest *創(chuàng)建ssid模板
ssid guest *ssid名稱,即wifi名
vap-profile name office *創(chuàng)建vap模板
service-vlan vlan-id 80 *配置業(yè)務vlan,即給連接無線用戶分配地址的vlan,此處為VLAN80
ssid-profile offic *引用ssid模板
security-profile office *引用安全模板
forward-mode direct-forward *配置轉(zhuǎn)發(fā)模式:直接轉(zhuǎn)發(fā),華為設(shè)備默認直接轉(zhuǎn)發(fā),此命令可不執(zhí)行
vap-profile name guest
service-vlan vlan-id 90
ssid-profile guest
security-profile guest
ap-group name aps *進入AP組配置
regulatory-domain-profile wlan
radio 0
vap-profile office wlan 1
vap-profile guest wlan 2
后增加AP
dis ap unauthorized record
ap-confirm all
ap-id 1
ap-group aps
ap-name 19f-1
增加5G信號
[AC6605-wlan-view]ap-group name aps
[AC6605-wlan-ap-group-aps]radio 1
[AC6605-wlan-group-radio-aps/1]vap-pro
[AC6605-wlan-group-radio-aps/1]vap-profile office wlan 1
[AC6605-wlan-group-radio-aps/1]vap-pro
[AC6605-wlan-group-radio-aps/1]vap-profile guest wlan 2
交換機的VLAN端口配置略……
三、驗證配置:
1、不同VLAN的PC之間互相訪問,通過;
2、VLAN90的PC,只能上外網(wǎng),禁止訪問內(nèi)網(wǎng)其他VLAN,通過;
3、無線終端連接WIFI,兩個SSID綁定了不同的VLAN,通過;
4、連接guest這個SSID的無線終端,可以訪問外網(wǎng)
5、連接guest這個SSID,即在VLAN90內(nèi)的客戶端, 禁止訪問內(nèi)網(wǎng)其他VLAN
6、連接guest這個SSID的無線終端,哪怕是在同一個VLAN內(nèi),也是禁止互相訪問的