《路由器基本知识及应用实例(DOC格式)》第15章


facility severity ;
facility…override facility;

source…address source…address;


chassis {
redundancy { //路由引擎冗余配置
routing…engine 0 master;
routing…engine 1 backup;
failover on…loss…of…keepalives;


/* interface description */
interfaces { //接口配置
so…0/1/0 {
encapsulation ppp;
sonet…options {
fcs 32;

unit 0 {
family inet {
address 10。0。1。2/24;



ge…3/0/0 {
unit 0 {
family inet {
address 192。168。50。2/24;



fxp0 { //管理口配置
unit 0 {
family inet {
address 131。192。191。148/26;



lo0 { //Loopback接口配置
unit 0 {
family inet {
address 127。0。0。1/32;
address 131。192。180。35/32 {
primary;





forwarding…options { //cflowd配置
sampling {
input {
family inet {
rate 80;
run…length 20;


output {
cflowd 199。94。208。146 {
port 23;
engine…id 0;
version 8;
local…dump;
as…type origin;




snmp { //SNMP配置
description M160;
location 〃Row E; Rack 13〃;
munity 4U2PollMe {
authorization read…only;
clients {
171。78。195。190/32;
131。192。185。34/32;



routing…options {
static { //静态路由配置
route 10。0。5。0/24 next…hop 10。0。50。1;
route 10。0。6。0/24 next…hop 10。0。50。1;
route 10。0。7。0/24 next…hop 10。0。50。1;
route 10。102。2。0/24 next…hop 10。0。8。1;

rib…groups {
both…inst {
import…rib ' inet。0 test1。inet。0 ';


route…record;
autonomous…system 65309; //AS号配置

protocols {
bgp { //BGP配置
damping;
import bgp…damping;
group external {
multihop ttl 8;
local…address 131。192。180。35;
peer…as 65305;
local…as 65309;
neighbor 131。192。186。1;


ospf { //OSPF配置
rib…group both…inst;
export inject_loopback;
area 0。0。0。0 {
interface so…3/2/0。0;


isis { //ISIS配置
level 1 disable;
interface so…1/1/0。0 {
level 2 metric 5;

interface all;
interface fxp0。0 {
disable;



3。2。2 安全配置
filter ProtectInternal {
term block…suspected…host {
from {
fragment…offset…except 0;

then count offset_none_0;

term bad…icmp {
from {
protocol icmp;
icmp…type echo…request;
icmp…code 0;
tcp…flags 0xaaaaaaaa;

then {
count bad…icmp;
syslog;
discard;


term virus…tcp…135 {
from {
fragment…offset 0;
protocol tcp;
port 135;

then {
count virus;
syslog;
discard;


term IOS…bug {
from {
protocol ' 53 55 77 103 ';

then {
count cert…advisory…2003…15;
log;
discard;


/* Layer 3 Inspection */
term deny…martian…1918 {
from {
address {
172。16。0。0/12;
10。0。0。0/8;
192。168。0。0/16;
0。0。0。0/8;
127。0。0。0/8;
128。0。0。0/8;
191。255。0。0/16;
223。255。255。0/24;
240。0。0。0/4;


then {
count martian…1918;
log;
syslog;
discard;


term deny…spoof {
from {
source…address {
210。82。108。192/26;


then {
count inbound…spoof;
syslog;
discard;


/* Allow Late Fragments after 64 bytes */
term allow…frags {
from {
fragment…offset 1…8191;

then accept;

/* Permit establish connections */
term allow…estab {
from {
fragment…offset 0;
protocol tcp;
tcp…established;

then accept;

/* Permits DNS time queries */
term allow…dns {
from {
fragment…offset 0;
protocol udp;
port domain;

then accept;

term allow…nntp {
from {
fragment…offset 0;
protocol tcp;
port nntp;

then {
count nntp;
accept;


term allow…ssh {
from {
source…address {
193。110。49。0/27;
207。17。136。129/32;
203。193。18。222/32;
207。17。136。0/22;

fragment…offset 0;
protocol tcp;
port ssh;

then accept;

term allow…icmp {
from {
protocol icmp;

then accept;

term allow…snmp {
from {
fragment…offset 0;
protocol udp;
port snmp;

then {
count snmp;
accept;


term allow…traceroute {
from {
fragment…offset 0;
protocol udp;
port 33434…33600;

then {
小说推荐
返回首页返回目录