User Profile配置舉例
關鍵詞:User Profile、802.1x、Portal、PPPoE、QoS、CAR
摘 要:User Profile是一種用來保存預設配置的方式,隻有用戶通過認證,成功上線後,這些配置才會生效。用戶成功上線後,設備通過這些配置來限製用戶的訪問行為,當用戶下線時,設備再取消相應的配置,以便動態控製用戶可以使用的網絡資源。本文介紹了在802.1x、Portal、PPPoE三種認證組網環境下,如何通過User Profile來限製用戶使用網絡資源。
縮略語:
縮略語 | 英文全名 | 中文解釋 |
CAR | Committed Access Rate | 承諾訪問速率 |
PPPoE | Point-to-Point Protocol over Ethernet | 點對點以太網承載協議 |
QoS | Quality of Service | 服務質量 |
目 錄
4 802.1x認證方式的User Profile配置舉例... 4
5 Portal認證方式的User Profile配置舉例... 15
User Profile(用戶配置文件)是一個配置模板,它是一係列配置的集合,能夠保存、統一管理用戶的預設配置。根據不同的應用場景設備管理員可以為User Profile配置不同的內容,並且在認證服務器上將用戶名和User Profile綁定起來。當用戶認證時,對於合法用戶,認證服務器會將用戶對應的User Profile名稱發送給設備,設備接著執行User Profile下的預設配置。用戶成功上線後,設備通過這些配置來限製用戶的訪問行為,當用戶下線時,設備再取消相應的配置,以便動態控製用戶可以使用的網絡資源。
l 用戶使用802.1x方式接入網絡,需要進行用戶級的訪問行為控製。
l 用戶使用Portal方式接入網絡,需要進行用戶級的訪問行為控製。
l 用戶使用PPPoE方式接入網絡,需要進行用戶級的訪問行為控製。
l 目前User Profile下支持配置CAR策略、QoS策略以及在WLAN組網環境中對用戶接入進行限製。以後,User Profile支持配置的具體內容還將擴展。
l 在User Profile下應用QoS策略時,策略中目前隻支持配置remark、car、filter三種流行為。
l 當User Profile QoS和普通QoS同時存在時,優先執行User Profile QoS。
UserA(對應組網圖中的Host A)是公司財務部職員,UserB(對應組網圖中的Host B)是公司行政部職員,公司員工采用移動辦公方式,為了保證網絡資源的安全,公司所有PC均采用802.1x方式接入網絡並需要到RADIUS服務器進行認證和授權。現要求實現,在公司內,不管UserA和UserB的辦公地點在哪裏:
l 上班時間不允許UserA通過代理服務器(IP地址為1.1.2.220)訪問外部網站;
l 任何時間都不允許UserB訪問財務部FTP服務器(IP地址為1.1.2.221)。
圖1 802.1x認證方式的User Profile配置舉例組網圖
l 在用戶主機上安裝802.1x客戶端,使得用戶可以通過802.1x接入認證方式上網;
l 在Device上創建兩個User profile,名稱分別為Finance和Office。在Finance下配置QoS策略test1用來限製用戶上班時間不能訪問外部網站,在Office下配置QoS策略test2用來限製用戶不能訪問財務部FTP服務器;
l 在Device上配置AAA和802.1x相關參數,以實現對用戶的接入認證;
l 使用CAMS作為RADIUS服務器,在RADIUS服務器上配置兩個用戶UserA和UserB,然後分別與User profile Finance和Office相關聯。
& 說明:
以下配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下配置不衝突。
本文檔不嚴格與具體軟、硬件版本對應。
# 在PC機上安裝H3C iNode智能管理客戶端。
# 在iNode上創建一個新連接,選擇接入認證協議類型為802.1x,選擇連接類型為普通連接,用戶名為UserA,密碼為aaaa,如圖2 所示。
# 將PC的IP地址設定為1.1.1.1(也可以通過DHCP server動態分配,隻要是1.1.1.10/24網段即可),子網掩碼設定為255.255.255.0,缺省網關的IP地址為1.1.1.10/24。
# 在PC機上安裝H3C iNode智能管理客戶端。
# 在iNode上創建一個新連接,選擇接入認證協議類型為802.1x,選擇連接類型為普通連接,用戶名為UserB,密碼為bbbb。
# 將PC的IP地址設定為1.1.1.2(也可以通過DHCP server動態分配,隻要是1.1.1.10/24網段即可),子網掩碼設定為255.255.255.0,缺省網關的IP地址為1.1.1.10/24。
L2 Switch是一台二層交換機,它作為一台普通的接入層設備,在此組網中使用出廠配置即可。
<Device> system-view
[Device] vlan 2
[Device-vlan2] port ethernet 1/2
[Device-vlan2] port ethernet 1/3
[Device-vlan2] vlan 4
[Device-vlan4] port ethernet 1/4
[Device-vlan4] interface vlan-interface 1
[Device-Vlan-interface1] ip address 1.1.1.10 24
[Device-Vlan-interface1] interface vlan-interface 2
[Device-Vlan-interface2] ip address 1.1.2.10 24
[Device-Vlan-interface2] interface vlan-interface 4
[Device-Vlan-interface4] ip address 3.3.3.1 24
[Device-Vlan-interface4] quit
# 創建RADIUS認證方案newScheme,指定認證和計費服務器的IP地址均為3.3.3.3,密鑰均為expert(該參數需要和CAMS服務器上的配置保持一致),認證時不需要攜帶域名。
[Device] radius scheme newScheme
New Radius scheme
[Device-radius-newscheme] server-type extended
[Device-radius-newscheme] primary authentication 3.3.3.3
[Device-radius-newscheme] primary accounting 3.3.3.3
[Device-radius-newscheme] key authentication expert
[Device-radius-newscheme] key accounting expert
[Device-radius-newscheme] user-name-format without-domain
[Device-radius-newscheme] quit
# 配置域參數。
[Device] domain newDomain
New Domain added.
[Device-isp-newdomian] authentication lan-access radius-scheme newScheme
[Device-isp-newdomian] authorization lan-access radius-scheme newScheme
[Device-isp-newdomian] accounting lan-access radius-scheme newScheme
[Device-isp-newdomian] quit
# 將newDomain設置為缺省域名。
[Device] domain default enable newDomain
# 全局使能802.1x。
[Device] dot1x
802.1x is enabled globally.
# 在接口Ethernet1/1上使能802.1x。
[Device] interface ethernet 1/1
[Device-Ethernet1/1] dot1x
802.1x is enabled on port Ethernet1/1.
[Device-Ethernet1/1] quit
# 配置QoS策略test1和test2,test1限製上班時間不能通過代理服務器(IP地址為1.1.2.220)訪問外部網站,test2用來限製用戶不能訪問財務部FTP服務器(IP地址為1.1.2.221)。
[Device] time-range time 08:00 to 18:00 working-day
[Device] acl number 3001
[Device-acl-adv-3001] rule permit ip destination 1.1.2.220 0 time-range time
[Device-acl-adv-3001] quit
[Device] traffic classifier tc1
[Device-classifier-tc1] if-match acl 3001
[Device-classifier-tc1] quit
[Device] traffic behavior tb1
[Device-behavior-tb1] filter deny
[Device-behavior-tb1] quit
[Device] qos policy test1
[Device-qospolicy-test1] classifier tc1 behavior tb1
[Device-qospolicy-test1] quit
[Device] acl number 3002
[Device-acl-adv-3002] rule permit ip destination 1.1.1.221 0
[Device-acl-adv-3002] quit
[Device] traffic classifier tc2
[Device-classifier-tc2] if-match acl 3002
[Device-classifier-tc2] quit
[Device] traffic behavior tb2
[Device-behavior-tb2] filter deny
[Device-behavior-tb2] quit
[Device] qos policy test2
[Device-qospolicy-test2] classifier tc2 behavior tb2
[Device-qospolicy-test2] quit
# 創建User profile,名稱為Finance和Office,並在該User Profile視圖下應用策略test1和test2。
[Device] user-profile Finance dot1x
[Device-user-profile-DOT1X-Finance] qos apply policy test1 inbound
[Device-user-profile-DOT1X-Finance] quit
[Device] user-profile Office dot1x
[Device-user-profile-DOT1X-Office] qos apply policy test2 inbound
[Device-user-profile-DOT1X-Office] quit
# 激活User Profile。
[Device] user-profile Finance enable
Info: This user profile is enabled, its configuration will not be modified.
[Device] user-profile Office enable
Info: This user profile is enabled, its configuration will not be modified.
[Device] display current-configuration
#
sysname Device
#
domain default enable newdomain
#
dot1x
#
time-range time 08:00 to 18:00 working-day
#
acl number 3001
rule 0 permit ip destination 1.1.2.220 0 time-range time
acl number 3002
rule 0 permit ip destination 1.1.1.221 0
#
vlan 1
#
vlan 2
#
vlan 4
#
radius scheme newscheme
server-type extended
primary authentication 3.3.3.3
primary accounting 3.3.3.3
key authentication expert
key accounting expert
user-name-format without-domain
#
domain newdomain
authentication lan-access radius-scheme newscheme
authorization lan-access radius-scheme newscheme
accounting lan-access radius-scheme newscheme
access-limit disable
state active
idle-cut disable
self-service-url disable
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
traffic classifier tc2 operator and
if-match acl 3002
traffic classifier tc1 operator and
if-match acl 3001
#
traffic behavior tb1
filter deny
traffic behavior tb2
filter deny
#
qos policy test1
classifier tc1 behavior tb1
qos policy test2
classifier tc2 behavior tb2
#
user-profile Finance DOT1X
qos apply policy test1 inbound
user-profile Office DOT1X
qos apply policy test2 inbound
#
interface Vlan-interface1
ip address 1.1.1.10 255.255.255.0
#
interface Vlan-interface2
ip address 1.1.2.10 255.255.255.0
#
interface Vlan-interface4
ip address 3.3.3.1 255.255.255.0
#
interface Ethernet1/1
port link-mode bridge
dot1x
#
interface Ethernet1/2
port link-mode bridge
port access vlan 2
#
interface Ethernet1/3
port link-mode bridge
port access vlan 2
#
interface Ethernet1/4
port link-mode bridge
port access vlan 4
#
user-profile Finance enable
user-profile Office enable
#
user-interface con 0
user-interface vty 0 4
#
return
l 單擊CAMS平台導航樹中的“服務管理 > 服務配置”菜單項,進入服務配置頁麵。
l 單擊<增加>按鈕,進入增加服務頁麵。設置服務名為serverA,(為了方便記憶,可以將“服務描述”設置為for user profile Finance),選中“訪問權限控製”前的複選框,並將外部組設置為Finance(即User profile的名稱),如圖3 所示,單擊<確定>按鈕完成增加服務操作。
配置步驟與創建服務serverA類似,需要將服務名設置為serverB,外部組填寫為Office。
l 單擊CAMS平台導航樹中的“用戶管理 > 帳戶用戶”菜單項,進入帳戶管理頁麵。
l 單擊<增加>按鈕,進入用戶開戶頁麵。設置帳號名為UserA,用戶密碼為aaaa,用戶姓名為hmr,在服務信息中選中剛增加的服務serverA,如圖4 所示。單擊<確認>按鈕完成用戶開戶操作。
配置步驟與創建用戶UserA類似,需要將用戶名設置為UserB,用戶密碼設置為bbbb,服務信息選擇serviceB。
l 單擊CAMS平台導航樹中的“係統管理 > 係統配置”菜單項,進入係統配置頁麵。
圖5 係統配置
l 單擊“接入設備配置”配置項對應的“修改”鏈接,進入接入設備配置頁麵。
l 單擊<增加>按鈕,進入增加配置項頁麵。將初始IP地址、結束IP地址設置為設備與服務器相連口的IP地址(本例中為3.3.3.1);共享密鑰為設備上配置RADIUS方案中的認證密鑰和計費密鑰(本例中為expert);端口列表為CAMS服務器上用於監聽認證和計費報文的端口,需要與設備上配置的一致(本例中沒有配置,則默認為1812和1813),協議類型和RADIUS報文類型需要和設備上RADIUS方案中配置的一致,如圖6 所示。單擊<確定>按鈕,在確認操作成功後,返回到接入設備配置頁麵,再單擊<返回>按鈕,返回到係統配置頁麵。
l 在係統配置頁麵中,單擊<立即生效>按鈕,使這些信息生效。
可通過以下方式驗證上述配置:
在校園網絡中,因為老師要上傳/下載課件、網上視頻教學和答疑,所以需要優先保證老師的可用帶寬資源。現要求實現:
l 為了防止非本校人員盜用本校網絡資源,所有用戶接入校園網時,均需要進行Portal認證;
l 在園區內,不管老師的辦公地點在哪裏,隻要使用teacher用戶名登錄都能獲得1Mbps的帶寬,學生使用student用戶名登錄後才能接入校園網,但是能夠使用的最大帶寬不能超過200kbps。
圖7 Portal認證方式的User Profile配置舉例組網圖
l 在學生和老師的主機上安裝Portal客戶端,使得用戶可以通過Portal接入認證方式上網;
l 在Device上創建兩個User profile,名稱分別為Teacher和Student。Teacher配置QoS策略test1用來限速為1Mbps,Student配置QoS策略test2用來限速為200kbps;
l 使用CAMS作為RADIUS服務器,在RADIUS服務器上配置兩個用戶Teacher和Student,然後分別關聯兩個User profile Teacher和Student。
& 說明:
以下配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下配置不衝突。
本文檔不嚴格與具體軟、硬件版本對應。
# 在PC機上安裝H3C iNode智能管理客戶端。
# 在iNode上創建一個新連接,選擇接入認證協議類型為Portal,用戶名為Teacher,密碼為1234,如圖8 所示。
# 將PC的IP地址設定為1.1.1.1,子網掩碼設定為255.255.255.0,缺省網關的IP地址為1.1.1.10/24。
# 在PC機上安裝H3C iNode智能管理客戶端。
# 在iNode上創建一個新連接,選擇接入認證協議類型為Portal,用戶名為Student,密碼為5678。
# 將PC的IP地址設定為1.1.1.2,子網掩碼設定為255.255.255.0,缺省網關的IP地址為1.1.1.10/24。
L2 Switch是一台二層交換機,它作為一台普通的接入層設備,在此組網中使用出廠配置即可。
<Device> system-view
[Device] vlan 4
[Device-vlan4] port ethernet 1/4
[Device-vlan4] interface vlan-interface 1
[Device-Vlan-interface1] ip address 1.1.1.10 24
[Device-Vlan-interface2] interface vlan-interface 4
[Device-Vlan-interface4] ip address 3.3.3.1 24
[Device-Vlan-interface4] quit
# 創建RADIUS認證方案newScheme,指定認證和計費服務器的IP地址均為3.3.3.3,密鑰均為expert(該參數需要和CAMS服務器上的配置保持一致),認證時不需要攜帶域名。
[Device] radius scheme newScheme
New Radius scheme
[Device-radius-newscheme] server-type extended
[Device-radius-newscheme] primary authentication 3.3.3.3
[Device-radius-newscheme] primary accounting 3.3.3.3
[Device-radius-newscheme] key authentication expert
[Device-radius-newscheme] key accounting expert
[Device-radius-newscheme] user-name-format without-domain
[Device-radius-newscheme] quit
# 配置域參數。
[Device] domain newDomain
New Domain added.
[Device-isp-newdomian] authentication portal radius-scheme newScheme
[Device-isp-newdomian] authorization portal radius-scheme newScheme
[Device-isp-newdomian] accounting portal radius-scheme newScheme
[Device-isp-newdomian] quit
# 將newDomain設置為缺省域名。
[Device] domain default enable newDomain
# 配置Portal認證。
[Device] portal server newpt ip 3.3.3.3 key expert url http://3.3.3.3/portal
# 在接口Vlan-interface1上使能Portal認證。
[Device] interface vlan-interface 1
[Device-Vlan-interface1] ip address 1.1.1.10
[Device-Vlan-interface1] portal server newpt method direct
[Device-Vlan-interface1] quit
# 配置QoS策略test1和test2,test1限速1Mbps,test2限速200kbps。
[Device] traffic classifier tc1
[Device-classifier-tc1] if-match any
[Device-classifier-tc1] quit
[Device] traffic behavior tb1
[Device-behavior-tb1] car cir 1000
[Device-behavior-tb1] quit
[Device] qos policy test1
[Device-qospolicy-test1] classifier tc1 behavior tb1
[Device-qospolicy-test1] quit
[Device] traffic classifier tc2
[Device-classifier-tc2] if-match any
[Device-classifier-tc2] quit
[Device] traffic behavior tb2
[Device-behavior-tb2] car cir 200
[Device-behavior-tb2] quit
[Device] qos policy test2
[Device-qospolicy-test2] classifier tc2 behavior tb2
[Device-qospolicy-test2] quit
# 創建User profile,名稱為Teacher和Student,並在該User Profile視圖下應用策略test1和test2。
[Device] user-profile Teacher portal
[Device-user-profile-PORTAL-Teacher] qos apply policy test1 inbound
[Device-user-profile-PORTAL-Teacher] quit
[Device] user-profile Student portal
[Device-user-profile-PORTAL-Student] qos apply policy test2 inbound
[Device-user-profile-PORTAL-Student] quit
# 激活User Profile。
[Device] user-profile Teacher enable
Info: This user profile is enabled, its configuration will not be modified.
[Device] user-profile Student enable
Info: This user profile is enabled, its configuration will not be modified.
[Device] display current-configuration
#
sysname Device
#
domain default enable newdomain
#
portal server newpt ip 3.3.3.3 key expert url http://3.3.3.3/portal
#
vlan 1
#
vlan 4
#
radius scheme newscheme
server-type extended
primary authentication 3.3.3.3
primary accounting 3.3.3.3
key authentication expert
key accounting expert
user-name-format without-domain
#
domain newdomain
authentication portal radius-scheme newscheme
authorization portal radius-scheme newscheme
accounting portal radius-scheme newscheme
access-limit disable
state active
idle-cut disable
self-service-url disable
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
traffic classifier tc2 operator and
if-match any
traffic classifier tc1 operator and
if-match any
#
traffic behavior tb1
car cir 1000 cbs 62500 ebs 0 green pass red discard
traffic behavior tb2
car cir 200 cbs 12500 ebs 0 green pass red discard
#
qos policy test1
classifier tc1 behavior tb1
qos policy test2
classifier tc2 behavior tb2
#
user-profile Teacher PORTAL
qos apply policy test1 inbound
user-profile Student PORTAL
qos apply policy test2 inbound
#
interface Vlan-interface1
ip address 1.1.1.10 255.255.255.0
portal server newpt method direct
#
interface Vlan-interface4
ip address 3.3.3.1 255.255.255.0
#
interface Ethernet1/4
port link-mode bridge
port access vlan 4
#
user-profile Student enable
user-profile Teacher enable
#
return
l 單擊CAMS平台導航樹中的“組件管理 > PORTAL組件 > 服務器信息”菜單項,進入PORTAL服務器信息維護頁麵。在頁麵填入PORTAL Server的相關參數,如圖9 所示。單擊<確定>按鈕進行確認。
圖9 PORTAL服務器信息維護
l 單擊CAMS平台導航樹中的“組件管理 > PORTAL組件 > 設備信息”菜單項,進入設備信息管理頁麵。
l 單擊<增加>按鈕,進入增加設備信息頁麵。將IP地址配置為Device與RADIUS server相連接口的IP地址(本例中為3.3.3.1),版本號選擇Portal 2.0(與Device上運行的Portal版本一致),密碼設置為expert(與在Device上配置的portal server命令中的key參數保持一致),如圖10 所示。單擊<增加>按鈕,在確認操作成功後,返回到設備信息管理頁麵。
l 單擊CAMS平台導航樹中的“組件管理 > PORTAL組件 > IP地址組”菜單項,進入IP地址組管理頁麵。
l 單擊<增加>按鈕,進入增加IP地址組頁麵。將起始地址和終止地址填用戶終端的IP地址,本舉例中為1.1.1.1和1.1.1.2,單擊<增加>按鈕,在確認操作成功後,返回到IP地址組管理頁麵。
圖11 增加IP地址組
l 單擊CAMS平台導航樹中的“組件管理 > PORTAL組件 > 設備信息”菜單項,進入設備信息管理頁麵。
l 單擊Device對應的“端口信息管理”鏈接,如圖12 所示,進入增加設備端口組頁麵。將IP地址組設置為剛創建的HostAandHostB,如圖13 所示。單擊<增加>按鈕,在確認操作成功後,返回到設備信息管理頁麵。
l 最後單擊CAMS平台導航樹中的“組件管理 > PORTAL組件 > 配置生效”菜單項,使以上配置生效。
可通過以下方式驗證上述配置:
接入網絡使用PPPoE認證方式,網絡中同時存在UserA和UserB,其中UserA為VIP用戶,UserB為普通用戶。現需要為他們提供區分服務,當網絡出現擁塞時,
l UserA和UserB同時訪問數據庫(DB),優先為UserA傳輸數據,以減少UserA的等待時間。
l UserA同時訪問DB和訪問WEB網站,因為傳輸數據占用的帶寬較大而且時間較長,所以,要求優先處理與WEB網站之間的報文。
圖14 Portal認證方式的User Profile配置舉例組網圖
l 在CAMS服務器上配置兩個用戶UserA和UserB,然後分別關聯兩個User profile VIP和normal。
l VIP配置QoS策略test1使得UserA訪問WEB網站報文的本地優先級最高為6,UserA訪問DB的響應報文的本地優先級次高為5,normal配置QoS策略test2使得UserB訪問DB的響應報文的本地優先級為4。
l 通過SP隊列來保證當網絡擁塞時,最先處理UserA與WEB網站間的交互報文,再處理UserA與DB間的交互報文,最後處理UserB與DB間的交互報文。
l 在Device的接口Ethernet1/1上使能PPPoE認證,之後Host A使用用戶名UserA認證上線,Host B使用用戶名UserB認證上線。
& 說明:
以下配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下配置不衝突。
本文檔不嚴格與具體軟、硬件版本對應。
# 使用Windows係統的網絡連接功能新建一個PPPoE連接。
l 使用<開始>菜單打開<控製麵板>,雙擊<網絡連接>服務,使用“創建一個新的連接功能”新建一個PPPoE連接。
l 打開新建連接向導,單擊<下一步>按鈕。
l 網絡連接類型窗口選擇為“連接到Internet(C)”,單擊<下一步>按鈕。
l 準備好窗口選擇“手動設置我的連接(M)”,單擊<下一步>按鈕。
l Internet連接窗口選擇“用要求用戶名和密碼的寬帶連接來連接(U)”,單擊<下一步>按鈕。
l 在連接名窗口輸入ISP名稱,單擊<下一步>按鈕。
l 在可用連接窗口選擇“隻是我使用”,單擊<下一步>按鈕。
l 在Internet帳戶信息窗口,輸入用戶名UserA,密碼為123,單擊<下一步>按鈕。
圖15 新建連接向導
l 最後單擊<完成>按鈕,完成連接創建操作。
之後用戶通過下麵的窗口就可以連接上網了。
圖16 連接
# 將PC的IP地址設定為1.1.1.1,子網掩碼設定為255.255.255.0,缺省網關的IP地址為1.1.1.10/24。
# 配置步驟請參見6.3.1 ,隻需在用戶名處輸入UserB,密碼處輸入456。PC的IP地址設定為1.1.1.2,子網掩碼設定為255.255.255.0,缺省網關的IP地址為1.1.1.10/24。
L2 Switch是一台二層交換機,它作為一台普通的接入層設備,在此組網中使用出廠配置即可。
<Device> system-view
[Device] vlan 2
[Device-vlan2] port ethernet 1/5
[Device] vlan 4
[Device-vlan4] port ethernet 1/4
[Device-vlan4] interface vlan-interface 1
[Device-Vlan-interface1] ip address 1.1.1.10 24
[Device-Vlan-interface1] interface vlan-interface 2
[Device-Vlan-interface2] ip address 1.1.2.10 24
[Device-Vlan-interface2] interface vlan-interface 4
[Device-Vlan-interface4] ip address 3.3.3.1 24
[Device-Vlan-interface4] quit
# 配置RADIUS認證方案參數,指定認證和計費服務器的IP地址均為3.3.3.3,密鑰均為expert(該參數需要和CAMS服務器上的配置保持一致),認證時不需要挾帶域名。
[Device] radius scheme newScheme
New Radius scheme
[Device-radius-newscheme] server-type extended
[Device-radius-newscheme] primary authentication 3.3.3.3
[Device-radius-newscheme] primary accounting 3.3.3.3
[Device-radius-newscheme] key authentication expert
[Device-radius-newscheme] key accounting expert
[Device-radius-newscheme] user-name-format without-domain
[Device-radius-newscheme] quit
# 配置域參數。
[Device] domain newDomain
New Domain added.
[Device-isp-newdomian] authentication ppp radius-scheme newscheme
[Device-isp-newdomian] authorization ppp radius-scheme newscheme
[Device-isp-newdomian] accounting ppp radius-scheme newscheme
[Device-isp-newdomian] quit
[Device] domain default enable newDomain
# 創建一個VT口,配置它的認證方式為CHAP,IP地址為1.1.1.10。
[Device] interface virtual-template 1
[Device-Virtual-Template1] ppp authentication-mode chap
[Device-Virtual-Template1] quit
# 在接口Vlan-interface1上使能PPPoE server功能,並綁定VT口。
[Device] interface vlan-interface 1
[Device-Vlan-interface1] pppoe-server bind virtual-template 1
[Device-Vlan-interface1] quit
# 配置QoS策略test0、test1和test2,使得VIP訪問WEB服務器報文的本地優先級設為6,訪問DB報文的本地優先級設為5,normal訪問DB報文的本地優先級設為4。
[Device] acl number 3000
[Device-acl-adv-3000] rule permit tcp destination-port eq 80
[Device-acl-adv-3000] quit
[Device] traffic classifier tc0
[Device-classifier-tc0] if-match acl 3000
[Device-classifier-tc0] quit
[Device] traffic behavior tb0
[Device-behavior-tb0] remark local-precedence 6
[Device-behavior-tb0] quit
[Device] acl number 3001
[Device-acl-adv-3001] rule permit ip source 1.1.2.222 0
[Device-acl-adv-3001] quit
[Device] traffic classifier tc1
[Device-classifier-tc1] if-match acl 3001
[Device-classifier-tc1] quit
[Device] traffic behavior tb1
[Device-behavior-tb1] remark local-precedence 5
[Device-behavior-tb1] quit
[Device] qos policy test1
[Device-qospolicy-test1] classifier tc0 behavior tb0
[Device-qospolicy-test1] classifier tc1 behavior tb1
[Device-qospolicy-test1] quit
[Device] traffic behavior tb2
[Device-behavior-tb2] remark local-precedence 4
[Device-behavior-tb2] quit
[Device] qos policy test2
[Device-qospolicy-test2] classifier tc1 behavior tb2
[Device-qospolicy-test2] quit
# 創建User profile,名稱為VIP和normal,並在該User Profile視圖下應用策略test1和test2。
[Device] user-profile VIP PPP
[Device-user-profile-PPP-VIP] qos apply policy test1 inbound
[Device-user-profile-PPP-VIP] quit
[Device] user-profile normal PPP
[Device-user-profile-PPP-normal] qos apply policy test2 inbound
[Device-user-profile-PPP-normal] quit
# 激活User Profile。
[Device] user-profile VIP enable
Info: This user profile is enabled, its configuration will not be modified.
[Device] user-profile normal enable
Info: This user profile is enabled, its configuration will not be modified.
# 通過報文優先級來保證當網絡擁塞時,優先處理UserA的HTTP流量,再處理UserA與DB之間的流量,最後處理UserB和DB之間的流量。
[Device] interface ethernet 1/1
[Device-Ethernet1/1] qos sp
[Device-Ethernet1/1] display current-configuration
#
sysname Device
#
domain default enable newdomain
#
acl number 3000
rule 0 permit tcp destination-port eq www
acl number 3001
rule 0 permit ip source 1.1.2.222 0
#
vlan 1
#
vlan 2
#
vlan 4
#
radius scheme newscheme
server-type extended
primary authentication 3.3.3.3
primary accounting 3.3.3.3
key authentication expert
key accounting expert
user-name-format without-domain
#
domain newdomain
authentication ppp radius-scheme newscheme
authorization ppp radius-scheme newscheme
accounting ppp radius-scheme newscheme
access-limit disable
state active
idle-cut disable
self-service-url disable
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
traffic classifier tc0 operator and
if-match acl 3000
traffic classifier tc1 operator and
if-match acl 3001
#
traffic behavior tb1
remark local-precedence 5
traffic behavior tb0
remark local-precedence 6
traffic behavior tb2
remark local-precedence 4
#
qos policy test1
classifier tc0 behavior tb0
classifier tc1 behavior tb1
qos policy test2
classifier tc1 behavior tb2
#
user-profile VIP PPP
user-profile normal PPP
#
interface Virtual-Template1
ppp authentication-mode chap
#
interface Vlan-interface1
pppoe-server bind Virtual-Template 1
ip address 1.1.1.10 255.255.255.0
#
interface Vlan-interface2
ip address 1.1.2.10 255.255.255.0
#
interface Vlan-interface4
ip address 3.3.3.1 255.255.255.0
#
interface Ethernet1/1
port link-mode bridge
qos sp
#
interface Ethernet1/4
port link-mode bridge
port access vlan 4
#
interface Ethernet1/5
port link-mode bridge
port access vlan 2
#
user-profile VIP enable
user-profile normal enable
#
return
可通過以下方式驗證上述配置:
Copyright ©2008 杭州華三通信技術有限公司 版權所有,保留一切權利。
非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,並不得以任何形式傳播。
本文檔中的信息可能變動,恕不另行通知。