[CentOS] centos 6.3 ipv6 default gateway

Sat Apr 13 17:24:56 UTC 2013
Michael H. Warfield <mhw at WittsEnd.com>

On Fri, 2013-04-12 at 11:38 +0800, Jaze Lee wrote:
> 2013/4/12 Michael H. Warfield <mhw at wittsend.com>

Big snip...

> > You are, none the less, not suppose to use addresses in that block for
> > ANYTHING.  The fc00::/7 block is intended for what you want to do.  Even
> > if they happen to work, they are not guaranteed to work and may cause
> > other problems (like reverse DNS lookup traffic).

>    Currently, i just use those ipv6 address to set up my testing
> environment. One day
>    they will be replaced by global ipv6 address. And i do not have any
> global ipv6 address right now,
>    i have to use some thing like 1:2:3::4. They truely work on ubuntu
> 12.04, so i think they should work on
>    centos.

That last statement is incorrect.  Just because they work on Ubuntu
doesn't guarantee they will work on CentOS, Scientific Linux, Fedora, or
Redhat Enterprise, if they do not adhere to the proper standards.  You
are in an area that should be considered "undefined behavior" where it
might work or it might not but, if it doesn't, it's your fault not that
of the system.  Although, in this case, this seems to have been more of
a configuration error/confusion issue between how the systems are

> But now, i realize i am wrong, what about i change the
> 1:2:3:4/64 to fc:2:3::4/64 ?
>    Is that ok?

No.  Strictly speaking, it should be fc00:2:3::4/64.  The prefix for
local unicast is fc00:: or fd00::, not fc::.  It's fc00 not fc.

> > > Must i change ipv6 address to some thing like 2000::/3, even i just want
> > to
> > > use ipv6 for private?
> >
> > No, you should change them to FC00:/7 for private use.  That's what that
> > block was allocated for.  Use it.  Don't just dream up stuff.
> >
> > You will need static routes on each of your two routers for your two
> > client routes.
> >

>   I change ipv6 address to this:

> DEVICE="eth2"   ---------------------------------> in centosv0
> BOOTPROTO="static"
> HWADDR="60:A4:4C:23:2F:4F"
> ONBOOT="yes"
> TYPE="Ethernet"
> #UUID="97d250ea-74db-47ae-bd8c-6682f57f9add"
> IPV6INIT=yes
> IPV6ADDR=fc00:2:3::5/64
> IPV6_DEFAULTGW=fc00:2:3::4

> DEVICE="eth1" -------------------------------------> in centosv0
> BOOTPROTO="static"
> HWADDR="60:A4:4C:23:2F:4E"
> ONBOOT="yes"
> TYPE="Ethernet"
> #UUID="f7f020e9-36a4-4f55-9ed2-81acc2dbd92f"
> IPV6INIT=yes
> IPV6ADDR=fc00:2:3:5::1/64

> DEVICE="eth1"  -----------------------------------> in centosv1
> BOOTPROTO="static"
> HWADDR="60:A4:4C:23:2F:6E"
> ONBOOT="yes"
> TYPE="Ethernet"
> #UUID="3597af05-199b-4eef-9a24-610c2872f313"
> IPV6INIT=yes
> IPV6ADDR=fc00:2:3:4::1/64

> DEVICE="eth2" -----------------------------------> in centosv1
> BOOTPROTO=static
> HWADDR="60:A4:4C:23:2F:6F"
> ONBOOT="yes"
> TYPE="Ethernet"
> #UUID="0ddcf499-878f-4ac7-9d1a-c27f85d2bccf"
> IPV6INIT=yes
> IPV6ADDR=fc00:2:3::4/64
> IPV6_DEFAULTGW=fc00:2:3::5

> and restart the network:
> [root at centosv0 network-scripts]# /etc/init.d/network restart
> Shutting down interface eth1:                              [  OK  ]
> Shutting down interface eth2:                              [  OK  ]
> Shutting down interface eth3:                              [  OK  ]
> Shutting down loopback interface:                          [  OK  ]
> Bringing up loopback interface:                            [  OK  ]
> Bringing up interface eth1:                                [  OK  ]
> Bringing up interface eth2:                                [  OK  ]
> Bringing up interface eth3:                                [  OK  ]

> It work now, thanks a lot, lot, lot....

Great!  Good to see you've made progress!

> Now, why ubuntu 12.04 and centos 6.3 are so different?
> Is that because ubunutu 12.04 uses 3.5 kernel, and centos uses 2.6.32 ?

No.  Actually I suspect it's more in the supporting scripts and
infrastructure.  The RedHat base distros (RH, Fedora, CentOS, SL, NST,
etc) and the Debian based distros (Ubuntu, Knoppix, Backtrack, etc) have
based their network support on different paradigms (and is probably the
PRIMARY reason why I dislike Debian, Knoppix and Ubuntu in their network

Historically, the RH based system is (VERY) loosely based on some of the
ideas that evolved out of the AT&T SYSV system with separate
configuration files, the classical init scripts are still referred to as
the sysv-init stuff, and what not.  NetworkManager aka NetworkMangler
and systemd are throwing all that for a loop lately with some
improvements and some abject debacles.

OTOH, Debian was more in-line with the BSD (Berkeley Software
Distribution) philosophy and their network interfaces and a common init
configuration file.

The RH derivative scripts for IPv6 support are largely based on the work
of Peter Bieringer in the ipv6init scripts (to which I had some minor
input and contributions).  I honestly don't know what Debian / Ubuntu is
using but there are some very significant deviations in behavior and
filtering in that arena.  It's not at all just a kernel issue.

I've done some "internal" distributions based on both paradigms (one
based on Knoppix and one based on NST - Network Security ToolKit) plus
contributions to several others.  If you are in a well defined region
(IOW - assigned addresses and network topology, etc) everything will
(should) work consistently between the two paradigms (it's just that
translating configurations between the two is a bugger), because the
conditions are defined and have defined behaviors.  When you are in a
"gray area" or and undefined area where you are not adhering to the well
established best common practices, standards and assignments - all bets
are off - you pays your nickel and you takes your chance, and you get
the blame for free.  It may well work on one distribution (and I may
argue that's that bug in that distribution in allowing it) and not in
another.  I would not be surprised at all by the behavior you have
experienced there.

> All in all, this problem is settled.

This, I'm very glad to hear it.  Go through that Hurricane Electric
stuff.  You'll find it useful as you learn more about IPv6.

> Thanks, you are a greate man :)

Thanks.  I do try to help, even though I often come across as abrasive
and dogmatic.

Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos/attachments/20130413/da5bd1bc/attachment-0005.sig>