EMAIL SUPPORT

dclessons@dclessons.com

LOCATION

NZ

LAB Configuring Network Load Balancers

LAB Configuring Network Load Balancers

Posted on Jan 17, 2020 (0)

LAB Configuring Network Load Balancers

To create your first Network Load Balancer, complete the following steps.

Tasks

  • Before You Begin
  • Step 1: Choose a Load Balancer Type
  • Step 2: Configure Your Load Balancer and Listener
  • Step 3: Configure Your Target Group
  • Step 4: Register Targets with Your Target Group
  • Step 5: Create and Test Your Load Balancer
  • Step 6: Delete Your Load Balancer (Optional)

Before You Begin

  • Decide which Availability Zones you will use for your EC2 instances. Configure your virtual private cloud (VPC) with at least one public subnet in each of these Availability Zones. These public subnets are used to configure the load balancer. You can launch your EC2 instances in other subnets of these Availability Zones instead. Here we have used the Availability zone : us-east-2c with public subnet 10.0.0.0/24 which is used in configuration on last lab .
  • Launch at least one EC2 instance in each Availability Zone. Ensure that the security groups for these instances allow TCP access from clients on the listener port and health check requests from your VPC. We have launched one EC2 instance in VPC dclessons-vpc. And all TCP port from outside to inside.

Step 1: Choose a Load Balancer Type

Elastic Load Balancing supports three types of load balancers. For this tutorial, you create a Network Load Balancer.

To create a Network Load Balancer

  • Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  • On the navigation bar, choose a region for your load balancer. Be sure to choose the same region that you used for your EC2 instances.
  • In the navigation pane, under LOAD BALANCING, choose Load Balancers.
  • Choose Create Load Balancer.

  • For Network Load Balancer, choose Create.

Step 2: Configure Your Load Balancer and Listener

On the Configure Load Balancer page, complete the following procedure.

To configure your load balancer and listener

  • For Name, type a name for your load balancer.
  • The name of your Network Load Balancer must be unique within your set of Application Load Balancers and Network Load Balancers for the region, can have a maximum of 32 characters, can contain only alphanumeric characters and hyphens, must not begin or end with a hyphen, and must not begin with "internal-".
  • For Scheme, keep the default value, internet-facing.
  • For Listeners, keep the default, which is a listener that accepts TCP traffic on port 80.
  • For Availability Zones, select the VPC that you used for your EC2 instances. For each Availability Zone that you used to launch your EC2 instances, select the Availability Zone and then select the public subnet for that Availability Zone.
  • When you create an internet-facing load balancer, you can optionally select an Elastic IP address from Elastic IP. This provides your load balancer node with a static IPv4 address.
  • Choose Next: Configure Routing.

 

 

Step 3: Configure Your Target Group

Create a target group, which is used in request routing. The rule for your listener routes requests to the registered targets in this target group. The load balancer checks the health of targets in this target group using the health check settings defined for the target group. On the Configure Routing page, complete the following procedure.

To configure your target group

  • For Target group, keep the default, New target group.
  • For Name, type a name for the new target group.
  • Keep Protocol as TCP, Port as 80, and Target type as instance.
  • For Health checks, keep the default protocol.
  • Choose Next: Register Targets.

Step 4: Register Targets with Your Target Group

On the Register Targets page, complete the following procedure.

To register targets with the target group

  • For Instances, select one or more instances.
  • Keep the default port, 80 and choose Add to registered.
  • When you have finished selecting instances, choose Next: Review.

Step 5: Create and Test Your Load Balancer

Before creating the load balancer, review your settings. After creating the load balancer, verify that it's sending traffic to your EC2 instances.

To create and test your load balancer

  • On the Review page, choose Create.
  • After you are notified that your load balancer was created successfully, choose Close.
  • In the navigation pane, under LOAD BALANCING, choose Target Groups.
  • Select the newly created target group.
  • Choose Targets and verify that your instances are ready. If the status of an instance is initial, it's probably because the instance is still in the process of being registered, or it has not passed the minimum number of health checks to be considered healthy. After the status of at least one instance is healthy, you can test your load balancer.
  • In the navigation pane, under LOAD BALANCING, choose Load Balancers.
  • Select the newly created load balancer.
  • Choose Description and copy the DNS name of the load balancer (for example, my-load-balancer-1234567890.us-west-2.elb.amazonaws.com). Paste the DNS name into the address field of an internet-connected web browser. If everything is working, the browser displays the default page of your server.

Or if you are not able to check with port 80 then, login to server and follow the steps:

  • RDP to server and from the Start menu, click Control Panel, click System and Security, and then click Windows Firewall. ...
  • Click Advanced Settings.
  • Click Inbound Rules.
  • Click New Rule in the Actions window.
  • Click Rule Type of Port.
  • Click Next.
  • On the Protocol and Ports page click TCP.( Allow all ports )
  • Choose next and enable.

Now to test, go to your laptop to check if your LB created is working on port 80, or 22. Open the CMD and telnet to LB DNS  on port 80 , you will see that connection will be established.

 

 


Comment

    You are will be the first.

LEAVE A COMMENT

Please login here to comment.