移动城域网项目
Juniper MX 宽带接入服务器配置模板
瞻博网络信息咨询(上海)有限公司
目 录
第一部分, MX960 设备开局配置指导................................................................................................................................3
1. 系统基本配置...................................................................................................................................................................3
设置设备的主机名字(主机名见集成商规化),增加管理带外管理的interface ......................................................3
增加管理者帐号...................................................................................................................................................................4
增加操作者帐号...................................................................................................................................................................4
打开telnet 功能,进行连接数以及空闲时间设置...........................................................................................................4
配置telnet 源地址限制,只允许特定的IP 段telnet 设备...............................................................................................4
配置syslog ,并在本地保存所有log 日志........................................................................................................................5
配置SNMP ...........................................................................................................................................................................5
设置本机时间及NTP 和时区设置(NTP Server 需从集成商或市公司取得)............................................................6
2. 全局和调用参数配置 ...................................................................................................................................................... 6
设置动态的profile 配置,根据业务vlan 需求可配置为单层vlan 或者双层vlan........................................................6
配置pppoe 业务用户上线记录log 功能............................................................................................................................ 7
Qos 全局配置限速策略........................................................................................................................................................7
3. 上行端口和防病毒 ACL 配置........................................................................................................................................ 9
配置防病毒ACL .................................................................................................................................................................. 9
配置loopback 接口............................................................................................................................................................ 11
配置上行接口.....................................................................................................................................................................11
4. 路由协议配置.................................................................................................................................................................11
负载均衡配置.....................................................................................................................................................................11
OSPF 路由配置..................................................................................................................................................................12
ISIS 路由配置.....................................................................................................................................................................13
BGP 配置(详见集成商方案)........................................................................................................................................13
LDP/MPLS 配置.................................................................................................................................................................14
第二部分, MX960 业务配置指导 ......................................................................................................................................14
PPPOE 拔号业务配置................................................................................................................................................... 15
配置ip 地址池....................................................................................................................................................................15
配置Radius 服务器............................................................................................................................................................15
配置业务侧端口.................................................................................................................................................................15
2. 专线业务配置.................................................................................................................................................................16
配置静态用户的网关接口.................................................................................................................................................16
配置用户及相关属性.........................................................................................................................................................17
配置用户应用属性.............................................................................................................................................................17
1.
修改人修改人//时间时间
张锦章张锦章/20/20120305
120305
18910598815
18910598815
randyzh@juniper.net
randyzh@juniper.net
版本号版本号
V1.0V1.0
V1.1V1.1
V1.2V1.2
主要更新内容
主要更新内容
文档初稿编写
文档初稿编写
本文描述 Juniper MX960 在移动城域网项目中的开局和业务的配置指导。
第一部分,
MX960 设备开局配置指导
1. 系统基本配置
设置设备的主机名字 (主机名见集成商规化),增加管理带外管理的 interface
groups {
re0 {
# Routing Engine 0 在MX960上
host-name JSTZ-MC-CMNET-BRAS-ZHL-MX960.RE0; #在主引擎上配置主机名
# Routing Engine 1 在MX960上
host-name JSTZ-MC-CMNET-BRAS-ZHL-MX960.RE1;
unit 0 {
family inet {
no-redirects;
address 192.168.0.202/24;
apply-groups [ re0 re1 ]; #全局应用
#增加带外管理端口
link-mode full-duplex;
unit 0 {
family inet {
no-redirects;
address 192.168.0.201/24;
system {
}
interfaces {
fxp0 {
}
}
}
}
}
re1 {
system {
}
interfaces {
fxp0 {
}
}
}
}
}
}
注:管理口具有路由功能,也会被发布到 local 的路由域里面,在应用到路由协议中时注意
disable 管理端口,避免发布到路由域里面。
增加管理者帐号
#增加用户名为admin的管理用户
#用户识别id,设备上具有唯一性
encrypted-password "aHsrk6sbWc1"; ## SECRET-DATA #此 为show 命 令时 显 示 配置 , 实 际配 置 用
user operator{
#增加用户名为operator的操作者用户,不能进行配置更改
encrypted-password "$1$RyIV0yuA$vF.DWWkLXgIaHsrk6sbWc1"; ## SECRET-DATA
system {
login {
user admin{
uid 2001;
class super-user;
authentication {
plain-text-password命令代替
}
}
}
}
system {
login {
增加操作者帐号
uid 2002
class operator;
authentication {
}
}
}
}
system {
services {
telnet {
}
}
login {
class admin {
}
}
}
打开 telnet 功能 ,进行连接数以及空闲时间设置
#使能设备Telnet服务
connection-limit 10; #连接数限制为10.
rate-limit 10; #允许每分钟连接请求次数限制为10.
idle-timeout 10; #超时推出时间配置在用户组中,该组用户适用
permissions all; #用户组权限
firewall {
配置 telnet 源地址限制,只允许特定的 IP 段 telnet 设备
#Telnet访问控制在firewall中定义
source-prefix-list { #允许下列前缀列表中的地址访问
filter flProtectRE {
term PermitTelnet {
from {
plNOC;
}
protocol tcp;
destination-port telnet;
count Telnet_Counter;
accept;
}
term DenyTelnet { #其它地址不允许访问设备
protocol tcp;
destination-port telnet;
count DenyTelnet_Counter;
reject;
}
then {
}
from {
}
then {
}
}
}
}
........(请注意这里只列出了filter flProtectRE的一部分内容)
policy-options {
prefix-list plNOC { #定义运行Telnet前缀列表
202.105.80.0/24;
202.105.82.0/24;
59.37.66.0/24;
125.88.116.0/24;
X.X.X.X/X;
}
#地市网管地址段
}
interfaces {
lo0 {
unit 0 {
family inet {
filter {
}
input flProtectRE; #应用的lo0即可
配置 syslog ,并在本地保存所有 log 日志
配置syslog服务器 (服务器IP需从集成商或市公司取得)
system {
#配置syslog server的主机IP地址
syslog {
user * {
any emergency;
}
host 59.37.66.135 {
any warning;
explicit-priority;
}
file messages {
any info;
authorization info;
archive size 10m;
explicit-priority;
}
source-address 61.144.1.253;
}
配置 SNMP
设置Trap服务器(Trap服务器需要从集成商或地市公司取得)
snmp
trap-options source-address lo0
trap-group snmp-trap-group {
version v2;
categories {
authentication;
chassis;
link;
routing;
configuration;
sonet-alarms;
}
targets {
}
}
202.105.80.97; #配置SNMP server的主机IP地址
设置本机时间及 NTP 和时区设置 (NTP Server 需从集成商或市公司取得)
#设置设备本地时间(非配置模式)
set date
interfaces {
pp0 {
unit "$junos-interface-unit" {
ppp-options {
pap;
}
pppoe-options {
}
no-keepalives;
family inet {
filter {
input "$junos-input-filter";
output "$junos-output-filter";
}
unnumbered-address lo0.0;
underlying-interface "$junos-underlying-interface";
server;
}
}
}
}
}
autovlan-singlevlan {
interfaces {
#单层vlan动态端口属性
"$junos-interface-ifd-name" {
unit "$junos-interface-unit" {
encapsulation ppp-over-ether;
vlan-id "$junos-vlan-id";
pppoe-underlying-options {
dynamic-profile pppoe;
}
}
}
}
}
}
配置 pppoe 业务用户上线记录 log 功能
protocols {
ppp-service {
traceoptions {
file pppoe.log;
flag all;
}
}
pppoe {
traceoptions {
file pppoe.log;
flag all;
}
}
}
Qos 全局配置限速策略
firewall {
family inet {
filter log {
interface-specific;
term 1 {
then log;
}
}
filter 4m {
interface-specific;
enhanced-mode;
term 1 {
then policer 4m;
}
term 2 {
then accept;
}
filter 10m {
interface-specific;
enhanced-mode;
term 1 {
then policer 10m;
}
term 2 {
then accept;
}
filter pass {
interface-specific;
term 1 {
then accept;
}
}
}
限速需要跟 radius 服务器配合实现,通过 Juniper 的厂家专有属性 VSA 可以实现限速,
radius 服务器在 dictionary 文件中增加该属性 VSA(此属性延用了 ERX 系列 BRAS 的属性
命名,亚信等常规 radius 均可支持)
根据用户申请的带宽,对该用户记录(user 文件)中对这项用户描述名称的字符串类型进行
赋值。用户拨号成功后 radius 把该用户的属性值下发,MX960 会根据 radius 下发限速的属
性值,进行相应的带宽限速。此处以带宽 4m 和 10m 用户为例:
#配置BRAS限速模板
bandwidth-limit 4m;
burst-size-limit 10k;
}
}
policer 4m {
if-exceeding {
}
then discard;
}
policer 10m {
if-exceeding {
}
then discard;
}
bandwidth-limit 10m;
burst-size-limit 10k;