配置核心交换机、服务器交换机、接入交换机
作者:闫欢
Q Q:253408824
七、 配置网络设备(华为篇)
1、 配置核心交换机(华为S7712)
sysname Core-Switch 更改主机名
vlan batch 31 32 90 100 批量创建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 90 创建业务vlan 90虚拟接口
ip address 192.168.0.254 24 配置业务vlan 90 网关地址
dhcp select relay
dhcp relay server-ip 172.16.31.66
配置DHCP中继服务器为172.16.31.66
int vlan 100 创建业务vlan 100虚拟接口
ip address 172.16.0.254 24 配置业务vlan 100 网关地址
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 mac-authen Switch-G1/0/24
port link-type trunk
port trunk pvid vlan 32
port trunk allow-pass vlan all
G10/0/2接口配置
int G10/0/2
description To Server Switch-G0/0/48
port link-type trunk
port trunk pvid vlan 32
port trunk 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.252 24 配置管理IP地址
配置默认路由
ip route 0.0.0.0 0.0.0.0 172.16.32.254
上联端口G0/0/48配置
interface GigabitEthernet0/0/1
description To Core-Switch-G10/0/2
port link-type access
port default vlan 31
连接服务器端口G0/0/1配置
interface GigabitEthernet0/0/1
description To Windows Server 2008
port link-type access
port default vlan 31
3、配置接入交换机 (华为)
sysname mac-authen Switch 更改主机名
vlan batch 32 90 100 批量创建VLAN 32 222和223
int Vlan 32 创建管理VLAN 32虚拟接口
ip address 172.16.32.253 24
配置管理IP为172.16.32.254/24
创建radius模版
radius-server template test.com
radius-server shared-key simple test.com
radius-server authentication 172.16.31.66 1812
radius-server accounting 172.16.31.66 1813
radius-server retransmit 2
undo radius-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
全局开启mac地址认证
mac-authen
设置mac地址认证域
mac-authen domain test.com
开启DHCP服务
dhcp enable
配置默认路由
ip route 0.0.0.0 0.0.0.0 172.16.32.254
配置接入的端口G0/0/1
port hybrid pvid vlan 100
undo port hybrid vlan 1
port hybrid untagged vlan 100
mac-authen
mac-authen guest-vlan 90
mac-authen max-user 1
配置上联端口G0/0/24
interface GigabitEthernet0/0/24
description To Core-Switch-G10/0/1
port link-type trunk
port trunk pvid vlan 32
port trunk allow-pass vlan 2 to 4094
网络设备全部配置完毕