1

I'm having trouble with configuration static ipv6 address and additonal ipv6 on same interface(eth4).

  1. static ipv6 configuraiton issue

firstly, I configure below

vi /etc/network/interfaces

auto eth4
iface eth4 inet6 static
address 0.0.0.0
network 0.0.0.0

auto eth4.484
iface eth4.484 inet6 static
address 2028:2123:1015:1015::aa11
netmask 2028:2123:1015:1015::/64
up route add -host 2027:2123:1015:1015::aa21 gw 2028:2123:1015:1015::aa10 dev eth4.484

auto eth4.484:1
iface eth4.484:1 inet6 static
address 2028:2123:1015:1015::aa12
netmask 2028:2123:1015:1015::/64

and I hit the ifconfig -a

eth4      Link encap:Ethernet  HWaddr 00:0C:29:CF:E6:76  
          inet6 addr: fe80::20c:29ff:fecf:e676/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54 errors:0 dropped:27 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4168 (4.0 KiB)  TX bytes:2120 (2.0 KiB)

eth4.484  Link encap:Ethernet  HWaddr 00:0C:29:CF:E6:76  
          inet6 addr: 2028:2123:1015:1015::aa12/0 Scope:Global
          inet6 addr: 2028:2123:1015:1015:20c:29ff:fecf:e676/64 Scope:Global
          inet6 addr: fe80::20c:29ff:fecf:e676/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2032 (1.9 KiB)  TX bytes:1652 (1.6 KiB)

so, to use static ipv6 I added also like below but it doesn't work.

/etc/sysctl.conf

net.ipv6.conf.eth4.484.accept_ra=0
  1. how to configure secondary static ipv6 in the same interface(eth4)

I want to add static ipv6 address (2028:2123:1015:1015::aa12) in the eth4 as well, but don't know how, because I need to use two source ip with same vlan for specific destination ip address.

Any suggestion would be much appreciated.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
joseph-shin
  • 11
  • 1
  • 2
  • Could you please add the operating system used (I suppose it is Debian or some derivative) and the kernel version to the question? – Dubu Oct 02 '13 at 07:04

1 Answers1

3

Your interfaces file has a bunch of problems in it.

First, netmask isn't specified properly. Second, you're using the old way of aliasing, which doesn't really work anymore, and especially not with VLANs. Third, your route statement also uses the old style. Unfortunately, all of these are actually recommended in Debian's wiki and hundreds of old, outdated tutorials on the Internet.

The relevant parts of your file should look something like this:

auto eth4.484
iface eth4.484 inet6 static
        address 2028:2123:1015:1015::aa11
        netmask 64
        up ip -6 route add to 2027:2123:1015:1015::aa21 via 2028:2123:1015:1015::aa10 dev eth4.484

iface eth4.484 inet6 static
        address 2028:2123:1015:1015::aa12
        netmask 64

Note also that you're missing a gateway address. You need to specify this as well, or the gateway given by SLAAC will be used instead. Or you just won't be able to talk to any hosts except the one you set up a static route for.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • after I changed the configuration as you suggested and rebooted, the system's ifconfig couldn't be loaded successfully. so, I couldn't logged in. do i need to upgrade linux kernel for this? – joseph-shin Oct 02 '13 at 05:56
  • Are you sure you didn't delete something inappropriate? I'll set up a Debian VM tomorrow if necessary... – Michael Hampton Oct 02 '13 at 06:19
  • You also seem to be in a VMware virtual machine, so you should double check your virtual switch configuration. – Michael Hampton Oct 02 '13 at 06:48