0% found this document useful (0 votes)
8 views112 pages

d1 s2 BGP Address Families

The document discusses the IPv4 unicast address family in BGP and provides an example configuration on Cisco IOS routers to establish BGP sessions and exchange IPv4 unicast routes between autonomous systems. The example shows the configuration of peer groups, route advertisement, and address family activation on two routers to establish internal and external BGP.

Uploaded by

bong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views112 pages

d1 s2 BGP Address Families

The document discusses the IPv4 unicast address family in BGP and provides an example configuration on Cisco IOS routers to establish BGP sessions and exchange IPv4 unicast routes between autonomous systems. The example shows the configuration of peer groups, route advertisement, and address family activation on two routers to establish internal and external BGP.

Uploaded by

bong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 112

Border Gateway Protocol (BGP)

BGP Address Families

1 v1.2
BGP Address Families

IPv4 Unicast Address Family

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

• Default Address Family in most BGP implementations.


• Recommended to run over an IPv4 BGP session.
– NEXT_HOP might need to be manually set on non-IPv4 BGP session
3 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
• 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
Loopback0 Loopback0
– 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) Loopback0 Loopback0
– 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

have reachability to each other


4 v1.2
Example: BGP IPv4 Unicast (Cisco IOS)
• AS65000
AS65000 AS65001
– R101 172.16.0.0/13
172.18.1.0/24
172.24.0.0/13
172.26.1.0/24
172.16.0.1/32 172.24.0.1/32
• Originates prefixes: Loopback0 Loopback0

– 172.16.0.0/13 (aggregate) R101


.5 172.20.0.4/30 .6
R201
– 172.18.1.0/24 (LAN) EBGP

• EBGP to R1 and R201 .1 .1

EBGP 172.20.0.0/30 172.28.0.0/30 EBGP


• AS65001
.2 10.0.0.1/32 .2 10.0.0.2/32
– R201 Loopback0 Loopback0

.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

• EBGP to R2 and R101

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

! Initialize BGP instance for AS64512


router bgp 64512
Administrator ! Hardcode Loopback IPv4 address as BGP Router ID
bgp router-id 10.0.0.1
! Do not enable IPv4 Unicast Address Family by default
no bgp default ipv4-unicast
! Create peer group for IPv4 Unicast IBGP: IBGP-IPV4
neighbor IBGP-IPV4 peer-group
! IBGP-IPV4 remote ASN: 64512 (IBGP)
neighbor IBGP-IPV4 remote-as 64512
! IBGP-IPV4 BGP session source interface: Loopback0
neighbor IBGP-IPV4 update-source Loopback0
! Create peer group for IPv4 Unicast EBGP with AS65000: EBGP-AS65000-IPV4
neighbor EBGP-AS65000-IPV4 peer-group
! EBGP-AS65000-IPV4 remote ASN: 65000 (EBGP)
neighbor EBGP-AS65000-IPV4 remote-as 65000
! Add 10.0.0.2 as a member of IBGP-IPV4
neighbor 10.0.0.2 peer-group IBGP-IPV4
! Add 172.20.0.1 as a member of EBGP-AS65000-IPV4
neighbor 172.20.0.1 peer-group EBGP-AS65000-IPV4
!
-- (To be continued) --

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

! Initialize BGP instance for AS64512


router bgp 64512
Administrator ! Hardcode Loopback IPv4 address as BGP Router ID
bgp router-id 10.0.0.2
! Do not enable IPv4 Unicast Address Family by default
no bgp default ipv4-unicast
! Create peer group for IPv4 Unicast IBGP: IBGP-IPV4
neighbor IBGP-IPV4 peer-group
! IBGP-IPV4 remote ASN: 64512 (IBGP)
neighbor IBGP-IPV4 remote-as 64512
! IBGP-IPV4 BGP session source interface: Loopback0
neighbor IBGP-IPV4 update-source Loopback0
! Create peer group for IPv4 Unicast EBGP with AS65001: EBGP-AS65001-IPV4
neighbor EBGP-AS65001-IPV4 peer-group
! EBGP-AS65001-IPV4 remote ASN: 65001 (EBGP)
neighbor EBGP-AS65001-IPV4 remote-as 65001
! Add 10.0.0.1 as a member of IBGP-IPV4
neighbor 10.0.0.1 peer-group IBGP-IPV4
! Add 172.28.0.1 as a member of EBGP-AS65001-IPV4
neighbor 172.28.0.1 peer-group EBGP-AS65001-IPV4
!
-- (To be continued) --

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

! Initialize BGP instance for AS65000


