- A
Advertise a more specific prefix over Direct Connect and a less specific prefix over VPN.
BGP always prefers the most specific prefix (longest match). This ensures Direct Connect is used when available.
- B
Use static routes pointing to the Direct Connect virtual interface with a lower metric than the VPN route.
Why wrong: Static routes are not used with BGP; Direct Connect and VPN use BGP dynamic routing.
- C
Advertise the same prefix over both connections but with a lower AS path length over Direct Connect.
Why wrong: BGP prefers shorter AS path only if prefix lengths are equal; here the prefixes are the same, but this would not guarantee Direct Connect preference if the AS paths are different.
- D
Advertise the same prefix over both connections but set a higher weight on the VPN BGP session.
Why wrong: Weight is a Cisco proprietary attribute and not supported by AWS Direct Connect or VPN.
BGP Path Selection — Direct Connect vs VPN
This ANS-C01 practice question tests your understanding of network implementation. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A company has a Direct Connect connection with a private VIF to a VPC. They also have a VPN connection as a backup. They want to ensure that traffic always uses the Direct Connect connection when it is available, and only fails over to the VPN if Direct Connect goes down. How should they configure routing?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue:
"always"Why it matters: Absolute qualifier. An answer using 'always' is only correct if there are genuinely no exceptions — absolute statements are often wrong in networking.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
Advertise a more specific prefix over Direct Connect and a less specific prefix over VPN.
Option A is correct because BGP selects the most specific prefix (longest prefix match) first, regardless of other attributes. By advertising a more specific prefix (e.g., /24) over Direct Connect and a less specific prefix (e.g., /16) over VPN, traffic will always prefer the Direct Connect path when it is available. If Direct Connect fails, the more specific prefix is withdrawn, and traffic automatically falls back to the VPN using the less specific prefix.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Advertise a more specific prefix over Direct Connect and a less specific prefix over VPN.
Why this is correct
BGP always prefers the most specific prefix (longest match). This ensures Direct Connect is used when available.
Clue confirmation
The clue word "always" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Use static routes pointing to the Direct Connect virtual interface with a lower metric than the VPN route.
- ✗
Advertise the same prefix over both connections but with a lower AS path length over Direct Connect.
Why it's wrong here
BGP prefers shorter AS path only if prefix lengths are equal; here the prefixes are the same, but this would not guarantee Direct Connect preference if the AS paths are different.
- ✗
Advertise the same prefix over both connections but set a higher weight on the VPN BGP session.
Why it's wrong here
Weight is a Cisco proprietary attribute and not supported by AWS Direct Connect or VPN.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The ANS-C01 exam often tests the misconception that BGP attributes like AS path length or weight are the primary tie-breakers, but in this scenario the longest prefix match rule overrides all BGP path attributes, making prefix specificity the correct mechanism for active/passive failover.
Detailed technical explanation
How to think about this question
BGP route selection follows a deterministic order: highest weight, highest local preference, locally originated, shortest AS path, lowest origin type, lowest MED, eBGP over iBGP, lowest IGP metric to next-hop, and finally longest prefix match. However, longest prefix match is evaluated before any BGP path attributes, meaning a more specific prefix (e.g., /24) will always be preferred over a less specific one (e.g., /16), regardless of other attributes. In a Direct Connect scenario, this allows you to advertise a /24 from your on-premises network over Direct Connect and a /16 over VPN; if Direct Connect fails, the /24 is withdrawn, and the /16 takes over, providing seamless failover.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Network Implementation — study guide chapter
Learn the concepts, then practise the questions
- →
Network Implementation practice questions
Targeted practice on this topic area only
- →
All ANS-C01 questions
1,705 questions across all exam domains
- →
AWS Certified Advanced Networking Specialty ANS-C01 study guide
Full concept coverage aligned to exam objectives
- →
ANS-C01 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related ANS-C01 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Network Management and Operations practice questions
Practise ANS-C01 questions linked to Network Management and Operations.
Network Security, Compliance and Governance practice questions
Practise ANS-C01 questions linked to Network Security, Compliance and Governance.
Network Design practice questions
Practise ANS-C01 questions linked to Network Design.
Network Implementation practice questions
Practise ANS-C01 questions linked to Network Implementation.
ANS-C01 fundamentals practice questions
Practise ANS-C01 questions linked to ANS-C01 fundamentals.
ANS-C01 scenario practice questions
Practise ANS-C01 questions linked to ANS-C01 scenario.
ANS-C01 troubleshooting practice questions
Practise ANS-C01 questions linked to ANS-C01 troubleshooting.
Practice this exam
Start a free ANS-C01 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this ANS-C01 question test?
Network Implementation — This question tests Network Implementation — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Advertise a more specific prefix over Direct Connect and a less specific prefix over VPN. — Option A is correct because BGP selects the most specific prefix (longest prefix match) first, regardless of other attributes. By advertising a more specific prefix (e.g., /24) over Direct Connect and a less specific prefix (e.g., /16) over VPN, traffic will always prefer the Direct Connect path when it is available. If Direct Connect fails, the more specific prefix is withdrawn, and traffic automatically falls back to the VPN using the less specific prefix.
What should I do if I get this ANS-C01 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "always". Absolute qualifier. An answer using 'always' is only correct if there are genuinely no exceptions — absolute statements are often wrong in networking.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
4 more ways this is tested on ANS-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company has a Direct Connect connection with a private VIF to a VPC. The company also has a Site-to-Site VPN connection to the same VPC as a backup. During a failover test, traffic from on-premises to the VPC continues to use the Direct Connect even after it is intentionally failed. The BGP timers are set to default values. What is the most likely cause?
hard- A.The Direct Connect route is more specific than the VPN route.
- B.The VPN BGP route has a longer AS path than the Direct Connect route.
- C.The VPN route has a lower local preference than the Direct Connect route.
- ✓ D.The BGP session with the Direct Connect router is still established because the physical link is up, but the link is not forwarding traffic.
Why D: Option D is correct because the Direct Connect physical link is still up, so the BGP session remains established even though the link is not forwarding traffic. With default BGP timers (keepalive 60s, hold 180s), the session does not time out, so the VPC continues to receive the Direct Connect route and prefers it over the VPN backup. A failover requires either the BGP session to go down or the route to be withdrawn, neither of which occurs when only the data plane fails.
Variation 2. A company has a Direct Connect connection with a private VIF to a VPC. They also have a site-to-site VPN as a backup. The on-premises network advertises the same prefix via BGP over both connections. The company wants to prefer the Direct Connect path. What configuration achieves this?
hard- A.Set the Multi-Exit Discriminator (MED) on the VPN advertisement to a lower value.
- B.Prepend the AS path on the Direct Connect advertisement to make it longer.
- ✓ C.Configure the Direct Connect BGP session with a higher local preference (e.g., 200) than the VPN BGP session.
- D.Configure the VPN BGP session with a higher local preference than the Direct Connect session.
Why C: Local preference is a BGP attribute used to influence outbound traffic from the local AS. By setting a higher local preference (e.g., 200) on the Direct Connect BGP session, the router will prefer that path over the VPN session (default local preference 100) for the same prefix. This ensures traffic from the VPC to on-premises uses Direct Connect as the primary path.
Variation 3. A company has an AWS Direct Connect connection with a private VIF to a VPC. They also have a VPN connection as a backup. They want to use BGP attributes to prefer the Direct Connect path. On the customer router, they set a lower local preference for routes received via the VPN. However, traffic still uses the VPN. What could be the reason?
hard- ✓ A.Local preference is not supported by AWS for BGP sessions; use AS path prepending instead
- B.The weight attribute is set higher on the VPN routes
- C.Bidirectional Forwarding Detection (BFD) is not enabled on the Direct Connect connection
- D.The BGP MED attribute is not set on the VPN routes
Why A: Option A is correct because AWS does not honor the local preference attribute set on the customer router for routes received via the VPN. In AWS, BGP local preference is not considered; instead, AS path prepending is the standard method to influence route selection on the customer side. Option B is incorrect because weight is a Cisco-proprietary attribute that is not used in AWS BGP sessions. Option C is incorrect because BFD is used for fast failure detection, not path selection. Option D is incorrect because MED is used to influence inbound traffic from AWS, not to prefer the Direct Connect path on the customer router.
Variation 4. A company has a Direct Connect connection with a private VIF to a VPC. They also have a Site-to-Site VPN connection to the same VPC as a backup. The on-premises router is advertising the same prefixes over both connections. The company wants to ensure that traffic uses Direct Connect when available and fails over to VPN if Direct Connect goes down. Which configuration should be applied?
medium- A.Set a higher MED value on the Direct Connect BGP advertisements.
- B.Disable BGP on the VPN connection to force traffic to Direct Connect.
- ✓ C.Prepend AS path on the BGP advertisements over the VPN connection to make the path less preferred.
- D.Set a higher local preference on the VPN BGP advertisements.
Why C: To prefer Direct Connect over VPN, adjust BGP attributes on the on-premises router. Prepend AS path on the VPN BGP advertisements to increase the AS path length, making the Direct Connect path shorter and thus preferred. This ensures failover to VPN if Direct Connect fails. Option A is incorrect because setting higher MED on Direct Connect would make it less preferred, not more. Option B is incorrect because disabling BGP on VPN removes the backup connection entirely. Option D is incorrect because setting higher local preference on VPN BGP advertisements would make VPN preferred, which is the opposite of the desired behavior. Local preference is typically set on the AWS side, not on-premises.
Keep practising
More ANS-C01 practice questions
- A financial services company has a VPC with a public subnet and a private subnet. EC2 instances in the private subnet ne…
- A company is designing a network security architecture for a multi-account environment using AWS Transit Gateway. The se…
- A company is using AWS Direct Connect to connect its on-premises network to AWS. The company wants to encrypt all traffi…
- A company uses AWS Transit Gateway to connect multiple VPCs and on-premises networks via AWS Site-to-Site VPN. The secur…
- A company runs a web application on EC2 instances behind an Application Load Balancer (ALB). The application must be acc…
- A global e-commerce company uses a hub-and-spoke network topology with a transit VPC in us-east-1. Each spoke VPC has an…
Last reviewed: Jul 4, 2026
This ANS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ANS-C01 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.