logo-MindMajix
PostAWSAWS
k
kavya A

Posted on 15th July 2024|14 views

0
votes

Is It Possible To See The Primary CIDR From The Terminal For VPC In AWS?

Can anyone please explain to me this concept in AWS? Thanks In advance. 

1 answers
Answers
P
Aryan Sharma

Posted on 15th July 2024| views

 

A VPC command can be used to view Primary CIDR which goes as follows:

 

aws ec2 describe-vpcs --vpc-id vpc-1a2b3c4d

Your outputs might be similar to this:

 

{

    "Vpcs": [

        {

            "VpcId": "vpc-1a2b3c4d", 

            "InstanceTenancy": "default", 

            "Tags": [

                {

                    "Value": "MyVPC", 

                    "Key": "Name"

                }

            ], 

            "CidrBlockAssociations": [

                {

                    "AssociationId": "vpc-cidr-assoc-3781aa5e", 

                    "CidrBlock": "10.0.0.0/16", 

                    "CidrBlockState": {

                        "State": "associated"

                    }

                }, 

                {

                    "AssociationId": "vpc-cidr-assoc-0280ab6b", 

                    "CidrBlock": "10.2.0.0/16", 

                    "CidrBlockState": {

                        "State": "associated"

                    }

                }

            ], 

            "State": "available", 

            "DhcpOptionsId": "dopt-e0fe0e88", 

            "CidrBlock": "10.0.0.0/16", 

            "IsDefault": false

        }

    ]

}

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number