router bgp 65000
Administrator ! Hardcode Loopback IPv4 address as BGP Router ID
bgp router-id 172.16.0.1
! Do not enable IPv4 Unicast Address Family by default
no bgp default ipv4-unicast
! Create peer group for IPv4 Unicast EBGP with AS64512: EBGP-AS64512-IPV4
neighbor EBGP-AS64512-IPV4 peer-group
! EBGP-AS64512-IPV4 remote ASN: 64512 (EBGP)
neighbor EBGP-AS64512-IPV4 remote-as 64512
! Create peer group for IPv4 Unicast EBGP with AS65001: EBGP-AS65001-IPV4
neighbor EBGP-AS65001-IPV4 peer-group
! EBGP-AS65001-IPV4 remote ASN: 65001 (EBGP)
neighbor EBGP-AS65001-IPV4 remote-as 65001
! Add 172.20.0.2 as a member of EBGP-AS64512-IPV4
neighbor 172.20.0.2 peer-group EBGP-AS64512-IPV4
! Add 172.20.0.6 as a member of EBGP-AS65001-IPV4
neighbor 172.20.0.6 peer-group EBGP-AS65001-IPV4
!
-- (To be continued) --

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

! Initialize BGP instance for AS65001


router bgp 65001
Administrator ! Hardcode Loopback IPv4 address as BGP Router ID
bgp router-id 172.24.0.1
! Do not enable IPv4 Unicast Address Family by default
no bgp default ipv4-unicast
! Create peer group for IPv4 Unicast EBGP with AS64512: EBGP-AS64512-IPV4
neighbor EBGP-AS64512-IPV4 peer-group
! EBGP-AS64512-IPV4 remote ASN: 64512 (EBGP)
neighbor EBGP-AS64512-IPV4 remote-as 64512
! Create peer group for IPv4 Unicast EBGP with AS65000: EBGP-AS65000-IPV4
neighbor EBGP-AS65000-IPV4 peer-group
! EBGP-AS65000-IPV4 remote ASN: 65000 (EBGP)
neighbor EBGP-AS65000-IPV4 remote-as 65000
! Add 172.28.0.2 as a member of EBGP-AS64512-IPV4
neighbor 172.28.0.2 peer-group EBGP-AS64512-IPV4
! Add 172.20.0.5 as a member of EBGP-AS65000-IPV4
neighbor 172.20.0.5 peer-group EBGP-AS65000-IPV4
!
-- (To be continued) –-

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

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


10.0.0.2 4 64512 8 10 10 0 0 00:03:00 4
172.20.0.1 4 65000 10 8 10 0 0 00:03:02 4

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

Network Next Hop Metric LocPrf Weight Path


*> 10.0.0.0 0.0.0.0 0 32768 i
*> 10.2.1.0/24 0.0.0.0 0 32768 i
*>i 10.2.2.0/24 10.0.0.2 0 100 0 i
*>i 172.24.0.0/13 10.0.0.2 0 100 0 65001 i
*>i 172.26.1.0/24 10.0.0.2 0 100 0 65001 i

Total number of prefixes 5

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

Network Next Hop Metric LocPrf Weight Path


*> 172.16.0.0/13 172.20.0.1 0 0 65000 i
*> 172.18.1.0/24 172.20.0.1 0 0 65000 i
* 172.24.0.0/13 172.20.0.1 0 65000 65001 i
* 172.26.1.0/24 172.20.0.1 0 65000 65001 i

Total number of prefixes 4

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

Network Next Hop Metric LocPrf Weight Path


* i 10.0.0.0 10.0.0.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*> 10.2.1.0/24 0.0.0.0 0 32768 i
*>i 10.2.2.0/24 10.0.0.2 0 100 0 i
*> 172.16.0.0/13 172.20.0.1 0 0 65000 i
*> 172.18.1.0/24 172.20.0.1 0 0 65000 i
*>i 172.24.0.0/13 10.0.0.2 0 100 0 65001 i
* 172.20.0.1 0 65000 65001 i
*>i 172.26.1.0/24 10.0.0.2 0 100 0 65001 i
* 172.20.0.1 0 65000 65001 i

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

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 10 subnets, 4 masks


B 10.2.2.0/24 [200/0] via 10.0.0.2, 00:03:17
B 172.16.0.0/13 [20/0] via 172.20.0.1, 00:03:17
172.18.0.0/24 is subnetted, 1 subnets
B 172.18.1.0 [20/0] via 172.20.0.1, 00:03:17
B 172.24.0.0/13 [200/0] via 10.0.0.2, 00:03:17
172.26.0.0/24 is subnetted, 1 subnets
B 172.26.1.0 [200/0] via 10.0.0.2, 00:03:17

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

have reachability to each other


24 v1.2
Example: BGP IPv4 Unicast (Juniper Junos OS)
• AS65000
AS65000 AS65001
– R101 172.16.0.0/13
172.18.1.0/24
172.24.0.0/13
172.26.1.0/24
172.16.0.1/32 172.24.0.1/32
• Originates prefixes: lo0 lo0

– 172.16.0.0/13 (aggregate) R101


.5 172.20.0.4/30 .6
R201
– 172.18.1.0/24 (LAN) EBGP

• EBGP to R1 and R201 .1 .1

EBGP 172.20.0.0/30 172.28.0.0/30 EBGP


• AS65001
.2 10.0.0.1/32 .2 10.0.0.2/32
– R201 lo0 lo0

.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

• EBGP to R2 and R101

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

# Hardcode Loopback IPv4 address as Router ID


