WEBVTT

00:00:00.240 --> 00:00:05.680
So let's begin by talking about DNA Center. So what is DNA Center? We've mentioned it a lot

00:00:05.680 --> 00:00:12.560
of times already. It's our centralized management solution for building and operating a fabric. So

00:00:12.560 --> 00:00:19.200
this goes really well with the SD access solution, DNA Center. Now you can use DNA Center without an

00:00:19.200 --> 00:00:25.840
SD access solution. So many Cisco devices you can control, manage, monitor, maintain

00:00:25.840 --> 00:00:34.640
using Cisco DNA Center. So you don't have to set up an SD access solution to use DNA Center.

00:00:34.640 --> 00:00:41.280
And it's really nice that Cisco gives us the opportunity to use devices either with or

00:00:41.280 --> 00:00:47.600
without DNA Center. And so even modern equipment you can buy and it's just an upgrade of the

00:00:47.600 --> 00:00:51.920
operating system or turning on this feature or that feature with licensing that would then give

00:00:51.920 --> 00:00:57.360
you the ability to use DNA Center with it or not. So that's really good. But it's a controller-based

00:00:57.360 --> 00:01:00.800
solution. So anytime you're asked what is a controller-based solution for managing your

00:01:00.800 --> 00:01:05.840
network or for automation or for policy enforcement or for assurance or for integration, I want you

00:01:05.840 --> 00:01:10.720
to pick Cisco DNA Center as your answer. So responsible for forwarding, configuration,

00:01:10.720 --> 00:01:15.760
policy distribution, device management, analytics, any of those buzzwords you see on a certification

00:01:15.760 --> 00:01:20.080
exam and are talking about centralized management of your networking equipment, then I want you to

00:01:20.080 --> 00:01:23.920
pick DNA Center. So when you think about our traditional networks, especially what we were

00:01:23.920 --> 00:01:32.160
doing last week, last week, we were configuring ASW1, DSW1, ASW2, DSW2, R1, R2, branch, right?

00:01:32.160 --> 00:01:38.400
All of these routers individually. We had to do each and every single one individually. So when

00:01:38.400 --> 00:01:44.880
you look at the traditional network, what do we have? We have a physical, we have a control plane,

00:01:44.880 --> 00:01:49.920
a data plane, a management plane on every single one of these devices. We have the brain, the

00:01:49.920 --> 00:01:55.680
power, and the management side of things on all of them. So even down here, you can see this would

00:01:55.680 --> 00:02:02.960
be a standalone solution, standalone solution, whereby we have to manage every single access

00:02:02.960 --> 00:02:07.680
point individually, right? So already we have solutions here that gives us a controller-based

00:02:07.680 --> 00:02:12.160
solutions for those. But what about all this stuff, right? We want a controller-based solution

00:02:12.160 --> 00:02:17.280
for that as well. So the new network is about doing what? It's about separating the control

00:02:17.280 --> 00:02:21.360
plane from the data plane. So instead of having a control and data, control and data, control and

00:02:21.360 --> 00:02:25.200
data, control and data, control and data, control and data, right? And even management, management,

00:02:25.200 --> 00:02:28.560
management, management, management, management, management, right? What do we want to have

00:02:28.560 --> 00:02:34.160
instead? We want to centralize the control plane, the brains, the management, all of that stuff.

00:02:34.160 --> 00:02:41.520
And that's what Cisco DNA Center gives us, right? So traditional network, new network,

00:02:41.520 --> 00:02:49.760
traditional network, new network. So that's what it's all about. It's really what it's all about.

00:02:50.960 --> 00:02:55.520
Controller makes the decisions. So Cisco DNA, so now we can log into our controller,

00:02:55.520 --> 00:02:59.200
and we can go ahead and do the configuration changes we need. We can have our devices talking

00:02:59.200 --> 00:03:03.280
to the controller, so it can be updated with whatever else, whatever they see on the network.

00:03:03.280 --> 00:03:06.880
And then we can get notified about it, or even the controller can be set up to make adjustments

00:03:06.880 --> 00:03:22.000
on the fly as it needs to. So the controller can tell our data plane devices what to do.

00:03:24.560 --> 00:03:30.880
We can centralize policy, centralize control, manage multiple devices at the same time

00:03:30.880 --> 00:03:34.880
as a single entity. Can we upgrade our devices all at the same time?

00:03:36.400 --> 00:03:41.120
Especially if they, you know, have a single operating system here, meaning upload the

00:03:41.120 --> 00:03:44.800
operating system that needs to be sent, and then any devices that are going to use that operating

