29-SAVA配置
本章節下載: 29-SAVA配置 (467.31 KB)
SAVA(Source Address Validation Architecture,源地址驗證架構)是一種根據設備的路由信息檢查攻擊報文的技術,用來防範基於源IPv6地址欺騙的攻擊。在設備的某個接口上開啟SAVA功能後,該接口上將會基於所有出接口為該接口的路由條目生成對應的SAVA表項。當該接口收到IPv6報文後,如果存在該報文的源IPv6地址對應的SAVA表項,則報文會被接收;反之報文會被丟棄。
SAVA主要部署在與接入網相連的骨幹網內邊界設備上。
如圖1-1所示,在IPv6多接入的組網環境中,當出現路由不對稱時,無法保證在路由表中查找到去往報文源IPv6地址的出接口和報文進入設備的入接口一致。在此場景下,如果為了防範基於源IPv6地址的攻擊,在Device B的Interface 1接口上開啟了嚴格型uRPF(unicast Reverse Path Forwarding,單播反向路徑轉發)功能,Device B僅依靠本地路由信息會將接入網中合法的報文判斷為IPv6源地址偽造,從而將其丟棄造成誤判斷。
相比較uRPF而言,SAVA技術在防範基於源地址攻擊的同時,可以避免不對稱路徑造成的誤判。此時,若在Device A和Device B的Interface 1上均開啟SAVA功能,那麼Device A和Device B上的SAVA功能除了能根據本地路由信息生成自己的SAVA表項,還會根據路由協議學習到對端的路由條目來生成SAVA表項。這樣可以保證同Device A和Device B上最終生成相同的SAVA表項。SAVA表項的同步機製可以保證非對稱的組網或路由不對稱的組網下的合法用戶報文不會被誤丟棄。
SAVA的運行機製可以概括為:
(1) 獲取合法用戶前綴。
(2) 根據合法用戶前綴生成相應的SAVA表項。
(3) 根據SAVA表項對來自局域網的用戶報文實現前綴級別的過濾。
在IPv6多接入的組網環境中,為了在每台邊界接入設備上都能生成所有合法用戶前綴對應的SAVA表項,需要先使每個骨幹網的邊界接入設備都獲取局域網內所有合法用戶的前綴信息,用戶前綴信息可通過如下兩種方式獲取:
· 通過本地路由獲取
從邊界接入設備本地學習的到局域網的路由信息中獲取用戶前綴,這些路由信息包括與局域網相連的接口地址生成的直連路由、靜態路由和動態路由。
· 通過遠端同步路由獲取
a. 邊界接入設備各自將本地學習的到局域網的路由信息打上Tag(不同的邊界設備對於到同一局域網的路由信息打上同樣的Tag),並將此路由信息引入骨幹網的動態路由協議中。
b. 其餘的邊界接入設備通過動態路由協議收到其他邊界設備發布的帶有Tag的路由信息後,通過本地配置的同步遠端路由條目的Tag值,識別並接受對應的路由信息,從而獲取到其他邊界接入設備學習的合法用戶前綴信息。
最終每台邊界接入設備均可以獲得局域網中所有的合法用戶前綴信息。
當邊界設備與局域網側相連的接口上開啟SAVA功能後,邊界設備將根據本地路由和遠端同步路由獲取到的所有的合法用戶前綴信息來生成與該接口綁定的SAVA表項。SAVA表項信息包含合法用戶前綴、前綴長度和綁定的接口信息。
SAVA通過根據合法用戶前綴信息生成的SAVA表項對來自局域網的用戶報文進行源地址的校驗,當開啟SAVA功能的接口收到IPv6報文後,如果存在該報文的源IPv6地址對應的SAVA表項,則報文會被接收;反之報文會被丟棄。
如圖1-2所示,局域網中的用戶通過Device B和Device C接入骨幹網,局域網中合法用戶的IPv6前綴分別為2000::/64和2001::/64。Device B給局域網提供的網關地址包括2000::1/64和2001::1/64,局域網中的所有合法用戶可以通過Device B訪問核心網絡。Device C給局域網提供的網關地址為2000::2/64。
在Device B和Device C的Interface1接口上同時開啟SAVA功能後,當Device C收到來自Device B的IPv6前綴為2001::/64的IPv6路由信息後,會生成對應的IPv6前綴為2001::/64的SAVA表項。當Device C收到IPv6前綴為2001::/64的用戶發送的報文後,由於該報文可以匹配到相應的SAVA表項,因此會被轉發,從而保證了合法用戶對網絡的正常訪問。
如圖1-3所示,當路由收斂完畢後,Device D到局域網的路由路徑經過Device E、Device C、Device B和Device A,局域網到Device D的路由路徑經過Device A直接到達Device D,此時局域網的上下行流量存在不對稱的情況。
在Device B和Device D的Interface1接口上均開啟SAVA功能後,Device B和Device D互相同步路由條目獲取到局域網的所有的網絡前綴信息並生成對應的SAVA表項。當Device D收到局域網的用戶發送的報文後,由於該報文可以匹配到相應的SAVA表項,因此會被轉發,從而保證了合法用戶對網絡的正常訪問。
圖1-3 與局域網非直連場景
如圖1-4所示,當路由收斂完畢後,Device D到局域網的路由路徑經過Device E、Device C、Device B和Device A,局域網到Device D的路由路徑經過Device A直接到達Device D,此時局域網的上下行流量存在不對稱的情況。
在Device B和Device D的Interface1接口上均開啟SAVA功能後,Device B和Device D互相同步路由條目獲取到局域網的所有的網絡前綴信息並生成對應的SAVA表項。其中,AS域內部Device B和Device C、Device D和Device E之間通過域內路由協議(比如OSPFv3)同步路由條目,AS間Device C和Device E通過BGP協議交互路由信息。當Device D收到局域網的用戶發送的報文後,由於該報文可以匹配到相應的SAVA表項,因此會被轉發,從而保證了合法用戶對網絡的正常訪問。
SAVA功能不支持在SA係列接口板上配置。
SAVA配置任務如下:
(1) 開啟SAVA功能
當一個局域網通過多台接入設備接入到骨幹網,局域網內具有多個前綴的合法用戶,邊界接入設備上的局域網側接口地址前綴隻有部分與局域網內合法用戶前綴相同時,本配置為必選。
(3) 配置接口加入SAVA接入組
一個局域網在同一台接入設備存在多個接入接口時,本配置為必選。
(4) 配置SAVA仿冒報文日誌功能
本功能根據設備的路由條目生成對應的SAVA表項,如果設備上的路由條目過多,在剛開啟本功能時,可能會出現設備上存在路由條目卻沒有對應的SAVA表項的情況,這會暫時導致合法IPv6報文被丟棄。等待各接口完成所有SAVA表項的學習後,合法報文會被正常接收,不會被丟棄。
SAVA功能不支持對軟件轉發的報文進行檢測和過濾。
建議先完成SAVA功能的配置,再進行遠端路由同步,否則可能出現SAVA耗時較長。
以硬件資源不足時生成的路由的IP地址為源IP的報文,無法通過SAVA檢查,會被丟棄。
uRPF、微分段、IPv6策略路由、業務板代理模式不能與SAVA功能同時開啟。uRPF的詳細介紹請參見“安全配置指導”中的“uRPF”。微分段的詳細介紹請參見“安全配置指導”中的“微分段”。IPv6策略路由的詳細介紹請參見“三層技術-IP路由配置指導”中的“IPv6策略路由”。業務板代理模式的詳細介紹請參見“基礎配置指導”中的“設備管理”。
表1-1 開啟SAVA功能
操作 |
命令 |
說明 |
進入係統視圖 |
system-view |
- |
進入接口視圖 |
interface interface-type interface-number |
- |
開啟SAVA功能 |
ipv6 sava enable |
缺省情況下,SAVA功能處於關閉狀態 本功能與uRPF和微分段功能互斥,無法同時配置 不支持在VSI接口下開啟SAVA功能 |
在配置本功能前,需要配置如下路由鏈路標記功能:
· 配置OSPFv3鏈路標記功能
當網絡中的動態路由協議使用的是OSPFv3時,需要配置OSPFv3鏈路標記功能。關於本功能的詳細介紹,請參見“三層技術—IP路由配置指導”中的“OSPFv3”。
· 配置IPv6 IS-IS鏈路標記功能
當網絡中的動態路由協議使用的是IPv6 IS-IS時,需要配置IPv6 IS-IS鏈路標記功能。關於本功能的詳細介紹,請參見“三層技術—IP路由配置指導”中的“IS-IS”。
當一個局域網通過多台接入設備接入到骨幹網,局域網內具有多個前綴的合法用戶,邊界接入設備上的局域網側接口地址前綴隻有部分與骨幹網內合法用戶前綴相同,此時為了使得邊界設備上都能獲取到局域網內所有合法的前綴,需要在邊界設備局域網側的接口上開啟SAVA功能,並將每台設備生成的SAVA表項同步給其餘邊界接入設備。各邊界設備將根據本地路由生成的SAVA表項對應的路由條目指定路由Tag值,並將路由條目通過路由協議進行發布。在需要接收遠端同步路由條目的設備上通過本命令配置與路由Tag相同的Tag值,設備收到對應Tag值的遠端同步路由條目後,會根據這些路由條目生成對應的SAVA表項。
表1-2 配置SAVA根據遠端同步的路由條目生成SAVA表項
操作 |
命令 |
說明 |
進入係統視圖 |
system-view |
- |
進入接口視圖 |
interface interface-type interface-number |
- |
配置SAVA根據遠端同步的路由條目生成SAVA表項 |
ipv6 sava import remote-route-tag tag |
缺省情況下,SAVA不會根據遠端同步的路由條目生成SAVA表項 |
當一個局域網在同一台接入設備存在多個接入接口時,則接入設備可能從不同的接入接口收到局域網中用戶發送的報文。此時,同一個接口通過本地路由獲取合法用戶前綴後生成SAVA表項不完整,可能會導致合法用戶的報文被誤丟棄。為了解決這個問題,可以通過本配置功能將接入設備連接同一個局域網的所有接口加入到同一個SAVA接入組中。配置完成後,同一個SAVA接入組中所有接口會互相同步學習通過本地路由獲取合法用戶前綴後生成的SAVA表項,從而保證每一個接口上都有本設備上所有通過本地路由獲取合法用戶前綴後生成的SAVA表項信息。
表1-3 配置接口加入SAVA接入組
操作 |
命令 |
說明 |
進入係統視圖 |
system-view |
- |
進入接口視圖 |
interface interface-type interface-number |
- |
配置接口加入SAVA接入組 |
ipv6 sava access-group group-name |
缺省情況下,接口未加入任何SAVA接入組 加入同一個SAVA接入組的所有接口需要在公網或同一個VPN中 一個SAVA接入組最多添加8個接口 |
SAVA檢測仿冒報文日誌可以方便管理員定位問題和解決問題。當SAVA檢測到仿冒報文時,設備就會生成SAVA檢測仿冒報文日誌信息。生成的檢測仿冒報文日誌信息會交給信息中心模塊處理,信息中心模塊的配置將決定日誌信息的發送規則和發送方向。關於信息中心的詳細描述請參見“網絡管理和監控配置指導”中的“信息中心”。
M-Lag組網下,SAVA僅支持對本端收到的仿冒報文生成日誌。
配置了QinQ、VLAN映射、Super VLAN、Private VLAN時,不支持SAVA仿冒報文日誌功能。
表1-4 配置SAVA仿冒報文日誌功能
操作 |
命令 |
說明 |
進入係統視圖 |
system-view |
- |
開啟SAVA仿冒報文日誌功能 |
ipv6 sava log enable spoofing-packet [ interval interval | number number ]* |
缺省情況下,SAVA仿冒報文日誌功能處於關閉狀態 |
在完成上述配置後,在任意視圖下執行display命令可以顯示配置後SAVA的運行情況,通過查看顯示信息驗證配置的效果。
表1-5 SAVA顯示和維護
操作 |
命令 |
顯示SAVA表項信息 |
(獨立運行模式) display ipv6 sava [ interface interface-type interface-number ] [ slot slot-number [ cpu cpu-number ] ] (IRF模式) display ipv6 sava [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number [ cpu cpu-number ] ] |
顯示SAVA丟棄報文計數信息 |
display ipv6 sava packet-drop statistics [ interface interface-type interface-number ] |
清除SAVA丟棄報文計數信息 |
reset ipv6 sava packet-drop statistics [ interface interface-type interface-number ] |
如圖1-5所示,局域網中的合法用戶地址前綴為2000::/64和2001::/64。在Decice B和Device C的局域網側接口Vlan-interface10上均配置SAVA功能,滿足如下需求:
· Device C收到IPv6前綴為2001::/64的IPv6路由條目後生成對應的SAVA表項。
· Device C的局域網側接口收到局域網中用戶發送的報文後基於SAVA表項做源地址的合法性檢查,對有對應表項的報文進行接收和轉發。
圖1-5 配置與局域網直連模式SAVA配置組網圖
設備 |
接口 |
IPv6地址 |
設備 |
接口 |
IPv6地址 |
Device A |
Vlan-int20 |
192:168::12:1/120 |
Device B |
Vlan-int10 |
2001::1/64 |
|
Vlan-int30 |
192:168::22:1/120 |
|
Vlan-int20 |
192:168::22:2/120 |
Device C |
Vlan-int10 |
2000::2/64 |
|
|
|
|
Vlan-int30 |
192:168::12:2/120 |
|
|
|
(1) 配置各接口的IPv6地址。
(2) 配置骨幹網域為OSPFv3域,配置參見“三層技術—IP路由配置指導”中的OSPFv3”。
(1) 配置Device B
# 在Device B的局域網側接口Vlan-interface10上開啟SAVA功能。
<DeviceB> system-view
[DeviceB] interface vlan-interface 10
[DeviceB-Vlan-interface10] ipv6 sava enable
# 配置路由策略ttt,匹配局域網側接口Vlan-interface10的路由條目,設置tag值為100。
[DeviceB] route-policy ttt permit node 10
[DeviceB-route-policy-ttt-10] if-match interface vlan-interface 10
[DeviceB-route-policy-ttt-10] apply tag 100
[DeviceB-route-policy-ttt-10] quit
# 在Device B的OSPFv3進程100下引入直連路由,並應用到路由策略ttt。
[DeviceB] ospfv3 100
[DeviceB-ospfv3-100] import-route direct route-policy ttt
[DeviceB-ospfv3-100] quit
(2) 配置Device C
# 在Device C的局域網側接口Vlan-interface10上開啟SAVA功能。
<DeviceC> system-view
[DeviceC] interface vlan-interface 10
[DeviceC-Vlan-interface10] ipv6 sava enable
# 在Device C的局域網側接口Vlan-interface10上引入值為100的遠端路由條目tag。
[DeviceC-Vlan-interface10] ipv6 sava import remote-tag 100
[DeviceC-Vlan-interface10] quit
# 在Device C上查看SAVA前綴表項同步信息是否正確。
[DeviceC] display ipv6 sava
IPv6 SAVA entry count: 2
Destination: 2000:: Prefix length: 64
Interface: Vlan-int10 Flags: L
Destination: 2001:: Prefix length: 64
Interface: Vlan-int10 Flags: R
以上信息表示Device C學到了2001::前綴的SAVA表項。Device C收到源IPv6地址的前綴為2001::的用戶發送的報文後,可以接受並轉發。
1. 組網需求
如圖1-6所示,骨幹網設備Device B、Device C、Device D與Device E之間運行OSPFv3協議,滿足如下用戶需求:
· 在Device B和Device D與Device A相鄰的接口Vlan-interface30和Vlan-interface40上開啟SAVA域內地址檢查功能。
· 在Device D上部署到達局域網的靜態路由,指定下一跳為Device A。同時開啟OSPFv3的鏈路標記繼承功能,並將到達局域網的路由條目打上路由標記值,實現對局域網靜態路由標識。
· Device B與Device A之間通過OSPFv3協議同步局域網路由。在Device B上開啟OSPFv3的鏈路標記繼承功能,並在Device B的Vlan-interface30上配置鏈路標記值,實現對局域網動態路由標識。
· 在骨幹網邊界設備Device B與Device D上對局域網用戶報文基於SAVA表項做源地址合法性的檢查。
2. 組網圖
圖1-6 與局域網非直連模式(OSPFv3)SAVA配置組網圖
設備 |
接口 |
IPv6地址 |
設備 |
接口 |
IPv6地址 |
Device A |
Vlan-int10 |
2001::2/64 |
Device B |
Vlan-int30 |
192:168::12:2/120 |
|
Vlan-int20 |
2000::2/64 |
|
Vlan-int20 |
192:168::34:3/120 |
|
Vlan-int30 |
192:168::12:1/120 |
|
|
|
|
Vlan-int40 |
192:168::22:1/120 |
|
|
|
Device C |
Vlan-int20 |
192:168::34:4/120 |
Device D |
Vlan-int40 |
192:168::22:2/120 |
|
Vlan-int10 |
192:168::46:4/120 |
|
Vlan-int20 |
192:168::56:5/120 |
Device E |
Vlan-int20 |
192:168::56:6/120 |
|
|
|
|
Vlan-int10 |
192:168::46:6/120 |
|
|
|
配置各接口的IPv6地址。
4. 配置步驟
(1) 配置Device A
# 在Device A的接口Vlan-interface10和Vlan-interface30運行OSPFv3協議。
<DeviceA> system-view
[DeviceA] ospfv3 1
[DeviceA-ospfv3-1] router-id 1.1.1.1
[DeviceA-ospfv3-1] quit
[DeviceA] interface vlan-interface 10
[DeviceA-Vlan-interface10] ospfv3 1 area 0.0.0.0
[DeviceA-Vlan-interface10] quit
[DeviceA] interface vlan-interface 30
[DeviceA-Vlan-interface30] ospfv3 1 area 0.0.0.0
[DeviceA-Vlan-interface30] quit
(2) 配置Device B
# 配置OSPFv3協議。
<DeviceB> system-view
[DeviceB] ospfv3 1
[DeviceB-ospfv3-1] router-id 2.2.2.2
[DeviceB-ospfv3-1] quit
[DeviceB] interface vlan-interface 30
[DeviceB-Vlan-interface30] ospfv3 1 area 0.0.0.0
[DeviceB-Vlan-interface30] quit
[DeviceB] interface vlan-interface 20
[DeviceB- Vlan-interface20] ospfv3 1 area 0.0.0.0
[DeviceB- Vlan-interface20] quit
# 開啟OSPFv3鏈路tag繼承功能。
[DeviceB] ospfv3 1
[DeviceB-ospfv3-1] link-tag inherit enable
[DeviceB-ospfv3-1] quit
# 在接口Vlan-interface30上配置鏈路標記值為100。
[DeviceB] interface vlan-interface 30
[DeviceB-Vlan-interface30] ospfv3 link-tag 100
# 在接口Vlan-interface30上開啟SAVA功能。
[DeviceB-Vlan-interface30] ipv6 sava enable
# 在接口Vlan-interface30上配置遠端同步路由條目生成SAVA表項,指定遠端路由tag值為100。
[DeviceB-Vlan-interface30] ipv6 sava import remote-route-tag 100
[DeviceB-Vlan-interface30] quit
(3) 配置Device D
# 部署到達局域網2000:: /64的靜態路由,下一跳為Device A(Device A的link-local地址為FE80::1),並配置tag值為100。
<DeviceD> system-view
[DeviceD] ipv6 route-static 2000:: 64 vlan-interface 40 FE80::1 tag 100
# 配置路由策略sava,匹配出接口Vlan-interface40。
[DeviceD] route-policy sava permit node 10
[DeviceD-route-policy-sava-10] if-match interface vlan-interface 40
[DeviceD-route-policy-sava-10] quit
# 配置OSPFv3協議。
[DeviceD] ospfv3 1
[DeviceD-ospfv3-1] router-id 4.4.4.4
[DeviceD-ospfv3-1] quit
[DeviceD] interface vlan-interface 20
[DeviceD-Vlan-interface20] ospfv3 1 area 0.0.0.0
[DeviceD- Vlan-interface20] quit
# OSPFv3進程1下引入靜態路由,並應用路由策略sava。
[DeviceD] ospfv3 1
[DeviceD-ospfv3-1] import-route static route-policy sava
# OSPFv3進程1開啟鏈路tag繼承功能。
[DeviceD-ospfv3-1] link-tag inherit enable
[DeviceD-ospfv3-1] quit
# 在接口Vlan-interface40上開啟SAVA功能。
[DeviceD] interface vlan-interface 40
[DeviceD-Vlan-interface40] ipv6 sava enable
# 在接口Vlan-interface40上配置遠端同步路由條目生成SAVA表項,指定遠端路由tag值為100。
[DeviceD-Vlan-interface40] ipv6 sava import remote-route-tag 100
[DeviceD-Vlan-interface40] quit
(4) 配置Device C
# 配置OSPFv3協議。
<DeviceC> system-view
[DeviceC] ospfv3 1
[DeviceC-ospfv3-1] router-id 3.3.3.3
[DeviceC-ospfv3-1] quit
[DeviceC] interface vlan-interface 40
[DeviceC-Vlan-interface40] ospfv3 1 area 0.0.0.0
[DeviceC-Vlan-interface40] quit
[DeviceC] interface vlan-interface 10
[DeviceC-Vlan-interface10] ospfv3 1 area 0.0.0.0
[DeviceC-Vlan-interface10] quit
(5) 配置Device E
# 配置OSPFv3協議。
<DeviceE> system-view
[DeviceE] ospfv3 1
[DeviceE-ospfv3-1] router-id 5.5.5.5
[DeviceE-ospfv3-1] quit
[DeviceE] interface vlan-interface 20
[DeviceE-Vlan-interface20] ospfv3 1 area 0.0.0.0
[DeviceE-Vlan-interface20] quit
[DeviceE] interface vlan-interface 10
[DeviceE-Vlan-interface10] ospfv3 1 area 0.0.0.0
[DeviceE-Vlan-interface10] quit
5. 驗證配置
# 在Device D上查看SAVA表項。
[DeviceD] display ipv6 sava
IPv6 SAVA entry count: 4
Destination:192:168::12:0 Prefix length: 120
Interface: Vlan-int40 Flags: R
Destination:192:168::22:0 Prefix length: 120
Interface: Vlan-int40 Flags: L
Destination: 2000:: Prefix length: 64
Interface: Vlan-int40 Flags: L
Destination: 2001:: Prefix length: 64
Interface: Vlan-int40 Flags: R
以上信息表示,Device D上已經學習到了前綴為2000::和2001::的SAVA表項。Device D收到源IPv6地址的前綴為2000::和2001::的用戶發送的報文後,可以接受並轉發。
# 在Device B上查看SAVA表項。
[DeviceB] display ipv6 sava
IPv6 SAVA entry count: 3
Destination:192:168::12:0 Prefix length: 120
Interface: Vlan-int30 Flags: L
Destination: 2000:: Prefix length: 64
Interface: Vlan-int30 Flags: R
Destination: 2001:: Prefix length: 64
Interface: Vlan-int30 Flags: L
Interface: GE1/0/1 Flags: L
以上信息表示,Device B上已經學習到了前綴為2000::和2001::的SAVA表項。Device B收到源IPv6地址的前綴為2000::和2001::的用戶發送的報文後,可以接受並轉發。
1. 組網需求
如圖1-7所示,在DeviceB和Device D與Device A相鄰的接口Vlan-interface30和Vlan-interface40上使能SAVA域內地址檢查,滿足如下用戶需求:
· 骨幹網路由器Device B、Device C、Device D與Device E之間運行IPv6 IS-IS協議。
· 在Device D上部署到達局域網的靜態路由,指定下一跳為Device A。同時開啟IPv6 IS-IS的鏈路標記繼承功能,並將到達局域網的路由條目打上路由標記值,實現對局域網靜態路由標識。
· Device B與Device A之間通過IPv6 IS-IS協議同步局域網路由,在Device B上開啟IPv6 IS-IS的鏈路標記繼承功能,並在Device B的Vlan-interface30上配置鏈路標記值,實現對局域網動態路由標識。
· 在骨幹網邊界設備Device D與Device B上對局域網用戶報文基於SAVA表項做源地址合法性的檢查。
2. 組網圖
圖1-7 與局域網非直連模式(IPv6 IS-IS)SAVA配置組網圖
設備 |
接口 |
IPv6地址 |
設備 |
接口 |
IPv6地址 |
Device A |
Vlan-int10 |
2001::2/64 |
Device B |
Vlan-int30 |
192:168::12:2/120 |
|
Vlan-int20 |
2000::2/64 |
|
Vlan-int20 |
192:168::34:3/120 |
|
Vlan-int30 |
192:168::12:1/120 |
|
|
|
|
Vlan-int40 |
192:168::22:1/120 |
|
|
|
Device C |
Vlan-int20 |
192:168::34:4/120 |
Device D |
Vlan-int40 |
192:168::22:2/120 |
|
Vlan-int10 |
192:168::46:4/120 |
|
Vlan-int20 |
192:168::56:5/120 |
Device E |
Vlan-int20 |
192:168::56:6/120 |
|
|
|
|
Vlan-int10 |
192:168::46:6/120 |
|
|
|
配置各接口的IPv6地址。
4. 配置步驟
(1) 配置Device A
# 在接口Vlan-interface10和 Vlan-interface30運行IS-IS協議。
<DeviceA> system-view
[DeviceA] isis 1
[DeviceA-isis-1] is-level level-2
[DeviceA-isis-1] network-entity 10.0000.0000.0001.00
[DeviceA-isis-1] cost-style wide
[DeviceA-isis-1] address-family ipv6
[DeviceA-isis-1-ipv6] quit
[DeviceA-isis-1] quit
[DeviceA] interface vlan-interface 10
[DeviceA-Vlan-interface10] isis ipv6 enable 1
[DeviceA-Vlan-interface10] quit
[DeviceA] interface vlan-interface 30
[DeviceA-Vlan-interface30] isis ipv6 enable 1
[DeviceA-Vlan-interface30] quit
(2) 配置Device B
# 配置IPv6 IS-IS協議。
<DeviceB> system-view
[DeviceB] isis 1
[DeviceB-isis-1] is-level level-2
[DeviceB-isis-1] network-entity 10.0000.0000.0002.00
[DeviceB-isis-1] cost-style wide
[DeviceB-isis-1] address-family ipv6
[DeviceB-isis-1-ipv6] quit
[DeviceB-isis-1] quit
[DeviceB] interface vlan-interface 30
[DeviceB-Vlan-interface30] isis ipv6 enable 1
[DeviceB-Vlan-interface30] quit
[DeviceB] interface vlan-interface 20
[DeviceB-Vlan-interface20] isis ipv6 enable 1
[DeviceB-Vlan-interface20] quit
# 開啟IPv6 IS-IS鏈路tag繼承功能。
[DeviceB] isis 1
[DeviceB-isis-1] address-family ipv6
[DeviceB-isis-1-ipv6] link-tag inherit enable
[DeviceB-isis-1-ipv6] quit
[DeviceB-isis-1] quit
# 在接口Vlan-interface30上配置鏈路標記值為100。
[DeviceB] interface vlan-interface 30
[DeviceB-Vlan-interface30] isis ipv6 link-tag 100
# 在接口Vlan-interface30上開啟SAVA功能。
[DeviceB-Vlan-interface30] ipv6 sava enable
# 在接口Vlan-interface30上配置遠端同步路由條目生成SAVA表項,指定遠端路由tag值為100。
[DeviceB-Vlan-interface30] ipv6 sava import remote-route-tag 100
[DeviceB-Vlan-interface30] quit
(3) 配置Device D
# 在Device D部署到達局域網2000::/64的靜態路由,下一跳為Device A(Device A的link-local地址為FE80::1),並配置tag值為100。
<DeviceD> system-view
[DeviceD] ipv6 route-static 2000:: 64 vlan-interface 40 FE80::1 tag 100
# 配置路由策略sava,匹配出接口Vlan-interface40。
[DeviceD] route-policy sava permit node 10
[DeviceD-route-policy-sava-10] if-match interface vlan-interface 40
[DeviceD-route-policy-sava-10] quit
# 配置IPv6 IS-IS協議。
[DeviceD] isis 1
[DeviceD-isis-1] is-level level-2
[DeviceD-isis-1] network-entity 10.0000.0000.0004.00
[DeviceD-isis-1] cost-style wide
[DeviceD-isis-1] address-family ipv6
[DeviceD-isis-1-ipv6] quit
[DeviceD-isis-1] quit
[DeviceD] interface vlan-interface 20
[DeviceD-Vlan-interface20] isis ipv6 enable 1
[DeviceD-Vlan-interface20] quit
# IPv6 IS-IS進程1下引入靜態路由,並應用路由策略sava。
[DeviceD] isis 1
[DeviceD-isis-1] address-family ipv6
[DeviceD-isis-1-ipv6] import-route static route-policy sava level-2
# IPv6 IS-IS進程1開啟鏈路tag繼承功能。
[DeviceD-isis-1-ipv6] link-tag inherit enable
[DeviceD-isis-1-ipv6] quit
[DeviceD-isis-1] quit
# 在接口Vlan-interface40上開啟SAVA功能。
[DeviceD] interface vlan-interface 40
[DeviceD-Vlan-interface40] ipv6 sava enable
# 在接口Vlan-interface40上配置遠端同步路由條目生成SAVA表項,指定遠端路由tag值為100。
[DeviceD-Vlan-interface40] ipv6 sava import remote-route-tag 100
[DeviceD-Vlan-interface40] quit
(4) 配置Device C
# 配置IPv6 IS-IS協議。
<DeviceC> system-view
[DeviceC] isis 1
[DeviceC-isis-1] is-level level-2
[DeviceC-isis-1] network-entity 10.0000.0000.0003.00
[DeviceC-isis-1] cost-style wide
[DeviceC-isis-1] address-family ipv6
[DeviceC-isis-1-ipv6] quit
[DeviceC-isis-1] quit
[DeviceC] interface vlan-interface 40
[DeviceC-Vlan-interface40] isis ipv6 enable 1
[DeviceC-Vlan-interface40] quit
[DeviceC] interface vlan-interface 10
[DeviceC-Vlan-interface10] isis ipv6 enable 1
[DeviceC-Vlan-interface10] quit
(5) 配置Device E
# 配置IPv6 IS-IS協議。
<DeviceE> system-view
[DeviceE] isis 1
[DeviceE-isis-1] is-level level-2
[DeviceE-isis-1] network-entity 10.0000.0000.0005.00
[DeviceE-isis-1] cost-style wide
[DeviceE-isis-1] address-family ipv6
[DeviceE-isis-1-ipv6] quit
[DeviceE-isis-1] quit
[DeviceE] interface vlan-interface 20
[DeviceE-Vlan-interface20] isis ipv6 enable 1
[DeviceE-Vlan-interface20] quit
[DeviceE] interface vlan-interface 10
[DeviceE-Vlan-interface10] isis ipv6 enable 1
[DeviceE-Vlan-interface10] quit
5. 驗證配置
# 在Device D上查看SAVA表項。
[DeviceD] display ipv6 sava
IPv6 SAVA entry count: 3
Destination:192:168::22:0 Prefix length: 120
Interface: Vlan-int40 Flags: L
Destination: 2000:: Prefix length: 64
Interface: Vlan-int40 Flags: L
Destination: 2001:: Prefix length: 64
Interface: Vlan-int40 Flags: R
以上信息表示,Device D上已經學習到了前綴為2000::和2001::的SAVA表項。Device D收到源IPv6地址的前綴為2000::和2001::的用戶發送的報文後,可以接受並轉發。
# 在Device B上查看SAVA表項。
[DeviceB] display ipv6 sava
IPv6 SAVA entry count: 3
Destination:192:168::12:0 Prefix length: 120
Interface: Vlan-int30 Flags: L
Destination: 2000:: Prefix length: 64
Interface: Vlan-int30 Flags: R
Destination: 2001:: Prefix length: 64
Interface: Vlan-int30 Flags: L
以上信息表示,Device B上已經學習到了前綴為2000::和2001::的SAVA表項。Device B收到源IPv6地址的前綴為2000::和2001::的用戶發送的報文後,可以接受並轉發。
1. 組網需求
如圖1-8所示,在Device B和Device D連接Device A相鄰的接口Vlan-interface30和Vlan-interface40上配置SAVA,滿足如下用戶需求:
· 從接口Vlan-interface30局域網用戶報文基於SAVA表項做源地址合法性的檢查。
· 配置遠端路由tag值標識,自治域內部Device B和Device C、Device D和Device E通過IGP協議如OSPFv3交互路由信息,自治域之間Device C和Device E通過BGP協議交互路由信息,各設備收到tag值標識的遠端同步路由條目後進行SAVA表項的同步。
2. 組網圖
圖1-8 與局域網非直連跨AS場景SAVA配置組網圖
設備 |
接口 |
IPv6地址 |
設備 |
接口 |
IPv6地址 |
Device A |
Vlan-int10 |
2001::2/64 |
Device B |
Vlan-int30 |
192:168::12:2/120 |
|
Vlan-int20 |
2000::2/64 |
|
Vlan-int20 |
192:168::23:2/120 |
|
Vlan-int30 |
192:168::12:1/120 |
|
|
|
|
Vlan-int40 |
192:168::22:1/120 |
|
|
|
Device C |
Vlan-int20 |
192:168::23:3/120 |
Device D |
Vlan-int40 |
192:168::22:2/120 |
|
Vlan-int10 |
192:168::34:3/120 |
|
Vlan-int20 |
192:168::45:4/120 |
Device E |
Vlan-int20 |
192:168::45:5/120 |
|
|
|
|
Vlan-int10 |
192:168::34:4/120 |
|
|
|
配置各接口的IPv6地址。
4. 配置步驟
(1) 配置Device B
# 在Device B部署到達局域網2001:: 64的靜態路由,下一跳為Device A(Device A的link-local地址為FE80::1),並配置tag值為100。
<DeviceB> system-view
[DeviceB] ipv6 route-static 2001:: 64 vlan-interface 30 FE80::1 tag 100
# 配置路由策略sava,匹配出接口Vlan-interface30。
[DeviceB] route-policy sava permit node 10
[DeviceB-route-policy-sava-10] if-match interface vlan-interface 30
[DeviceB-route-policy-sava-10] quit
# 配置OSPFv3協議。
[DeviceB] ospfv3 1
[DeviceB-ospfv3-1] router-id 2.2.2.2
[DeviceB-ospfv3-1] quit
[DeviceB] interface vlan-interface 20
[DeviceB-Vlan-interface20] ospfv3 1 area 0.0.0.0
[DeviceB-Vlan-interface20] quit
# OSPFv3進程1下引入靜態路由,並應用路由策略sava。
[DeviceB] ospfv3 1
[DeviceB-ospfv3-1] import-route static route-policy sava
[DeviceB-ospfv3-1] quit
# 在接口Vlan-interface30上開啟SAVA功能。
[DeviceB] interface vlan-interface 30
[DeviceB-Vlan-interface30] ipv6 sava enable
# 配置根據遠端同步路由條目生成SAVA表項,指定遠端路由tag值為100。
[DeviceB-Vlan-interface30] ipv6 sava import remote-route-tag 100
[DeviceB-Vlan-interface30] quit
(2) 配置DeviceD
# 在DeviceD部署到達局域網2000::/64的靜態路由,下一跳為Device A,Device A的link-local地址為FE80::1,並配置tag值為100。
<DeviceD> system-view
[DeviceD] ipv6 route-static 2000:: 64 vlan-interface 40 FE80::1 tag 100
# 配置路由策略sava,匹配出接口Vlan-interface30。
[DeviceD] route-policy sava permit node 10
[DeviceD-route-policy-sava-10] if-match interface vlan-interface 40
[DeviceD-route-policy-sava-10] quit
# 配置OSPFv3協議。
[DeviceD] ospfv3 1
[DeviceD-ospfv3-1] router-id 4.4.4.4
[DeviceD-ospfv3-1] quit
[DeviceD] interface vlan-interface 20
[DeviceD-Vlan-interface20] ospfv3 1 area 0.0.0.0
[DeviceD-Vlan-interface20] quit
# OSPFv3進程1下引入靜態路由,並應用路由策略sava。
[DeviceD] ospfv3 1
[DeviceD-ospfv3-1] import-route static route-policy sava
[DeviceD-ospfv3-1] quit
# 在接口Vlan-interface40上開啟SAVA功能。
[DeviceD] interface vlan-interface 40
[DeviceD-Vlan-interface40] ipv6 sava enable
# 配置根據遠端同步路由條目生成SAVA表項,指定遠端路由tag值為100。
[DeviceD-Vlan-interface40] ipv6 sava import remote-route-tag 100
[DeviceD-Vlan-interface40] quit
(3) 配置DeviceC
# 配置BGP 發布路由時使用的路由策略,將tag映射為團體屬性。
[DeviceC] route-policy sava-exp permit node 0
[DeviceC-route-policy-sava-exp-0] if-match tag 100
[DeviceC-route-policy-sava-exp-0] apply community 10:10
[DeviceC-route-policy-sava-exp-0] quit
# 配置BGP,下一跳DeviceF的接口地址為192:168::34:4。
[DeviceC] bgp 100
[DeviceC-bgp-default] router-id 3.3.3.3
[DeviceC-bgp-default] peer 192:168::34:4 as 200
[DeviceC-bgp-default] address-family ipv6
[DeviceC-bgp-default-ipv6] peer 192:168::34:4 enable
[DeviceC-bgp-default-ipv6] peer 192:168::34:4 advertise-community
# 配置BGP引入OSPFv3路由,並指定發布的路由策略。
[DeviceC-bgp-default-ipv6] import-route ospfv3 1
[DeviceC-bgp-default-ipv6] peer 192:168::34:4 route-policy sava-exp export
[DeviceC-bgp-default-ipv6] quit
[DeviceC-bgp-default] quit
# 配置BGP接收路由時使用的路由策略,將團體屬性映射為tag。
[DeviceC] ip community-list 1 permit 10:10
[DeviceC] route-policy sava-imp permit node 0
[DeviceC-route-policy-sava-imp-0] if-match community 1
[DeviceC-route-policy-sava-imp-0] apply tag 100
[DeviceC-route-policy-sava-imp-0] quit
# 配置BGP指定接收的路由策略。
[DeviceC] bgp 100
[DeviceC-bgp-default] address-family ipv6
[DeviceC-bgp-default-ipv6] peer 192:168::34:4 route-policy sava-imp import
[DeviceC-bgp-default-ipv6] quit
[DeviceC-bgp-default] quit
# 配置OSPFv3協議。
[DeviceC] ospfv3 1
[DeviceC-ospfv3-1] router-id 3.3.3.3
[DeviceC-ospfv3-1] quit
[DeviceC] interface vlan-interface 20
[DeviceC-Vlan-interface20] ospfv3 1 area 0.0.0.0
[DeviceC-Vlan-interface20] quit
# 配置OSPFv3,引入BGP路由。
[DeviceC] ospfv3 1
[DeviceC-ospfv3-1] import-route bgp4+
[DeviceC-ospfv3-1] quit
(4) 配置DeviceE
# 配置BGP 發布路由時使用的路由策略,將tag映射為團體屬性。
[DeviceE] route-policy sava-exp permit node 0
[DeviceE-route-policy-sava-exp-0] if-match tag 100
[DeviceE-route-policy-sava-exp-0] apply community 10:10
[DeviceE-route-policy-sava-exp-0] quit
# 配置BGP,下一跳RouerC的接口地址為192:168::34:3
[DeviceE] bgp 200
[DeviceE-bgp-default] router-id 5.5.5.5
[DeviceE-bgp-default] peer 192:168::34:3 as 100
[DeviceE-bgp-default] address-family ipv6
[DeviceE-bgp-default-ipv6] peer 192:168::34:3 enable
[DeviceE-bgp-default-ipv6] peer 192:168::34:3 advertise-community
# 配置BGP引入OSPFv3路由,並指定發布的路由策略。
[DeviceE-bgp-default-ipv6] import-route ospfv3
[DeviceE-bgp-default-ipv6] peer 192:168::34:3 route-policy sava-exp export
[DeviceE-bgp-default-ipv6] quit
[DeviceE-bgp-default] quit
# 配置BGP接收路由時使用的路由策略,將團體屬性映射為tag。
[DeviceE] ip community-list 1 permit 10:10
[DeviceE] route-policy sava-imp permit node 0
[DeviceE-route-policy-sava-imp-0] if-match community 1
[DeviceE-route-policy-sava-imp-0] apply tag 100
[DeviceE-route-policy-sava-imp-0] quit
# 配置BGP指定接收的路由策略。
[DeviceE] bgp 200
[DeviceE-bgp-default] address-family ipv6
[DeviceE-bgp-default-ipv6] peer 192:168::34:3 route-policy sava-imp import
[DeviceE-bgp-default-ipv6] quit
[DeviceE-bgp-default] quit
# 配置OSPFv3協議。
[DeviceE] ospfv3 1
[DeviceE-ospfv3-1] router-id 5.5.5.5
[DeviceE-ospfv3-1] quit
[DeviceE] interface vlan-interface 20
[DeviceE-Vlan-interface20] ospfv3 1 area 0.0.0.0
[DeviceE- Vlan-interface20] quit
# 配置OSPFv3,引入BGP路由。
[DeviceE] ospfv3 1
[DeviceE-ospfv3-1] import-route bgp4+
[DeviceE-ospfv3-1] quit
5. 驗證配置
# 在Device D上查看SAVA表項。
[DeviceD] display ipv6 sava
IPv6 SAVA entry count: 3
Destination:192:168::22:0 Prefix length: 120
Interface: Vlan-int40 Flags: L
Destination: 2000:: Prefix length: 64
Interface: Vlan-int40 Flags: L
Destination: 2001:: Prefix length: 64
Interface: Vlan-int40 Flags: R
以上信息表示,Device D上已經學習到了前綴為2000::和2001::的SAVA表項。Device D收到源IPv6地址的前綴為2000::和2001::的用戶發送的報文後,可以接受並轉發。
# 在Device B上查看SAVA表項。
[DeviceB] display ipv6 sava
IPv6 SAVA entry count: 3
Destination:192:168::12:0 Prefix length: 120
Interface: Vlan-int30 Flags: L
Destination: 2000:: Prefix length: 64
Interface: Vlan-int30 Flags: R
Destination: 2001:: Prefix length: 64
Interface: Vlan-int30 Flags: L
以上信息表示,Device B上已經學習到了前綴為2000::和2001::的SAVA表項。Device B收到源IPv6地址的前綴為2000::和2001::的用戶發送的報文後,可以接受並轉發。
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!