Linux-Noob Forums

Full Version: troubles with script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

when i run the script i get error, log :

eth1: No such device
IPv6 configuration failed!

the script's code:

if ! [ -f /proc/net/if_inet6 ]
then echo "IPv6 is not installed!" 1>&2; exit 1; fi
ifconfig sit0 up \
&& ifconfig sit0 inet6 tunnel :: \
&& ifconfig sit1 inet6 add 2001:618:400::591:cb1f/128 \
&& route -A inet6 add ::/0 gw fe80::d579:1855 dev sit1 \
&& route -A inet6 add 2000::/3 gw fe80::d579:1855 dev sit1 \
&& ifconfig eth1 up \
&& ifconfig eth1 inet6 add 2001:618:400:b733::/64 \
&& echo 1 > /proc/sys/net/ipv6/conf/all/forwarding \
&& echo 'interface eth1
AdvSendAdvert on;
prefix 2001

  AdvOnLink on;
  AdvAutonomous on;
};' > /etc/radvd.conf \
&& /etc/init.d/radvd start \
&& echo "IPv6 configuration completed" || \
{ echo "IPv6 configuration failed!" 1>&2; exit 1; }


and when i do ifconfig there is:

snake@delta:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:4C:77:CD:1D
      inet6 addr: fe80::2e0:4cff:fe77:cd1d/64 Диапазон:Link
      RX packets:270656 errors:0 dropped:0 overruns:0 frame:0
      TX packets:250379 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:275446383 (262.6 MiB)  TX bytes:21518725 (20.5 MiB)
      Interrupt:20 Base address:0x2000

lo        Link encap:Local Loopback
      inet addr:  Mask:
      inet6 addr: ::1/128 Диапазон:Host
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:84 errors:0 dropped:0 overruns:0 frame:0
      TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:4817 (4.7 KiB)  TX bytes:4817 (4.7 KiB)

ppp0      Link encap:Point-to-Point Protocol
      inet addr:  P-t-P:  Mask:
      RX packets:269808 errors:0 dropped:0 overruns:0 frame:0
      TX packets:249776 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:3
      RX bytes:269452852 (256.9 MiB)  TX bytes:15987305 (15.2 MiB)

sit0      Link encap:IPv6-in-IPv4
      inet6 addr: :: Диапазон:Compat
      inet6 addr: :: Диапазон:Unknown
      UP RUNNING NOARP  MTU:1480  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

sit1      Link encap:IPv6-in-IPv4
      inet6 addr: 2001:618:400::591:cb1f/128 Диапазон:Общий
      inet6 addr: fe80::5901:cb1f/64 Диапазон:Link
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:0 (0.0 b)  TX bytes:588 (588.0 b)

any ideas how to solve that problem?

i tryed editing the script and changing all eth1 to eth0 because in ifconfig i dont see any eth1 connection but i got error too

snake@delta:~$ sudo sh
SIOCSIFADDR: File exists
IPv6 configuration failed!


Unless you have an eth1, you need to change that to eth0.

First, you have no eth1, so eth0 is the correct setting.


&& ifconfig eth1 up \


That part of the code is attempting to bring the device up, even though it is already up and that is why you get the complaint when you use eth0.


So in round up, you can simply remove that line from the script and it should complete and replace all eth1 with eth0.