網(wǎng)絡(luò)工程師用這個方法竟然可以實現(xiàn)VLAN間的訪問權(quán)限_第1頁
網(wǎng)絡(luò)工程師用這個方法竟然可以實現(xiàn)VLAN間的訪問權(quán)限_第2頁
網(wǎng)絡(luò)工程師用這個方法竟然可以實現(xiàn)VLAN間的訪問權(quán)限_第3頁
網(wǎng)絡(luò)工程師用這個方法竟然可以實現(xiàn)VLAN間的訪問權(quán)限_第4頁
網(wǎng)絡(luò)工程師用這個方法竟然可以實現(xiàn)VLAN間的訪問權(quán)限_第5頁
已閱讀5頁,還剩4頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

網(wǎng)絡(luò)工程師用這個方法竟然可以實現(xiàn)VLAN間的訪問權(quán)限?。?!前言VLAN(VirtualLocalAreaNetwork)即虛擬局域網(wǎng),是將一個物理的LAN在邏輯上劃分成多個廣播域的通信技術(shù)。本文主要介紹通過流策略實現(xiàn)VLAN間三層隔離,也就是我們常說的對用戶增加訪問權(quán)限。1、組網(wǎng)需求如圖1所示,為了通信的安全性,某公司將訪客、員工、服務(wù)器分別劃分到VLAN10、VLAN20、VLAN30中。公司希望:員工、服務(wù)器主機、訪客均能訪問Internet。訪客只能訪問Internet,不能與其他任何VLAN的用戶通信。員工A可以訪問服務(wù)器區(qū)的所有資源,但其他員工只能訪問服務(wù)器A的21端口(FTP服務(wù))。圖1

配置通過流策略實現(xiàn)VLAN間三層隔離組網(wǎng)圖2、配置思路可采用如下思路配置通過流策略實現(xiàn)VLAN間互訪控制:配置VLAN并將各接口加入VLAN,使員工、服務(wù)器、訪客間二層隔離。配置VLANIF接口及其IP地址,使員工、服務(wù)器、訪客間可三層互通。配置上行路由,(歡迎關(guān)注公眾號:網(wǎng)絡(luò)技術(shù)交流)使員工、服務(wù)器、訪客均可通過Switch訪問Internet。配置并應(yīng)用流策略,使員工A可以訪問服務(wù)器區(qū)的所有資源,其他員工只能訪問服務(wù)器A的21端口,且只允許員工訪問服務(wù)器;使訪客只能訪問Internet。3、配置步驟【1】配置VLAN并將各接口加入VLAN,使員工、服務(wù)器、訪客間二層隔離在Switch_1上創(chuàng)建VLAN10,并將接口GE1/0/1以Untagged方式加入VLAN10,接口GE1/0/2以Tagged方式加入VLAN10。Switch_2和Switch_3的配置與Switch_1類似,不再贅述。(詳看文章后面的配置文件)<HUAWEI>

system-view

[HUAWEI]

sysname

Switch_1

[Switch_1]

vlan

batch

10

[Switch_1]

interface

gigabitethernet

1/0/1

[Switch_1-GigabitEthernet1/0/1]

port

link-type

access

[Switch_1-GigabitEthernet1/0/1]

port

default

vlan

10

[Switch_1-GigabitEthernet1/0/1]

quit

[Switch_1]

interface

gigabitethernet

1/0/2

[Switch_1-GigabitEthernet1/0/2]

port

link-type

trunk

[Switch_1-GigabitEthernet1/0/2]

port

trunk

allow-pass

vlan

10

[Switch_1-GigabitEthernet1/0/2]

quit在Switch_4上創(chuàng)建VLAN10、VLAN20、VLAN30、VLAN100,并配置接口GE1/0/1~GE1/0/4分別以Tagged方式加入VLAN10、VLAN20、VLAN30、VLAN100。<HUAWEI>

system-view

[HUAWEI]

sysname

Switch_4

[Switch_4]

vlan

batch

10

20

30

100

[Switch_4]

interface

gigabitethernet

1/0/1

[Switch_4-GigabitEthernet1/0/1]

port

link-type

trunk

[Switch_4-GigabitEthernet1/0/1]

port

trunk

allow-pass

vlan

10

[Switch_4-GigabitEthernet1/0/1]

quit

[Switch_4]

interface

gigabitethernet

1/0/2

[Switch_4-GigabitEthernet1/0/2]

port

link-type

trunk

[Switch_4-GigabitEthernet1/0/2]

port

trunk

allow-pass