00:03:44.800 --> 00:03:49.440
system, click, click, click, click, click, boom, boom, boom, they can all get updated for us

00:03:49.440 --> 00:03:56.720
as an example, right? So our entire network can be modified, and our policies can be adjusted,

00:03:56.720 --> 00:04:00.320
and everything can be provisioned as we need to using essentially clicks of buttons.

00:04:07.600 --> 00:04:12.640
A true, true, true, true, true software-defined networking solution, folks,

00:04:13.360 --> 00:04:22.400
with a centralized controller is going to have routers and switches that have

00:04:23.280 --> 00:04:30.480
no ability to make decisions on their own. They are simply going to be forwarding devices,

00:04:30.480 --> 00:04:38.560
essentially interfaces that can access tables to forward. So how do those tables

00:04:39.280 --> 00:04:43.280
get populated? The tables get populated based on the controller.

00:04:44.080 --> 00:04:50.640
So all that means is that these would need RAM and a processor, interfaces,

00:04:51.600 --> 00:04:59.440
so not a whole lot going into them. They need the power to move packets, move frames,

00:05:00.160 --> 00:05:04.080
and store tables. They don't have to make any decisions on their own except for, oh,

00:05:04.080 --> 00:05:07.760
it came in this interface based on this table, send it out that interface. So that would be a

00:05:07.760 --> 00:05:12.320
true software-defined networking solution, folks. So that's what we're going to be talking about

00:05:12.320 --> 00:05:16.880
software-defined networking device. And then all the power and brains and management would all be

00:05:16.880 --> 00:05:24.080
done from here. But Cisco doesn't really believe in that. Cisco still believes in having some brains

00:05:24.080 --> 00:05:29.520
here, having some management here as well. One, it's so that way there you can have a hybrid

00:05:29.520 --> 00:05:33.920
solution if you need it. Two, it's so that way there if anything really happens with the controller

00:05:33.920 --> 00:05:37.520
solution you have, you can still log into your devices and do what you need to do.

00:05:37.520 --> 00:05:44.240
You get a lot more flexibility, better scalability. So Cisco's software-defined

00:05:44.240 --> 00:05:50.560
networking solution that you see here is not a true, true, true software-defined networking

00:05:50.560 --> 00:05:56.880
solution because it's more of a hybrid approach where you still have brains in all of your

00:05:56.880 --> 00:06:03.360
devices as well. And that's why Cisco products are expensive. That's why Cisco products are

00:06:03.440 --> 00:06:06.560
some of the top-end products that are in the market because

00:06:07.680 --> 00:06:11.440
you'll find products out there that are very, very cheap for SD

00:06:14.640 --> 00:06:22.160
software-defined networking solutions. But you got to realize that they are just there to do that one

00:06:22.160 --> 00:06:26.000
thing. And so they have tables that are designed just for forwarding and they get it from the

00:06:26.000 --> 00:06:31.040
controller. Whereas Cisco devices, you got flexibility and you got a lot of different

00:06:31.200 --> 00:06:33.760
and you got a lot of different options at your disposal.

00:06:35.520 --> 00:06:40.320
So it's hard to compare one company to another company, one product to another product when it

00:06:40.320 --> 00:06:48.560
comes to that. One thing that's great about Cisco though in this case is that it is a more open

00:06:48.560 --> 00:06:53.600
solution than previous solutions they've had. Meaning that DNA Center will work with other

00:06:53.600 --> 00:07:01.120
vendors' products. Absolutely. Yep. So that's a wonderful thing. Now some of the principles,

00:07:01.120 --> 00:07:06.560
so keywords, buzzwords, in case you take the exam. When they talk about policy or security

00:07:06.560 --> 00:07:11.920
or automation or analytics, it's an open platform, as I said, cloud and non-cloud solutions,

00:07:11.920 --> 00:07:18.800
physical and virtual. Look at the scenario as a whole. And if they're talking about centralized

00:07:18.800 --> 00:07:24.240
management of any of this stuff, just pick Cisco DNA Center as your answer. It's your best bet.

00:07:25.920 --> 00:07:30.480
Benefits, agility and scale, reduction in risk, improve user experience,

00:07:30.480 --> 00:07:36.240
investment protection. Geez, this sounds like a marketing video from Cisco. But down here,

00:07:36.240 --> 00:07:42.400
this is amazing. This is true ease of updates. Because you can do partial updates, full updates

00:07:43.120 --> 00:07:49.280
for applications and systems. And you can perform these updates from a centralized location.

00:07:49.280 --> 00:07:53.040
So no longer do you have to go to device to device to device to device to do your updates.

