我有一个Debian 7服务器与几个networking和运行configuration的KVM虚拟机:
IPv6子网被分成/ 96个networking,为每个网桥分配一个自己的子网。
auto hetzner0 iface hetzner0 inet static address 144.76.43.151 network 144.76.43.128 netmask 27 gateway 144.76.43.129 iface hetzner0 inet6 static address 2a01:4f8:191:439b:0:0:0:1 netmask 96 gateway fe80::1 auto hetzner1 iface hetzner1 inet static address 144.72.132.209 broadcast 144.72.132.208 netmask 29 bridge_ports none bridge_fd 1 bridge_waitport 0 bridge_stp off iface hetzner1 inet6 static address 2a01:4f8:191:439b:0:1:0:1 netmask 96
尽pipeIPv4运行良好,但IPv6让我疯狂。 hetzner0的v6地址分配正确,我可以在世界各地平铺。 但是hetzner1的地址没有被赋值! 我能够通过执行以下手动添加它:
/sbin/ip -f inet6 addr add 2a01:4f8:191:439b:0:1:0:1/96 dev hetzner1
虽然这个工作,在一个后,上下钩这样做是行不通的…
post-up /sbin/ip -f inet6 addr add 2a01:4f8:191:439b:0:1:0:1/96 dev hetzner1 pre-down /sbin/ip -f inet6 addr add 2a01:4f8:191:439b:0:1:0:1/96 dev hetzner1
IPv6通过sysctl为此接口启用,而最自动的configuration被禁用: ╰─$ sysctl -a | grep 'hetzner1' net.ipv4.conf.hetzner1.accept_local = 0 net.ipv4.conf.hetzner1.accept_redirects = 0 net.ipv4.conf.hetzner1.accept_source_route = 0 net.ipv4.conf.hetzner1.arp_accept = 0 net.ipv4.conf.hetzner1.arp_announce = 0 net.ipv4.conf.hetzner1.arp_filter = 0 net.ipv4.conf.hetzner1.arp_ignore = 0 net.ipv4.conf.hetzner1.arp_notify = 0 net.ipv4.conf.hetzner1.bootp_relay = 0 net.ipv4.conf.hetzner1.disable_policy = 0 net.ipv4.conf.hetzner1.disable_xfrm = 0 net.ipv4.conf.hetzner1.force_igmp_version = 0 net.ipv4.conf.hetzner1.forwarding = 1 net.ipv4.conf.hetzner1.igmpv2_unsolicited_report_interval = 10000 net.ipv4.conf.hetzner1.igmpv3_unsolicited_report_interval = 1000 net.ipv4.conf.hetzner1.log_martians = 0 net.ipv4.conf.hetzner1.mc_forwarding = 0 net.ipv4.conf.hetzner1.medium_id = 0 net.ipv4.conf.hetzner1.promote_secondaries = 0 net.ipv4.conf.hetzner1.proxy_arp = 0 net.ipv4.conf.hetzner1.proxy_arp_pvlan = 0 net.ipv4.conf.hetzner1.route_localnet = 0 net.ipv4.conf.hetzner1.rp_filter = 1 net.ipv4.conf.hetzner1.secure_redirects = 1 net.ipv4.conf.hetzner1.send_redirects = 0 net.ipv4.conf.hetzner1.shared_media = 1 net.ipv4.conf.hetzner1.src_valid_mark = 0 net.ipv4.conf.hetzner1.tag = 0 net.ipv4.neigh.hetzner1.anycast_delay = 100 net.ipv4.neigh.hetzner1.app_solicit = 0 net.ipv4.neigh.hetzner1.base_reachable_time_ms = 30000 net.ipv4.neigh.hetzner1.delay_first_probe_time = 5 net.ipv4.neigh.hetzner1.gc_stale_time = 60 net.ipv4.neigh.hetzner1.locktime = 100 net.ipv4.neigh.hetzner1.mcast_solicit = 3 net.ipv4.neigh.hetzner1.proxy_delay = 80 net.ipv4.neigh.hetzner1.proxy_qlen = 64 net.ipv4.neigh.hetzner1.retrans_time_ms = 1000 net.ipv4.neigh.hetzner1.ucast_solicit = 3 net.ipv4.neigh.hetzner1.unres_qlen = 31 net.ipv4.neigh.hetzner1.unres_qlen_bytes = 65536 net.ipv6.conf.hetzner1.accept_dad = 0 net.ipv6.conf.hetzner1.accept_ra = 0 net.ipv6.conf.hetzner1.accept_ra_defrtr = 0 net.ipv6.conf.hetzner1.accept_ra_pinfo = 0 net.ipv6.conf.hetzner1.accept_ra_rt_info_max_plen = 0 net.ipv6.conf.hetzner1.accept_ra_rtr_pref = 0 net.ipv6.conf.hetzner1.accept_redirects = 0 net.ipv6.conf.hetzner1.accept_source_route = 0 net.ipv6.conf.hetzner1.autoconf = 0 net.ipv6.conf.hetzner1.dad_transmits = 1 net.ipv6.conf.hetzner1.disable_ipv6 = 0 net.ipv6.conf.hetzner1.force_mld_version = 0 net.ipv6.conf.hetzner1.force_tllao = 0 net.ipv6.conf.hetzner1.forwarding = 1 net.ipv6.conf.hetzner1.hop_limit = 64 net.ipv6.conf.hetzner1.max_addresses = 16 net.ipv6.conf.hetzner1.max_desync_factor = 600 net.ipv6.conf.hetzner1.mc_forwarding = 0 net.ipv6.conf.hetzner1.mldv1_unsolicited_report_interval = 10000 net.ipv6.conf.hetzner1.mldv2_unsolicited_report_interval = 1000 net.ipv6.conf.hetzner1.mtu = 1500 net.ipv6.conf.hetzner1.ndisc_notify = 0 net.ipv6.conf.hetzner1.optimistic_dad = 0 net.ipv6.conf.hetzner1.proxy_ndp = 0 net.ipv6.conf.hetzner1.regen_max_retry = 3 net.ipv6.conf.hetzner1.router_probe_interval = 60 net.ipv6.conf.hetzner1.router_solicitation_delay = 1 net.ipv6.conf.hetzner1.router_solicitation_interval = 4 net.ipv6.conf.hetzner1.router_solicitations = 3 net.ipv6.conf.hetzner1.suppress_frag_ndisc = 1 net.ipv6.conf.hetzner1.temp_prefered_lft = 86400 net.ipv6.conf.hetzner1.temp_valid_lft = 604800 net.ipv6.conf.hetzner1.use_tempaddr = 0 net.ipv6.neigh.hetzner1.anycast_delay = 100 net.ipv6.neigh.hetzner1.app_solicit = 0 net.ipv6.neigh.hetzner1.base_reachable_time_ms = 30000 net.ipv6.neigh.hetzner1.delay_first_probe_time = 5 net.ipv6.neigh.hetzner1.gc_stale_time = 60 net.ipv6.neigh.hetzner1.locktime = 0 net.ipv6.neigh.hetzner1.mcast_solicit = 3 net.ipv6.neigh.hetzner1.proxy_delay = 80 net.ipv6.neigh.hetzner1.proxy_qlen = 64 net.ipv6.neigh.hetzner1.retrans_time_ms = 1000 net.ipv6.neigh.hetzner1.ucast_solicit = 3 net.ipv6.neigh.hetzner1.unres_qlen = 31 net.ipv6.neigh.hetzner1.unres_qlen_bytes = 65536 ╰─$ sysctl -a | grep 'hetzner1' net.ipv4.conf.hetzner1.accept_local = 0 net.ipv4.conf.hetzner1.accept_redirects = 0 net.ipv4.conf.hetzner1.accept_source_route = 0 net.ipv4.conf.hetzner1.arp_accept = 0 net.ipv4.conf.hetzner1.arp_announce = 0 net.ipv4.conf.hetzner1.arp_filter = 0 net.ipv4.conf.hetzner1.arp_ignore = 0 net.ipv4.conf.hetzner1.arp_notify = 0 net.ipv4.conf.hetzner1.bootp_relay = 0 net.ipv4.conf.hetzner1.disable_policy = 0 net.ipv4.conf.hetzner1.disable_xfrm = 0 net.ipv4.conf.hetzner1.force_igmp_version = 0 net.ipv4.conf.hetzner1.forwarding = 1 net.ipv4.conf.hetzner1.igmpv2_unsolicited_report_interval = 10000 net.ipv4.conf.hetzner1.igmpv3_unsolicited_report_interval = 1000 net.ipv4.conf.hetzner1.log_martians = 0 net.ipv4.conf.hetzner1.mc_forwarding = 0 net.ipv4.conf.hetzner1.medium_id = 0 net.ipv4.conf.hetzner1.promote_secondaries = 0 net.ipv4.conf.hetzner1.proxy_arp = 0 net.ipv4.conf.hetzner1.proxy_arp_pvlan = 0 net.ipv4.conf.hetzner1.route_localnet = 0 net.ipv4.conf.hetzner1.rp_filter = 1 net.ipv4.conf.hetzner1.secure_redirects = 1 net.ipv4.conf.hetzner1.send_redirects = 0 net.ipv4.conf.hetzner1.shared_media = 1 net.ipv4.conf.hetzner1.src_valid_mark = 0 net.ipv4.conf.hetzner1.tag = 0 net.ipv4.neigh.hetzner1.anycast_delay = 100 net.ipv4.neigh.hetzner1.app_solicit = 0 net.ipv4.neigh.hetzner1.base_reachable_time_ms = 30000 net.ipv4.neigh.hetzner1.delay_first_probe_time = 5 net.ipv4.neigh.hetzner1.gc_stale_time = 60 net.ipv4.neigh.hetzner1.locktime = 100 net.ipv4.neigh.hetzner1.mcast_solicit = 3 net.ipv4.neigh.hetzner1.proxy_delay = 80 net.ipv4.neigh.hetzner1.proxy_qlen = 64 net.ipv4.neigh.hetzner1.retrans_time_ms = 1000 net.ipv4.neigh.hetzner1.ucast_solicit = 3 net.ipv4.neigh.hetzner1.unres_qlen = 31 net.ipv4.neigh.hetzner1.unres_qlen_bytes = 65536 net.ipv6.conf.hetzner1.accept_dad = 0 net.ipv6.conf.hetzner1.accept_ra = 0 net.ipv6.conf.hetzner1.accept_ra_defrtr = 0 net.ipv6.conf.hetzner1.accept_ra_pinfo = 0 net.ipv6.conf.hetzner1.accept_ra_rt_info_max_plen = 0 net.ipv6.conf.hetzner1.accept_ra_rtr_pref = 0 net.ipv6.conf.hetzner1.accept_redirects = 0 net.ipv6.conf.hetzner1.accept_source_route = 0 net.ipv6.conf.hetzner1.autoconf = 0 net.ipv6.conf.hetzner1.dad_transmits = 1 net.ipv6.conf.hetzner1.disable_ipv6 = 0 net.ipv6.conf.hetzner1.force_mld_version = 0 net.ipv6.conf.hetzner1.force_tllao = 0 net.ipv6.conf.hetzner1.forwarding = 1 net.ipv6.conf.hetzner1.hop_limit = 64 net.ipv6.conf.hetzner1.max_addresses = 16 net.ipv6.conf.hetzner1.max_desync_factor = 600 net.ipv6.conf.hetzner1.mc_forwarding = 0 net.ipv6.conf.hetzner1.mldv1_unsolicited_report_interval = 10000 net.ipv6.conf.hetzner1.mldv2_unsolicited_report_interval = 1000 net.ipv6.conf.hetzner1.mtu = 1500 net.ipv6.conf.hetzner1.ndisc_notify = 0 net.ipv6.conf.hetzner1.optimistic_dad = 0 net.ipv6.conf.hetzner1.proxy_ndp = 0 net.ipv6.conf.hetzner1.regen_max_retry = 3 net.ipv6.conf.hetzner1.router_probe_interval = 60 net.ipv6.conf.hetzner1.router_solicitation_delay = 1 net.ipv6.conf.hetzner1.router_solicitation_interval = 4 net.ipv6.conf.hetzner1.router_solicitations = 3 net.ipv6.conf.hetzner1.suppress_frag_ndisc = 1 net.ipv6.conf.hetzner1.temp_prefered_lft = 86400 net.ipv6.conf.hetzner1.temp_valid_lft = 604800 net.ipv6.conf.hetzner1.use_tempaddr = 0 net.ipv6.neigh.hetzner1.anycast_delay = 100 net.ipv6.neigh.hetzner1.app_solicit = 0 net.ipv6.neigh.hetzner1.base_reachable_time_ms = 30000 net.ipv6.neigh.hetzner1.delay_first_probe_time = 5 net.ipv6.neigh.hetzner1.gc_stale_time = 60 net.ipv6.neigh.hetzner1.locktime = 0 net.ipv6.neigh.hetzner1.mcast_solicit = 3 net.ipv6.neigh.hetzner1.proxy_delay = 80 net.ipv6.neigh.hetzner1.proxy_qlen = 64 net.ipv6.neigh.hetzner1.retrans_time_ms = 1000 net.ipv6.neigh.hetzner1.ucast_solicit = 3 net.ipv6.neigh.hetzner1.unres_qlen = 31 net.ipv6.neigh.hetzner1.unres_qlen_bytes = 65536
我很绝望,有没有人有解决scheme吗?
胜利者
更新:
我很尴尬,但是当我点击右侧的链接,search类似的问题,我发现这个:
IPv6只在ping默认网关后才起作用。
以下几行引起了我的注意(是的,我的提供者是德国Hetzner):
因为Debian对于那里还没有那个疯狂? – 迈克尔·汉普顿♦13年2月23日在9:29
这个文件是由hetzner提供的:“### Hetzner Online AG – installimage”但这绝对是我的错,不是首先看到它:D。 – – dexstar 13年2月23日在9:31
所以我试了他的解决scheme,它终于工作了! 我添加到/ etc / network / interfaces而Hetzner的安装映像没有提供:
iface lo inet6 loopback