Setting up Centos7 VM as IPv6 router

Issues related to configuring your network
Post Reply
mikesafh
Posts: 5
Joined: 2009/07/15 01:47:58
Location: Maryland, US
Contact:

Setting up Centos7 VM as IPv6 router

Post by mikesafh » 2016/02/04 17:28:19

I have a CentOS 7 VM that's currently my IPv4 router in an isolated lab environment. Trying to add IPv6 to it.

There are three problems I'm running in to, which are probably related somehow.

One, using nmtui to set the IPv6 parameters gives me a segfault every time I try to add the IPv6 address when switching to manual. (if it helps:
Feb 4 17:20:11 gateway kernel: nmtui[10389]: segfault at 0 ip 00007fea109db76e sp 00007fff539ff440 error 4 in nmtui[7fea109ca000+3c000]
)

Two, with the following ifcfg-ens160 configuration, the only IPv6 address that comes up with the interface is the link-local fe80 one:
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_ADDRESS=6164:686f:636c:6162:0:0:0:1/128
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens160
UUID=1a428521-943b-469b-84de-bda01952dec8
ONBOOT=yes
IPADDR0=<ip>
PREFIX0=18
GATEWAY0=<ip>
DNS1=<ip>
DOMAIN=<domain>
HWADDR=00:0C:29:96:FE:9A
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

# ip -6 a
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 fe80::20c:29ff:fe96:fe9a/64 scope link
valid_lft forever preferred_lft forever

I've got /etc/sysconfig/network set as:
[root@gateway network-scripts]# more /etc/sysconfig/network
# Created by anaconda
NETWORKING_IPV6=yes
IPV6FORWARDING=yes

I have the sysctl config set for forwarding both ipv4 and ipv6.

I have other Windows servers running with IPv6 and getting IPv6 DHCP addresses, although I have not configured any routes yet because, well, the CentOS 7 VM is supposed to be the router. One thing I've noted also (which is problem three) is that if I set the IPv6 config to DHCP, it doesn't actually get anything. So I'm wondering if there's some global IPv6 setting that I'm not aware of, or something.

This is my first foray into IPv6 as well, so it's quite possible I'm missing something fundamental here. Because this is the router to the internal lab environment, it's not trivial to allow it to connect to the Internet to do yum updates, so what's there is what came from the CentOS 7 distribution ISOs (7.0.1406).

Any ideas?

Thanks.

Mike

HQJaTu
Posts: 1
Joined: 2018/01/14 15:41:57
Contact:

Re: Setting up Centos7 VM as IPv6 router

Post by HQJaTu » 2018/01/14 16:06:46

I bumped into exactly the same problem. My ISP finally went forward with their IPv6-project and SLAAC/DHCPv6 started working on my CentOS 7 router (release 7.4.1708). They issued me a /56 prefix, and I kicked RADVD on, but things weren't rolling my way.

There is a FirewallD-running, and looking at the IPtables-rules, there is no way any LAN-originating IPv6-traffic would be allowed to exit the box. To fix that, I added following:

Code: Select all

# firewall-cmd --permanent --direct --add-rule ipv6 filter FWDO_public_allow 0 -j ACCEPT
Any traffic, bound to output from my public-zone, is unconditionally allowed. Problem solved.

If there is an elegant way of achieving the same, I'd definitely love to hear about that. That's my crude solution.

Post Reply