00:07:53.040 --> 00:07:58.800
You can do it all from the centralized location. So how is communication happening though in this

00:07:58.800 --> 00:08:04.000
part? How do we communicate? For example, if I make a change on the controller,

00:08:04.000 --> 00:08:08.480
how is that updated on all the devices? Well, we're using what are called APIs.

00:08:09.040 --> 00:08:14.800
So what is an API? API is how software talks to other software. And if you're a developer,

00:08:14.800 --> 00:08:17.760
you know what an API is. If you're not a developer, you may not know what an API is.

00:08:18.720 --> 00:08:25.200
That's okay. But you'll know after today what an API is if you don't. So think about this for a

00:08:25.200 --> 00:08:28.480
second. If you want to talk to your computer, how do you talk to your computer, folks?

00:08:29.120 --> 00:08:32.320
You talk to your computer with a keyboard, right? So that's an API.

00:08:32.560 --> 00:08:37.200
It's an API. The API stands for Application Programming Interface. But in reality,

00:08:37.760 --> 00:08:41.840
how are you communicating with a computer? You're communicating with a keyboard. That's your API,

00:08:41.840 --> 00:08:46.560
essentially. And how does the computer talk to you? The computer talks to you with a monitor.

00:08:48.480 --> 00:08:53.600
So there's another example of an API in this type of scenario. But do we need keyboards and monitors

00:08:53.600 --> 00:08:59.600
when one computer is trying to talk to another computer? No. No, we don't. We don't. We don't

00:08:59.600 --> 00:09:07.120
talk to another computer. No. No, we don't. In this case, we have what? We have APIs, right?

00:09:07.120 --> 00:09:11.360
So this is more like human management interfaces. But I'm trying to just give you that visual

00:09:11.360 --> 00:09:18.480
representation. What is an API? A way to talk. A way to talk. So when you have your controller

00:09:18.480 --> 00:09:25.760
needing to talk to the device, we can use these APIs, Application Programming Interfaces, to do

00:09:25.760 --> 00:09:31.200
that. All right. And we'll see some examples here shortly. But you can also think of it this way.

00:09:32.160 --> 00:09:35.600
When you go to your favorite restaurant, folks. So right now, everybody chat in your favorite

00:09:35.600 --> 00:09:39.280
restaurant. Right now. Chat it in. Quick, quick, quick. Whatever it is. It doesn't matter. It can

00:09:39.280 --> 00:09:43.760
be McDonald's if you want it to be today. I'm okay with that. Maybe it's A&amp;W. When's the last

00:09:43.760 --> 00:09:49.680
time you went to A&amp;W? Or maybe it's something I've never heard of because we don't have it here.

00:09:50.560 --> 00:09:57.680
All right. Excellent. So whether it's the steakhouse, or whether it's IHOP,

00:09:58.320 --> 00:10:07.760
or whether it's A&amp;W, or McDonald's, or whatever. Do you get to talk directly to the kitchen?

00:10:08.080 --> 00:10:12.560
There's you. There's the kitchen.

00:10:17.680 --> 00:10:25.840
You need an API. Who's your API? Who's your API?

00:10:26.480 --> 00:10:43.920
It could be a waiter. It could be a waitress. In a lot of places nowadays, there's a digital kiosk

00:10:44.800 --> 00:10:47.600
where you can go up to the kiosk, put in your order,

00:10:48.240 --> 00:10:52.400
tap your credit card, move on. It could have been your phone. You could have done a mobile order.

00:10:53.360 --> 00:11:00.800
Whatever it is, that's the API as an example. So just so you get a better idea of the API,

00:11:00.800 --> 00:11:06.480
it's how you're going to talk to the back end. Front end, back end. Front end, back end.

00:11:07.040 --> 00:11:13.760
How do you talk? You need an API. So we have what are called self-bound APIs

00:11:13.760 --> 00:11:19.840
when we're dealing with DNA Center. And so the self-bound APIs are how we're going to talk

00:11:20.640 --> 00:11:27.760
between the controller and the nodes. Doesn't matter whether it's controller to the node or

00:11:27.760 --> 00:11:34.000
node to the controller. We're talking about self-bound APIs here. And so here's some examples

00:11:34.000 --> 00:11:41.760
of self-bound APIs. OpenFlow, NetConf, OpFlex, SNMP. That's right. SNMP can be used from here

00:11:41.760 --> 00:11:48.240
to here if we want to. The command line interface. You have an option in DNA Center to connect to the

