F0/3Console
【实验步骤】
172.16.1.23
步骤一、配置交换机端口的最大连接数限制
Switch#configure terminal
Switch(config)#interface range fastethernet 0/1-23 !打开交换机1-23端口 Switch(config-if-range)#switchport port-security !开启1-23安全端口功能
Switch(config-if-range)#switchport port-security maximum 1 !开启端口的最大连接数为1 Switch(config-if-range)#switchport port-security violation shutdown !配置安全违例的处理方式shutdown
步骤二、验证测试:查看交换机的端口安全配置
Switch#show port-security
步骤三、配置交换机端口的地址绑定
1、查看主机的IP和MAC地址信息。在PC1主机上打开CMD命令提示符窗口,执行Ipcinfig/All命令,查看测试计算机PC1的IP和MAC地址信息,如图:
2、配置交换机端口的地址绑定
Switch#configure terminal
Switch(config)#interface fastethernet 0/3 Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security mac-address 0019.2147.10F9 Ip-address 172.16.1.23 !配置地址绑定
- 31 -
3、查看地址绑定配置
Switch#show port-security address
【实验测试】
在特权模式开始,可以通过下面的命令,查看端口安全的信息,测试刚才为交换机配置的安全项目内容:
1、查看接口的端口安全配置信息:show port-security interface Fa0/1 2、查看安全地址信息: show port-security address
3、显示某个接口上的安全地址信息: Show port-security interface Fa0/1 address
4、显示所有安全端口的统计信息,包括最大安全地址数,当前安全地址数以及违例处理方式等: Show port-security 【实验问题】
1、交换机端口安全功能有哪些?
2、对交换机的端口配置最大连接数是多少? 3、交换机端口安全功能只能在哪个接口进行配置? 4、交换机最大连接数限制默认的处理方式是什么? 【实验注意事项】
1、锐捷交换机安全功能只能在ACCESS接口进行配置;
2、锐捷交换机最大连接数限制取值范围是1~128,默认是128; 3、锐捷交换机最大连接数限制默认的处理方式是protect; 【实验结论】
- 32 -
实验四 (2)802.1x交换机的配置
【实验名称】
锐捷RG-S3760EG系列接入层交换机的802.1与Radius协议配置。
【实验目的】
掌握锐捷RG-S3760EG系列接入增交换机基于802.1x与Radius协议结合RG-SAM2.1认证版实现安全接入认证的配置。 【背景描述】
假设您是某公司的网络管理人员,鉴于公司网络安全管理的需要,需要实现对用户接入公司网络进行必要的身份控制,公司决定部署基于IEEE802.1x与RADIUS协议的认证管理系统。
本实验是RG-SAM2.1认证版系列实验的第一步。在进行相关实验之前,首先要配置锐捷系列接入层交换机开启802.1x与Radius协议。 【实现功能】
实现LAN接入的安全身份认证。 【实验拓扑】
PC1
RG-S3760EG
RG-SAM Server
192.168.0.44/24 192.168.0.2/24
192.168.0.185/24
【实验设备】
1、RG-S3760EG一台;
2、PC机一台,用于配置交换机的终端。 【实验步骤】
步骤一、查看交换机版本信息
验证测试:
查看交换机版本信息: Switch>show version
System description : Red-Giant Gigabit Intelligent Switch(S3760EG) By Ruijie Network System uptime : 0d:0h:8m:40s
- 33 -
System hardware version : 3.3
System software version : 1.5(1) Build Mar 3 2005 Temp System BOOT version : RG-S3760EG-BOOT 03-02-02 System CTRL version : RG-S3760EG-CTRL 03-05-02 Running Switching Image : Layer2 Switch>
步骤二、初始化交换机配置
所有的交换机在开始进行配置前,必需先进行初始化,清除原有的一切配置,命令如下:
Switch>
Switch>enable
Switch#delete flash:config.text !删除配置 (在实验室实验时请实验指导老师清除相关配置)
Switch#reload …..
Switch#configure terminal !进入配置层 Switch(config)#
验证测试:
使用命令show running-config命令查看配置信息,删除原始配置信息后该命令的打印结果如下:
Switch#show running-config Building configuration...
Current configuration : 318 bytes !
version 1.0 !
hostname Switch vlan 1 ! end Switch#
步骤三
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip default-gateway 192.168.0.1 !!!设置交换机默认网关,实现跨网段管理交换机
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.0.2 255.255.255.0 Switch(config)#exit
Switch(config)#enable secret level 1 5 star
- 34 -
Switch(config)#enable secret level 15 5 star
Switch(config)#radius-server host 192.168.0.185 auth-port 1812 !!! 指定RADIUS服务器的地址及UDP认证端口
Switch(config)#aaa accounting server 192.168.0.185 !!! 指定记账服务器的地址
Switch(config)#aaa accounting acc-port 1813 !!! 指定记账服务器的UDP端口
Switch(config)#aaa authentication dot1x !!! 开启AAA功能中的802.1x认证功能 Switch(config)#aaa accounting !!! 开启AAA功能中的记账功能 Switch(config)#radius-server key star !!!设置RADIUS服务器认证字 Switch(config)#snmp-server community public rw
!!!为通过简单网络管理协议访问交换机设置认证名(public为缺省认证名) 并分配读写权限
Switch(config)#interface fastEthernet 0/4 !!! 实验中将在4号接口启动802.1x的认证 Switch(config-if)#dot1x port-control auto !!! 设置该接口参与802.1x认证 Switch(config-if)#exit Switch(config)#exit Switch#write
Building configuration... [OK] Switch# 验证测试:
将两台PC(使用192.168.0.0/24网段的地址,实验中客户端PC使用地址192.168.0.44/24,服务器使用地址192.168.0.185/24)连接到交换机除4号端口外的其他任意两个端口上,在任何一个PC上进行连通性测试(ping)。在客户端上使用命令ping 192.168.0.185,能够ping通。命令执行结果如下图所示:
将客户端PC或服务器PC接到4号端口,在其中的一台PC上ping另一台PC,则
- 35 -