fbpx

If the device has IPv4 and IPv6 configured at the same time, which of the two is used as the default gateway?

When a device is configured to use both IPv4 and IPv6 at the same time, it does not “choose” one of the protocols as the “default gateway” in the traditional sense.

Instead, it uses both protocols independently, depending on the communication and the destination you are trying to connect to.

The choice between using an IPv4 or IPv6 route to send packets depends on several factors, including system configuration, route availability, and the preferences of the operating system or application in question.

Here are some key points to understand how this works:

1. Dual-Stack Configuration

The most common configuration on devices that support both IPv4 and IPv6 is known as “dual-stack”. In this configuration, the device maintains independent protocol stacks for IPv4 and IPv6, allowing it to operate with both types of addresses simultaneously. Each stack has its own set of configurations, including its own default gateway.

2. Protocol Selection

The decision whether to use IPv4 or IPv6 for a specific connection is usually based on name resolution and route availability:

  • If a hostname resolves to an IPv6 address and the device can establish a connection over IPv6 (that is, the destination is reachable over IPv6 and an IPv6 gateway is configured), then IPv6 is preferred.
  • If the hostname only resolves to an IPv4 address, or if there is no viable IPv6 route (even if the hostname resolves to an IPv6 address), the device will use IPv4.

3. Protocol Preference

Some operating systems and applications have a preference for IPv6 when available. For example, the IPv6 address selection policy defined in RFC 6724 describes how devices should choose from multiple possible addresses to establish a connection, giving preference to IPv6 in many situations.

4. Independent Default Gateways

The default gateways for IPv4 and IPv6 are configured and operate independently. A device can have both an IPv4 gateway configured for IPv4 traffic and an IPv6 gateway for IPv6 traffic. The choice of using one or another gateway depends purely on whether the packet to be sent is IPv4 or IPv6.

5. Network Configuration and Support

The ability of a device to use IPv4 or IPv6 also depends on the configuration of the network to which it is connected. If the network only supports IPv4, then the device will only use IPv4, and vice versa. On networks that support both, the device can use both protocols, determined by the logic mentioned above.

In summary, a device configured with both IPv4 and IPv6 will use the appropriate protocol for each specific connection, based on availability, configuration, and protocol selection policies. There is no “default gateway” between IPv4 and IPv6; each protocol stack uses its own independently configured gateway.

There are no tags for this post.
Did this content help you?
Facebook
Twitter
LinkedIn
WhatsApp
Telegram

Other documents in this category

Leave your comment

Your email address will not be published. Required fields are marked with *

Tutorials available at MikroLABs

No Courses Found!

DISCOUNT CODE

AN24-LIB

applies to MikroTik books and book packs

Days
Hours
Minutes
Seconds

Introduction to
OSPF - BGP - MPLS

Sign up for this Free course

MAE-RAV-ROS-240118
Days
Hours
Minutes
Seconds

Sign up for this Free course

MAS-ROS-240111

Promo for Three Kings Day!

KINGS24

15%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the Three Kings Day discount code!

* promotion valid until Sunday January 7, 2024
** the code (KINGS24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

New Year's Eve Promo!

NY24

20%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the New Year's Eve discount code!

* promotion valid until Monday, January 1, 2024
** the code (NY24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

Christmas discounts!

XMAS23

30%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the discount code for Christmas!!!

**codes are applied in the shopping cart
Promo valid until Monday December 25, 2023

CYBER WEEK DISCOUNTS

CW23-MK

17%

all MikroTik OnLine courses

CW23-AX

30%

all Academy courses

CW23-LIB

25%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Cyber ​​Week!!!

**codes are applied in the shopping cart
Promo valid until Sunday December 3, 2023

BLACK FRIDAY DISCOUNTS

BF23-MX

22%

all MikroTik OnLine courses

BF23-AX

35%

all Academy courses

BF23-LIB

30%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Black Friday!!!

**Codes are applied in the shopping cart

codes are applied in the shopping cart
valid until Sunday November 26, 2023

Days
Hours
Minutes
Seconds

Sign up for this Free course

MAE-VPN-SET-231115

Halloween promo

Take advantage of discount codes for Halloween.

Codes are applied in the shopping cart

HW23-MK

11% discount on all MikroTik OnLine courses

11%

HW23-AX

30% discount on all Academy courses

30%

HW23-LIB

25% discount on all MikroTik Books and Book Packs

25%

Register and participate in the free course Introduction to Advanced Routing with MikroTik (MAE-RAV-ROS)

Today (Wednesday) October 11, 2023
7pm to 11pm (Colombia, Ecuador, Peru)

MAE-RAV-ROS-231011