- [Instructor] In this video,
I'm gonna show you how to set
up DHCP Client step by step.
I'm gonna show you the location
of the Nameserver config file.
And I'm gonna show you
a couple of examples
of how to configure that in GNS3.
(upbeat music)
(high bass upbeat music)
All right, starting from scratch,
the first thing I'm
gonna do is drag and drop
the NAT cloud onto the topology.
I'm gonna select GNS3 VM.
I'm also gonna snap to grid,
so that I can just get
everything lined up properly.
Then I'm gonna drag and drop
a generic ethernet switch
onto the topology, select GNS3 VM.
And the next step is
I'm gonna drag and drop
the Ubuntu Docker Guest onto the topology.
I'm gonna use the connection
tool to create links.
Now I'm gonna power on the Linux server,
and open up the console.
First thing's first,
is the location of the network settings.
And that's where it's
gonna be, it's gonna be at:
/etc/network/interfaces.
And so we're gonna open
that up in a text editor.
And all we have to do in order
to configure this for DHCP
is to come down and
uncomment those commands,
just like that.
And hit CTRL+X to save, Y, Enter.
And then in order to refresh
the network settings,
I'm going to power off
and then power back on
the Linux server.
Close the console, Yes.
Power it back on, re-open the console.
And we can see, just like that,
that it has obtained an IP address.
Ifconfig to verify that we
do now have an IP address.
And the reason that this
was able to work like this
is because this NAT cloud has
a built in DHCP server in it.
And also, by default,
it allows you to connect
directly to the internet with
no additional configuration.
So we can ping 8.8.8.8.
And we're connected.
And because this is a video
series for network engineers,
I'm going to take it a
step farther than that
and we're gonna put another
server in this topology,
and we're gonna put it
behind a Cisco router
and get it connected to
the internet, as well.
So for the next step, I'm going
to drag on a Cisco router.
I'm gonna change the symbol to
the classic one that I like.
I'm gonna double click on
the name to change it R1,
so that it's simple.
And then I'm going to create
a connection to the switch.
Close that window.
I'm gonna power it on.
And I'm gonna open up a
console to the router.
It's gonna take a minute
for that to boot up.
All right, so I've turned
on Interface Labels,
so that we can see what interface is what.
And the first step is gonna be
getting gigabit ethernet 0/0
an IP address.
And we're gonna do this with DHCP.
All right, so I've gone into
the interface, gigabit 0/0,
IP address DHCP and no shut.
And now you can see that
the interface did get
an IP address.
do sh ip int b
See that that interface is up,
and it has an IP address by DHCP.
And our next step is gonna be adding
another docker container to the topology.
Now I'm gonna create
a connection from this
docker container to the router.
And then I'm gonna power
on this docker container.
And open up the console.
All right, so our next step
is gonna be configuring
DHCP on the router,
and then giving our
second Ubuntu docker guest
an IP address with that DHCP configuration
and then connecting it to the internet.
So the next step is giving
interface gigabit 0/1
on the router an IP address.
So we're gonna give it
IP address 10.0.0.1,
and no shut the interface.
And then the next step
is creating a DHCP pool.
Which I want to paste in.
All right, so the name
of our DHCP pool is Pool.
This defines the network
that we're gonna be
handing IP addresses out in.
This defines the default router,
which is gonna be the IP
address of that interface on R1.
And here is the public DNS server
that it's gonna use for name resolution.
And so then, the next step is gonna be
getting our second docker
guest here an IP address.
And since this is a blank server,
we're just gonna do the
same thing that we did
with the other docker guest.
We'll uncomment those commands.
Save the configuration.
And we'll stop and restart it.
And open up the console for it.
And this time we can see
that it did obtain an IP address, here.
Ifconfig to verify.
Okay, now we have an IP address.
We can ping the default gateway for this.
Now I'm gonna go back to the router,
and see if we can ping.
All right, so the router can ping 8.8.4.4.
Can our docker guest
that's on the other side
of that router?
No, it cannot.
And the reason for that, is
that the NAT cloud does not
know that this network exists.
That 0/24 network, it
doesn't know that it's there.
If this NAT cloud was
just a normal router,
we could configure routing
between R1 and that device,
but since we can't do
that, we need to use NAT.
And the first step in configuring NAT
is to go back to the router.
And we're gonna define
the outside interface.
Which is gig 0/0.
Right here, and then we define that
as the IP NAT outside interface.
And then we define the inside interface,
which is going to be 0/1.
And then we also need to
put in our NAT statement.
Ip nat inside source list 1,
which means we're gonna
be using access list 1.
And our outside interface is
0/0 and we're gonna overload.
And then lastly, we need
to define our access list.
All right, now if NAT is working,
we should be able to ping that DNS server.
And if we're able to ping our DNS server,
we should also be able
to ping domain names.
Which we're able to do so.
All right, well that concludes this video.
If you found it helpful,
please consider liking and subscribing.
And I'll see you in the next video.
(heavy bass upbeat music)
