Skip to main content

 路由器设置 > 新闻资讯 > 华为 >

华为交换机802.1x动态下发vlan配置

2013-08-04 01:04 浏览:

一、配置网络设备(华为篇)

 

1、配置核心交换机(华为S7712)

sysnameCore-Switch                更改主机名

vlan batch 31 32 222 223           批量创建vlan

int vlan 32                        创建管理vlan 32虚拟接口

ip address 172.16.32.254 24        配置管理vlan 32 网关地址

int vlan 31                        创建服务器vlan 31虚拟接口

ip address 172.16.31.254 24        配置服务器vlan 31 网关地址

int vlan 222                       创建业务vlan 222虚拟接口

ip address 172.16.222.254 24       配置业务vlan 222 网关地址

dhcp select relay                  

dhcp relay server-ip 172.16.31.66  

配置DHCP中继服务器为172.16.31.66

int vlan 223                       创建业务vlan 223虚拟接口

ip address 172.16.223.254 24       配置业务vlan 223 网关地址

dhcp select relay                

dhcp relay server-ip 172.16.31.66  

配置DHCP中继服务器为172.16.31.66

开启DHCP服务

dhcp enable

G10/0/1端口配置

int G10/0/1

description To 802.1x Switch-G1/0/24

port link-type trunk

porttrunk pvid vlan 32

porttrunk allow-pass vlan all

G10/0/2接口配置

int G10/0/2

description To Server Switch-G0/0/48

portlink-type trunk

porttrunk pvid vlan 32

porttrunk allow-pass vlan all

2、配置服务器端交换机(S5700)

sysname Server Switch               更改主机名

vlan batch 31 32                    创建vlan 31、32

int Vlan 32                         创建管理VLAN 32虚拟接口

ip address 172.16.32.25224         配置管理IP地址

配置默认路由

ip route 0.0.0.0 0.0.0.0 172.16.32.254

上联端口G0/0/48配置

interfaceGigabitEthernet0/0/1    

description ToCore-Switch-G10/0/2    

port link-typeaccess

port defaultvlan 31

连接服务器端口G0/0/1配置

interfaceGigabitEthernet0/0/1    

description ToWindows Server 2008    

port link-typeaccess

port defaultvlan 31

3配置接入交换机 (华为)

sysname 802.1x Switch           更改主机名

vlan batch 32 222to 223        批量创建VLAN 32 222和223

int Vlan 32                     创建管理VLAN 32虚拟接口

ip address 172.16.32.25324

配置管理IP为172.16.32.254/24

创建radius模版

radius-server template test.com

      radius-servershared-key simple test.com

      radius-serverauthentication 10.248.31.66 1812

radius-server accounting 10.248.31.66 1813

radius-server retransmit 2

undoradius-server user-name domain-included

配置aaa

aaa

authentication-scheme test.com          

authentication-mode radius

authorization-scheme test.com

accounting-scheme test.com

accounting-mode radius

domain test.com

authentication-scheme test.com

accounting-scheme test.com

authorization-scheme test.com

radius-server  test.com

配置默认域

domain test.com

全局开启dot1x

dot1x enable

配置dot1x验证方式

dot1x authentication-method eap

开启DHCP服务

dhcp enable

配置默认路由

ip route 0.0.0.0 0.0.0.0 172.16.32.254

配置接入的端口G0/0/1

interface GigabitEthernet0/0/1

description To Dynamic 802.1x-huan.yan-PC

interface GigabitEthernet0/0/1

port hybrid pvid vlan 222

undoport hybrid vlan 1

porthybrid untagged vlan 222

dot1xenable

配置接入的端口G0/0/2

interface GigabitEthernet0/0/2

description To Dynamic 802.1x-obama-PC

port hybrid pvid vlan 222

undoport hybrid vlan 1

porthybrid untagged vlan 222

dot1xenable

配置上联端口G0/0/24

interface GigabitEthernet0/0/24

description To Core-Switch-G10/0/1    

port link-type trunk

porttrunk pvid vlan 32

porttrunk allow-pass vlan 2 to 4094

华为配置比华三配置繁琐些~