iBGP Lab Final
iBGP Lab Final
Purpose
Since iBGP is an extension of BGP I'll explain how BGP works first. BGP
manages how packets get routed between networks through the exchange of reachability
and routing information between edge routers. It creates stability within its network by
making sure routers can adapt to route failures. For example, when one route goes down,
a new route is quicky found. It makes routing decisions based on paths, which are defined
by rules or network policies that network administrators set. BGP is generally used in
connecting individual networks managed by a large organization to other groups of
networks managed by large organizations. These network groups are also called
autonomous systems (AS). Each AS creates different rules and policies on how they want
traffic to move in its network. Different AS organizations arrange peering agreements
that allow traffic to travel in their networks. In BGP, the BGP routers at the edge of AS
networks advertise to peers the prefixes of the IP addresses, they can send traffic to.
These routers regularly send advertisements through network-prefix announcements so
they can update each other's routing table. It works by using decision-making algorithms
to analyze the data they gather. They then decide which peer is best to send each packet
to. Generally, the path with the fewest number of hops is chosen, but if there is delay and
congestion on that route, BGP may choose a longer router if it’s faster. Once traffic
moves across an autonomous system and gets to another BGP router connected to a
different autonomous system. This process is repeated until the data reaches the
autonomous system where its destination is. For network operators to control routing in
their networks and to exchange routing information with other internet server providers,
they need autonomous system numbers (ASN). These numbers are assigned by IANA or
the Internet Assigned Numbers Authority. Just like an IP address, ASNs are both 16-bit
and 32-bit numbers.
There are many things that make iBGP different from eBGP. First, iBGP goes
between two BGP routers in the same autonomous system. It also has an administrative
distance of 200 compared to eBGPs 20. IBGP routers that are received from an IBGP
peer cannot be advertised to other iBGP peers, but they can be advertised to an eBGP
peer, while in eBGP routes received from an eBGP peer can be advertised to eBGP and
iBGP peers. Another thing is that iBGP requires a full mesh topology while eBGP
doesn’t. IBGP is also used within the same organization, and its default peers have a TTL
iBGP | 2
of 255 while eBGP has a default TTL of 1. These are some of the things that make iBGP
different from eBGP but the main difference is that iBGP is used inside autonomous
systems while eBGP is used between autonomous systems.
Lab Summary
In this lab, I used seven 4321 Cisco Routers and six copper-straight through cables. Each
router, except for the two border routers had two copper-straight throughs connected to
them. One cable went in the GigabitEthernet 1 interface and the other went in the
GigabitEthernet 0/0/1 interface. After that, I assigned the interfaces of each router an
IPv4 and IPv6 address and configured loopback addresses on the routers. Then, I
configured BGP on the routers. Finally, I pinged my routers with each other to verify
connectivity and did other commands like show ip protocols and show ip bgp summary to
ensure that BGP was working.
Lab Commands
Router(config)#ipv6 unicast-routing
This command enables BGP on the router and enters BGP configuration mode. The AS
(autonomous system) number identifies the router’s BGP configuration group. When you
configure external BGP, two connected routers should not have the same AS number, as
that will signal they are in different groups.
Router(config-router) #no bgp default ipv4-unicast
This command disables the default behavior of BGPv4 to advertise only IPv4 unicast
routes and enables multi-protocol BGP mode.
Router(config-router) #address-family <Address Family>
This command enters BGP address-family configuration mode. The address family
parameter covers ipv4 and ipv6. Each one brings the router to its respective configuration
mode for either BGPv4 or BGPv6.
Router(config-router)#neighbor <IP Address> remote-as
<Neighbor AS Number>
This command configures a BGP neighbor. It can be either an IPv4 or IPv6 address. The
Neighbor AS Number parameter requires the AS number of the adjacent router. This
command statically configures BGP to create a neighbor connection. This command
needs to be entered correctly on both routers in order for a neighbor connection to be
iBGP | 3
formed. This command needs to be entered twice, once for IPv4 and once for IPv6, for
dual stack operation.
Router(config-router-af)#neighbor <IP Address> activate
This command activates the BGP neighbor connection. It can be either an IPv4 or IPv6
address. You can enter it in either the IPv4 or IPv6 address family configuration mode to
activate respective neighbor connections.
Router(config-router-af)#network <IPv4 Address> mask <Subnet
Mask>
This command allows BGP to distribute information from a different protocol. It can be
either OSPF or EIGRP. The protocol number is the process-id of OSPF or the AS number
of EIGRP.
Router(config-router)#redistribute <protocol> <protocol
number>
This command is used in OSPF or EIGRP router configuration mode and allows them to
distribute information from different routing protocols. The protocol parameter is only
BGP. The protocol number is the AS number of the local BGP connection.
Router#show ip/ipv6 protocols
This command shows a summary of all the configured IPv4 and IPv6 protocols on the
router.
Router#show ip bgp
Configurations
Router 1
show run
R1#show run
iBGP | 6
Building configuration...
no mop enabled
no mop sysid
!
interface GigabitEthernet2
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet3
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet4
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router eigrp 1
network 10.0.0.0 0.0.0.3
network 192.168.1.0
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
!
iBGP | 10
Interfaces:
Loopback0
GigabitEthernet1
Redistribution:
None
IPv6 Routing Protocol is "eigrp 1"
EIGRP-IPv6 Protocol for AS(1)
Metric weight K1=1, K2=0, K3=1, K4=0, K5=0
Soft SIA disabled
NSF-aware route hold timer is 240
EIGRP NSF disabled
NSF signal timer is 20s
NSF converge timer is 120s
Router-ID: 1.1.1.1
Topology : 0 (base)
iBGP | 15
Interfaces:
Redistribution:
Redistributing protocol connected
Router 2
show run
R2#show run
Building configuration...
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router eigrp 1
network 10.0.0.0 0.0.0.3
network 10.0.2.0 0.0.0.3
network 192.168.2.0
redistribute bgp 10 metric 10000 100 255 240 65535
!
router bgp 10
bgp log-neighbor-changes
neighbor 10:2::2 remote-as 11
neighbor 10.0.2.2 remote-as 11
!
address-family ipv4
redistribute eigrp 1
no neighbor 10:2::2 activate
neighbor 10.0.2.2 activate
exit-address-family
!
address-family ipv6
redistribute connected
redistribute eigrp 10
neighbor 10:2::2 activate
exit-address-family
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
!
iBGP | 20
Interfaces:
Loopback0
GigabitEthernet1
Redistribution:
Redistributing protocol bgp 10 with metric 10000 10 254
254 65535
IPv6 Routing Protocol is "eigrp 1"
EIGRP-IPv6 Protocol for AS(1)
Metric weight K1=1, K2=0, K3=1, K4=0, K5=0
Soft SIA disabled
NSF-aware route hold timer is 240
EIGRP NSF disabled
NSF signal timer is 20s
NSF converge timer is 120s
Router-ID: 2.2.2.2
Topology : 0 (base)
Active Timer: 3 min
Distance: internal 90 external 170
iBGP | 26
Maximum path: 16
Maximum hopcount 100
Maximum metric variance 1
Interfaces:
Redistribution:
Redistributing protocol connected
Redistributing protocol bgp 10 with metric 10000 10 254
254 65535
show ip bgp
R2#show ip bgp
BGP table version is 6, local router ID is 192.168.2.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,
x best-external, a additional-path, c RIB-
compressed,
t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Router 3
show run
R3#show run
Building configuration...
!
boot-start-marker
boot-end-marker
!
no aaa new-model
!
login on-success log
!
subscriber templating
!
ipv6 unicast-routing
multilink bundle-name authenticated
!
crypto pki trustpoint TP-self-signed-3256851222
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-3256851222
revocation-check none
rsakeypair TP-self-signed-3256851222
!
crypto pki certificate chain TP-self-signed-3256851222
certificate self-signed 01
30820330 30820218 A0030201 02020101 300D0609 2A864886
F70D0101 05050030
31312F30 2D060355 04031326 494F532D 53656C66 2D536967
6E65642D 43657274
69666963 6174652D 33323536 38353132 3232301E 170D3231
31323032 31383237
30365A17 0D333030 31303130 30303030 305A3031 312F302D
06035504 03132649
4F532D53 656C662D 5369676E 65642D43 65727469 66696361
74652D33 32353638
35313232 32308201 22300D06 092A8648 86F70D01 01010500
0382010F 00308201
iBGP | 29
quit
!
license udi pid CSR1000V sn 9MJCWK69HK6
no license smart enable
diagnostic bootup level minimal
!
spanning-tree extend system-id
!
redundancy
!
interface Loopback0
ip address 192.168.3.1 255.255.255.0
ipv6 address 100:3::1/64
ospfv3 11 ipv6 area 0
!
interface GigabitEthernet1
ip address 10.0.1.1 255.255.255.252
negotiation auto
ipv6 address 10:3::1/64
ospfv3 11 ipv6 area 0
no mop enabled
no mop sysid
!
interface GigabitEthernet2
ip address 10.0.2.2 255.255.255.252
negotiation auto
ipv6 address 10:2::2/64
no mop enabled
no mop sysid
!
interface GigabitEthernet3
no ip address
shutdown
iBGP | 31
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet4
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router ospfv3 11
!
address-family ipv6 unicast
redistribute bgp 11
router-id 3.3.3.3
exit-address-family
!
router ospf 1
router-id 3.3.3.3
redistribute bgp 11 subnets
network 10.0.1.0 0.0.0.3 area 0
network 10.0.2.0 0.0.0.3 area 0
network 192.168.3.0 0.0.0.255 area 0
!
router bgp 11
bgp log-neighbor-changes
neighbor 10:2::1 remote-as 10
neighbor 100:5::1 remote-as 11
neighbor 100:5::1 update-source Loopback0
neighbor 10.0.2.1 remote-as 10
neighbor 192.168.5.1 remote-as 11
neighbor 192.168.5.1 update-source Loopback0
iBGP | 32
!
address-family ipv4
network 192.168.3.1
no neighbor 10:2::1 activate
no neighbor 100:5::1 activate
neighbor 10.0.2.1 activate
neighbor 192.168.5.1 activate
exit-address-family
!
address-family ipv6
network 10:2::/64
network 100:3::/64
neighbor 10:2::1 activate
neighbor 100:5::1 activate
exit-address-family
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
!
control-plane
!
line con 0
stopbits 1
line vty 0 4
login
!
end
show ip/ipv6 route
R3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M -
mobile, B - BGP
iBGP | 33
L 10:3::1/128 [0/0]
via GigabitEthernet1, receive
O 10:4::/64 [110/2]
via FE80::E95:44FF:FEEE:0, GigabitEthernet1
B 100:1::/64 [20/130816]
via FE80::E2B:4FFF:FEF8:1, GigabitEthernet2
B 100:2::/64 [20/0]
via FE80::E2B:4FFF:FEF8:1, GigabitEthernet2
C 100:3::/64 [0/0]
via Loopback0, directly connected
L 100:3::1/128 [0/0]
via Loopback0, receive
O 100:4::1/128 [110/1]
via FE80::E95:44FF:FEEE:0, GigabitEthernet1
O 100:5::1/128 [110/2]
via FE80::E95:44FF:FEEE:0, GigabitEthernet1
L FF00::/8 [0/0]
via Null0, receive
show ip/ipv6 protocols
R3#show ip protocols
*** IP Routing is NSF aware ***
Router 4
show run
R4#show run
Building configuration...
no mop enabled
no mop sysid
!
interface GigabitEthernet3
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet4
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router ospfv3 11
!
address-family ipv6 unicast
router-id 4.4.4.4
exit-address-family
!
router ospf 1
router-id 4.4.4.4
network 10.0.1.0 0.0.0.3 area 0
network 10.0.1.4 0.0.0.3 area 0
network 192.168.4.0 0.0.0.255 area 0
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
iBGP | 44
!
control-plane
!
line con 0
stopbits 1
line vty 0 4
login
!
end
show ip/ipv6 route
R4#show ip route
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
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
Router 5
show run
R5#show run
Building configuration...
hostname R5
!
boot-start-marker
boot-end-marker
!
no aaa new-model
!
login on-success log
!
subscriber templating
!
ipv6 unicast-routing
multilink bundle-name authenticated
!
crypto pki trustpoint TP-self-signed-2979605039
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-2979605039
revocation-check none
rsakeypair TP-self-signed-2979605039
!
crypto pki certificate chain TP-self-signed-2979605039
certificate self-signed 01
30820330 30820218 A0030201 02020101 300D0609 2A864886
F70D0101 05050030
31312F30 2D060355 04031326 494F532D 53656C66 2D536967
6E65642D 43657274
69666963 6174652D 32393739 36303530 3339301E 170D3231
31323032 31383237
33315A17 0D333030 31303130 30303030 305A3031 312F302D
06035504 03132649
4F532D53 656C662D 5369676E 65642D43 65727469 66696361
74652D32 39373936
30353033 39308201 22300D06 092A8648 86F70D01 01010500
0382010F 00308201
iBGP | 50
quit
!
license udi pid CSR1000V sn 90LGOYKMJ18
no license smart enable
diagnostic bootup level minimal
!
spanning-tree extend system-id
!
redundancy
!
interface Loopback0
ip address 192.168.5.1 255.255.255.0
ipv6 address 100:5::1/64
ospfv3 11 ipv6 area 0
!
interface GigabitEthernet1
ip address 10.0.1.6 255.255.255.252
negotiation auto
ipv6 address 10:4::2/64
ospfv3 11 ipv6 area 0
no mop enabled
no mop sysid
!
interface GigabitEthernet2
ip address 10.0.2.5 255.255.255.252
negotiation auto
ipv6 address 10:5::1/64
no mop enabled
no mop sysid
!
interface GigabitEthernet3
no ip address
shutdown
iBGP | 52
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet4
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router ospfv3 11
!
address-family ipv6 unicast
router-id 5.5.5.5
exit-address-family
!
router ospf 1
router-id 5.5.5.5
redistribute bgp 11 subnets
network 10.0.1.4 0.0.0.3 area 0
network 10.0.2.4 0.0.0.3 area 0
network 192.168.5.0 0.0.0.255 area 0
!
router bgp 11
bgp log-neighbor-changes
neighbor 10:5::2 remote-as 12
neighbor 100:3::1 remote-as 11
neighbor 100:3::1 update-source Loopback0
neighbor 10.0.2.6 remote-as 12
neighbor 192.168.3.1 remote-as 11
neighbor 192.168.3.1 update-source Loopback0
!
iBGP | 53
address-family ipv4
network 192.168.5.0
no neighbor 10:5::2 activate
no neighbor 100:3::1 activate
neighbor 10.0.2.6 activate
neighbor 192.168.3.1 activate
exit-address-family
!
address-family ipv6
neighbor 10:5::2 activate
neighbor 100:3::1 activate
exit-address-family
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
!
control-plane
!
line con 0
stopbits 1
line vty 0 4
login
!
end
show ip/ipv6 route
R5#show ip route
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
iBGP | 54
Router 6
show run
R6#show run
Building configuration...
no aaa new-model
!
login on-success log
!
subscriber templating
!
ipv6 unicast-routing
multilink bundle-name authenticated
!
crypto pki trustpoint TP-self-signed-1231818338
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-1231818338
revocation-check none
rsakeypair TP-self-signed-1231818338
!
crypto pki certificate chain TP-self-signed-1231818338
certificate self-signed 01
30820330 30820218 A0030201 02020101 300D0609 2A864886
F70D0101 05050030
31312F30 2D060355 04031326 494F532D 53656C66 2D536967
6E65642D 43657274
69666963 6174652D 31323331 38313833 3338301E 170D3231
31323032 31383237
33395A17 0D333030 31303130 30303030 305A3031 312F302D
06035504 03132649
4F532D53 656C662D 5369676E 65642D43 65727469 66696361
74652D31 32333138
31383333 38308201 22300D06 092A8648 86F70D01 01010500
0382010F 00308201
0A028201 0100B95B 8AB69695 F52F1439 D37CCEB7 7422F22C
4849F98F 09AC7785
05DD562C 4CECCCDD EC73A0FE C00D28AE 938B625D 267955D7
C69C2790 A476C210
A9C23059 29FB6C1C 388B8588 8E6AE913 4493651C 750F64F0
A6AD8B5D 77978577
iBGP | 62
!
spanning-tree extend system-id
!
redundancy
!
interface Loopback0
ip address 192.168.6.1 255.255.255.0
ipv6 address 100:6::1/64
ipv6 eigrp 12
!
interface GigabitEthernet1
ip address 10.0.0.6 255.255.255.252
negotiation auto
ipv6 address 10:6::1/64
ipv6 eigrp 12
no mop enabled
no mop sysid
!
interface GigabitEthernet2
ip address 10.0.2.6 255.255.255.252
negotiation auto
ipv6 address 10:5::2/64
no mop enabled
no mop sysid
!
interface GigabitEthernet3
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet4
iBGP | 64
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router eigrp 2
network 10.0.0.4 0.0.0.3
network 10.0.2.4 0.0.0.3
network 192.168.6.0
redistribute bgp 12 metric 10000 100 255 240 65535
!
router bgp 12
bgp log-neighbor-changes
neighbor 10:5::1 remote-as 11
neighbor 10.0.2.5 remote-as 11
!
address-family ipv4
redistribute eigrp 2
no neighbor 10:5::1 activate
neighbor 10.0.2.5 activate
exit-address-family
!
address-family ipv6
neighbor 10:5::1 activate
exit-address-family
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
!
ipv6 router eigrp 12
iBGP | 65
a - Application
B 10:1::/64 [20/0]
via FE80::E1D:10FF:FE5D:1, GigabitEthernet2
B 10:2::/64 [20/0]
via FE80::E1D:10FF:FE5D:1, GigabitEthernet2
C 10:5::/64 [0/0]
via GigabitEthernet2, directly connected
L 10:5::2/128 [0/0]
via GigabitEthernet2, receive
C 10:6::/64 [0/0]
via GigabitEthernet1, directly connected
L 10:6::1/128 [0/0]
via GigabitEthernet1, receive
B 100:1::/64 [20/0]
via FE80::E1D:10FF:FE5D:1, GigabitEthernet2
B 100:2::/64 [20/0]
via FE80::E1D:10FF:FE5D:1, GigabitEthernet2
B 100:3::/64 [20/0]
via FE80::E1D:10FF:FE5D:1, GigabitEthernet2
C 100:6::/64 [0/0]
via Loopback0, directly connected
L 100:6::1/128 [0/0]
via Loopback0, receive
D 100:7::/64 [90/130816]
via FE80::EAB:E1FF:FE01:0, GigabitEthernet1
L FF00::/8 [0/0]
via Null0, receive
show ip/ipv6 protocols
R6#show ip protocols
*** IP Routing is NSF aware ***
10.0.0.4/30
10.0.2.4/30
192.168.6.0
Routing Information Sources:
Gateway Distance Last Update
10.0.0.5 90 00:04:46
Distance: internal 90 external 170
Interfaces:
Loopback0
GigabitEthernet1
Redistribution:
Redistributing protocol bgp 12 with metric 10000 100 254
254 65535
show ip bgp
R6#show ip bgp
BGP table version is 11, local router ID is 192.168.6.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,
iBGP | 71
Router 7
show run
R7#show run
Building configuration...
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router eigrp 2
network 10.0.0.4 0.0.0.3
network 192.168.7.0
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
Router-ID: 7.7.7.7
Topology : 0 (base)
Active Timer: 3 min
Distance: internal 90 external 170
Maximum path: 16
Maximum hopcount 100
Maximum metric variance 1
Interfaces:
Loopback0
GigabitEthernet1
Redistribution:
None
Problems
A problem I faced was that some of my BGP routers didn’t have IPv6 routes to networks
directly connected to the other BGP router. I concluded that because the only routes
missing were the ones directly connected to the other BGP router, the problem was
probably that BGP was unable to communicate with the directly connected routes. After
looking for different ways to fix this, I ran the redistribute connected command so BGP
could send its directly connected routes to the other router with BGP. After running this
command, I checked my BGP routers’ routing tables and they were fixed, and when I
looked at my IPv6 routes for the middle routers, they were there.
Conclusion
iBGP is an extension of the BGP routing protocol and is used to provide more
information to your internal routers.. To configure eBGP you need to use BGP specific
commands such as router bgp <AS Number> and redistribute <protocol> <protocol
number>. There are also some BGP specific show commands that are helpful to verify
BGP is working correctly after configuring it. These include show ip bgp and show ip
bgp summary. I was able to configure an eBGP network that enabled communications
between two separate autonomous systems, on 6 Cisco 4321 routers. Although I had
some problems with my IPv6 routes, I was able to troubleshoot them to get BGP to work.
Through this lab, I learned how to configure BGP in both ipv6 and ipv6, as well as
develop a deeper understanding of everything needed to make it work.
iBGP | 82