View previous topic :: View next topic |
Author |
Message |
padoor Advocate
Joined: 30 Dec 2005 Posts: 4185 Location: india
|
Posted: Sun Oct 23, 2011 3:26 am Post subject: You are using a bash array for config_eth0. how to? |
|
|
from rc.log
Code: | * Bringing up interface eth0
* You are using a bash array for config_eth0.
* This feature will be removed in the future.
* Please see net.example for the correct format for config_eth0.
* dhcp ...
* Running dhcpcd ... |
my current ifconfig shows
Code: | localtux ramaswamy # ifconfig
eth0 Link encap:Ethernet HWaddr 00:0e:7b:4d:36:04
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20e:7bff:fe4d:3604/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32971 errors:0 dropped:0 overruns:0 frame:0
TX packets:23127 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36892441 (35.1 MiB) TX bytes:3160472 (3.0 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)
localtux ramaswamy # |
how do i configure my /etc/conf.d/net ?
net.example does not give me any idea.
i am not sure i have ipv4 or ipv6
some help needed pls. _________________ reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name) |
|
Back to top |
|
|
Sadako Advocate
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Sun Oct 23, 2011 1:59 pm Post subject: |
|
|
We would need to see what you have in your /etc/conf.d/net currently to help. _________________ "You have to invite me in" |
|
Back to top |
|
|
padoor Advocate
Joined: 30 Dec 2005 Posts: 4185 Location: india
|
Posted: Sun Oct 23, 2011 2:21 pm Post subject: |
|
|
Code: | ramaswamy@localtux ~ $ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /usr/share/doc/openrc/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=( "dhcp" )
ramaswamy@localtux ~ $ |
even though it is dhcp lan , i have 3 computers to share from the router same network and to share between them the files and programs.
i want to set this laptop with
ip 192.168.1.102
dns 1 125.22.47.125
dns 2 202.56.250.5
route 192.168.1.1
the other 2 computers have ip 100 and 101 respectively
thanks for reply _________________ reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name) |
|
Back to top |
|
|
Sadako Advocate
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Sun Oct 23, 2011 2:38 pm Post subject: |
|
|
Try just changing config_eth0=( "dhcp" ) to config_eth0="dhcp", the parentheses '( )' aren't required, and are used to define arrays in bash. _________________ "You have to invite me in" |
|
Back to top |
|
|
padoor Advocate
Joined: 30 Dec 2005 Posts: 4185 Location: india
|
Posted: Mon Oct 24, 2011 1:54 am Post subject: |
|
|
Code: | * Bringing up interface lo
* 127.0.0.1/8 ...
[ ok ]
* Adding routes
* 127.0.0.0/8 via 127.0.0.1 ...
[ ok ]
* Bringing up interface eth0
* dhcp ...
* Running dhcpcd ...
dhcpcd[1872]: version 5.2.12 starting
dhcpcd[1872]: eth0: rebinding lease of 192.168.1.2
dhcpcd[1872]: eth0: NAK: from 192.168.1.1
dhcpcd[1872]: eth0: broadcasting for a lease
dhcpcd[1872]: eth0: offered 192.168.1.2 from 192.168.1.1
dhcpcd[1872]: eth0: acknowledged 192.168.1.2 from 192.168.1.1
dhcpcd[1872]: eth0: checking for 192.168.1.2
dhcpcd[1872]: eth0: leased 192.168.1.2 for 86400 seconds
dhcpcd[1872]: forked to background, child pid 1911
[ ok ]
* received address 192.168.1.2/24
[ ok ]
|
the message has gone and it looks trying more than previously to get the connection.
otherwise it seems to work ok
Code: | * Bringing up interface eth0
* You are using a bash array for config_eth0.
* This feature will be removed in the future.
* Please see net.example for the correct format for config_eth0.
* dhcp ...
* Running dhcpcd ...
dhcpcd[1880]: version 5.2.12 starting
dhcpcd[1880]: eth0: rebinding lease of 192.168.1.2
dhcpcd[1880]: eth0: acknowledged 192.168.1.2 from 192.168.1.1
dhcpcd[1880]: eth0: checking for 192.168.1.2
dhcpcd[1880]: eth0: leased 192.168.1.2 for 86400 seconds
dhcpcd[1880]: forked to background, child pid 1910
[ ok ]
* received address 192.168.1.2/24
[ ok ]
|
this the difference before edit of the net file _________________ reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name) |
|
Back to top |
|
|
TaKeNeK n00b
Joined: 19 Dec 2004 Posts: 13
|
Posted: Tue Nov 29, 2011 3:49 pm Post subject: |
|
|
Any idea how to change this?
TEST ~ # cat /etc/conf.d/net
dns_servers_eth0="127.0.0.1"
config_eth0=(
"XX.160.232.132/24"
"XX.160.232.133/24"
"XX.160.232.134/24"
"XX.160.232.150/24"
"XX02:f40:10::2/64"
"XX02:f40:10::6/64"
"XX02:f40:10::7/64"
)
routes_eth0=(
"default gw XX.160.232.1"
"default gw XX02:f40:10::1"
)
dns_search_eth1="something.net"
config_eth1=(
"172.17.1.132/24"
"172.17.1.129/24"
)
routes_eth1=(
"172.16.0.0/12 via 172.17.1.20"
"10.0.0.0/8 via 172.17.1.21"
"192.168.0.0/16 via 172.17.1.22"
)
I do config_eth0="XX.160.232.132/24 XX.160.232.133/24 XX.160.232.134/24 XX.160.232.150/24 XX02:f40:10::2/64 XX02:f40:10::6/64 XX02:f40:10::7/64" - that was easy... but how about give 2 another route i try
routes_eth0="default gw XX.160.232.1 default gw XX02:f40:10::1"
or
routes_eth0="default gw XX.160.232.1 XX02:f40:10::1"
But don`t work....
This same with eth1 how give so much route ? |
|
Back to top |
|
|
padoor Advocate
Joined: 30 Dec 2005 Posts: 4185 Location: india
|
Posted: Tue Nov 29, 2011 5:22 pm Post subject: |
|
|
i think you can use add route command to add routes
reffer the link
http://www.cyberciti.biz/faq/linux-setup-default-gateway-with-route-command/
prior to gentoo whan i tried fedora early stage distro i had to connect manually to the net using add route and add default gateway and things like that.
some more knowledges people may give a better answer _________________ reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name) |
|
Back to top |
|
|
TaKeNeK n00b
Joined: 19 Dec 2004 Posts: 13
|
Posted: Tue Nov 29, 2011 5:56 pm Post subject: |
|
|
Hey m8 i know how work add route and ip a a but i want use normal net.eth0/net.eth1 script from gentoo openrc. |
|
Back to top |
|
|
Sadako Advocate
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Tue Nov 29, 2011 6:33 pm Post subject: |
|
|
I think you just put one per line, ie; Code: | routes_eth0="default gw XX.160.232.1
default gw XX02:f40:10::1" |
_________________ "You have to invite me in" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Tue Nov 29, 2011 8:45 pm Post subject: |
|
|
From my VPS, which has native IPv6
Code: | # no brackets for baselayout2
config_eth0="212.110.180.12/24
2001:41c8:123:112::2/64"
routes_eth0="default via 212.110.180.254
default via 2001:41c8:123:112::1" |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|