网络搭建第一部分:
 1.DCRS
 连接交换机后进入特权模式恢复出厂设置
 Enable
 Set defalut
 Write
 Reload
 恢复出厂设置后再进行配置,修改交换机名字
 Enable
 Config terminal
 Hostname DCRS
 创建vlan
 Vlan 10;;;*
 给vlan配置ip
 Interface vlan 10
 Ip addres (ip+子网掩码)
 Exit
 进入相应接口划分vlan
 配置接口模式后在将接口划入VLAN,但是在通常情况下可以省略将交换机接口模式设置为access模式,因为交换机接口一般默认为access模式。
 Interface ethernet (接口号)
 Switchport access vlan 10
 Exit
 注意:连接另一个交换机接口的要进行封装
 Interface ethernet (另一个交换机接口号)
 Switchport mode trunk
 Switchport trunk allowed vlan *
 Exit
 配置完成后可以在特权模式下输入show vlan命令查看结果(比赛时要将此截图保存入文档)
 Show vlan
 配置终端MAC地址的学习数量和违规时的规则为阻止后续违规流量通过,首先需要设置mac地址学习模式为cpu控制才能配置端口安全相关的命令(另外,waf接口不需要配置,比赛时某一台pc接口也不需要配置,连接它的接口为专业接口,限定只允许它的mac地址可以连接。)
 mac-address-learning cpu-control
 普通接口
 Interface ethernet (接口号)
 Switchport port-security
 switchport port-security maximum (配置终端mac地址的学习数量)
 Switchport port-security violation restrict
 Exit
 有专用接口的pc
 Interface ethernet (连接专用接口的接口号)
 Switchport port-security
 Switchport port-security mac-address cc-cc-cc-cc-cc-cc
 Exit
 将连接 DCFW 的双向流量镜像至 Netlog 进行监控和分析
 Monitor session 1 source interface ethernet (连接DCFW的接口号)tx
 Monitor session 1 source interface ethernet (连接DCFW的接口号)rx
 (Monitor session 1 source interface ethernet (连接DCFW的接口号)both)
 Monitor session 1 destination interface ethernet (日志接口号)
 开启防ARP扫描功能,单位时间内端口收到ARP数量超过你设定的数便认定是攻击,DOWN 掉此端口
 Anti-arpscan enable
 Anti-arpscan port-based threshold (你设定的数)
 为连接DCFW和DCWS的两个端口开启信任,因为这两个接口连接着DCFW和DCWS面临的多用户的环境,如果限制ARP数量,可能使网络出现故障,所以需要信任这两个端口
 Interface ethernet (
 anti-arpscan trust supertrust-port
 Exit
 在DCRS上配置端口环路检测(loopback-detection)防止来自 某vlan接口下的单端口环路,并配置存在环路时的检测时间间隔为多少,不存在环路时的检测时间间隔为多少
 Loopback-detection interval-time (存在环路时的检测时间间隔) (不存在环路时的检测时间间隔)
 对某vlan接口进行配置
 Interface ethernet (某vlan接口号)
 Loopback-detection specified-某vlan
 Loopback-detection control shutdown
 Exit
 为了控制接入网络 PC,需要在交换 某接口开启 DOT1X 认证,配置radius认证服务器,配置IP地址并设置密码为明文加密
 (authentication认证)
 Radius-server authentiction host ip地址(认证服务器)key 0 (密码)
 开启AAA(认证,授权和为打开计费做准备
 Aaa enable
 在全局模式下开启dot1x
 Dot1x enable
 再对接口进行配置,开启dot1x并配置端口认证方式基于端口认证
 Interface ethernet //*
 Dot1x enable
 Dot1x port-method portbased
 Exit
 交换机开启远程管理,使用 SSH 方式
 Username 账号 password 0 密码
 ssh-server enable
 开启DHCP服务
 Service dhcp
 配置送往UDP端口的数据报
 ip forward-protocol udp bootps
 针对各VLAN配置UDP广播数据报的目的地址
 interface vlan*
 ip helper-address (UDP广播数据报的目的地址)
 exit
 配置时间范围名字为worktime
 time-range worktime
 配置周期时间段(periodic)
 创建访问控制列表work(ip access-list extended work)
 为拦截、防止非法的MAC地址与IP地址绑定的ARP数据包配置动态arp检测功能,设置用户的ARP阀值为*(ip arp dynamic maximum *)
 开启ip dhcp snooping并在接口下绑定用户,防止某vlan网段arp欺骗
 启动DHCP Snooping功能
 ip dhcp snooping enable
 启动DHCP Snooping绑定功能
 ip dhcp snooping binding enable
 配置端口的dhcp侦听为信任
 ip dhcp snooping trust
 对某vlan中的某端口启动dhcp snooping 绑定user 功能
 ip dhcp snooping binding user-control
 配置设备enable密码
 Enable password 0 密码
 开启抑制广播风暴功能,设置参数
 storm-control broadcast pps 参数