Professional Documents
Culture Documents
BG
P P
BG
AS 65503
Note: BGP Is an Internet Engineering Task Force standard defined in RFC 4271
(supersedes RFC 1771).
© 2012 Juniper Networks, Inc. All rights reserved. www.juniper.net | 2
BGP Usage
BGP is typically used in large enterprise environments
where multiple ISP connections exist, and in all service
provider environments
ISP A
AS 65502
Customer A
BG
P Single-homed customers
typically use a default route
AS 65501 BGP to the Internet.
Customer B
BG
P
Static Routing
AS 65503
Multihomed customers use
BGP to control inbound and ISP B
outbound traffic.
© 2012 Juniper Networks, Inc. All rights reserved. www.juniper.net | 3
BGP Peers
EB
G
P BGP
AS 65501 E AS 65504
IGP
IBGP
AS 65503
© 2012 Juniper Networks, Inc. All rights reserved. www.juniper.net | 4
BGP Peering Sessions
BGP peering sessions are manually defined and rely on
TCP connections
• No automatic neighbor discovery
R1 R2
TCP Connectivity
BGP Connectivity
Established Neighbors
R1 R2
TCP Connectivity
BGP Connectivity
Established Neighbors
R1 Route X R2 Route X R3
Route X Route X
R1 R2 R3
ISP B
(AS 65002)
ISP A ISP C
(AS 65001) (AS 65003)
Static default
route to ISP A
Static route to Customer A
R3
ISP A R2 R4
(AS 65001)
R1
Note: All BGP routes start as something other than BGP routes.
ISP A ISP C
(AS 65001) (AS 65003)
172.31.128.0/20 is reachable
ISP B through AS 65003 and
(AS 65002) AS 65501
ISP A ISP C
(AS 65001) (AS 65003)
172.31.128.0/20 is
reachable through
Default Static Route AS 65501
ISP A ISP C
(AS 65001) (AS 65003)
172.31.128.0/20 is
reachable through
AS 65501
Default Static Route
AS 65503
R1
AS 65502 ge-0/0/1.0 ge-0/0/1.0
R2
(.1) 172.24.1.0/30 (.2)
IGP
IBGP
prefix X
EBGP IGP
IBGP
GP
EB
GP
EB
IGP IGP
IBGP IBGP
AS 65502 AS 65503
R1 10.10.1.2/24 10.10.1.1/24 R2
(AS 1) (AS 2)
10.10.2.2/24 10.10.2.1/24
Forwarding Plane
FT
Packets In Packets Out
Packet Forwarding Engine
© 2012 Juniper Networks, Inc. All rights reserved. www.juniper.net | 41
Configuring GR (1 of 2)
GR helper mode is enabled by default
• You can disable GR helper mode globally at
the [edit routing-options] hierarchy or on a
per-protocol, per-group, or per-neighbor basis
(depending on the protocol)
[edit]
user@R1# show routing-options
graceful-restart {
disable; Disables helper mode globally for all
} protocols that support GR
[edit]
user@R1# show protocols bgp
graceful-restart; Enables helper mode for BGP
group my-group {
type internal;
local-address 192.168.1.1;
Note: The most specific application is preferred.
neighbor 192.168.1.2;
neighbor 192.168.2.2 {
graceful-restart {
disable; Disables GR for BGP peer
}
}
}
© 2012 Juniper Networks, Inc. All rights reserved. www.juniper.net | 42
Configuring GR (2 of 2)
GR restarting router mode is not enabled by default
• You can enable this mode at the [edit routing-
options] hierarchy and disable it on a per-protocol, per-
group, or per-neighbor basis (depending on the protocol)
• Configuration options vary between
the supported protocols [edit]
user@R1# show routing-options
graceful-restart;
[edit]
user@R1# show protocols bgp
Enables restarting router mode for all graceful-restart;
protocols that support GR group my-group {
type internal;
local-address 192.168.1.1;
neighbor 192.168.1.2;
neighbor 192.168.2.2 {
graceful-restart {
Disables GR for BGP peer disable;
}
}
}
© 2012 Juniper Networks, Inc. All rights reserved. www.juniper.net | 43
Modifying Local Preference
AS 65002 AS 65003
192.168.19.0/24
R1 R2
lo0=192.168.40.1 Local preference
[edit]
user@R2# set protocols bgp group int-peers local-preference 300
R1 remove-private
R2
AS 1000 R3
Internet
172.16.10.0/24: 1 222
172.16.12.0/24: 1 333
AS 1
172.16.10.0/24: 222
172.16.12.0/24: 333
AS 222 AS 333
172.16.10.0/24 172.16.12.0/24
AS 777
172.16.10.0/24: 1 222
172.16.12.0/24: 1 333
172.16.10.0/24: 777 1 222
172.16.12.0/24: 777 1 333
local-as 1
Internet
172.16.10.0/24: 222
172.16.12.0/24: 333
AS 222 AS 333
172.16.10.0/24 172.16.12.0/24
AS 777
172.16.10.0/24: 222
172.16.12.0/24: 333
172.16.10.0/24: 777 222
172.16.12.0/24: 777 333
local-as 1 private
Internet
172.16.10.0/24: 222
172.16.12.0/24: 333
AS 222 AS 333
172.16.10.0/24 172.16.12.0/24
10.222.4.2
AS 65022
10.222.4.1
172.16.10.0/24
AS 65432 AS 65022
as-override
user@AS65432> show route advertising-protocol bgp 10.222.4.2
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 172.16.10.0/24 Self 65022 I
user@AS65022> show route receive-protocol bgp 10.222.4.1
inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
[edit]
user@AS65432# set protocols bgp group AS-65022 as-override
user@AS65432> show route advertising-protocol bgp 10.222.4.2
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 172.16.10.0/24 Self 65022 I
user@AS65022> show route receive-protocol bgp 10.222.4.1
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 172.16.10.0/24 10.222.4.1 65432 65432 I
AS 65022
AS 65432
172.16.10.0/24
AS 65022
[edit]
user@AS65022# set routing-options autonomous-system 65022 loops 2