d1 s2 BGP Address Families
d1 s2 BGP Address Families
1 v1.2
BGP Address Families
2 v1.2
IPv4 Unicast Address Family
• AFI = 1, SAFI = 1.
• Exchanges normal IPv4 Unicast routes.
• Interacts with IPv4 Unicast routing table.
– BGP installs received IPv4 prefixes into the routing table
– BGP verifies whether a matching IPv4 route exists in the routing table
before advertising an IPv4 prefix
.1 10.1.0.0/30 .2
• Originates prefixes: R1 R2
IBGP
– 172.24.0.0/13 (aggregate)
AS64512
– 172.26.1.0/24 (LAN) 10.2.1.0/24
10.0.0.0/8
10.2.2.0/24
5 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s configuration
! Create black hole route for IPv4 Unicast aggregate prefix
ip route 10.0.0.0 255.0.0.0 Null0
6 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s configuration
-- (Continued) --
! Enter IPv4 Unicast Address Family configuration
address-family ipv4 unicast
! Advertise aggregate prefix into BGP
network 10.0.0.0 mask 255.0.0.0
Administrator ! Advertise LAN prefix into BGP
network 10.2.1.0 mask 255.255.255.0
! IBGP-IPV4 next hop option: self
neighbor IBGP-IPV4 next-hop-self
! Enable IPv4 Unicast Address Family capability for BGP session
neighbor 10.0.0.2 activate
neighbor 172.20.0.1 activate
exit-address-family
7 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R2’s configuration
! Create black hole route for IPv4 Unicast aggregate prefix
ip route 10.0.0.0 255.0.0.0 Null0
8 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R2’s configuration
-- (Continued) --
! Enter IPv4 Unicast Address Family configuration
address-family ipv4 unicast
! Advertise aggregate prefix into BGP
network 10.0.0.0 mask 255.0.0.0
Administrator ! Advertise LAN prefix into BGP
network 10.2.2.0 mask 255.255.255.0
! IBGP-IPV4 next hop option: self
neighbor IBGP-IPV4 next-hop-self
! Enable IPv4 Unicast Address Family capability for BGP session
neighbor 10.0.0.1 activate
neighbor 172.28.0.1 activate
exit-address-family
9 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R101’s configuration
! Create black hole route for IPv4 Unicast aggregate prefix
ip route 172.16.0.0 255.248.0.0 Null0
10 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R101’s configuration
-- (Continued) --
! Enter IPv4 Unicast Address Family configuration
address-family ipv4 unicast
! Advertise aggregate prefix into BGP
network 172.16.0.0 mask 255.248.0.0
Administrator ! Advertise LAN prefix into BGP
network 172.18.1.0 mask 255.255.255.0
! Enable IPv4 Unicast Address Family capability for BGP session
neighbor 172.20.0.2 activate
neighbor 172.20.0.6 activate
exit-address-family
11 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R201’s configuration
! Create black hole route for IPv4 Unicast aggregate prefix
ip route 172.24.0.0 255.248.0.0 Null0
12 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R201’s configuration
-- (Continued) --
! Enter IPv4 Unicast Address Family configuration
address-family ipv4 unicast
! Advertise aggregate prefix into BGP
network 172.24.0.0 mask 255.248.0.0
Administrator ! Advertise LAN prefix into BGP
network 172.26.1.0 mask 255.255.255.0
! Enable IPv4 Unicast Address Family capability for BGP session
neighbor 172.28.0.2 activate
neighbor 172.20.0.5 activate
exit-address-family
13 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
• Verification commands:
– Showing BGP peers
• show bgp ipv4 unicast summary
– Showing detail information of specific peer
• show bgp ipv4 unicast neighbors [peer-address]
– Showing prefixes advertised to specific peer
• show bgp ipv4 unicast neighbors [peer-address] advertised-routes
– Showing prefixes received from specific peer
• show bgp ipv4 unicast neighbors [peer-address] routes
14 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
• Verification commands:
– Showing BGP table
• show bgp ipv4 unicast
– Showing detail information of specific prefix
• show bgp ipv4 unicast [prefix]/[len]
– Showing BGP routes in routing table
• show ip route bgp
– Showing detail information of specific route
• show ip route [network] [mask]
15 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing BGP peers
R1#show bgp ipv4 unicast summary
BGP router identifier 10.0.0.1, local AS number 64512
BGP table version is 10, main routing table version 10
7 network entries using 1736 bytes of memory
Administrator 10 path entries using 1280 bytes of memory
5/4 BGP path/bestpath attribute entries using 1320 bytes of memory
3 BGP AS-PATH entries using 88 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 4424 total bytes of memory
BGP activity 15/8 prefixes, 36/26 paths, scan interval 60 secs
16 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing detail information of specific peer
R1#show bgp ipv4 unicast neighbors 172.20.0.1
BGP neighbor is 172.20.0.1, remote AS 65000, external link
Member of peer-group EBGP-AS65000-IPV4 for session parameters
BGP version 4, remote router ID 172.16.0.1
Administrator BGP state = Established, up for 00:03:04
Last read 00:00:07, last write 00:00:43, hold time is 180, keepalive interval is 60
seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Multisession Capability:
Stateful switchover support enabled: NO for session 1
Message statistics:
InQ depth is 0
OutQ depth is 0
-- (Snipped) --
17 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing prefixes advertised to specific peer
R1#show bgp ipv4 unicast neighbors 172.20.0.1 advertised-routes
BGP table version is 10, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
Administrator x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
18 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing prefixes received from specific peer
R1#show bgp ipv4 unicast neighbors 172.20.0.1 routes
BGP table version is 10, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
Administrator x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
19 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing BGP table
R1#show bgp ipv4 unicast
BGP table version is 10, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
Administrator x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
20 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing detail information of specific prefix
R1#show bgp ipv4 unicast 172.26.1.0/24
BGP routing table entry for 172.26.1.0/24, version 10
Paths: (2 available, best #1, table default)
Advertised to update-groups:
Administrator 5
Refresh Epoch 1
65001
10.0.0.2 (metric 20) from 10.0.0.2 (10.0.0.2)
Origin IGP, metric 0, localpref 100, valid, internal, best
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 1
65000 65001
172.20.0.1 from 172.20.0.1 (172.16.0.1)
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
21 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing BGP routes in routing table
R1#show ip route bgp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
Administrator E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
22 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing detail information of specific route
R1#show ip route 172.26.1.0 255.255.255.0
Routing entry for 172.26.1.0/24
Known via "bgp 64512", distance 200, metric 0
Tag 65001, type internal
Administrator Last update from 10.0.0.2 00:03:33 ago
Routing Descriptor Blocks:
* 10.0.0.2, from 10.0.0.2, 00:03:33 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 65001
MPLS label: none
23 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
• AS64512
– R1 AS65000 AS65001
172.16.0.0/13 172.24.0.0/13
172.18.1.0/24 172.26.1.0/24
• Originates prefixes: 172.16.0.1/32 172.24.0.1/32
lo0 lo0
– 10.0.0.0/8 (aggregate)
.5 172.20.0.4/30 .6
– 10.2.1.0/24 (LAN) R101 R201
• IBGP to R2 (Loopback peering) EBGP
.1 .1
• EBGP to R101
– R2 EBGP 172.20.0.0/30 172.28.0.0/30 EBGP
• Originates prefixes:
.2 10.0.0.1/32 .2 10.0.0.2/32
– 10.0.0.0/8 (aggregate) lo0 lo0
– 10.2.2.0/24 (LAN) .1 10.1.0.0/30 .2
R1 R2
• IBGP to R1 (Loopback peering)
IBGP
• EBGP to R201 AS64512
10.2.1.0/24 10.2.2.0/24
– IGP has been configured, all Loopbacks 10.0.0.0/8
.1 10.1.0.0/30 .2
• Originates prefixes: R1 R2
IBGP
– 172.24.0.0/13 (aggregate)
AS64512
– 172.26.1.0/24 (LAN) 10.2.1.0/24
10.0.0.0/8
10.2.2.0/24
25 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s configuration
# Set 64512 as default ASN
top set routing-options autonomous-system 64512
# Create policy statement for outbound filter of IPv4 Unicast EBGP with AS65000
top edit policy-options policy-statement EBGP-AS65000-IPV4-OUT
set term 10 from prefix-list LOCAL-IPV4
set term 10 then accept
26 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s configuration
# Create policy statement for setting next hop to “self”
top edit policy-options policy-statement NEXT-HOP-SELF
set term 10 from route-type external
set term 10 then next-hop self
27 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s configuration
# Create BGP group for IPv4 Unicast EBGP with AS65000
top edit protocols bgp group EBGP-AS65000-IPV4
# This is an EBGP group
set type external
# Set peer ASN as 65000
Administrator set peer-as 65000
# Enable IPv4 Unicast Address Family
set family inet unicast
# Add BGP session to R101
set neighbor 172.20.0.1
# Apply BGP outbound filter
set export EBGP-AS65000-IPV4-OUT
28 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R2’s configuration
# Set 64512 as default ASN
top set routing-options autonomous-system 64512
# Create policy statement for outbound filter of IPv4 Unicast EBGP with AS65001
top edit policy-options policy-statement EBGP-AS65001-IPV4-OUT
set term 10 from prefix-list LOCAL-IPV4
set term 10 then accept
29 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R2’s configuration
# Create policy statement for setting next hop to “self”
top edit policy-options policy-statement NEXT-HOP-SELF
set term 10 from route-type external
set term 10 then next-hop self
30 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R2’s configuration
# Create BGP group for IPv4 Unicast EBGP with AS65001
top edit protocols bgp group EBGP-AS65001-IPV4
# This is an EBGP group
set type external
# Set peer ASN as 65001
Administrator set peer-as 65001
# Enable IPv4 Unicast Address Family
set family inet unicast
# Add BGP session to R201
set neighbor 172.28.0.1
# Apply BGP outbound filter
set export EBGP-AS65001-IPV4-OUT
31 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R101’s configuration
# Set 65000 as default ASN
top set routing-options autonomous-system 65000
# Create policy statement for outbound filter of IPv4 Unicast EBGP with AS64512
top edit policy-options policy-statement EBGP-AS64512-IPV4-OUT
set term 10 from prefix-list LOCAL-IPV4
set term 10 then accept
# Create policy statement for outbound filter of IPv4 Unicast EBGP with AS65001
top edit policy-options policy-statement EBGP-AS65001-IPV4-OUT
set term 10 from prefix-list LOCAL-IPV4
set term 10 then accept
32 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R101’s configuration
# Create BGP group for IPv4 Unicast EBGP with AS64512
top edit protocols bgp group EBGP-AS64512-IPV4
# This is an EBGP group
set type external
# Set peer ASN as 64512
Administrator set peer-as 64512
# Enable IPv4 Unicast Address Family
set family inet unicast
# Add BGP session to R1
set neighbor 172.20.0.2
# Apply BGP outbound filter
set export EBGP-AS64512-IPV4-OUT
33 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R201’s configuration
# Set 65001 as default ASN
top set routing-options autonomous-system 65001
# Create policy statement for outbound filter of IPv4 Unicast EBGP with AS64512
top edit policy-options policy-statement EBGP-AS64512-IPV4-OUT
set term 10 from prefix-list LOCAL-IPV4
set term 10 then accept
# Create policy statement for outbound filter of IPv4 Unicast EBGP with AS65000
top edit policy-options policy-statement EBGP-AS65000-IPV4-OUT
set term 10 from prefix-list LOCAL-IPV4
set term 10 then accept
34 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R201’s configuration
# Create BGP group for IPv4 Unicast EBGP with AS64512
top edit protocols bgp group EBGP-AS64512-IPV4
# This is an EBGP group
set type external
# Set peer ASN as 64512
Administrator set peer-as 64512
# Enable IPv4 Unicast Address Family
set family inet unicast
# Add BGP session to R2
set neighbor 172.28.0.2
# Apply BGP outbound filter
set export EBGP-AS64512-IPV4-OUT
35 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
• Verification commands:
– Showing BGP peers
• show bgp summary
– Showing detail information of specific peer
• show bgp neighbor [peer-address]
– Showing prefixes advertised to specific peer
• show route table inet.0 advertising-protocol bgp [peer-address]
– Showing prefixes received from specific peer
• show route table inet.0 receive-protocol bgp [peer-address]
36 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
• Verification commands:
– Showing BGP routes in routing table
• show route table inet.0 protocol bgp
– Showing detail information of specific route
• show route table inet.0 [prefix]/[len] detail
37 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing BGP peers
apnic@R1> show bgp summary
Threading mode: BGP I/O
Groups: 2 Peers: 2 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
Administrator inet.0
8 5 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn
State|#Active/Received/Accepted/Damped...
10.0.0.2 64512 12 10 0 0 3:12 Establ
inet.0: 3/4/4/0
172.20.0.1 65000 13 12 0 0 3:08 Establ
inet.0: 2/4/4/0
38 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing detail information of specific peer
apnic@R1> show bgp neighbor 172.20.0.1
Peer: 172.20.0.1+179 AS 65000 Local: 172.20.0.2+55884 AS 64512
Group: EBGP-AS65000-IPV4 Routing-Instance: master
Forwarding routing-instance: master
Administrator Type: External State: Established
Last State: OpenConfirm
Flags: <Sync>
Last Event: RecvKeepAlive
Last Error: None
Export: [ EBGP-AS65000-IPV4-OUT ]
Options: <Preference AddressFamily PeerAS Refresh>
Options: <GracefulShutdownRcv>
Address families configured: inet-unicast
Holdtime: 90 Preference: 170
Graceful Shutdown Receiver local-preference: 0
Number of flaps: 0
Peer ID: 172.16.0.1 Local ID: 10.0.0.1 Active Holdtime: 90
Keepalive Interval: 30 Group index: 1 Peer index: 0 SNMP index: 3
I/O Session Thread: bgpio-0 State: Enabled
BFD: disabled, down
Local Interface: ge-0/0/5.0
NLRI for restart configured on peer: inet-unicast
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Peer supports Refresh capability (2)
-- (Snipped) --
39 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing prefixes advertised to specific peer
apnic@R1> show route table inet.0 advertising-protocol bgp 172.20.0.1
40 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing BGP routes in routing table
apnic@R1> show route table inet.0 protocol bgp
41 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing BGP routes in routing table
apnic@R1> show route table inet.0 protocol bgp
-- (Continued) --
172.24.0.0/13 *[BGP/170] 00:03:32, localpref 100, from 10.0.0.2
AS path: 65001 I, validation-state: unverified
Administrator > to 10.1.0.2 via ge-0/0/0.0
[BGP/170] 00:03:28, localpref 100
AS path: 65000 65001 I, validation-state: unverified
> to 172.20.0.1 via ge-0/0/5.0
172.26.1.0/24 *[BGP/170] 00:03:32, localpref 100, from 10.0.0.2
AS path: 65001 I, validation-state: unverified
> to 10.1.0.2 via ge-0/0/0.0
[BGP/170] 00:03:28, localpref 100
AS path: 65000 65001 I, validation-state: unverified
> to 172.20.0.1 via ge-0/0/5.0
42 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing detail information of specific route
apnic@R1> show route table inet.0 172.26.1.0/24 detail
43 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
• AS64512
– R1 AS65000 AS65001
172.16.0.0/13 172.24.0.0/13
172.18.1.0/24 172.26.1.0/24
• Originates prefixes: 172.16.0.1/32 172.24.0.1/32
BR-LOOPBACK BR-LOOPBACK
– 10.0.0.0/8 (aggregate)
.5 172.20.0.4/30 .6
– 10.2.1.0/24 (LAN) R101 R201
• IBGP to R2 (Loopback peering) EBGP
.1 .1
• EBGP to R101
– R2 EBGP 172.20.0.0/30 172.28.0.0/30 EBGP
• Originates prefixes:
.2 10.0.0.1/32 .2 10.0.0.2/32
– 10.0.0.0/8 (aggregate) BR-LOOPBACK BR-LOOPBACK
– 10.2.2.0/24 (LAN) .1 10.1.0.0/30 .2
R1 R2
• IBGP to R1 (Loopback peering)
IBGP
• EBGP to R201 AS64512
10.2.1.0/24 10.2.2.0/24
– IGP has been configured, all Loopbacks 10.0.0.0/8
.1 10.1.0.0/30 .2
• Originates prefixes: R1 R2
IBGP
– 172.24.0.0/13 (aggregate)
AS64512
– 172.26.1.0/24 (LAN) 10.2.1.0/24
10.0.0.0/8
10.2.2.0/24
45 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s configuration
# Create black hole route for IPv4 Unicast aggregate prefix
/ip route add dst-address=10.0.0.0/8 type=blackhole
# Set 64512 as default ASN, hardcode Loopback IPv4 address as BGP Router ID
/routing bgp instance set default as=64512 router-id=10.0.0.1
Administrator # Add peer for IPv4 Unicast IBGP with R2,
# use BR-LOOPBACK as source interface, next hop option: self
/routing bgp peer
add name=IBGP-R2-IPV4 remote-address=10.0.0.2 remote-as=64512 \
address-families=ip update-source=BR-LOOPBACK nexthop-choice=force-self
46 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
MikroTik RouterOS R2’s configuration
# Create black hole route for IPv4 Unicast aggregate prefix
/ip route add dst-address=10.0.0.0/8 type=blackhole
# Set 64512 as default ASN, hardcode Loopback IPv4 address as BGP Router ID
/routing bgp instance set default as=64512 router-id=10.0.0.2
Administrator # Add peer for IPv4 Unicast IBGP with R1,
# use BR-LOOPBACK as source interface, next hop option: self
/routing bgp peer
add name=IBGP-R1-IPV4 remote-address=10.0.0.1 remote-as=64512 \
address-families=ip update-source=BR-LOOPBACK nexthop-choice=force-self
47 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
MikroTik RouterOS R101’s configuration
# Create black hole route for IPv4 Unicast aggregate prefix
/ip route add dst-address=172.16.0.0/13 type=blackhole
# Set 65000 as default ASN, hardcode Loopback IPv4 address as BGP Router ID
/routing bgp instance set default as=65000 router-id=172.16.0.1
Administrator # Add peer for IPv4 Unicast EBGP with AS64512
/routing bgp peer
add name=EBGP-AS64512-IPV4 remote-address=172.20.0.2 remote-as=64512 \
address-families=ip
48 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
MikroTik RouterOS R201’s configuration
# Create black hole route for IPv4 Unicast aggregate prefix
/ip route add dst-address=172.24.0.0/13 type=blackhole
# Set 65001 as default ASN, hardcode Loopback IPv4 address as BGP Router ID
/routing bgp instance set default as=65001 router-id=172.24.0.1
Administrator # Add peer for IPv4 Unicast EBGP with AS64512
/routing bgp peer
add name=EBGP-AS64512-IPV4 remote-address=172.28.0.2 remote-as=64512 \
address-families=ip
49 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
• Verification commands:
– Showing BGP peers
• /routing bgp peer print status
– Showing prefixes advertised to specific peer
• /routing bgp advertise print [peer-name] detail
– Showing prefixes received from specific peer
• /ip route print detail where bgp received-from=[peer-name]
– Showing BGP routes in routing table
• /ip route print where bgp
– Showing detail information of specific route
• /ip route print detail where dst-address=[prefix]/[len]
50 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing BGP peers
[apnic@R1] > /routing bgp peer print status
Flags: X - disabled, E - established
0 E name="IBGP-R2-IPV4" instance=default remote-address=10.0.0.2
remote-as=64512 tcp-md5-key="" nexthop-choice=force-self multihop=no
Administrator route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter=""
address-families=ip update-source=BR-LOOPBACK default-originate=never
remove-private-as=no as-override=no passive=no use-bfd=no
remote-id=10.0.0.2 local-address=10.0.0.1 uptime=3m2s prefix-count=4
updates-sent=4 updates-received=6 withdrawn-sent=0 withdrawn-received=2
remote-hold-time=3m used-hold-time=3m used-keepalive-time=1m
refresh-capability=yes as4-capability=yes state=established
51 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing prefixes advertised to specific peer
[apnic@R1] > /routing bgp advertise print EBGP-AS65000-IPV4 detail
peer="EBGP-AS65000-IPV4" prefix=172.26.1.0/24 nexthop=172.20.0.2
as-path="65001" origin=igp
52 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing prefixes received from specific peer
[apnic@R1] > /ip route print detail where bgp received-from=EBGP-AS65000-IPV4
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
Administrator 0 ADb dst-address=172.16.0.0/13 gateway=172.20.0.1
gateway-status=172.20.0.1 reachable via ether6 distance=20 scope=40
target-scope=10 bgp-as-path="65000" bgp-origin=igp
received-from=EBGP-AS65000-IPV4
2 Db dst-address=172.24.0.0/13 gateway=172.20.0.1
gateway-status=172.20.0.1 reachable via ether6 distance=20 scope=40
target-scope=10 bgp-as-path="65000,65001" bgp-origin=igp
received-from=EBGP-AS65000-IPV4
3 Db dst-address=172.26.1.0/24 gateway=172.20.0.1
gateway-status=172.20.0.1 reachable via ether6 distance=20 scope=40
target-scope=10 bgp-as-path="65000,65001" bgp-origin=igp
received-from=EBGP-AS65000-IPV4
53 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing BGP routes in routing table
[apnic@R1] > /ip route print where bgp
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
Administrator # DST-ADDRESS
0 Db 10.0.0.0/8
PREF-SRC GATEWAY
10.0.0.2
DISTANCE
200
1 ADb 10.2.2.0/24 10.0.0.2 200
2 ADb 172.16.0.0/13 172.20.0.1 20
3 ADb 172.18.1.0/24 172.20.0.1 20
4 ADb 172.24.0.0/13 10.0.0.2 200
5 Db 172.24.0.0/13 172.20.0.1 20
6 ADb 172.26.1.0/24 10.0.0.2 200
7 Db 172.26.1.0/24 172.20.0.1 20
54 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing detail information of specific route
[apnic@R1] > /ip route print detail where dst-address=172.26.1.0/24
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
Administrator 0 ADb dst-address=172.26.1.0/24 gateway=10.0.0.2
gateway-status=10.0.0.2 recursive via 10.1.0.2 ether1 distance=200
scope=40 target-scope=30 bgp-as-path="65001" bgp-local-pref=100
bgp-origin=igp received-from=IBGP-R2-IPV4
1 Db dst-address=172.26.1.0/24 gateway=172.20.0.1
gateway-status=172.20.0.1 reachable via ether6 distance=20 scope=40
target-scope=10 bgp-as-path="65000,65001" bgp-origin=igp
received-from=EBGP-AS65000-IPV4
55 v1.2
BGP Address Families
56 v1.2
IPv6 Unicast Address Family
• AFI = 2, SAFI = 1.
• Exchanges normal IPv6 Unicast routes.
• Interacts with IPv6 Unicast routing table.
– BGP installs received IPv6 prefixes into the routing table
– BGP verifies whether a matching IPv6 route exists in the routing table
before advertising an IPv6 prefix
59 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s configuration
! Create black hole route for IPv6 Unicast aggregate prefix
ipv6 route 2001:DB8::/32 Null0
60 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s configuration
-- (Continued) --
! Enter IPv6 Unicast Address Family configuration
address-family ipv6 unicast
! Advertise aggregate prefix into BGP
network 2001:DB8::/32
Administrator ! Advertise LAN prefix into BGP
network 2001:DB8:2:1::/64
! IBGP-IPV6 next hop option: self
neighbor IBGP-IPV6 next-hop-self
! Enable IPv6 Unicast Address Family capability for BGP session
neighbor 2001:DB8::2 activate
neighbor 2406:6400:4:: activate
exit-address-family
61 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R2’s configuration
! Create black hole route for IPv6 Unicast aggregate prefix
ipv6 route 2001:DB8::/32 Null0
62 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R2’s configuration
-- (Continued) --
! Enter IPv6 Unicast Address Family configuration
address-family ipv6 unicast
! Advertise aggregate prefix into BGP
network 2001:DB8::/32
Administrator ! Advertise LAN prefix into BGP
network 2001:DB8:2:2::/64
! IBGP-IPV6 next hop option: self
neighbor IBGP-IPV6 next-hop-self
! Enable IPv6 Unicast Address Family capability for BGP session
neighbor 2001:DB8::1 activate
neighbor 2406:6401:4:: activate
exit-address-family
63 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R101’s configuration
! Create black hole route for IPv6 Unicast aggregate prefix
ipv6 route 2406:6400::/32 Null0
64 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R101’s configuration
-- (Continued) --
! Enter IPv6 Unicast Address Family configuration
address-family ipv6 unicast
! Advertise aggregate prefix into BGP
network 2406:6400::/32
Administrator ! Advertise LAN prefix into BGP
network 2406:6400:2:1::/64
! Enable IPv6 Unicast Address Family capability for BGP session
neighbor 2406:6400:4::1 activate
neighbor 2406:6400:4:1::1 activate
exit-address-family
65 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R201’s configuration
! Create black hole route for IPv6 Unicast aggregate prefix
ipv6 route 2406:6401::/32 Null0
66 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R201’s configuration
-- (Continued) --
! Enter IPv6 Unicast Address Family configuration
address-family ipv6 unicast
! Advertise aggregate prefix into BGP
network 2406:6401::/32
Administrator ! Advertise LAN prefix into BGP
network 2406:6401:2:1::/64
! Enable IPv6 Unicast Address Family capability for BGP session
neighbor 2406:6401:4::1 activate
neighbor 2406:6400:4:1:: activate
exit-address-family
67 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
• Verification commands:
– Showing BGP peers
• show bgp ipv6 unicast summary
– Showing detail information of specific peer
• show bgp ipv6 unicast neighbors [peer-address]
– Showing prefixes advertised to specific peer
• show bgp ipv6 unicast neighbors [peer-address] advertised-routes
– Showing prefixes received from specific peer
• show bgp ipv6 unicast neighbors [peer-address] routes
68 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
• Verification commands:
– Showing BGP table
• show bgp ipv6 unicast
– Showing detail information of specific prefix
• show bgp ipv6 unicast [prefix]/[len]
– Showing BGP routes in routing table
• show ipv6 route bgp
– Showing detail information of specific route
• show ipv6 route [prefix]/[len]
69 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing BGP peers
R1#show bgp ipv6 unicast summary
BGP router identifier 10.0.0.1, local AS number 64512
BGP table version is 8, main routing table version 8
7 network entries using 1904 bytes of memory
Administrator 10 path entries using 1520 bytes of memory
5/4 BGP path/bestpath attribute entries using 1320 bytes of memory
3 BGP AS-PATH entries using 88 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 4832 total bytes of memory
BGP activity 22/8 prefixes, 46/26 paths, scan interval 60 secs
70 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing detail information of specific peer
R1#show bgp ipv6 unicast neighbors 2406:6400:4::
BGP neighbor is 2406:6400:4::, remote AS 65000, external link
Member of peer-group EBGP-AS65000-IPV6 for session parameters
BGP version 4, remote router ID 172.16.0.1
Administrator BGP state = Established, up for 00:03:08
Last read 00:00:43, last write 00:00:38, hold time is 180, keepalive interval is 60
seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv6 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Multisession Capability:
Stateful switchover support enabled: NO for session 1
Message statistics:
InQ depth is 0
OutQ depth is 0
-- (Snipped) --
71 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing prefixes advertised to specific peer
R1#show bgp ipv6 unicast neighbors 2406:6400:4:: advertised-routes
BGP table version is 8, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
Administrator x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
72 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing prefixes received from specific peer
R1#show bgp ipv6 unicast neighbors 2406:6400:4:: routes
BGP table version is 8, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
Administrator x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
73 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing BGP table
R1#show bgp ipv6 unicast
BGP table version is 8, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
Administrator x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
74 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing detail information of specific prefix
R1#show bgp ipv6 unicast 2406:6401:2:1::/64
BGP routing table entry for 2406:6401:2:1::/64, version 8
Paths: (2 available, best #2, table default)
Advertised to update-groups:
Administrator 2
Refresh Epoch 1
65000 65001
2406:6400:4:: (FE80::253:1FF:FE11:106) from 2406:6400:4:: (172.16.0.1)
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
65001
2001:DB8::2 (metric 10) from 2001:DB8::2 (10.0.0.2)
Origin IGP, metric 0, localpref 100, valid, internal, best
rx pathid: 0, tx pathid: 0x0
75 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing BGP routes in routing table
R1#show ipv6 route bgp
IPv6 Routing Table - default - 15 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
Administrator I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
ld - LISP dyn-eid, lA - LISP away, a - Application
B 2001:DB8:2:2::/64 [200/0]
via 2001:DB8::2
B 2406:6400::/32 [20/0]
via FE80::253:1FF:FE11:106, GigabitEthernet6
B 2406:6400:2:1::/64 [20/0]
via FE80::253:1FF:FE11:106, GigabitEthernet6
B 2406:6401::/32 [200/0]
via 2001:DB8::2
B 2406:6401:2:1::/64 [200/0]
via 2001:DB8::2
76 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
Cisco IOS R1’s verification as an example
! Showing detail information of specific route
R1#show ipv6 route 2406:6401:2:1::/64
Routing entry for 2406:6401:2:1::/64
Known via "bgp 64512", distance 200, metric 0, type internal
Route count is 1/1, share count 0
Administrator Routing paths:
2001:DB8::2
MPLS label: nolabel
From 2001:DB8::2
Last updated 00:03:30 ago
77 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
• AS64512
– R1 AS65000 AS65001
2406:6400::/32 2406:6401::/32
2406:6400:2:1::/64 172.16.0.1/32 2406:6401:2:1::/64 172.24.0.1/32
• Originates prefixes: 2406:6400::1/128 2406:6401::1/128
lo0 lo0
– 2001:DB8::/32 (aggregate)
::0 2406:6400:4:1::/127 ::1
– 2001:DB8:2:1::/64 (LAN) R101 R201
• IBGP to R2 (Loopback peering) EBGP
::0 ::0
• EBGP to R101
– R2 EBGP 2406:6400:4::/127 2406:6401:4::/127 EBGP
• Originates prefixes: 10.0.0.1/32 10.0.0.2/32
::1 2001:DB8::1/128 ::1 2001:DB8::2/128
– 2001:DB8::/32 (aggregate) lo0 lo0
– 2001:DB8:2:2::/64 (LAN) ::0 2001:DB8:1::/127 ::1
R1 R2
• IBGP to R1 (Loopback peering)
IBGP
• EBGP to R201 AS64512
2001:DB8:2:1::/64 2001:DB8:2:2::/64
– IGP has been configured, all Loopbacks 2001:DB8::/32
79 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s configuration
# Set 64512 as default ASN
top set routing-options autonomous-system 64512
# Create policy statement for outbound filter of IPv6 Unicast EBGP with AS65000
top edit policy-options policy-statement EBGP-AS65000-IPV6-OUT
set term 10 from prefix-list LOCAL-IPV6
set term 10 then accept
80 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s configuration
# Create policy statement for setting next hop to “self”
top edit policy-options policy-statement NEXT-HOP-SELF
set term 10 from route-type external
set term 10 then next-hop self
81 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s configuration
# Create BGP group for IPv6 Unicast EBGP with AS65000
top edit protocols bgp group EBGP-AS65000-IPV6
# This is an EBGP group
set type external
# Set peer ASN as 65000
Administrator set peer-as 65000
# Enable IPv6 Unicast Address Family
set family inet6 unicast
# Add BGP session to R101
set neighbor 2406:6400:4::
# Apply BGP outbound filter
set export EBGP-AS65000-IPV6-OUT
82 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R2’s configuration
# Set 64512 as default ASN
top set routing-options autonomous-system 64512
# Create policy statement for outbound filter of IPv6 Unicast EBGP with AS65001
top edit policy-options policy-statement EBGP-AS65001-IPV6-OUT
set term 10 from prefix-list LOCAL-IPV6
set term 10 then accept
83 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R2’s configuration
# Create policy statement for setting next hop to “self”
top edit policy-options policy-statement NEXT-HOP-SELF
set term 10 from route-type external
set term 10 then next-hop self
84 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R2’s configuration
# Create BGP group for IPv6 Unicast EBGP with AS65001
top edit protocols bgp group EBGP-AS65001-IPV6
# This is an EBGP group
set type external
# Set peer ASN as 65001
Administrator set peer-as 65001
# Enable IPv6 Unicast Address Family
set family inet6 unicast
# Add BGP session to R201
set neighbor 2406:6401:4::
# Apply BGP outbound filter
set export EBGP-AS65001-IPV6-OUT
85 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R101’s configuration
# Set 65000 as default ASN
top set routing-options autonomous-system 65000
# Create policy statement for outbound filter of IPv6 Unicast EBGP with AS64512
top edit policy-options policy-statement EBGP-AS64512-IPV6-OUT
set term 10 from prefix-list LOCAL-IPV6
set term 10 then accept
# Create policy statement for outbound filter of IPv6 Unicast EBGP with AS65001
top edit policy-options policy-statement EBGP-AS65001-IPV6-OUT
set term 10 from prefix-list LOCAL-IPV6
set term 10 then accept
86 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R101’s configuration
# Create BGP group for IPv6 Unicast EBGP with AS64512
top edit protocols bgp group EBGP-AS64512-IPV6
# This is an EBGP group
set type external
# Set peer ASN as 64512
Administrator set peer-as 64512
# Enable IPv6 Unicast Address Family
set family inet6 unicast
# Add BGP session to R1
set neighbor 2406:6400:4::1
# Apply BGP outbound filter
set export EBGP-AS64512-IPV6-OUT
87 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R201’s configuration
# Set 65001 as default ASN
top set routing-options autonomous-system 65001
# Create policy statement for outbound filter of IPv6 Unicast EBGP with AS64512
top edit policy-options policy-statement EBGP-AS64512-IPV6-OUT
set term 10 from prefix-list LOCAL-IPV6
set term 10 then accept
# Create policy statement for outbound filter of IPv6 Unicast EBGP with AS65000
top edit policy-options policy-statement EBGP-AS65000-IPV6-OUT
set term 10 from prefix-list LOCAL-IPV6
set term 10 then accept
88 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R201’s configuration
# Create BGP group for IPv6 Unicast EBGP with AS64512
top edit protocols bgp group EBGP-AS64512-IPV6
# This is an EBGP group
set type external
# Set peer ASN as 64512
Administrator set peer-as 64512
# Enable IPv6 Unicast Address Family
set family inet6 unicast
# Add BGP session to R2
set neighbor 2406:6401:4::1
# Apply BGP outbound filter
set export EBGP-AS64512-IPV6-OUT
89 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
• Verification commands:
– Showing BGP peers
• show bgp summary
– Showing detail information of specific peer
• show bgp neighbor [peer-address]
– Showing prefixes advertised to specific peer
• show route table inet6.0 advertising-protocol bgp [peer-address]
– Showing prefixes received from specific peer
• show route table inet6.0 receive-protocol bgp [peer-address]
90 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
• Verification commands:
– Showing BGP routes in routing table
• show route table inet6.0 protocol bgp
– Showing detail information of specific route
• show route table inet6.0 [prefix]/[len] detail
91 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing BGP peers
apnic@R1> show bgp summary
Threading mode: BGP I/O
Groups: 2 Peers: 2 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
Administrator inet6.0
8 5 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn
State|#Active/Received/Accepted/Damped...
2001:db8::2 64512 13 10 0 0 3:04 Establ
inet6.0: 3/4/4/0
2406:6400:4:: 65000 13 12 0 0 3:00 Establ
inet6.0: 2/4/4/0
92 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing detail information of specific peer
apnic@R1> show bgp neighbor 2406:6400:4::
Peer: 2406:6400:4::+179 AS 65000 Local: 2406:6400:4::1+65156 AS 64512
Group: EBGP-AS65000-IPV6 Routing-Instance: master
Forwarding routing-instance: master
Administrator Type: External State: Established
Last State: OpenConfirm
Flags: <Sync>
Last Event: RecvKeepAlive
Last Error: None
Export: [ EBGP-AS65000-IPV6-OUT ]
Options: <Preference AddressFamily PeerAS Refresh>
Options: <GracefulShutdownRcv>
Address families configured: inet6-unicast
Holdtime: 90 Preference: 170
Graceful Shutdown Receiver local-preference: 0
Number of flaps: 0
Peer ID: 172.16.0.1 Local ID: 10.0.0.1 Active Holdtime: 90
Keepalive Interval: 30 Group index: 1 Peer index: 0 SNMP index: 7
I/O Session Thread: bgpio-0 State: Enabled
BFD: disabled, down
Local Interface: ge-0/0/5.0
NLRI for restart configured on peer: inet6-unicast
NLRI advertised by peer: inet6-unicast
NLRI for this session: inet6-unicast
Peer supports Refresh capability (2)
-- (Snipped) --
93 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing prefixes advertised to specific peer
apnic@R1> show route table inet6.0 advertising-protocol bgp 2406:6400:4::
94 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing BGP routes in routing table
apnic@R1> show route table inet6.0 protocol bgp
95 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing BGP routes in routing table
apnic@R1> show route table inet6.0 protocol bgp
-- (Continued) --
2406:6401::/32 *[BGP/170] 00:03:23, localpref 100, from 2001:db8::2
AS path: 65001 I, validation-state: unverified
Administrator > to fe80::253:ff:fe12:202 via ge-0/0/0.0
[BGP/170] 00:03:19, localpref 100
AS path: 65000 65001 I, validation-state: unverified
> to 2406:6400:4:: via ge-0/0/5.0
2406:6401:2:1::/64 *[BGP/170] 00:03:23, localpref 100, from 2001:db8::2
AS path: 65001 I, validation-state: unverified
> to fe80::253:ff:fe12:202 via ge-0/0/0.0
[BGP/170] 00:03:19, localpref 100
AS path: 65000 65001 I, validation-state: unverified
> to 2406:6400:4:: via ge-0/0/5.0
96 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
Juniper Junos OS R1’s verification as an example
# Showing detail information of specific route
apnic@R1> show route table inet6.0 2406:6401:2:1::/64 detail
97 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
• AS64512
– R1 AS65000 AS65001
2406:6400::/32 2406:6401::/32
2406:6400:2:1::/64 172.16.0.1/32 2406:6401:2:1::/64 172.24.0.1/32
• Originates prefixes: 2406:6400::1/128 2406:6401::1/128
BR-LOOPBACK BR-LOOPBACK
– 2001:DB8::/32 (aggregate)
::1 2406:6400:4:1::/126 ::2
– 2001:DB8:2:1::/64 (LAN) R101 R201
• IBGP to R2 (Loopback peering) EBGP
::1 ::1
• EBGP to R101
– R2 EBGP 2406:6400:4::/126 2406:6401:4::/126 EBGP
• Originates prefixes: 10.0.0.1/32 10.0.0.2/32
::2 2001:DB8::1/128 ::2 2001:DB8::2/128
– 2001:DB8::/32 (aggregate) BR-LOOPBACK BR-LOOPBACK
– 2001:DB8:2:2::/64 (LAN) ::1 2001:DB8:1::/126 ::2
R1 R2
• IBGP to R1 (Loopback peering)
IBGP
• EBGP to R201 AS64512
2001:DB8:2:1::/64 2001:DB8:2:2::/64
– IGP has been configured, all Loopbacks 2001:DB8::/32
99 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s configuration
# Create unreachable route for IPv6 Unicast aggregate prefix
/ipv6 route add dst-address=2001:DB8::/32 type=unreachable
# Set 64512 as default ASN, hardcode Loopback IPv4 address as BGP Router ID
/routing bgp instance set default as=64512 router-id=10.0.0.1
Administrator # Add peer for IPv6 Unicast IBGP with R2,
# use BR-LOOPBACK as source interface, next hop option: self
/routing bgp peer
add name=IBGP-R2-IPV6 remote-address=2001:DB8::2 remote-as=64512 \
address-families=ipv6 update-source=BR-LOOPBACK nexthop-choice=force-self
100 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
MikroTik RouterOS R2’s configuration
# Create unreachable route for IPv6 Unicast aggregate prefix
/ipv6 route add dst-address=2001:DB8::/32 type=unreachable
# Set 64512 as default ASN, hardcode Loopback IPv4 address as BGP Router ID
/routing bgp instance set default as=64512 router-id=10.0.0.2
Administrator # Add peer for IPv6 Unicast IBGP with R1,
# use BR-LOOPBACK as source interface, next hop option: self
/routing bgp peer
add name=IBGP-R1-IPV6 remote-address=2001:DB8::1 remote-as=64512 \
address-families=ipv6 update-source=BR-LOOPBACK nexthop-choice=force-self
101 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
MikroTik RouterOS R101’s configuration
# Create unreachable route for IPv6 Unicast aggregate prefix
/ipv6 route add dst-address=2406:6400::/32 type=unreachable
# Set 65000 as default ASN, hardcode Loopback IPv4 address as BGP Router ID
/routing bgp instance set default as=65000 router-id=172.16.0.1
Administrator # Add peer for IPv6 Unicast EBGP with AS64512
/routing bgp peer
add name=EBGP-AS64512-IPV6 remote-address=2406:6400:4::2 remote-as=64512 \
address-families=ipv6
102 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
MikroTik RouterOS R201’s configuration
# Create unreachable route for IPv6 Unicast aggregate prefix
/ipv6 route add dst-address=2406:6401::/32 type=unreachable
# Set 65001 as default ASN, hardcode Loopback IPv4 address as BGP Router ID
/routing bgp instance set default as=65001 router-id=172.24.0.1
Administrator # Add peer for IPv6 Unicast EBGP with AS64512
/routing bgp peer
add name=EBGP-AS64512-IPV6 remote-address=2406:6401:4::2 remote-as=64512 \
address-families=ipv6
103 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
• Verification commands:
– Showing BGP peers
• /routing bgp peer print status
– Showing prefixes advertised to specific peer
• /routing bgp advertise print [peer-name] detail
– Showing prefixes received from specific peer
• /ipv6 route print detail where bgp received-from=[peer-name]
– Showing BGP routes in routing table
• /ipv6 route print where bgp
– Showing detail information of specific route
• /ipv6 route print detail where dst-address=[prefix]/[len]
104 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing BGP peers
[apnic@R1] > /routing bgp peer print status
Flags: X - disabled, E - established
0 E name="IBGP-R2-IPV6" instance=default remote-address=2001:db8::2
remote-as=64512 tcp-md5-key="" nexthop-choice=force-self multihop=no
Administrator route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter=""
address-families=ipv6 update-source=BR-LOOPBACK default-originate=never
remove-private-as=no as-override=no passive=no use-bfd=no
remote-id=10.0.0.2 local-address=2001:db8::1 uptime=3m4s prefix-count=4
updates-sent=6 updates-received=6 withdrawn-sent=2 withdrawn-received=2
remote-hold-time=3m used-hold-time=3m used-keepalive-time=1m
refresh-capability=yes as4-capability=yes state=established
105 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing prefixes advertised to specific peer
[apnic@R1] > /routing bgp advertise print EBGP-AS65000-IPV6 detail
peer="EBGP-AS65000-IPV6" prefix=2406:6401::/32 nexthop=2406:6400:4::2
as-path="65001" origin=igp
106 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing prefixes received from specific peer
[apnic@R1] > /ipv6 route print detail where bgp received-from=EBGP-AS65000-IPV6
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable
0 ADb dst-address=2406:6400::/32 gateway=fe80::253:1ff:fe13:106%ether6
Administrator gateway-status=fe80::253:1ff:fe13:106%ether6 reachable distance=20
scope=40 target-scope=10 bgp-as-path="65000" bgp-origin=igp
received-from=EBGP-AS65000-IPV6
2 Db dst-address=2406:6401::/32 gateway=fe80::253:1ff:fe13:106%ether6
gateway-status=fe80::253:1ff:fe13:106%ether6 reachable distance=20
scope=40 target-scope=10 bgp-as-path="65000,65001" bgp-origin=igp
received-from=EBGP-AS65000-IPV6
3 Db dst-address=2406:6401:2:1::/64 gateway=fe80::253:1ff:fe13:106%ether6
gateway-status=fe80::253:1ff:fe13:106%ether6 reachable distance=20
scope=40 target-scope=10 bgp-as-path="65000,65001" bgp-origin=igp
received-from=EBGP-AS65000-IPV6
107 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing BGP routes in routing table
[apnic@R1] > /ipv6 route print where bgp
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable
# DST-ADDRESS GATEWAY DISTANCE
Administrator 0 Db 2001:db8::/32
1 ADb 2001:db8:2:2::/64
2001:db8::2
2001:db8::2
200
200
2 ADb 2406:6400::/32 fe80::253:1ff:fe13:10... 20
3 ADb 2406:6400:2:1::/64 fe80::253:1ff:fe13:10... 20
4 ADb 2406:6401::/32 2001:db8::2 200
5 Db 2406:6401::/32 fe80::253:1ff:fe13:10... 20
6 ADb 2406:6401:2:1::/64 2001:db8::2 200
7 Db 2406:6401:2:1::/64 fe80::253:1ff:fe13:10... 20
108 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
MikroTik RouterOS R1’s verification as an example
# Showing detail information of specific route
[apnic@R1] > /ipv6 route print detail where dst-address=2406:6401:2:1::/64
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable
0 ADb dst-address=2406:6401:2:1::/64 gateway=2001:db8::2
Administrator gateway-status=2001:db8::2 recursive via 2001:db8:1::2 ether1
distance=200 scope=40 target-scope=30 bgp-as-path="65001"
bgp-local-pref=100 bgp-origin=igp received-from=IBGP-R2-IPV6
1 Db dst-address=2406:6401:2:1::/64 gateway=fe80::253:1ff:fe13:106%ether6
gateway-status=fe80::253:1ff:fe13:106%ether6 reachable distance=20
scope=40 target-scope=10 bgp-as-path="65000,65001" bgp-origin=igp
received-from=EBGP-AS65000-IPV6
109 v1.2
BGP Address Families
110 v1.2
MPLS Enabled Services
Purpose Option Address Family AFI SAFI Reference
Routes in default/main
IPv4 Labeled Unicast 1 4
routing table (4PE)
Tunneling IPv4 Unicast
traffic over MPLS core
Routes in VRF (4VPE) VPNv4 Unicast 1 128 RFC4364
Routes in default/main
IPv6 Labeled Unicast 2 4 RFC4798
routing table (6PE)
Tunneling IPv6 Unicast
traffic over MPLS core
Routes in VRF (6VPE) VPNv6 Unicast 2 128 RFC4659
111 v1.2
Other Address Families
Purpose Option Address Family AFI SAFI Reference
112 v1.2