top set routing-options router-id 10.0.0.1
Administrator # Create black hole route for IPv4 Unicast aggregate prefix
top set routing-options static route 10.0.0.0/8 discard

# Create prefix list for locally originated IPv4 Unicast prefixes


top edit policy-options prefix-list LOCAL-IPV4
set 10.0.0.0/8
set 10.2.1.0/24

# Create policy statement for outbound filter of IPv4 Unicast IBGP


top edit policy-options policy-statement IBGP-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

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

Administrator # Create BGP group for IPv4 Unicast IBGP


top edit protocols bgp group IBGP-IPV4
# This is an IBGP group
set type internal
# Use Loopback as source address
set local-address 10.0.0.1
# Enable IPv4 Unicast Address Family
set family inet unicast
# Add BGP session to R2
set neighbor 10.0.0.2
# Set next hop to “self”
set export NEXT-HOP-SELF
# Apply BGP outbound filter
set export IBGP-IPV4-OUT

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

# Hardcode Loopback IPv4 address as Router ID


top set routing-options router-id 10.0.0.2
Administrator # Create black hole route for IPv4 Unicast aggregate prefix
top set routing-options static route 10.0.0.0/8 discard

# Create prefix list for locally originated IPv4 Unicast prefixes


top edit policy-options prefix-list LOCAL-IPV4
set 10.0.0.0/8
set 10.2.2.0/24

# Create policy statement for outbound filter of IPv4 Unicast IBGP


top edit policy-options policy-statement IBGP-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

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

Administrator # Create BGP group for IPv4 Unicast IBGP


top edit protocols bgp group IBGP-IPV4
# This is an IBGP group
set type internal
# Use Loopback as source address
set local-address 10.0.0.2
# Enable IPv4 Unicast Address Family
set family inet unicast
# Add BGP session to R1
set neighbor 10.0.0.1
# Set next hop to “self”
set export NEXT-HOP-SELF
# Apply BGP outbound filter
set export IBGP-IPV4-OUT

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

# Hardcode Loopback IPv4 address as Router ID


top set routing-options router-id 172.16.0.1
Administrator # Create black hole route for IPv4 Unicast aggregate prefix
top set routing-options static route 172.16.0.0/13 discard

# Create prefix list for locally originated IPv4 Unicast prefixes


top edit policy-options prefix-list LOCAL-IPV4
set 172.16.0.0/13
set 172.18.1.0/24

# 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

# 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
set peer-as 65001
# Enable IPv4 Unicast Address Family
set family inet unicast
# Add BGP session to R201
set neighbor 172.20.0.6
# Apply BGP outbound filter
set export EBGP-AS65001-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

# Hardcode Loopback IPv4 address as Router ID


top set routing-options router-id 172.24.0.1
Administrator # Create black hole route for IPv4 Unicast aggregate prefix
top set routing-options static route 172.24.0.0/13 discard

# Create prefix list for locally originated IPv4 Unicast prefixes


top edit policy-options prefix-list LOCAL-IPV4
set 172.24.0.0/13
set 172.26.1.0/24

# 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

# 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
set peer-as 65000
# Enable IPv4 Unicast Address Family
set family inet unicast
# Add BGP session to R101
set neighbor 172.20.0.5
# Apply BGP outbound filter
set export EBGP-AS65000-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

inet.0: 17 destinations, 20 routes (17 active, 0 holddown, 0 hidden)


Prefix Nexthop MED Lclpref AS path
Administrator * 10.0.0.0/8
* 10.2.1.0/24
Self
Self
I
I
* 10.2.2.0/24 Self I
* 172.24.0.0/13 Self 65001 I
* 172.26.1.0/24 Self 65001 I

# Showing prefixes received from specific peer


apnic@R1> show route table inet.0 receive-protocol bgp 172.20.0.1

inet.0: 17 destinations, 20 routes (17 active, 0 holddown, 0 hidden)


Prefix Nexthop MED Lclpref AS path
* 172.16.0.0/13 172.20.0.1 65000 I
* 172.18.1.0/24 172.20.0.1 65000 I
172.24.0.0/13 172.20.0.1 65000 65001 I
172.26.1.0/24 172.20.0.1 65000 65001 I

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

