1 00:00:00,330 --> 00:00:01,163 ‫So now let's talk 2 00:00:01,163 --> 00:00:02,520 ‫about another routing policy 3 00:00:02,520 --> 00:00:04,230 ‫called the IP-based Routing 4 00:00:04,230 --> 00:00:06,090 ‫which is very intuitive to think about 5 00:00:06,090 --> 00:00:08,400 ‫because you're going to define the routing based 6 00:00:08,400 --> 00:00:10,500 ‫on the client IP addresses. 7 00:00:10,500 --> 00:00:13,620 ‫In Route 53, you're going to define a list of CIDRs, 8 00:00:13,620 --> 00:00:15,810 ‫they are IP ranges for your clients, 9 00:00:15,810 --> 00:00:18,510 ‫and you're going to say, based on the CIDR 10 00:00:18,510 --> 00:00:21,810 ‫which location the traffic should be sent to. 11 00:00:21,810 --> 00:00:23,820 ‫So the use cases will be to optimize performance 12 00:00:23,820 --> 00:00:25,530 ‫because you know the IP ahead of time 13 00:00:25,530 --> 00:00:26,760 ‫or to reduce network costs 14 00:00:26,760 --> 00:00:29,490 ‫because you know where the IPs are coming from. 15 00:00:29,490 --> 00:00:31,350 ‫So an example is that if you know 16 00:00:31,350 --> 00:00:33,780 ‫that you have a specific internet provider 17 00:00:33,780 --> 00:00:37,380 ‫and they are using a specific CIDR of IP addresses 18 00:00:37,380 --> 00:00:38,213 ‫you can route them 19 00:00:38,213 --> 00:00:41,160 ‫to a specific endpoint thanks to this strategy. 20 00:00:41,160 --> 00:00:42,330 ‫So let's go for an example. 21 00:00:42,330 --> 00:00:46,020 ‫In Route 53, I'm going to define two locations 22 00:00:46,020 --> 00:00:47,940 ‫with two different CIDR blocks. 23 00:00:47,940 --> 00:00:49,980 ‫As you can see, one start with 203 24 00:00:49,980 --> 00:00:54,240 ‫and the other one start with 200 and the defined IP ranges. 25 00:00:54,240 --> 00:00:56,520 ‫Now we are going to link these locations 26 00:00:56,520 --> 00:00:57,630 ‫to a specific record. 27 00:00:57,630 --> 00:01:00,930 ‫So for example.com we're going to have location one. 28 00:01:00,930 --> 00:01:03,150 ‫So the first CIDR block to send 29 00:01:03,150 --> 00:01:05,100 ‫to the value 1.2.3.4, 30 00:01:05,100 --> 00:01:08,730 ‫and the second location, the CIDR block number two, 31 00:01:08,730 --> 00:01:10,440 ‫to send it to 5.6.7.8. 32 00:01:10,440 --> 00:01:14,700 ‫And these represents the public IP of two EC2 instances. 33 00:01:14,700 --> 00:01:16,950 ‫Now, as you would expect, if a user comes in 34 00:01:16,950 --> 00:01:19,260 ‫with a specific IP that is part 35 00:01:19,260 --> 00:01:22,170 ‫of the location one CIDR block, they will be directed 36 00:01:22,170 --> 00:01:26,250 ‫to the first EC2 instance of IP 1.2.3.4, 37 00:01:26,250 --> 00:01:29,040 ‫and the user B, with a second IP address 38 00:01:29,040 --> 00:01:31,230 ‫that belongs to the location two, 39 00:01:31,230 --> 00:01:35,250 ‫will be redirected and will have a DNS query response 40 00:01:35,250 --> 00:01:39,720 ‫to the EC2 instance of IP 5.6.7.8. 41 00:01:39,720 --> 00:01:41,310 ‫And that's it for IP based routing. 42 00:01:41,310 --> 00:01:43,770 ‫It's very simple and I hope you liked it. 43 00:01:43,770 --> 00:01:45,543 ‫I will see you in the next lecture.