vlan

20

[Switch_4-GigabitEthernet1/0/2]

quit

[Switch_4]

interface

gigabitethernet

1/0/3

[Switch_4-GigabitEthernet1/0/3]

port

link-type

trunk

[Switch_4-GigabitEthernet1/0/3]

port

trunk

allow-pass

vlan

30

[Switch_4-GigabitEthernet1/0/3]

quit

[Switch_4]

interface

gigabitethernet

1/0/4

[Switch_4-GigabitEthernet1/0/4]

port

link-type

trunk

[Switch_4-GigabitEthernet1/0/4]

port

trunk

allow-pass

vlan

100

[Switch_4-GigabitEthernet1/0/4]

quit【2】配置VLANIF接口及其IP地址,使員工、服務(wù)器、訪客間可以三層互通在Switch_4上創(chuàng)建VLANIF10、VLANIF20、VLANIF30、VLANIF100,并分別配置其IP地址為/24、/24、/24、/24。[Switch_4]

interface

vlanif

10

[Switch_4-Vlanif10]

ip

address

24

[Switch_4-Vlanif10]

quit

[Switch_4]

interface

vlanif

20

[Switch_4-Vlanif20]

ip

address

24

[Switch_4-Vlanif20]

quit

[Switch_4]

interface

vlanif

30

[Switch_4-Vlanif30]

ip

address

24

[Switch_4-Vlanif30]

quit

[Switch_4]

interface

vlanif

100

[Switch_4-Vlanif100]

ip

address

24

[Switch_4-Vlanif100]

quit【3】配置上行路由,使員工、服務(wù)器、訪客均可通過Switch訪問Internet。在Switch_4上配置OSPF基本功能,發(fā)布用戶網(wǎng)段以及Switch_4與Router之間的互聯(lián)網(wǎng)段。[Switch_4]

ospf

[Switch_4-ospf-1]

area

0

[Switch_4-ospf-1-area-]

network

55

[Switch_4-ospf-1-area-]

network

55

[Switch_4-ospf-1-area-]

network

55

[Switch_4-ospf-1-area-]

network

55

[Switch_4-ospf-1-area-]

quit

[Switch_4-ospf-1]

quitRouter上需要進行如下配置:將連接Switch的接口以Tagged方式加入VLAN100,并指定VLANIF100的IP地址與在同一網(wǎng)段。(歡迎關(guān)注公眾號:網(wǎng)絡(luò)技術(shù)交流)配置OSPF基本功能,并發(fā)布Switch與Router之間的互聯(lián)網(wǎng)段?!?】配置并應(yīng)用流策略,控制員工、訪客、服務(wù)器之間的訪問A、通過ACL定義每個流在Switch_4上配置ACL3000,禁止訪客訪問員工區(qū)和服務(wù)器區(qū)。[Switch_4]

acl

3000(來源:網(wǎng)絡(luò)技術(shù)聯(lián)盟圈)

[Switch_4-acl-adv-3000]

rule

deny

ip

destination

55

[Switch_4-acl-adv-3000]

rule

deny

ip

destination

55

[Switch_4-acl-adv-3000]

quit在Switch_4上配置ACL3001,使員工A可以訪問服務(wù)器區(qū)的所有資源,其他員工只能訪問服務(wù)器A的21端口。[Switch_4]

acl

3001(來源:網(wǎng)絡(luò)技術(shù)聯(lián)盟圈)

[Switch_4-acl-adv-3001]

rule

permit

ip

source

0

destination

55

[Switch_4-acl-adv-3001]

rule

permit

tcp

destination

0

destination-port

eq

21

[Switch_4-acl-adv-3001]

rule

deny

ip

destination

55

[Switch_4-acl-adv-3001]

quitB、配置流分類,區(qū)分不同的流在Switch_4上創(chuàng)建流分類c_custom、c_staff,并分別配置匹配規(guī)則3000、3001。[Switch_4]

traffic

classifier

c_custom

[Switch_4-classifier-c_custom]

if-match

acl

3000

[Switch_4-classifier-c_custom]

quit

[Switch_4]

traffic

classifier

c_staff

[Switch_4-classifier-c_staff]

if-match

acl

3001

[Switch_4-classifier-c_staff]

quitC、配置流行為,指定流動作在Switch_4上創(chuàng)建流行為b1,并配置允許動作。[Switch_4]

traffic

behavior

b1

[Switch_4-behavior-b1]

permit

[Switch_4-behavior-b1]