inet.0: 17 destinations, 20 routes (17 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both
Administrator 10.0.0.0/8 [BGP/170] 00:03:32, localpref 100, from 10.0.0.2
AS path: I, validation-state: unverified
> to 10.1.0.2 via ge-0/0/0.0
10.2.2.0/24 *[BGP/170] 00:03:32, localpref 100, from 10.0.0.2
AS path: I, validation-state: unverified
> to 10.1.0.2 via ge-0/0/0.0
172.16.0.0/13 *[BGP/170] 00:03:28, localpref 100
AS path: 65000 I, validation-state: unverified
> to 172.20.0.1 via ge-0/0/5.0
172.18.1.0/24 *[BGP/170] 00:03:28, localpref 100
AS path: 65000 I, validation-state: unverified
> to 172.20.0.1 via ge-0/0/5.0
-- (To be continued) --

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

inet.0: 17 destinations, 20 routes (17 active, 0 holddown, 0 hidden)


172.26.1.0/24 (2 entries, 1 announced)
Administrator *BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xdbdf1d4
Next-hop reference count: 7
Source: 10.0.0.2
Next hop type: Router, Next hop index: 597
Next hop: 10.1.0.2 via ge-0/0/0.0, selected
Session Id: 0x0
Protocol next hop: 10.0.0.2
Indirect next hop: 0xc0c8704 262142 INH Session ID: 0x0
State: <Active Int Ext>
Local AS: 64512 Peer AS: 64512
Age: 3:42 Metric2: 20
Validation State: unverified
Task: BGP_64512.10.0.0.2
Announcement bits (3): 0-KRT 5-BGP_RT_Background 6-Resolve tree 1
AS path: 65001 I
Accepted
Localpref: 100
-- (Snipped) --

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

have reachability to each other


44 v1.2
Example: BGP IPv4 Unicast (MikroTik RouterOS)
• AS65000
AS65000 AS65001
– R101 172.16.0.0/13
172.18.1.0/24
172.24.0.0/13
172.26.1.0/24
172.16.0.1/32 172.24.0.1/32
• Originates prefixes: BR-LOOPBACK BR-LOOPBACK

– 172.16.0.0/13 (aggregate) R101


.5 172.20.0.4/30 .6
R201
– 172.18.1.0/24 (LAN) EBGP

• EBGP to R1 and R201 .1 .1

EBGP 172.20.0.0/30 172.28.0.0/30 EBGP


• AS65001
.2 10.0.0.1/32 .2 10.0.0.2/32
– R201 BR-LOOPBACK BR-LOOPBACK

.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

• EBGP to R2 and R101

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

# Add peer for IPv4 Unicast EBGP with AS65000


/routing bgp peer
add name=EBGP-AS65000-IPV4 remote-address=172.20.0.1 remote-as=65000 \
address-families=ip

# Advertise locally originated prefixes into BGP


/routing bgp network
add network=10.0.0.0/8 synchronize=yes
add network=10.2.1.0/24 synchronize=yes

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

# Add peer for IPv4 Unicast EBGP with AS65001


/routing bgp peer
add name=EBGP-AS65001-IPV4 remote-address=172.28.0.1 remote-as=65001 \
address-families=ip

# Advertise locally originated prefixes into BGP


/routing bgp network
add network=10.0.0.0/8 synchronize=yes
add network=10.2.2.0/24 synchronize=yes

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

# Add peer for IPv4 Unicast EBGP with AS65001


/routing bgp peer
add name=EBGP-AS65001-IPV4 remote-address=172.20.0.6 remote-as=65001 \
address-families=ip

# Advertise locally originated prefixes into BGP


/routing bgp network
add network=172.16.0.0/13 synchronize=yes
add network=172.18.1.0/24 synchronize=yes

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

# Add peer for IPv4 Unicast EBGP with AS65000


/routing bgp peer
add name=EBGP-AS65000-IPV4 remote-address=172.20.0.5 remote-as=65000 \
address-families=ip

# Advertise locally originated prefixes into BGP


/routing bgp network
add network=172.24.0.0/13 synchronize=yes
add network=172.26.1.0/24 synchronize=yes

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

1 E name="EBGP-AS65000-IPV4" instance=default remote-address=172.20.0.1


remote-as=65000 tcp-md5-key="" nexthop-choice=default multihop=no
route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter=""
address-families=ip default-originate=never remove-private-as=no
as-override=no passive=no use-bfd=no remote-id=172.16.0.1
local-address=172.20.0.2 uptime=3m1s prefix-count=4 updates-sent=7
updates-received=5 withdrawn-sent=2 withdrawn-received=4
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

Administrator peer="EBGP-AS65000-IPV4" prefix=10.2.2.0/24 nexthop=172.20.0.2 origin=igp

peer="EBGP-AS65000-IPV4" prefix=10.0.0.0/8 nexthop=172.20.0.2 origin=igp

peer="EBGP-AS65000-IPV4" prefix=172.24.0.0/13 nexthop=172.20.0.2


as-path="65001" origin=igp

peer="EBGP-AS65000-IPV4" prefix=10.2.1.0/24 nexthop=172.20.0.2 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

1 ADb dst-address=172.18.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" 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

IPv6 Unicast Address Family

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

• Not enabled by default.


• Recommended to run over an IPv6 BGP session.
– NEXT_HOP might need to be manually set on non-IPv6 BGP session
57 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
• 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
Loopback0 Loopback0
– 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) Loopback0 Loopback0
– 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

have reachability to each other


58 v1.2
Example: BGP IPv6 Unicast (Cisco IOS)
• AS65000
AS65000 AS65001
– R101 2406:6400::/32
2406:6400:2:1::/64 172.16.0.1/32
2406:6401::/32
2406:6401:2:1::/64 172.24.0.1/32
2406:6400::1/128 2406:6401::1/128
• Originates prefixes: Loopback0 Loopback0

