全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 713|回复: 3
打印 上一主题 下一主题

关于Ubuntu ipv6 的疑问

[复制链接]
跳转到指定楼层
1#
发表于 2023-3-13 09:48:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
用Ubuntu 当软路由(目前只是作为旁路由使用),目前/etc/netplan/00-installer-config.yaml的配置如下:
network:
  ethernets:
    eno1:
      dhcp4: true
    enp1s0:
      dhcp4: true
    enp4s0:
      dhcp4: true
    enp2s0:     
      addresses: [192.168.1.xx/24]   
      dhcp4: true   
      optional: true
      routes:
        - to: default
          via: 192.168.1.1   
      nameservers:
         addresses: [114.114.114.114,223.5.5.5]   
  version: 2
  renderer: networkd

请问怎样同时开启ipv6?并且设置ipv6优先?目前我只是用了enp2s0这个网口作旁路由  谢谢!
2#
发表于 2023-3-13 09:54:36 来自手机 | 只看该作者
dhcp6开启就好了,你问问chatgpt
3#
 楼主| 发表于 2023-3-13 13:04:08 | 只看该作者
iamydp 发表于 2023-3-13 09:54
dhcp6开启就好了,你问问chatgpt

貌似上级路由已经开启了,但是本机并不是ipv6优先
4#
发表于 2023-3-13 14:19:40 | 只看该作者

  1. sysctl -w net.ipv6.conf.all.route_metric=10
复制代码


To set IPv6 as the priority protocol in Ubuntu 22.04, you can open a terminal and run the command sudo sysctl -w net.ipv6.conf.all.route_metric=10. This will set the route metric for IPv6 to 10, making it the preferred protocol.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-12-7 03:23 , Processed in 0.171147 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表