`
neighbor x.x.x.x peer-group internal / external network 218.88.144.0 mask 255.255.254.0 Interface loopback 0 Ip address 222.211.185.1 255.255.255.255 mpls mpls topology-driven-lsp mpls ldp advertise-labels for PE access-list PE permit ip host 222.211.185.1 any ip as-path access-list 1 permit exit mpls ldp targeted-hello interval 5 mpls ldp targeted-hello holdtime 15 mpls ldp session keepalive interval 10 mpls ldp session holdtime 30 mpls ldp profile default MBGP配置
router bgp xxx
no synchronization no auto-summary timers bgp 30 90 maximum-paths 2
neighbor internal peer-group neighbor internal remote-as xxx neighbor internal send-community
neighbor internal route-map \ neighbor x.x.x.x peer-group internal
neighbor x.x.x.x update-source loopback 0 neighbor x.x.x.x remote-as xxx log here
bgp router-id x.x.x.x
neighbor 1.1.1.1 advertisement-interval 5
//以下作为选配内容
neighbor internal route-map \route-map \match ip address 10 set local-preference 100 set community 65182:65182
neighbor external route-map \route-map \match ip address 10 set local-preference 20
set community 4134:651822
`
3、中兴设备
MPLS: 1:
全局配置模式下:
mpls ip //全局启用mpls
mpls ldp router-id loopback1 //配置mpls的建链接口,前提是需要首先创建loopback1接口 接口模式下
mpls ip //接口下启用mpls
以上配置是必配项,两个loopback1(建链接口)地址需要用路由打通,这样mpls邻居可以建立起来。需要注意的是两个loopback1的地址不能相同,否则邻居无法建立。 2:
全局配置模式下
mpls ldp access-fec host-route-only / for acl. // host-route-only只对32位地址路由分配标签,for acl.可以用acl对标签分发做控制。 3:
缺省情况下,标签分配控制方式为有序方式ordered;标签保持方式为自由方式liberal;标签发布方式为下游自主方式DU。 4:
缺省情况下,Hello时间间隔定时器设定为5秒;Hello保持定时器设定为15秒; 全局配置模式下
mpls ldp holdtime 30 //LDP会话Keepalive保持定时器设定
第三章 安全加固配置
第1节 数据层面安全加固
1.1 关闭IP选项
■ 配置内容: 关闭IP选项; ■ 规范要求:
IP数据平面中的 IP选项功能一般在特定的情形中需要应用,但对于大多数常见的IP通信则不是必须的。由于IP选项导致IP数据包的可变长度和复杂处理的需要,具有IP选项的数据包会通过数据平面转发的慢速路径进行处理,在城域网网络中,不需要也没有必要对 IP
`
选项进行处理,因此,应该禁用 IP选项技术。 ■ 配置示例: 1、华为设备 缺省关闭。 2、Juniper设备 缺省关闭。 3、中兴设备
中兴BRAS涉及IP选项的有两个,一是IGMP,该选项无法关闭;二是RSVP,该功能能够通过以下方式关闭。 ZXR10(config)#no ip source-route 1.2 关闭IP 直接广播
■ 配置内容: 关闭IP直接广播; ■ 规范要求:
IP直接广播是其目的地址是一个 IP子网(或网络)的一个有效广播地址的数据包,该子网(或网络)是来自源地址的一个或多个路由器。IP 直接广播运行 IP 广播进行远程传输,这就为 DoS 攻击提供了一定的条件,在城域网网络中,应该禁止IP直接广播。 ■ 配置示例: 1、华为设备 缺省关闭。
2、Juniper设备 缺省关闭。
3、中兴设备 缺省关闭。 1.3 典型垃圾流量过滤
■ 配置内容:
1、配置病毒木马端口过滤; 2、配置URPF; ■ 规范要求: 1、通过使用接口ACL技术,可以有效的阻止一些有害的流量进入CHINANET,也阻止CHINANET有害流量进入城域网。
2、需要阻止的流量主要有以下几类:
1).常见及危害程度较大的病毒、木马端口。
`
2).伪造源地址数据流。 3、具体过滤的端口如下:
Udp: 1433~1434、1027、1028、135~139、 445、9995、9996、3333、4444、5554; Tcp: 901、2745、3127、3128、 6129、 6667、593、135、137~139、 9996、 1068、
5800、5900、 8998、3333;
■ 配置示例: 1、华为设备
一、病毒木马端口过滤 acl number 3000
description ANTI-VIRUS
rule 1 permit tcp destination-port eq 4444 rule 2 permit tcp destination-port eq 5554 rule 3 permit tcp destination-port eq 901 rule 4 permit tcp destination-port eq 2745 rule 5 permit tcp destination-port eq 3127 rule 6 permit tcp destination-port eq 3128 rule 7 permit tcp destination-port eq 6129 rule 8 permit tcp destination-port eq 6667 rule 9 permit tcp destination-port eq 593 rule 10 permit tcp destination-port eq 135 rule 11 permit tcp destination-port eq 137 rule 12 permit tcp destination-port eq 138 rule 13 permit tcp destination-port eq 139 rule 14 permit tcp destination-port eq 9996 rule 15 permit tcp destination-port eq 1068 rule 16 permit tcp destination-port eq 5800 rule 17 permit tcp destination-port eq 5900 rule 18 permit tcp destination-port eq 8998 rule 19 permit tcp destination-port eq 3333 rule 20 permit udp destination-port eq 1433 rule 21 permit udp destination-port eq 1434 rule 22 permit udp destination-port eq 1027 rule 23 permit udp destination-port eq 1028 rule 24 permit udp destination-port eq 135 rule 25 permit udp destination-port eq 136 rule 26 permit udp destination-port eq 137 rule 27 permit udp destination-port eq 138 rule 28 permit udp destination-port eq 139 rule 29 permit udp destination-port eq 445 rule 30 permit udp destination-port eq 9995 rule 31 permit udp destination-port eq 9996 rule 32 permit udp destination-port eq 3333
`
acl number 3001 rule permit ip
traffic classifier bingdu //配置流模板
if-match ACL 3000
traffic classifier any //配置流模板
if-match ACL 3001
traffic behavior bingdu //配置动作模板 deny
traffic behavior permit
permit
traffic policy bingdu //配置策略模板,流与动作相关联
classifier bingdu behavior bingdu
classifier any behavior permit
interface GigabitEthernet1/0/0
description Link-to-MZNE5000E-GE6/0/6
traffic-policy bingdu outbound //在相关的接口下应用