– 2406:6400::/32 (aggregate) R101


::0 2406:6400:4:1::/127 ::1
R201
– 2406:6400:2:1::/64 (LAN) EBGP

• EBGP to R1 and R201 ::0 ::0

EBGP 2406:6400:4::/127 2406:6401:4::/127 EBGP


• AS65001 10.0.0.1/32 10.0.0.2/32
::1 2001:DB8::1/128 ::1 2001:DB8::2/128
– R201 Loopback0 Loopback0

::0 2001:DB8:1::/127 ::1


• Originates prefixes: R1 R2
IBGP
– 2406:6401::/32 (aggregate)
AS64512
– 2406:6401:2:1::/64 (LAN) 2001:DB8:2:1::/64
2001:DB8::/32
2001:DB8:2:2::/64

• EBGP to R2 and R101

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

! Initialize BGP instance for AS64512


router bgp 64512
Administrator ! Hardcode Loopback IPv4 address as BGP Router ID
bgp router-id 10.0.0.1
! Do not enable IPv4 Unicast Address Family by default
no bgp default ipv4-unicast
! Create peer group for IPv6 Unicast IBGP: IBGP-IPV6
neighbor IBGP-IPV6 peer-group
! IBGP-IPV6 remote ASN: 64512 (IBGP)
neighbor IBGP-IPV6 remote-as 64512
! IBGP-IPV6 BGP session source interface: Loopback0
neighbor IBGP-IPV6 update-source Loopback0
! Create peer group for IPv6 Unicast EBGP with AS65000: EBGP-AS65000-IPV6
neighbor EBGP-AS65000-IPV6 peer-group
! EBGP-AS65000-IPV6 remote ASN: 65000 (EBGP)
neighbor EBGP-AS65000-IPV6 remote-as 65000
! Add 2001:DB8::2 as a member of IBGP-IPV6
neighbor 2001:DB8::2 peer-group IBGP-IPV6
! Add 2406:6400:4:: as a member of EBGP-AS65000-IPV6
neighbor 2406:6400:4:: peer-group EBGP-AS65000-IPV6
!
-- (To be continued) --

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

! Initialize BGP instance for AS64512


router bgp 64512
Administrator ! Hardcode Loopback IPv4 address as BGP Router ID
bgp router-id 10.0.0.2
! Do not enable IPv4 Unicast Address Family by default
no bgp default ipv4-unicast
! Create peer group for IPv6 Unicast IBGP: IBGP-IPV6
neighbor IBGP-IPV6 peer-group
! IBGP-IPV6 remote ASN: 64512 (IBGP)
neighbor IBGP-IPV6 remote-as 64512
! IBGP-IPV6 BGP session source interface: Loopback0
neighbor IBGP-IPV6 update-source Loopback0
! Create peer group for IPv6 Unicast EBGP with AS65001: EBGP-AS65001-IPV6
neighbor EBGP-AS65001-IPV6 peer-group
! EBGP-AS65001-IPV6 remote ASN: 65001 (EBGP)
neighbor EBGP-AS65001-IPV6 remote-as 65001
! Add 2001:DB8::1 as a member of IBGP-IPV6
neighbor 2001:DB8::1 peer-group IBGP-IPV6
! Add 2406:6401:4:: as a member of EBGP-AS65001-IPV6
neighbor 2406:6401:4:: peer-group EBGP-AS65001-IPV6
!
-- (To be continued) --

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

! Initialize BGP instance for AS65000


router bgp 65000
Administrator ! Hardcode Loopback IPv4 address as BGP Router ID
bgp router-id 172.16.0.1
! Do not enable IPv4 Unicast Address Family by default
no bgp default ipv4-unicast
! Create peer group for IPv6 Unicast EBGP with AS64512: EBGP-AS64512-IPV6
neighbor EBGP-AS64512-IPV6 peer-group
! EBGP-AS64512-IPV6 remote ASN: 64512 (EBGP)
neighbor EBGP-AS64512-IPV6 remote-as 64512
! Create peer group for IPv6 Unicast EBGP with AS65001: EBGP-AS65001-IPV6
neighbor EBGP-AS65001-IPV6 peer-group
! EBGP-AS65001-IPV6 remote ASN: 65001 (EBGP)
neighbor EBGP-AS65001-IPV6 remote-as 65001
! Add 2406:6400:4::1 as a member of EBGP-AS64512-IPV6
neighbor 2406:6400:4::1 peer-group EBGP-AS64512-IPV6
! Add 2406:6400:4:1::1 as a member of EBGP-AS65001-IPV6
neighbor 2406:6400:4:1::1 peer-group EBGP-AS65001-IPV6
!
-- (To be continued) --

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

! Initialize BGP instance for AS65001