00:11:48.240 --> 00:11:54.720
command line interface. So that would actually be your self-bound API in that case. FTPS, FTP,

00:11:54.720 --> 00:11:58.800
Telnet, SSH, Resconf. We're going to talk a little bit more about this later because you'll get

00:11:58.800 --> 00:12:01.200
tested on it. And we'll talk a little bit more about this later because you're going to get

00:12:01.200 --> 00:12:07.920
tested on it. But those are examples of self-bound APIs. It's how the controller and the network

00:12:07.920 --> 00:12:13.520
devices talk to each other. But we also have to remember that we might have an application

00:12:13.680 --> 00:12:19.280
that can talk to the controller. So for example, when you think about this application here,

00:12:20.240 --> 00:12:24.960
what might that be? It might be your web browser, your web site, your web interface

00:12:25.760 --> 00:12:30.480
talking to the controller. So how do we talk there? Well, that's northbound APIs.

00:12:31.120 --> 00:12:36.720
So between the controller and whatever apps you have, it could be custom apps, it could be

00:12:36.720 --> 00:12:42.320
whatever it is. There's a lot of customization here. You can build your own application

00:12:43.120 --> 00:12:48.080
applications that can talk to DNA Center. So that's what we call northbound APIs.

00:12:48.720 --> 00:12:52.720
Communication between the application and the controller. So here's some examples of what you

00:12:52.720 --> 00:12:58.080
could use to communicate between an application and the controller. This is very, very, very common,

00:12:58.080 --> 00:13:05.840
REST APIs, REST APIs. Let me say that one more time and start again, REST APIs for northbound APIs

00:13:06.160 --> 00:13:12.160
between the application and the controller using what? Verbs. More on this later. Verbs.

00:13:14.560 --> 00:13:20.560
It's the way we communicate on the internet. Verbs with a lot of REST APIs today. We got XML,

00:13:21.280 --> 00:13:26.640
SNMP, Syslog, LDAP, Redis. There's just many different things. For example, we could have a

00:13:26.640 --> 00:13:32.800
Syslog message that we use to talk. But the key here is REST APIs. It's a big one. It's the

00:13:32.800 --> 00:13:39.920
big one. Not the only one though. So typically in a properly deployed environment where you're

00:13:39.920 --> 00:13:43.680
using the best of the best of the best option, it would be REST APIs for northbound,

00:13:44.480 --> 00:13:50.400
and it would be Netconf or RESTconf for southbound, even though there's a boatload of other options.

00:13:53.440 --> 00:14:01.360
Those are what are supposed to be used to communicate between the application and the

00:14:02.160 --> 00:14:09.760
supposed to be used based on the standard as the true, true options for software-defined networking.

00:14:10.960 --> 00:14:14.960
All right. So speaking of REST APIs, let's talk about those a bit too. We're going to get tested

00:14:14.960 --> 00:14:23.280
on them. So what is a REST API? So we're dealing here with a URL. That's what we're dealing with.

00:14:24.240 --> 00:14:33.760
See this URL? What I want you to realize is that there are so many things today that are out there

00:14:33.760 --> 00:14:42.400
on the internet, and how are they identified? They're identified by a URL. So you call that URL.

00:14:44.160 --> 00:14:53.040
And so this is also now how we can call aspects of our networking devices as well.

00:14:54.160 --> 00:15:00.400
What do I mean by that? Well, we will look a little bit deeper later on at RESTconf and the

00:15:00.400 --> 00:15:08.800
concept of a URL for it, but you'll notice here there are different options. And based on these

00:15:08.800 --> 00:15:14.720
different options and how you populate it, you could actually be pointing to a very specific

00:15:15.200 --> 00:15:28.960
thing on your router, a statistic of your router, the CPU utilization of your router,

00:15:30.000 --> 00:15:35.680
the interface state of your router. So yes, in modern networking equipment,

00:15:37.600 --> 00:15:43.600
every single thing about your router, your switch, your firewall, your access point,

00:15:43.600 --> 00:15:51.840
your controllers, your wireless, all of that, every tiny thing has the potential to have an

00:15:51.840 --> 00:16:04.240
API associated with it, meaning that everything has its own URL. But before we get into that,

00:16:04.240 --> 00:16:12.560
we'll get back to that later. The most popular way of doing this is with REST APIs, RESTful APIs.

00:16:13.840 --> 00:16:24.800
And RESTful APIs use verbs. So when we are on the internet and you are trying to get a web page,

00:16:25.760 --> 00:16:33.280
right, the HTTP verb is get. You want to create something, post. You want to update something,

