• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C MSR系列路由器典型配置举例(V5)-6W100

目录

42-MSR系列路由器Portal、RADIUS、HWTACACS支持MultiVRF特性典型配置举例

本章节下载 42-MSR系列路由器Portal、RADIUS、HWTACACS支持MultiVRF特性典型配置举例  (275.64 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/MSR/MSR_50/Configure/Typical_Configuration_Example/H3C_MSR_(V5)-6W100/201401/812753_30005_0.htm

42-MSR系列路由器Portal、RADIUS、HWTACACS支持MultiVRF特性典型配置举例

MSR系列路由器Portal、RADIUS、HWTACACS支持MultiVRF特性典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 



1  简介

本文档介绍Portal、RADIUS、HWTACACS支持MultiVRF特性典型配置举例。

2  配置前提

本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解MPLS VPN、Portal、RADIUS、HWTACACS特性。

3  注意事项

·     RADIUS或HWTACACS认证时,建议使用Nas-ip命令指定设备 IP,防止没有指定Nas-ip时设备使用的源IP与服务器指定的IP不符,造成认证失败。

·     Portal远程认证只支持RADIUS认证,不支持HWTACACS认证。

4  Portal和RADIUS支持MultiVRF功能配置举例

4.1  组网需求

图1所示,要求:在VPN环境中使用RADIUS服务器,用户使用Portal方式接入,Portal服务器也在VPN环境中,验证对MultiVRF的支持。

图1 Portal和RADIUS支持MultiVRF功能配置组网图

 

4.2  配置思路

·     portal服务器的相关参数需要在iMC上进行配置。

·     为了进行portal认证,需要在Router A上绑定VPN实例的接口下使能portal认证。

·     Router A上配置Portal认证的服务器时,需与VPN实例相结合。

4.3  使用版本

本举例是在Release 2317版本上进行配置和验证的。

4.4  配置步骤

4.4.1  Router A的配置

(1)     配置Router A为PE。

# 创建Loopback1接口。

<RouterA> system-view

[RouterA] interface loopback 1

[RouterA-LoopBack1] ip address 60.1.1.1 255.255.255.255

[RouterA-LoopBack1] quit

# 配置路由协议OSPF。

[RouterA] ospf 1

[RouterA-ospf-1] import-route direct

[RouterA-ospf-1] area 0.0.0.0

[RouterA-ospf-1-area-0.0.0.0] network 4.1.1.0 0.0.0.255

[RouterA-ospf-1-area-0.0.0.0] quit

# 配置router id。

[RouterA] router id 60.1.1.1

# 创建VPN实例,并进入VPN实例视图。

[RouterA] ip vpn-instance 1:1

[RouterA-vpn-instance-1:1] route-distinguisher 1:1

[RouterA-vpn-instance-1:1] vpn-target 1:1 export-extcommunity

[RouterA-vpn-instance-1:1] vpn-target 1:1 import-extcommunity

[RouterA-vpn-instance-1:1] quit

# 全局使能MPLS 和MPLS LDP。

[RouterA] mpls lsr-id 60.1.1.1

[RouterA] mpls

[RouterA-mpls] mpls ldp

[RouterA-mpls] quit

# 在接口GE5/0上使能MPLS MPLS LDP,并配置IP地址。

[RouterA] interface gigabitethernet 5/0

[RouterA-GigabitEthernet5/0] ip address 4.1.1.1 24

[RouterA-GigabitEthernet5/0] mpls

[RouterA-GigabitEthernet5/0] mpls ldp

[RouterA-GigabitEthernet5/0] quit

# 在接口Ethernet2/0上绑定VPN实例。

[RouterA] interface ethernet 2/0

[RouterA-Ethernet2/0] ip binding vpn-instance 1:1

[RouterA-Ethernet2/0] ip address 16.1.1.1 24

[RouterA-Ethernet2/0] quit

# 配置BGP协议,Router B的对等体为Router A

[RouterA] bgp 100

[RouterA-bgp] router-id 60.1.1.1

[RouterA-bgp] import-route direct

[RouterA-bgp] import-route ospf 1

[RouterA-bgp] peer 40.1.1.1 as-number 100

[RouterA-bgp] peer 40.1.1.1 connect-interface LoopBack1

[RouterA-bgp] ipv4-family vpn-instance 1:1

[RouterA-bgp-1:1] import-route static

[RouterA-bgp-1:1] ipv4-family vpnv4

[RouterA-bgp-af-vpnv4] peer 40.1.1.1 enable

(2)     配置Portal认证的服务器,并在接口下使能Portal认证。

[RouterA] portal server test ip 168.32.36.2 url http://168.32.36.2:8080/portal

vpn-instance 1:1 key test

[RouterA] interface ethernet 2/0

[RouterA-Ethernet2/0] portal server test method direct

[RouterA-Ethernet2/0] quit

(3)     配置RADIUS。

[RouterA] radius scheme radius

[RouterA-radius-radius] primary authentication 168.32.36.2 key test vpn-instance

1:1

[RouterA-radius-radius] primary accounting 168.32.36.2 key test vpn-instance 1:1

[RouterA-radius-radius] nas-ip 16.1.1.1

[RouterA-radius-radius] user-name-format without-domain  

[RouterA-radius-radius] quit

[RouterA] domain radius

[RouterA-isp-radius] authentication portal radius-scheme radius

[RouterA-isp-radius] authorization portal radius-scheme radius

[RouterA-isp-radius] accounting portal radius-scheme radius

[RouterA-isp-radius] quit

4.4.2  Router B的配置

# 创建Loopback1接口。

<RouterB> system-view

[RouterB] interface loopback 1

[RouterB-LoopBack1] ip address 40.1.1.1 255.255.255.255

[RouterB-LoopBack1] quit

# 配置路由协议OSPF。

[RouterB] ospf 1

[RouterB-ospf-1] import-route direct

[RouterB-ospf-1] area 0.0.0.0

[RouterB-ospf-1-area-0.0.0.0] network 4.1.1.0 0.0.0.255

[RouterB-ospf-1-area-0.0.0.0] quit

# 配置router id。

[RouterB] router id 40.1.1.1

# 创建VPN实例,并进入VPN实例视图。

[RouterB] ip vpn-instance 1:1

[RouterB-vpn-instance-1:1] route-distinguisher 1:1

[RouterB-vpn-instance-1:1] vpn-target 1:1 export-extcommunity

[RouterB-vpn-instance-1:1] vpn-target 1:1 import-extcommunity

[RouterB-vpn-instance-1:1] quit

# 全局使能MPLS 和MPLS LDP。

[RouterB] mpls lsr-id 40.1.1.1

[RouterB] mpls

[RouterB-mpls] mpls ldp

[RouterB-mpls] quit

# 在接口GigabitEthernet0/1上绑定VPN实例。

[RouterB] interface gigabitethernet 0/1

[RouterB-GigabitEthernet0/1] ip binding vpn-instance 1:1

[RouterB-GigabitEthernet0/1] ip address 168.32.30.11 16

[RouterB-GigabitEthernet0/1] quit

在接口GigabitEthernet0/0上使能MPLS和MPLS LDP,并配置接口IP地址。

[RouterB] interface gigabitethernet 0/0

[RouterB-GigabitEthernet0/0] ip address 4.1.1.2 24

[RouterB-GigabitEthernet0/0] mpls

[RouterB-GigabitEthernet0/0] mpls ldp

[RouterB-GigabitEthernet0/0] quit

# 配置BGP协议,Router B的对等体为Router A。

[RouterB] bgp 100

[RouterB-bgp] router-id 40.1.1.1

[RouterB-bgp] import-route direct

[RouterB-bgp] import-route ospf 1

[RouterB-bgp] peer 60.1.1.1 as-number 100

[RouterB-bgp] peer 60.1.1.1 connect-interface LoopBack1

[RouterB-bgp] ipv4-family vpn-instance 1:1

[RouterB-bgp-ipv4-1:1] import-route direct

[RouterB-bgp-ipv4-1:1] ipv4-family vpnv4

[RouterB-bgp-af-vpnv4] peer 60.1.1.1 enable

[RouterB-bgp-af-vpnv4] quit

4.4.3  iMC的配置

# 配置接入设备。

图2 接入配置信息页面图

 

 

# 配置服务。

图3 修改服务配置页面图

 

 

# 配置地址组。

图4 修改IP地址组图

 

 

# 配置portal设备。

图5 修改设备信息页面图

 

 

# 配置端口。

图6 端口详细信息页面图

 

 

# 配置用户。

图7 接入用户信息页面图

 

 

4.5  验证配置

通过用户上线情况来验证结果,使用Portal认证通过,用户上线后显示用户在线。

<RouterA> display connection

Index=6   ,Username=portal@radius

MAC=00-40-05-41-64-0C

IP=16.1.1.2

IPv6=N/A

 Total 1 connection(s) matched.

<RouterA> display connection ucibindex 6

Index=6   , Username=portal@radius

MAC=00-40-05-41-64-0C

IP=16.1.1.2

IPv6=N/A

Access=PORTAL ,AuthMethod=CHAP

Port Type=Ethernet,Port Name=Ethernet2/0

Initial VLAN=N/A, Authorization VLAN=N/A

ACL Group=Disable

User Profile=N/A

CAR=Disable

Priority=Disable

Start=2011-09-21 09:07:39 ,Current=2011-09-21 09:07:46 ,Online=00h00m06s

 Total 1 connection matched

4.6  配置文件

·     Router A

#

 router id 60.1.1.1

#

 portal server test ip 168.32.36.2 vpn-instance 1:1 key test url http://168.32.36.2:8080/portal

#

 mpls lsr-id 60.1.1.1

#

ip vpn-instance 1:1

 route-distinguisher 1:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

mpls

#

mpls ldp

#

radius scheme radius

 primary authentication 168.32.36.2 key test vpn-instance 1:1

 primary accounting 168.32.36.2 key test vpn-instance 1:1

 user-name-format without-domain

 nas-ip 16.1.1.1

#

domain radius

 authentication portal radius-scheme radius

 authorization portal radius-scheme radius

 accounting portal radius-scheme radius

 access-limit disable

 state active

 idle-cut disable

 self-service-url disable

#

interface Ethernet2/0

 port link-mode route

 ip binding vpn-instance 1:1

 ip address 16.1.1.1 255.255.255.0

 portal server test method direct

#

interface LoopBack1

 ip address 60.1.1.1 255.255.255.255

#

interface GigabitEthernet5/0

 port link-mode route

 ip address 4.1.1.1 255.255.255.0

 mpls

 mpls ldp

#

bgp 100

 router-id 60.1.1.1

 import-route direct

 import-route static

 import-route ospf 1

 undo synchronization

 peer 40.1.1.1 as-number 100

 peer 40.1.1.1 connect-interface LoopBack1

 #

 ipv4-family vpn-instance 1:1

  import-route direct

 #

 ipv4-family vpnv4

  peer 40.1.1.1 enable

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 4.1.1.0 0.0.0.255

#

·     Router B:

#

 router id 40.1.1.1

#

 mpls lsr-id 40.1.1.1

#

ip vpn-instance 1:1

 route-distinguisher 1:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

mpls

#

mpls ldp

#

interface LoopBack1

 ip address 40.1.1.1 255.255.255.255

#

interface GigabitEthernet0/0

 port link-mode route

 ip address 4.1.1.2 255.255.255.0

 mpls

 mpls ldp

#

interface GigabitEthernet0/1

 port link-mode route

 ip binding vpn-instance 1:1

 ip address 168.32.30.11 255.255.0.0

#

bgp 100

 router-id 40.1.1.1

 import-route direct

 import-route ospf 1

 undo synchronization

 peer 60.1.1.1 as-number 100

 peer 60.1.1.1 connect-interface LoopBack1

 #

 ipv4-family vpn-instance 1:1

  import-route direct

 #

 ipv4-family vpnv4

  peer 60.1.1.1 enable

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 4.1.1.0 0.0.0.255

#

5  HWTACACS支持MultiVRF功能配置举例

5.1  组网需求

图8所示,要求:在VPN环境中使用HWTACACS服务器,用户使用Telnet方式接入,验证对MultiVRF的支持。

图8 HWTACACS支持MultiVRF功能配置组网图

 

5.2  使用版本

本举例是在Release 2207版本上进行配置和验证的。

5.3  配置步骤

5.3.1  Router A的配置

(1)     配置Router A为PE。

# 创建Loopback1接口。

<RouterA> system-view

[RouterA] interface loopback 1

[RouterA-LoopBack1] ip address 60.1.1.1 255.255.255.255

[RouterA-LoopBack1] quit

# 配置路由协议OSPF。

[RouterA] ospf 1

[RouterA-ospf-1] import-route direct

[RouterA-ospf-1] area 0.0.0.0

[RouterA-ospf-1-area-0.0.0.0] network 4.1.1.0 0.0.0.255

[RouterA-ospf-1-area-0.0.0.0] quit

# 配置router id。

[RouterA] router id 60.1.1.1

# 创建VPN实例,并进入VPN实例视图。

[RouterA] ip vpn-instance 1:1

[RouterA-vpn-instance-1:1] route-distinguisher 1:1

[RouterA-vpn-instance-1:1] vpn-target 1:1 export-extcommunity

[RouterA-vpn-instance-1:1] vpn-target 1:1 import-extcommunity

[RouterA-vpn-instance-1:1] quit

# 全局使能MPLS 和MPLS LDP。

[RouterA] mpls lsr-id 60.1.1.1

[RouterA] mpls

[RouterA-mpls] mpls ldp

[RouterA-mpls] quit

# 在接口GE5/0上使能MPLS MPLS LDP,并配置IP地址。

[RouterA] interface gigabitethernet 5/0

[RouterA-GigabitEthernet5/0] ip address 4.1.1.1 24

[RouterA-GigabitEthernet5/0] mpls

[RouterA-GigabitEthernet5/0] mpls ldp

[RouterA-GigabitEthernet5/0] quit

# 在接口Ethernet2/0上绑定VPN实例。

[RouterA] interface ethernet 2/0

[RouterA-Ethernet2/0] ip binding vpn-instance 1:1

[RouterA-Ethernet2/0] ip address 16.1.1.1 24

[RouterA-Ethernet2/0] quit

# 配置BGP协议,Router B的对等体为Router A

[RouterA] bgp 100

[RouterA-bgp] router-id 60.1.1.1

[RouterA-bgp] import-route direct

[RouterA-bgp] import-route ospf 1

[RouterA-bgp] peer 40.1.1.1 as-number 100

[RouterA-bgp] peer 40.1.1.1 connect-interface LoopBack1

[RouterA-bgp] ipv4-family vpn-instance 1:1

[RouterA-bgp-1:1] import-route static

[RouterA-bgp-1:1] ipv4-family vpnv4

[RouterA-bgp-af-vpnv4] peer 40.1.1.1 enable

(2)     配置Router A上配置Telnet。

[RouterA] telnet server enable

[RouterA] user-interface vty 0 4

[RouterA-ui-vty0-4] authentication-mode scheme

[RouterA-ui-vty0-4] quit

(3)     配置Router A上配置HWTACACS。

[RouterA] hwtacacs scheme hwtacacs

[RouterA-hwtacacs-hwtacacs] primary authentication 168.32.30.20 vpn-instance 1:1

[RouterA-hwtacacs-hwtacacs] primary authorization 168.32.30.20 vpn-instance 1:1

[RouterA-hwtacacs-hwtacacs] primary accounting 168.32.30.20 vpn-instance 1:1

[RouterA-hwtacacs-hwtacacs] nas-ip 16.1.1.1

[RouterA-hwtacacs-hwtacacs ]user-name-format without-domain

[RouterA-hwtacacs-hwtacacs] quit

[RouterA] domain hwtacacs

[RouterA-isp-hwtacacs] authentication login hwtacacs-scheme hwtacacs

[RouterA-isp-hwtacacs] authorization login hwtacacs-scheme hwtacacs

[RouterA-isp-hwtacacs] accounting login hwtacacs-scheme hwtacacs

[RouterA-hwtacacs-hwtacacs] key authentication test

[RouterA-hwtacacs-hwtacacs] key authorization test

[RouterA-hwtacacs-hwtacacs] key accounting test

[RouterA-isp-hwtacacs] quit

5.3.2  Router B的配置

# 创建Loopback1接口。

<RouterB> system-view

[RouterB] interface loopback 1

[RouterB-LoopBack1] ip address 40.1.1.1 255.255.255.255

[RouterB-LoopBack1] quit

# 配置路由协议OSPF。

[RouterB] ospf 1

[RouterB-ospf-1] import-route direct

[RouterB-ospf-1] area 0.0.0.0

[RouterB-ospf-1-area-0.0.0.0] network 4.1.1.0 0.0.0.255

[RouterB-ospf-1-area-0.0.0.0] quit

# 配置router id。

[RouterB] router id 40.1.1.1

# 创建VPN实例,并进入VPN实例视图。

[RouterB] ip vpn-instance 1:1

[RouterB-vpn-instance-1:1] route-distinguisher 1:1

[RouterB-vpn-instance-1:1] vpn-target 1:1 export-extcommunity

[RouterB-vpn-instance-1:1] vpn-target 1:1 import-extcommunity

[RouterB-vpn-instance-1:1] quit

# 全局使能MPLS 和MPLS LDP。

[RouterB] mpls lsr-id 40.1.1.1

[RouterB] mpls

[RouterB-mpls] mpls ldp

[RouterB-mpls] quit

# 在接口GigabitEthernet0/1上绑定VPN实例。

[RouterB] interface gigabitethernet 0/1

[RouterB-GigabitEthernet0/1] ip binding vpn-instance 1:1

[RouterB-GigabitEthernet0/1] ip address 168.32.30.11 16

[RouterB-GigabitEthernet0/1] quit

在接口GigabitEthernet0/0上使能MPLS和MPLS LDP,并配置接口IP地址。

[RouterB] interface gigabitethernet 0/0

[RouterB-GigabitEthernet0/0] ip address 4.1.1.2 24

[RouterB-GigabitEthernet0/0] mpls

[RouterB-GigabitEthernet0/0] mpls ldp

[RouterB-GigabitEthernet0/0] quit

# 配置BGP协议,Router B的对等体为Router A。

[RouterB] bgp 100

[RouterB-bgp] router-id 40.1.1.1

[RouterB-bgp] import-route direct

[RouterB-bgp] import-route ospf 1

[RouterB-bgp] peer 60.1.1.1 as-number 100

[RouterB-bgp] peer 60.1.1.1 connect-interface LoopBack1

[RouterB-bgp] ipv4-family vpn-instance 1:1

[RouterB-bgp-ipv4-1:1] import-route direct

[RouterB-bgp-ipv4-1:1] ipv4-family vpnv4

[RouterB-bgp-af-vpnv4] peer 60.1.1.1 enable

[RouterB-bgp-af-vpnv4] quit

5.3.3  ACS的配置

# 配置NAS。

图9 添加AAA客户端图

㰞Ô

 

# 配置用户。

图10 配置用户图

㰞Ô

 

5.4  验证配置

通过用户上线情况验证结果,使用Telnet认证通过。

<RouterA> display connection

Index=14,Username=test@hwtacacs

IP=16.1.1.2

IPv6=N/A

 Total 1 connection(s) matched.

<RouterA> display connection ucibindex 14

Index=14,Username=test@hwtacacs

IP=16.1.1.2

IPv6=N/A

Access=Admin   ,AuthMethod=PAP

Port Type=Virtual ,Port Name=N/A

Initial VLAN=N/A, Authorization VLAN=N/A

ACL Group=Disable

User Profile=N/A

CAR=Disable

Priority=Disable

Start=2011-09-21 11:16:50 ,Current=2011-09-21 11:19:08 ,Online=00h02m19s

 Total 1 connection matched.

5.5  配置文件

·     Router A:

#

 router id 60.1.1.1

#

 telnet server enable

#

 mpls lsr-id 60.1.1.1

#

ip vpn-instance 1:1

 route-distinguisher 1:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

mpls

#

mpls ldp

#

hwtacacs scheme hwtacacs

 primary authentication 168.32.30.20  vpn-instance 1:1

 primary authorization 168.32.30.20  vpn-instance 1:1

 primary accounting 168.32.30.20  vpn-instance 1:1

 nas-ip 16.1.1.1

 key authentication test

 key authorization test

 key accounting test

 user-name-format without-domain

#

domain hwtacacs

 authentication login hwtacacs-scheme hwtacacs

 authorization login hwtacacs-scheme hwtacacs

 accounting login hwtacacs-scheme hwtacacs

 access-limit disable

 state active

 idle-cut disable

 self-service-url disable

#

interface Ethernet2/0

 port link-mode route

 ip binding vpn-instance 1:1

 ip address 16.1.1.1 255.255.255.0

#

interface LoopBack1

 ip address 60.1.1.1 255.255.255.255

#

interface GigabitEthernet5/0

 port link-mode route

 ip address 4.1.1.1 255.255.255.0

 mpls

 mpls ldp

#

bgp 100

 router-id 60.1.1.1

 import-route direct

 import-route static

 import-route ospf 1

 undo synchronization

 peer 40.1.1.1 as-number 100

 peer 40.1.1.1 connect-interface LoopBack1

#

 ipv4-family vpn-instance 1:1

  import-route direct

#

 ipv4-family vpnv4

  peer 40.1.1.1 enable

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 4.1.1.0 0.0.0.255

#

user-interface vty 0 4

 authentication-mode scheme

idle-timeout 0 0

#

·     Router B:

#

 router id 40.1.1.1

#

 mpls lsr-id 40.1.1.1

#

ip vpn-instance 1:1

 route-distinguisher 1:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

mpls

#

mpls ldp

#

interface LoopBack1

 ip address 40.1.1.1 255.255.255.255

#

interface GigabitEthernet0/0

 port link-mode route

 ip address 4.1.1.2 255.255.255.0

 mpls

 mpls ldp

#

interface GigabitEthernet0/1

 port link-mode route

 ip binding vpn-instance 1:1

 ip address 168.32.30.11 255.255.0.0

#

bgp 100

 router-id 40.1.1.1

 import-route direct

 import-route ospf 1

 undo synchronization

 peer 60.1.1.1 as-number 100

 peer 60.1.1.1 connect-interface LoopBack1

 #

 ipv4-family vpn-instance 1:1

  import-route direct

 #

 ipv4-family vpnv4

  peer 60.1.1.1 enable

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 4.1.1.0 0.0.0.255

#

6  相关资料

·     H3C MSR 系列路由器 命令参考(V5)-R2311

·     H3C MSR 系列路由器 配置指导(V5)-R2311

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们