router bgp 65001
Administrator ! Hardcode Loopback IPv4 address as BGP Router ID
bgp router-id 172.24.0.1
! Do not enable IPv4 Unicast Address Family by default
no bgp default ipv4-unicast
! Create peer group for IPv6 Unicast EBGP with AS64512: EBGP-AS64512-IPV6
neighbor EBGP-AS64512-IPV6 peer-group
! EBGP-AS64512-IPV6 remote ASN: 64512 (EBGP)
neighbor EBGP-AS64512-IPV6 remote-as 64512
! Create peer group for IPv6 Unicast EBGP with AS65000: EBGP-AS65000-IPV6
neighbor EBGP-AS65000-IPV6 peer-group
! EBGP-AS65000-IPV6 remote ASN: 65000 (EBGP)
neighbor EBGP-AS65000-IPV6 remote-as 65000
! Add 2406:6401:4::1 as a member of EBGP-AS64512-IPV6
neighbor 2406:6401:4::1 peer-group EBGP-AS64512-IPV6
! Add 2406:6400:4:1:: as a member of EBGP-AS65000-IPV6
neighbor 2406:6400:4:1:: peer-group EBGP-AS65000-IPV6
!
-- (To be continued) --

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

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


2001:DB8::2 4 64512 8 9 8 0 0 00:03:19 4
2406:6400:4:: 4 65000 10 9 8 0 0 00:03:00 4

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

Network Next Hop Metric LocPrf Weight Path


*> 2001:DB8::/32 :: 0 32768 i
*> 2001:DB8:2:1::/64
:: 0 32768 i
*>i 2001:DB8:2:2::/64
2001:DB8::2 0 100 0 i
*>i 2406:6401::/32 2001:DB8::2 0 100 0 65001 i
*>i 2406:6401:2:1::/64
2001:DB8::2 0 100 0 65001 i

Total number of prefixes 5

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

Network Next Hop Metric LocPrf Weight Path


*> 2406:6400::/32 2406:6400:4:: 0 0 65000 i
*> 2406:6400:2:1::/64
2406:6400:4:: 0 0 65000 i
* 2406:6401::/32 2406:6400:4:: 0 65000 65001 i
* 2406:6401:2:1::/64
2406:6400:4:: 0 65000 65001 i

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

Network Next Hop Metric LocPrf Weight Path


* i 2001:DB8::/32 2001:DB8::2 0 100 0 i
*> :: 0 32768 i
*> 2001:DB8:2:1::/64
:: 0 32768 i
*>i 2001:DB8:2:2::/64
2001:DB8::2 0 100 0 i
*> 2406:6400::/32 2406:6400:4:: 0 0 65000 i
*> 2406:6400:2:1::/64
2406:6400:4:: 0 0 65000 i
* 2406:6401::/32 2406:6400:4:: 0 65000 65001 i
*>i 2001:DB8::2 0 100 0 65001 i
* 2406:6401:2:1::/64
2406:6400:4:: 0 65000 65001 i
*>i 2001:DB8::2 0 100 0 65001 i

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

have reachability to each other


78 v1.2
Example: BGP IPv6 Unicast (Juniper Junos OS)
• AS65000
AS65000 AS65001
– R101 2406:6400::/32
2406:6400:2:1::/64 172.16.0.1/32
2406:6401::/32
2406:6401:2:1::/64 172.24.0.1/32
2406:6400::1/128 2406:6401::1/128
• Originates prefixes: lo0 lo0

– 2406:6400::/32 (aggregate) R101


::0 2406:6400:4:1::/127 ::1
R201
– 2406:6400:2:1::/64 (LAN) EBGP

• EBGP to R1 and R201 ::0 ::0

EBGP 2406:6400:4::/127 2406:6401:4::/127 EBGP


• AS65001 10.0.0.1/32 10.0.0.2/32
::1 2001:DB8::1/128 ::1 2001:DB8::2/128
– R201 lo0 lo0

::0 2001:DB8:1::/127 ::1


• Originates prefixes: R1 R2
IBGP
– 2406:6401::/32 (aggregate)
AS64512
– 2406:6401:2:1::/64 (LAN) 2001:DB8:2:1::/64
2001:DB8::/32
2001:DB8:2:2::/64

• EBGP to R2 and R101

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

# Hardcode Loopback IPv4 address as Router ID


top set routing-options router-id 10.0.0.1
Administrator # Create black hole route for IPv6 Unicast aggregate prefix
top set routing-options rib inet6.0 static route 2001:DB8::/32 discard

# Create prefix list for locally originated IPv6 Unicast prefixes


top edit policy-options prefix-list LOCAL-IPV6
set 2001:DB8::/32
set 2001:DB8:2:1::/64

# Create policy statement for outbound filter of IPv6 Unicast IBGP


top edit policy-options policy-statement IBGP-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

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

Administrator # Create BGP group for IPv6 Unicast IBGP


top edit protocols bgp group IBGP-IPV6
# This is an IBGP group
set type internal
# Use Loopback as source address
set local-address 2001:DB8::1
# Enable IPv6 Unicast Address Family
set family inet6 unicast
# Add BGP session to R2
set neighbor 2001:DB8::2
# Set next hop to “self”
set export NEXT-HOP-SELF
# Apply BGP outbound filter
set export IBGP-IPV6-OUT

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