00:16:33.280 --> 00:16:38.720
put. You want to delete something, delete. Okay, that's what REST APIs use. Same thing.

00:16:39.120 --> 00:16:44.160
So you want to retrieve all action movies from a movie database, get. Blah, blah, blah, blah,

00:16:44.160 --> 00:16:48.560
blah, blah, blah, blah. You want to create a new movie entry in the movie database,

00:16:48.560 --> 00:16:53.680
post. Blah, blah, blah, blah, blah, blah, blah, blah. So that gets filled in. So you're going to

00:16:53.680 --> 00:16:57.840
say, how does that get filled in? Well, whoever created the application, when you fill in all the

00:16:57.840 --> 00:17:06.880
fields, then those fields can populate the API. And then when you click submit,

00:17:07.440 --> 00:17:11.040
when you click submit, that invokes post that.

00:17:13.040 --> 00:17:16.640
So there's got to be coding behind the scenes here. It just doesn't happen magically.

00:17:19.600 --> 00:17:22.080
No Harry Potter wand being waved here.

00:17:25.920 --> 00:17:30.960
Would it be important for you to kind of remember get, post, put, delete? It might help. It might.

00:17:37.840 --> 00:17:44.640
So let's look at DNA Center here, a screenshot of DNA Center. You'll see things like get, post,

00:17:44.640 --> 00:17:49.520
delete in various aspects of DNA Center. Now you're going to have to know how to use DNA

00:17:49.520 --> 00:17:58.640
Center for this exam. Not last time I checked. But understanding that REST APIs, northbound

00:17:58.640 --> 00:18:02.880
communication, get, post, put, delete, and other verbs come into play.

00:18:06.880 --> 00:18:12.400
So if we dig a little bit deeper here, you'll see here that we have this very specific API.

00:18:12.400 --> 00:18:20.640
Here it is. Let me zoom in. Right there. HTTPS colon forward slash, forward slash,

00:18:20.640 --> 00:18:27.280
the IP address of this specific DNA Center, and then other values, DNA intent, API version one,

00:18:27.280 --> 00:18:35.840
network device. So what happens if I use this particular get? So use the get method, the get

00:18:35.840 --> 00:18:50.880
verb, with that particular URL. It says, returns a list of network devices based on filter criteria

00:18:50.880 --> 00:18:54.800
such as management IP address, MAC address, host name, location name, and a wide variety of

00:18:54.800 --> 00:19:01.040
additional criteria. You can also use the asterisks in any value to conduct a wildcard search. So it's

00:19:01.040 --> 00:19:10.560
even customizable. But if I went ahead and use this however I want to use it by executing this

00:19:10.560 --> 00:19:16.720
get, then I'm going to get that particular result. All right. So there's the parameters we can use,

00:19:16.720 --> 00:19:20.400
just host name, management IP address, MAC address, location name. So it's very specific

00:19:20.400 --> 00:19:25.040
in this case what this one's particularly going to do. All right. So for example, if we go

00:19:25.040 --> 00:19:31.040
out to my live environment, I'm going to go to Postman right now. So Postman is a tool that I

00:19:31.040 --> 00:19:38.800
can use to create, test, work with APIs, REST APIs. So right now, I have some examples here. So

00:19:38.800 --> 00:19:45.440
right now, I have this get one right here. So it says, HTTPS colon forward slash, forward slash,

00:19:45.440 --> 00:19:50.480
sandbox dash iOS XE blah, blah, blah, blah, blah, blah, blah, blah, blah. And then it says

00:19:50.480 --> 00:19:57.360
interfaces. So the point of this particular REST API is to get me all of the interfaces that are on

00:19:57.360 --> 00:20:05.600
this particular device. So get me all of the interfaces and specifically any information

00:20:05.600 --> 00:20:10.800
that corresponds with this particular data model. So we're going to talk about data models later

00:20:10.800 --> 00:20:17.120
because that's part of the exam. So if I click Send, you'll see here now I can see that I have

00:20:17.120 --> 00:20:21.040
gigabit ethernet one. It's a management interface. Don't touch me. So description.

00:20:21.040 --> 00:20:27.120
It is an ethernet interface. It's enabled right now. There's its IP address. There's its subnet

00:20:27.120 --> 00:20:31.440
mask. And then we have gigabit number two. And its description is network interface.

00:20:31.440 --> 00:20:37.440
It's an ethernet interface. It is disabled right now. No IP address, no subnet mask.

00:20:37.440 --> 00:20:41.840
Okay. Likewise, gigabit ethernet three. Somebody created a virtual port group on this particular

