Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
troubles with script
#1

when i run the script i get error, log :



Code:
eth1: No such device
IPv6 configuration failed!




the script's code:



Code:
#!/bin/sh
if ! [ -f /proc/net/if_inet6 ]
then echo "IPv6 is not installed!" 1>&2; exit 1; fi
ifconfig sit0 up \
&& ifconfig sit0 inet6 tunnel ::213.121.24.85 \
&& 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

:618:400:b733::/64
{
  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:



Code:
snake@delta:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:4C:77:CD:1D
      inet6 addr: fe80::2e0:4cff:fe77:cd1d/64 Диапазон:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      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:127.0.0.1  Mask:255.0.0.0
      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:89.1.203.31  P-t-P:212.29.206.60  Mask:255.255.255.255
      UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
      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: ::89.1.203.31/96 Диапазон:Compat
      inet6 addr: ::127.0.0.1/96 Диапазон: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
      UP POINTOPOINT RUNNING NOARP  MTU:1472  Metric:1
      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



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




thanks.

Reply
#2
Unless you have an eth1, you need to change that to eth0.
Reply
#3

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

 



Code:
......
&& 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.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)