- We now want to look at using IPv4 and IPv6,
address families.
We know that BGP has a multi protocol capability,
meaning that it is capable of carrying various routing
protocols over a single session.
And this is possible using address families.
This allows us to advertise both IPv4 and IPv6
to appear over a single BGP session.
You can see in our topology,
we have two directly connected routers
and the interfaces
are configured for both IPv4 and IPv6.
R1 is in AS 65,100 and R2 is in AS 65,200.
Again, we're going to build
a single BGP session between these routers,
and advertise both IPv6 and IPv4.
If we connect to router one and say,
show run, interface, gig 0/0
we'll be able to see that we
are configured with both
an IP version four address that we see here,
and an IP version six address on our interface gig 0/0.
Let's jump over to router two.
We'll do the same verification,
show run interface gig 0/0.
Again, we see IP version four
and IP version six configured on our interface.
Let's connect back to router one
and let's begin by creating a BGP session.
Let's say, under global configuration mode,
router BGP 65, 100,
we'll set our router ID to 1.1.1.1.
And next, we want to issue the command,
No BGP, default IP version four, hyphen uni cast.
So this command that's going
to prepare the router to be multi protocol.
And not advertise only IP version four uni cast,
which is the default behavior for BGP.
So we're just disabling this default behavior
with this particular command.
Now, let's define our neighbor as we would normally do.
Say neighbor 10.1.1.2, the remote AS is 65,200,
And, in addition to our IP version four address,
we need to do the same thing for IP version six.
So, we'll put in our IP version six address
the remote AS again is 65,200.
So now since we're using multi protocol BGP,
we need to create both
an IP version four address family ,
and an IP version six address family,
and we'll need to activate
each neighbor once we do that.
So first the creation of the address family
they'll say, address hyphen family,
and if you look at our options,
we have several of those.
We want to use IP version four
in this first case
and notice we're now under address
family configuration mode.
Now, what we want to do
is very simply to activate our neighbor.
So we'll say neighbor 10.1.1.2,
and the key word activate without that activate command,
our BGP session will never become established.
So that's important.
Let's back up a step,
and let's again, say address hyphen family,
and we'll create our IP version six address family.
We'll again, activate our neighbor using this time,
the IP version six address of our neighbor,
and we'll say activate at the end of that as well.
Now, one thing to be aware of
is that if you don't have IPv6
routing enabled on your router,
you're going to get an error message here in the console
stating that IPv6 routing must be enabled.
I've already enabled that with the global command
IPv6 uni cast hyphen routing,
but that's something to be aware of
if you're labbing this up on your own,
you want to make sure that
you have IP version six enabled on the router.
Let's jump over to router two
and mirror this configuration.
So we'll say router BGP 65, 200.
We'll set our router ID 2.2.2.2,
We want to turn off our default IPv4 uni cast option.
And we want to say neighbor 10.1.1.1
The remote AS is 65,100.
And we want to do that also
for the IP version six address
with the same remote AS of 65,100.
Now we need to create our address families.
Remember we have to activate our neighbors.
That's why we're not seeing
any BGP neighbor adjacencies just yet.
So let's first say address hyphen family, IP version four.
Let's activate our IP version four neighbor
10.1.1.1, activate.
We'll see our BGP neighbor adjacency come up.
We see that console message. So that's good.
Let's back out of address family configuration mode
and create our IP version six address family
will again say, neighbor followed
by the IP version six address of the neighbor
and say activate.
And we will see another console message
come up stating that we've got a second adjacency form.
And there it is we have an IP version six,
neighbor adjacency as well.
Now, on router one, let's jump over here,
and let's run, show BGP IPv4, uni cast, neighbors.
So you can see our neighbor is 10.1.1.2,
remote AS 65,200.
So that looks good.
Looks like we are in the established state.
BGP is established. That looks great.
Let's also say, we'll break out of there
and we'll do the IPv6 version of this command.
Show BGP IPv6, uni cast neighbors.
And we see our BGP neighbor
using the IP version six address,
same remote AS,
we see the correct router ID,
our session is established.
So that all looks good.
So we have both an IPv4 and an IPv6 session.
We've looked at creating both
IP version four and IP version six,
address families within BGP.