00:20:41.840 --> 00:20:47.840
device with an IP address of 1.1 slash 24 subnet mask. It is enabled right now. And the type of

00:20:47.840 --> 00:20:56.560
interface is a virtual interface. So as you can see, this particular REST API accomplished this

00:20:56.560 --> 00:21:05.280
objective. This particular REST API accomplished this objective.

00:21:06.080 --> 00:21:27.840
So what I'm going to do here is I'm going to grab – so I can show you this password. It's no big deal

00:21:27.840 --> 00:21:39.920
because this is a public device out on the internet that Cisco has that people can play

00:21:39.920 --> 00:21:44.560
around with. Okay. So here it is. Okay. Let me type in show IP interface brief.

00:21:46.960 --> 00:21:49.920
Okay. There they are. Those are the interfaces we just looked at.

00:21:50.240 --> 00:21:59.280
So when you think about it, right, this right here does something very specific. This particular

00:21:59.280 --> 00:22:06.000
API does something very, very specific. And it gets me information like this. Whereas this

00:22:06.000 --> 00:22:18.800
particular command gets me this information. Show IP interface gigabit one would get me

00:22:19.040 --> 00:22:27.520
would get me this information. Show interface gig one would get me this information.

00:22:28.160 --> 00:22:39.200
So notice here that in this case, it says up up right here. Well, that is defined here as

00:22:39.280 --> 00:22:48.000
enabled true. Look at the description. The description is where? The description is

00:22:50.480 --> 00:22:56.240
right here. So the COI displays information this way.

00:22:58.560 --> 00:23:06.160
In this case, this particular REST API gives me this information. So somebody at some point in

00:23:06.160 --> 00:23:12.080
time or something or some groups, some standardized body had to say, hey, if you do this,

00:23:13.280 --> 00:23:17.840
then you return this. If you do this, then you return this. If you do this,

00:23:17.840 --> 00:23:20.480
and we're going to talk about that later on, we're going to come back to that.

00:23:21.520 --> 00:23:25.600
Just like whoever coded the Cisco CLI says if you type in this command,

00:23:25.600 --> 00:23:27.200
this is what you get as a result.

00:23:27.200 --> 00:23:44.560
So when we are dealing with REST APIs, what exactly are we truly dealing with in this case?

00:23:44.640 --> 00:23:57.920
HTTP messages. So I'm sending HTTP messages in this case. And so when it comes to HTTP messages,

00:23:59.920 --> 00:24:10.800
we have in those messages a start line, which tells us what's happening. Is it a get, a post,

00:24:11.680 --> 00:24:17.120
what's happening? Is it a get, a post, a put, and the version of HTTP that's being used?

00:24:18.320 --> 00:24:24.880
We have headers. They can be general headers, request headers, response headers, entity headers.

00:24:25.600 --> 00:24:36.080
For example, content type. The content is JSON data, JSON information, as an example.

00:24:36.960 --> 00:24:43.440
Data, Tuesday, whatever, whatever, whatever. We have an empty line, and then we have our body.

00:24:43.440 --> 00:24:48.960
So what do we have? We have a start line, headers, empty line, body. Start line, headers,

00:24:48.960 --> 00:24:57.040
empty line, body. And the body could be HTML, it could be XML. But when it comes to our headers,

00:24:58.800 --> 00:25:02.800
the headers, you're going to have content type headers, accept headers, authorize headers,

00:25:03.040 --> 00:25:06.080
accept headers, authorize headers, date headers, and more, more.

00:25:07.920 --> 00:25:12.400
And so when it comes to the content type, it's about specifying the format of the data in the

00:25:12.400 --> 00:25:21.200
body. Accept headers specifies the request format for any return data. So if I send you an HTTP

00:25:21.200 --> 00:25:27.520
message, and I have an accept header in it, I would be saying, hey, send me back the data in

00:25:27.520 --> 00:25:33.600
this format. And if I'm sending it to you in a certain format, then the content type header tells

00:25:33.600 --> 00:25:39.360
you how I'm sending it to you. We can have authorization in there. So credentials to

00:25:39.360 --> 00:25:43.840
authorize who can use it. So you're going to have the right credentials, and you cannot execute that

00:25:43.840 --> 00:25:50.000
particular API. So for example, over here, under headers, you'll see there's a content type header

00:25:50.000 --> 00:25:58.080
here for application Yang data JSON. And then under authorization, we have basic auth that is

00:25:58.080 --> 00:26:05.040
happening with this username and password. So this authorization header, this authorization

00:26:05.040 --> 00:26:08.880
is going to be part of the headers, this headers, these headers are going to be part of the headers.