quitD、配置流策略,關(guān)聯(lián)流分類和流行為#在Switch_4上創(chuàng)建流策略p_custom、p_staff,并分別將流分類c_custom、c_staff與流行為b1關(guān)聯(lián)。[Switch_4]

traffic

policy

p_custom

[Switch_4-trafficpolicy-p_custom]

classifier

c_custom

behavior

b1

[Switch_4-trafficpolicy-p_custom]

quit

[Switch_4]

traffic

policy

p_staff

[Switch_4-trafficpolicy-p_staff]

classifier

c_staff

behavior

b1

[Switch_4-trafficpolicy-p_staff]

quitE、應(yīng)用流策略,實現(xiàn)員工、訪客、服務(wù)器之間的訪問控制在Switch_4上,分別在VLAN10、VLAN20的入方向應(yīng)用流策略p_custom、p_staff。[Switch_4]

vlan

10

[Switch_4-vlan10]

traffic-policy

p_custom

inbound

[Switch_4-vlan10]

quit(來源:網(wǎng)絡(luò)技術(shù)聯(lián)盟圈)

[Switch_4]

vlan

20

[Switch_4-vlan20]

traffic-policy

p_staff

inbound

[Switch_4-vlan20]

quit【5】驗證配置結(jié)果配置訪客A的IP地址為/24,缺省網(wǎng)關(guān)為VLANIF10接口的IP地址;配置員工A的IP地址為/24,缺省網(wǎng)關(guān)為VLANIF20接口的從IP地址;配置員工B的IP地址為/24,缺省網(wǎng)關(guān)為VLANIF20接口的從IP地址;配置服務(wù)器A的IP地址為/24,缺省網(wǎng)關(guān)為VLANIF30接口的從IP地址。配置完成后:訪客A不能Ping通員工A、服務(wù)器A;員工A和服務(wù)器A不能Ping通訪客A。員工A可以Ping通服務(wù)器A,即可以使用服務(wù)器A的FTP服務(wù),也可以使用服務(wù)器A的。員工B可以Ping不通服務(wù)器A,只能使用服務(wù)器A的FTP服務(wù)。訪客、員工A、員工B、服務(wù)器A均可以Ping通Router連接Switch_4的接口的IP地址/24,也就都可以訪問Internet。4、配置文件Switch_1的配置文件#

sysname

Switch_1

#

vlan

batch

10

#

interface

GigabitEthernet1/0/1

port

link-type

access

port

default

vlan

10

#

interface

GigabitEthernet1/0/2

port

link-type

trunk

port

trunk

allow-pass

vlan

10

#(來源:網(wǎng)絡(luò)技術(shù)聯(lián)盟圈)

returnSwitch_2的配置文件#

sysname

Switch_2

#

vlan

batch

20

#

interface

GigabitEthernet1/0/1

port

link-type

access

port

default

vlan

20

#(來源:網(wǎng)絡(luò)技術(shù)聯(lián)盟圈)

interface

GigabitEthernet1/0/2

port

link-type

access

port

default

vlan

20

#

interface

GigabitEthernet1/0/3

port

link-type

trunk

port

trunk

allow-pass

vlan

20

#

returnSwitch_3的配置文件#

sysname

Switch_3

#

vlan

batch

30

#

interface

GigabitEthernet1/0/1

port

link-type

access

port

default

vlan

30

#(來源:網(wǎng)絡(luò)技術(shù)聯(lián)盟圈)

interface

GigabitEthernet1/0/2

port

link-type

trunk

port

trunk

allow-pass

vlan

30

#

returnSwitch_4的配置文件#

sysname

Switch_4

#

vlan

batch

10

20

30

100

#(來源:網(wǎng)絡(luò)技術(shù)聯(lián)盟圈)

acl

number

3000

rule

5

deny

ip

destination

55

rule

10

deny

ip

destination

55

acl

number

3001

rule

5

permit

tcp

destination

0

destination-port

eq

ftp

rule

10

permit

ip

source

0

destination

55

rule

15

deny

ip

destination

55

#

traffic

classifier

c_custom

operator

or

precedence

5

if-match

acl

3000

traffic

classifier

c_staff

operator

or

precedence

10

if-match

acl

3001

#

traffic

behavior

b1

permit

#(來源:網(wǎng)絡(luò)技術(shù)聯(lián)盟圈)

traffic

policy

p_custom

match-order

config

classifier

c_custom

behavior

b1

traffic

policy

p_staff

match-order

config

classifier

c_staff

behavior

b1

#

vlan

10

traffic-policy

p_custom

inbou

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論