Professional Documents
Culture Documents
Default Preference
0
5
7
9
10
15
18
30
130
150
170
Default Preference
0
1
20
90
100
110
115
120
140
170
200
255
on Juniper
Must be turned on for Cisco
BGP Information
10
State|#Act/Recv/Da
47769/50591/0
Active
0/0/0
Active
OutQ
OutPkt
55263
0
2201
163
OutPkt
InPkt
1225
911
10458
10458
InPkt
AS
45
33
23
432
Unestablished peers: 2
Count of the number of BGP packets that are queued to be transmitted to a particular neighbor. It normally
is 0 because the queue usually is emptied quickly.
Last Up/Down
11
12
13
14
BGP Tracing
15
General Tracing
16
General Tracing
General Flags
allAll tracing operations
generalAll normal operations and routing table changes (combination
of normal and route)
normalAll normal operations
policyRouting policy operations and actions
routeRouting table changes
stateState transitions
taskInterface transactions and processing
timerTimer usage
Modifiers
detailDetailed trace information
receivePackets being received
sendPackets being transmitted
17
BGP Tracing
18
19
20
bin
bin
bin
bin
bin
bin
bin
bin
wheel
wheel
bin
bin
1429
17734
9265
486
793495
999987
999956
41217
56056
20519
4095
438
Feb
Feb
Feb
Feb
Feb
Feb
Jan
Feb
Feb
Jan
Feb
Feb
25
17
25
25
25
2
15
25
25
8
25
25
10:11
17:26
10:51
10:11
10:11
09:55
11:35
10:51
10:11
10:18
10:05
10:05
BGP-Events
bgp.log
cli-commands
critical
dcd
dcd.0
dcd.1
general-routing
lastlog
messages
ospf-log
problem-neighbor
21
Example
user@host> show log dcd
Feb 25 10:06:13 Test /kernel: fxp0: link
Feb 25 10:06:20 Test /kernel: fxp1: link
linktype = 1
Feb 25 10:06:20 Test /kernel: fxp1: bmcr
= 0x1e1,
prtnr = 0x21, expan = 0x0, exten = 0x400
Feb 25 10:11:08 Test /kernel: fxp1: link
Feb 25 10:11:10 Test /kernel: fxp0: link
linktype = 1
Feb 25 10:11:10 Test /kernel: fxp0: bmcr
= 0x1e1,
prtnr = 0x21, expan = 0x0, exten = 0x400
[additional information]
down
up, speed = 10000000,
= 0x1000, status = 0x782d, ad
down
up, speed = 10000000,
= 0x1000, status = 0x782d, ad
22
Monitor Traces
23
Monitor Example
user@host> monitor start system-log
*** system-log***
Jul
Jul
Jul
Jul
Jul
Jul
Jul
20
20
20
20
20
20
20
15:07:34
15:07:35
15:07:35
15:07:37
15:07:37
15:07:37
15:07:37
hang
hang
hang
hang
hang
hang
hang
sshd[5845]:
sshd[5845]:
sshd[5845]:
sshd[5845]:
sshd[5845]:
sshd[5847]:
sshd[5845]:
log:
log:
log:
log:
log:
log:
log:
24
Delete Traces
25
26
172.1.1.1
172.1.1.2
AS 100
SmallNet
AS 200
BigNet
27
EBGP Example:
routing-options {
router-id 1.1.1.1;
autonomous-system 100;
}
protocols {
bgp {
group AS200 {
type external;
description "EBGP Peer to BIGNET - AS200";
peer-as 200;
neighbor 172.1.1.2;
}
}
}
28
EBGP Example:
routing-options {
router-id 2.2.2.2;
autonomous-system 200;
}
protocols {
bgp {
group AS100 {
type external;
description "EBGP Peer to SmallNet AS100";
peer-as 100;
neighbor 172.1.1.1;
}
}
}
29
AS 100
IBGP Peering
30
Local-address
protocols {
bgp {
group InternalPeers {
type internal;
local-address 1.1.1.1;
neighbor 2.2.2.2;
neighbor 3.3.3.3;
neighbor 4.4.4.4;
neighbor 5.5.5.5;
}
}
}
Juniper Networks, Inc. Copyright 2000 - Proprietary & Confidential
31
IBGP Example:
routing-options {
router-id 1.1.1.1;
autonomous-system 100;
}
protocols {
bgp {
group InternalPeers {
type internal;
local-address 1.1.1.1;
neighbor 2.2.2.2;
neighbor 3.3.3.3;
neighbor 4.4.4.4;
neighbor 5.5.5.5;
}
}
}
Juniper Networks, Inc. Copyright 2000 - Proprietary & Confidential
32
33
34
routes only
All
policies needed to
Advertise
static routes
Advertise aggregate routes
Advertise default route
Redistribute other routes to BGP
35
BGP
Import
All
Export
Transmit
36
Import vs Export
Import Policy
Export Policy
37
Import vs Export
Neighbors
Neighbors
Import
Routes
Routing
table
Export
Routes
Protocol
Protocol
PFE
Forwarding
table
38
Applying Policy
39
Example:
protocols {
bgp {
group SomeRegional.ISP {
type external;
multihop;
import customer-routes;
peer-as 500;
neighbor 6.6.6.6;
}
40
Example:
protocols {
bgp {
local-address 5.5.5.5;
group Internal-Peers {
type internal;
export nexthopself;
neighbor 2.2.2.2;
neighbor 1.1.1.1;
neighbor 9.9.9.9;
41
42
Configuring Policy
Policy
Term
Term
Match
condition
Action
Match
condition
Action
43
match-conditions;
}
then {
action;
}
}
final-action;
}
}
44
Match Conditions
General
Route metrics
Metric
Preference
Color
Interface name
Neighbor address
Next-hop address
Protocol
bgp,
45
Match Conditions
OSPF
IS-IS
BGP
46
Match Actions
Modify
Metric
(protocol
Preference
(global
specific)
routing preference)
Color
Next-hop address
47
Match Actions
Modify
OSPF
Type
BGP
Prepend
AS path
Add, delete, or set community
Change route damping parameters
Change local preference value
Change protocol origin
48
Terminate
Flow Control
Accept route
Reject (or suppress) route
Skip to next policy
Skip to next term
Trace
49
50
Policy Terms
Accept
Route
Term
Term
Reject
Accept
...
Reject
Accept
Last
term
Next
policy
Reject
51
Policy Terms
Example:
policy-statement advertise-policy {
term advertise {
from community transit;
then accept;
}
term do-not-advertise {
from community Tier-1;
then reject;
}
term catch-all {
then reject;
}
52
Chained Policies
Accept
Route
Policy
Policy
Reject
Accept
...
Reject
Accept
Last
policy
Accept
Default
policy
Reject
Reject
53
Chained Policies
Example:
protocols {
bgp {
group Regional.ISP.AS47 {
type external;
multihop;
import [martian-filter long-prefix-filter as-47-filter ];
peer-as 500;
neighbor 6.6.6.6;
54
Global
Groups
of neighbors
Individual neighbors
Neighbor
55
56
57
58
59
Advertising Networks
60
Advertising Networks
A
Dynamic Routes
Redistributing Static Routes
Redistributing Aggregates
61
62
63
Reject
Discard
64
Create a policy
policy-options {
policy-statement redistribute-static {
from {
protocol static;
route-filter 9.0.0.0/8 exact;
}
then accept;
}
}
65
66
67
This
68
A
69
70
Route Filter
71
Route Filter
72
Route Filters
[]
term term-name {
from {
route-filter prefix/prefix-length match-type <actions>;
[]
}
<then actions>;
}
[]
73
Logical
OR
function
74
75
}
76
Logical
OR
function
}
<then actions>;
}
77
78
Match Typesexact
term sample {
from route-filter 192.168/16 exact;
then accept;
}
Includes
Excludes
192.168.0.0/16
Everything else
79
Match Typesorlonger
term sample {
from route-filter 192.168/16 orlonger;
then accept;
}
Includes
192.168.0.0/16
192.168.0.0/17
192.168.4.0/24
Excludes
192.168.12.4/30
192.168.12.128/32
192.0.0.0/8
192.170.0.0/16
192.169.1.0/24
80
Match Typeslonger
Includes
192.168.0.0/17
192.168.4.0/24
Excludes
192.168.12.4/30
192.168.12.128/32
192.0.0.0/8
192.170.0.0/16
192.169.1.0/24
192.168.0.0/16
81
Match Typesupto
term sample {
from route-filter 192.168/16 upto /24;
then accept;
}
Includes
Excludes
192.168.0.0/16
192.168.0.0/17
192.168.4.0/24
192.0.0.0/8
192.169.1.0/24
192.170.0.0/16
192.168.5.4/30
192.168.12.128/32
82
Match Typesthrough
Includes
192.168.0.0/16
192.168.0.0/17
192.168.0.0/18
Excludes
192.168.0.0/19
192.168.16.0/20
192.168.128.0/17 192.168.0.0/20
192.168.192.0/18
192.168.224.0/19
83
84
# Default
# Loopbacks
# Reserved A block
# Reserved B block
# Reserved C block
# Multicast
# IANA reserved-2
85
Prefix List
86
Prefix List
87
88
89
Route Reflectors
90
Non-client
peers
Route
Reflector
Clients
Route
Reflector
Clients
Route
Reflectors
Cluster
1.1.1.1
IBGP Peering
Cluster
2.2.2.2
91
}
}
92
no-client-reflect
Non-client
peers
Route
Reflector
Non-client
peers
Route
Reflector
Clients
Route
Reflector
Clients
Cluster
1.1.1.1
Route
Reflector
Clients
IBGP Peering
Juniper Networks, Inc. Copyright 2000 - Proprietary & Confidential
93
no-client-reflect
protocols {
bgp {
export static-to-bgp;
group ibgp {
type internal;
local-address 2.2.2.2;
peer-as 100;
neighbor 5.5.5.5;
}
group rrcluster {
type internal;
local-address 2.2.2.2;
no-client-reflect;
cluster 192.128.1.1;
peer-as 100;
neighbor 1.1.1.1;
neighbor 3.3.3.3;
}
}
94
95
96
97
98
Thank you!