00:26:08.880 --> 00:26:11.760
And we're going to be sending that over with any information that's in the body.

00:26:12.480 --> 00:26:17.120
So in my case, my body would be empty. And what's returned to me is what's in the body,

00:26:17.120 --> 00:26:21.360
because I'm just requesting give me everything that this is supposed to give me.

00:26:22.240 --> 00:26:25.680
All right, so the idea here is to recognize that you are going to have

00:26:27.040 --> 00:26:32.480
these different fields in your HTTP header, and you're going to have this

00:26:37.040 --> 00:26:41.760
section. So you're going to have your different fields in your HTTP message,

00:26:41.760 --> 00:26:46.000
and then you're going to have a header section that can have content type in it, accept, authorize,

00:26:47.280 --> 00:26:58.880
dates, and others. And so it's important that we secure our HTTP REST APIs. And so

00:27:00.000 --> 00:27:04.880
typically, you're going to use HTTPS, that's how you secure, that's how you encrypt.

00:27:06.240 --> 00:27:11.760
So if you're using HTTP, then it's not encrypted, you want to use HTTPS. And since you're using

00:27:11.760 --> 00:27:18.960
HTTPS, you're using SSL slash TLS. Really, today, it's just TLS. But back in the day,

00:27:18.960 --> 00:27:22.080
it was called SSL. And so most of the time when you're teaching or talking about it,

00:27:22.080 --> 00:27:26.720
you say SSL TLS. So that way there, anybody who doesn't know it's called TLS still recognizes,

00:27:26.720 --> 00:27:35.360
oh, we're talking about SSL here. So if you're using HTTP, it's not encrypted using HTTPS,

00:27:35.360 --> 00:27:39.040
it's encrypted with SSL TLS. And then as I mentioned earlier, you can also do authentication.

00:27:39.920 --> 00:27:44.880
So there's many different types of authentication. So none, basic HTTP, token, OAuth, and a whole

00:27:44.880 --> 00:27:51.920
lot more. But if you look at it, none means what? It's public. Meaning that if I did not

00:27:51.920 --> 00:27:57.760
require authentication, anybody could use this and get that information. If I use basic, it means

00:27:57.760 --> 00:28:03.120
only those that know the username and password can use that and get the information. So you can

00:28:03.120 --> 00:28:07.600
make the call all you want. You can call, call, call, call, call, call, call. But if you don't

00:28:07.600 --> 00:28:12.640
have the right username and password, you'll never get a response. You have the right username

00:28:12.640 --> 00:28:17.520
and password, you'll get a response. So this is something that's static, which means you have to

00:28:17.520 --> 00:28:22.240
share with whoever needs that. So then that's not a really good production solution. Okay,

00:28:22.240 --> 00:28:26.560
what about a token? A token is a static secret generated and retrieved from the API developer

00:28:26.560 --> 00:28:31.440
portal. Okay, so this, right, is not all that great either in production environments because

00:28:31.440 --> 00:28:38.400
of the fact that even though it is a secret generated and retrieved from the API developer

00:28:38.400 --> 00:28:42.560
portal, it's still static, meaning it's not changing. So whoever gets their hand on that

00:28:42.560 --> 00:28:50.400
static secret key can use it and get access to the data from that REST API. But the difference

00:28:50.400 --> 00:28:55.360
is it's not a username and password, it is a static secret long key, like an access key,

00:28:55.360 --> 00:29:01.200
an access code, something like that. It could be 37, 38, 100 characters long, you copy and paste it.

00:29:01.200 --> 00:29:06.560
Somebody gets it though, they get access, right? OAuth is a lot better because OAuth is a dynamic

00:29:06.560 --> 00:29:10.720
method of retrieving and using tokens from an identity provider. So you can connect to the

00:29:10.720 --> 00:29:14.240
identity provider, you get the token, you get to use it, but it's a one-time token,

00:29:14.240 --> 00:29:20.320
meaning that every time you do whatever it is you're doing, you reauthenticate and get a new

00:29:20.320 --> 00:29:24.160
token. So if somebody captures your token, they can't use it again, it's a one-time token.

00:29:24.640 --> 00:29:30.400
So that would be a better production solution. Now, because we're using HTTP,

00:29:32.640 --> 00:29:37.680
we're going to be dealing with what type of codes? Oh, the good old HTTP codes here. Which one here,

00:29:37.680 --> 00:29:42.560
folks, is your favorite code? Which one here have you seen like all your life and you used to make