# Hardcode Loopback IPv4 address as Router ID


top set routing-options router-id 10.0.0.2
Administrator # Create black hole route for IPv6 Unicast aggregate prefix
top set routing-options rib inet6.0 static route 2001:DB8::/32 discard

# Create prefix list for locally originated IPv6 Unicast prefixes


top edit policy-options prefix-list LOCAL-IPV6
set 2001:DB8::/32
set 2001:DB8:2:2::/64

# Create policy statement for outbound filter of IPv6 Unicast IBGP


top edit policy-options policy-statement IBGP-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

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

Administrator # Create BGP group for IPv6 Unicast IBGP


top edit protocols bgp group IBGP-IPV6
# This is an IBGP group
set type internal
# Use Loopback as source address
set local-address 2001:DB8::2
# Enable IPv6 Unicast Address Family
set family inet6 unicast
# Add BGP session to R1
set neighbor 2001:DB8::1
# Set next hop to “self”
set export NEXT-HOP-SELF
# Apply BGP outbound filter
set export IBGP-IPV6-OUT

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

# Hardcode Loopback IPv4 address as Router ID


top set routing-options router-id 172.16.0.1
Administrator # Create black hole route for IPv6 Unicast aggregate prefix
top set routing-options rib inet6.0 static route 2406:6400::/32 discard

# Create prefix list for locally originated IPv6 Unicast prefixes


top edit policy-options prefix-list LOCAL-IPV6
set 2406:6400::/32
set 2406:6400:2:1::/64

# 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

# 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
set peer-as 65001
# Enable IPv6 Unicast Address Family
set family inet6 unicast
# Add BGP session to R201
set neighbor 2406:6400:4:1::1
# Apply BGP outbound filter
set export EBGP-AS65001-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

# Hardcode Loopback IPv4 address as Router ID


top set routing-options router-id 172.24.0.1
Administrator # Create black hole route for IPv6 Unicast aggregate prefix
top set routing-options rib inet6.0 static route 2406:6401::/32 discard

# Create prefix list for locally originated IPv6 Unicast prefixes


top edit policy-options prefix-list LOCAL-IPV6
set 2406:6401::/32
set 2406:6401:2:1::/64

# 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

# 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
set peer-as 65000
# Enable IPv6 Unicast Address Family
set family inet6 unicast
# Add BGP session to R101
set neighbor 2406:6400:4:1::
# Apply BGP outbound filter
set export EBGP-AS65000-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::

inet6.0: 20 destinations, 23 routes (20 active, 0 holddown, 0 hidden)


Prefix Nexthop MED Lclpref AS path
Administrator * 2001:db8::/32
* 2001:db8:2:1::/64
Self
Self
I
I
* 2001:db8:2:2::/64 Self I
* 2406:6401::/32 Self 65001 I
* 2406:6401:2:1::/64 Self 65001 I

# Showing prefixes received from specific peer


apnic@R1> show route table inet6.0 receive-protocol bgp 2406:6400:4::

inet6.0: 20 destinations, 23 routes (20 active, 0 holddown, 0 hidden)


Prefix Nexthop MED Lclpref AS path
* 2406:6400::/32 2406:6400:4:: 65000 I
* 2406:6400:2:1::/64 2406:6400:4:: 65000 I
2406:6401::/32 2406:6400:4:: 65000 65001 I
2406:6401:2:1::/64 2406:6400:4:: 65000 65001 I

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