00:29:42.560 --> 00:29:50.320
fun of it 20 years ago? I'm pretty sure we'll all point to this one right here. Even my children,

00:29:51.280 --> 00:29:57.360
my daughter the other day drew a picture with a big cloud on it and a 404 on it.

00:29:58.160 --> 00:30:02.400
I'm like, why? Because it's funny. All right, fine, whatever.

00:30:05.840 --> 00:30:11.040
So 404, but that's all we're dealing with here. So what do I want you to know for the exam?

00:30:11.040 --> 00:30:14.560
I want you to know these because you never know what you could be tested on.

00:30:15.280 --> 00:30:18.800
So you could be tested on something as simple as what does the code 200 mean?

00:30:18.800 --> 00:30:22.160
It means everything's good. It means everything's okay. So look for the option

00:30:22.800 --> 00:30:26.720
that looks as close as possible to everything is awesome. Something like that.

00:30:28.480 --> 00:30:34.240
201, something was created. I can give you two examples of that right now.

00:30:35.360 --> 00:30:38.080
Right here when I executed this one, so let's execute it again.

00:30:40.160 --> 00:30:45.120
Code 200 right there. Everything's good. Everything's good. Okay, let's go ahead and

00:30:45.120 --> 00:30:52.560
create something. So I have a put. So I have a put here for loopback 150. If we look at our body,

00:30:53.360 --> 00:31:00.560
it says here, interface loopback 150 stormwind demo. So when I click send, this information is

00:31:00.560 --> 00:31:08.560
going to get sent to this router, this router right here. So let's type in show IP interface

00:31:08.560 --> 00:31:13.360
brief right now. All right, so the interface is not there. Let's go ahead and do this, send.

00:31:14.320 --> 00:31:21.520
All right, we should see a 201, 201 created, 201 created. So if we go back to the router now,

00:31:24.960 --> 00:31:31.840
there it is. And it's up, up, because I said in the code, make sure it's up. So did I have

00:31:31.840 --> 00:31:34.800
to type all this out? Did I have to know how to format that? Yes, I did.

00:31:36.960 --> 00:31:41.280
But I'm not telling you that in modern networks, you're going to be sitting there writing code

00:31:41.760 --> 00:31:47.280
like this in JSON encoded format. No, no, no, no. Right? Applications that either you,

00:31:47.280 --> 00:31:52.160
somebody custom makes in your organization, or you custom make that you fill in fields. Okay,

00:31:52.160 --> 00:31:55.200
what's the name of the new information? What's this? What's this? What's this? What's this?

00:31:55.200 --> 00:31:59.840
What's this? Is this? You can type it in. And then you click submit. And all of this

00:31:59.840 --> 00:32:02.960
gets formatted properly by the application and get sent.

00:32:05.760 --> 00:32:09.920
So it could be just a web based application. But there's an example of a 201 code.

00:32:12.080 --> 00:32:18.560
Right? Let's say we make a mistake here with authentication. So let me just

00:32:19.680 --> 00:32:28.000
accidentally change the password. So we do that and I click send 401, unauthorized 401

00:32:28.000 --> 00:32:33.600
unauthorized. So let's go back to our page. There's an example of it 401 unauthorized,

00:32:33.600 --> 00:32:40.720
authentication missing, or incorrect. If they can't find the resource, we should get a 404.

00:32:40.720 --> 00:32:48.000
So let me try that one now. So if we say all interfaces, let's go back to this. Let me try

00:32:48.000 --> 00:32:58.080
this. If we take off this, just trying to take off this click send, I should get a 404. Yay,

00:32:58.080 --> 00:33:03.360
there it is. Right resource cannot be found because I didn't type that properly.

00:33:03.680 --> 00:33:12.080
Okay. So just make sure you have a good idea of what these are, because you can be tested either

00:33:12.080 --> 00:33:19.280
on what code are you going to get if authentication is missing? Or what code are you going to get if

00:33:19.280 --> 00:33:24.480
the resource is not found? Or you could be asked, what is the result? Or why did you get a code like

00:33:24.480 --> 00:33:29.920
this? Oh, because resource was not found or Oh, everything was fine. That's why I got 200.

00:33:30.560 --> 00:33:35.040
So it's kind of strange that we have to learn these for an enterprise routing and switching

00:33:35.040 --> 00:33:43.680
exam. But apparently, it's the way of the future. So even in DNA center, you can see here that we

00:33:43.680 --> 00:33:58.880
have different response codes listed in DNA center. So I just my chart had a

00:33:58.880 --> 00:34:07.360
my chart had a few as not all of them to some and you can use my chart for your study purposes.