inet6.0: 20 destinations, 23 routes (20 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both
Administrator 2001:db8::/32 [BGP/170] 00:03:23, localpref 100, from 2001:db8::2
AS path: I, validation-state: unverified
> to fe80::253:ff:fe12:202 via ge-0/0/0.0
2001:db8:2:2::/64 *[BGP/170] 00:03:23, localpref 100, from 2001:db8::2
AS path: I, validation-state: unverified
> to fe80::253:ff:fe12:202 via ge-0/0/0.0
2406:6400::/32 *[BGP/170] 00:03:19, localpref 100
AS path: 65000 I, validation-state: unverified
> to 2406:6400:4:: via ge-0/0/5.0
2406:6400:2:1::/64 *[BGP/170] 00:03:19, localpref 100
AS path: 65000 I, validation-state: unverified
> to 2406:6400:4:: via ge-0/0/5.0
-- (To be continued) --

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

inet6.0: 20 destinations, 23 routes (20 active, 0 holddown, 0 hidden)


2406:6401:2:1::/64 (2 entries, 1 announced)
Administrator *BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xbd75cf4
Next-hop reference count: 7
Source: 2001:db8::2
Next hop type: Router, Next hop index: 598
Next hop: fe80::253:ff:fe12:202 via ge-0/0/0.0, selected
Session Id: 0x0
Protocol next hop: 2001:db8::2
Indirect next hop: 0xc0c6604 262142 INH Session ID: 0x0
State: <Active Int Ext>
Local AS: 64512 Peer AS: 64512
Age: 3:37 Metric2: 20
Validation State: unverified
Task: BGP_64512.2001:db8::2
Announcement bits (3): 0-KRT 3-BGP_RT_Background 4-Resolve tree 1
AS path: 65001 I
Accepted
Localpref: 100
-- (Snipped) --

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

have reachability to each other


98 v1.2
Example: BGP IPv6 Unicast (MikroTik RouterOS)
• AS65000
AS65000 AS65001
– R101 2406:6400::/32
2406:6400:2:1::/64 172.16.0.1/32
2406:6401::/32
2406:6401:2:1::/64 172.24.0.1/32
2406:6400::1/128 2406:6401::1/128
• Originates prefixes: BR-LOOPBACK BR-LOOPBACK

– 2406:6400::/32 (aggregate) R101


::1 2406:6400:4:1::/126 ::2
R201
– 2406:6400:2:1::/64 (LAN) EBGP

• EBGP to R1 and R201 ::1 ::1

EBGP 2406:6400:4::/126 2406:6401:4::/126 EBGP


• AS65001 10.0.0.1/32 10.0.0.2/32
::2 2001:DB8::1/128 ::2 2001:DB8::2/128
– R201 BR-LOOPBACK BR-LOOPBACK

::1 2001:DB8:1::/126 ::2


• Originates prefixes: R1 R2
IBGP
– 2406:6401::/32 (aggregate)
AS64512
– 2406:6401:2:1::/64 (LAN) 2001:DB8:2:1::/64
2001:DB8::/32
2001:DB8:2:2::/64

• EBGP to R2 and R101

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

# Add peer for IPv6 Unicast EBGP with AS65000


/routing bgp peer
add name=EBGP-AS65000-IPV6 remote-address=2406:6400:4::1 remote-as=65000 \
address-families=ipv6

# Advertise locally originated prefixes into BGP


/routing bgp network
add network=2001:DB8::/32 synchronize=yes
add network=2001:DB8:2:1::/64 synchronize=yes

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

# Add peer for IPv6 Unicast EBGP with AS65001


/routing bgp peer
add name=EBGP-AS65001-IPV6 remote-address=2406:6401:4::1 remote-as=65001 \
address-families=ipv6

# Advertise locally originated prefixes into BGP


/routing bgp network
add network=2001:DB8::/32 synchronize=yes
add network=2001:DB8:2:2::/64 synchronize=yes

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

# Add peer for IPv6 Unicast EBGP with AS65001


/routing bgp peer
add name=EBGP-AS65001-IPV6 remote-address=2406:6400:4:1::2 remote-as=65001 \
address-families=ipv6

# Advertise locally originated prefixes into BGP


/routing bgp network
add network=2406:6400::/32 synchronize=yes
add network=2406:6400:2:1::/64 synchronize=yes

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

# Add peer for IPv6 Unicast EBGP with AS65000


/routing bgp peer
add name=EBGP-AS65000-IPV6 remote-address=2406:6400:4:1::1 remote-as=65000 \
address-families=ipv6

# Advertise locally originated prefixes into BGP


/routing bgp network
add network=2406:6401::/32 synchronize=yes
add network=2406:6401:2:1::/64 synchronize=yes

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

1 E name="EBGP-AS65000-IPV6" instance=default remote-address=2406:6400:4::1


remote-as=65000 tcp-md5-key="" nexthop-choice=default multihop=no
route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter=""
address-families=ipv6 default-originate=never remove-private-as=no
as-override=no passive=no use-bfd=no remote-id=172.16.0.1
local-address=2406:6400:4::2 uptime=3m4s prefix-count=4 updates-sent=5
updates-received=4 withdrawn-sent=0 withdrawn-received=4
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

Administrator peer="EBGP-AS65000-IPV6" prefix=2001:db8:2:1::/64 nexthop=2406:6400:4::2


origin=igp

peer="EBGP-AS65000-IPV6" prefix=2406:6401:2:1::/64 nexthop=2406:6400:4::2


as-path="65001" origin=igp

peer="EBGP-AS65000-IPV6" prefix=2001:db8::/32 nexthop=2406:6400:4::2


origin=igp

peer="EBGP-AS65000-IPV6" prefix=2001:db8:2:2::/64 nexthop=2406:6400:4::2


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

1 ADb dst-address=2406:6400: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" 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

Other 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

Virtual Private LAN Service


L2VPN VPLS 25 65 RFC4761
(VPLS)
Tunneling Layer 2
traffic over MPLS core
Ethernet Virtual Private
L2VPN EVPN 25 70 RFC7432
Network (EVPN)

111 v1.2
Other Address Families
Purpose Option Address Family AFI SAFI Reference

Exchanging IPv4 Routes in default/main


IPv4 Multicast 1 2 RFC4760
Multicast routes routing table

Exchanging IPv6 Routes in default/main


IPv6 Multicast 2 2 RFC4760
Multicast routes routing table

Non-VPN link, node, prefix


Link-State 16388 71 RFC7752
information
Advertising topology
information
VPN link, node, prefix
Link-State VPN 16388 72 RFC7752
information

112 v1.2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy