Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How to setup lo:1 or lo:2 device in/etc/conf.d/net?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
axa
n00b
n00b


Joined: 17 Jun 2003
Posts: 51
Location: Taiwan

PostPosted: Tue Dec 20, 2005 2:42 am    Post subject: [SOLVED] How to setup lo:1 or lo:2 device in/etc/conf.d/net? Reply with quote

As subject.

I can't see any doc about this issue.

Please Help. :roll:
_________________
Trust & Unique...


Last edited by axa on Tue Dec 20, 2005 11:37 am; edited 1 time in total
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Dec 20, 2005 7:17 am    Post subject: Reply with quote

Some examples.

Code:
config_lo=( "192.168.0.2/24" "10.0.0.1/8" )


We force 127.0.0.1, so there's no need to specify that yourself :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
axa
n00b
n00b


Joined: 17 Jun 2003
Posts: 51
Location: Taiwan

PostPosted: Tue Dec 20, 2005 8:10 am    Post subject: Reply with quote

Hello UberLord :

I changed my /etc/conf.d/net as u said but it didnt work ... :cry:

Sth. wrong ??? :roll:

Should I need modify "RC_NET_STRICT_CHECKING="lo" that in /etc/conf.d/rc ???


Quote:

plus conf.d # pwd
/etc/conf.d
plus conf.d # cat net|grep config_lo
config_lo=( "230.130.19.12/32" "192.168.1.170/32" )


Quote:

plus conf.d # /etc/init.d/net.lo restart
* WARNING: you are stopping a boot service.
* Stopping lo
* Shutting down lo ... [ ok ]
* Starting lo
* Bringingg up lo ... [ ok ]
plus conf.d # ifconfig lo
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:35 errors:0 dropped:0 overruns:0 frame:0
TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2572 (2.5 Kb) TX bytes:2572 (2.5 Kb)

plus conf.d #


_________________
Trust & Unique...
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Dec 20, 2005 8:20 am    Post subject: Reply with quote

What version of baselayout do you have installed? You need 1.12 at a minimum.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
axa
n00b
n00b


Joined: 17 Jun 2003
Posts: 51
Location: Taiwan

PostPosted: Tue Dec 20, 2005 8:32 am    Post subject: Reply with quote

i am using 1.11 8O

Quote:


plus conf.d # /usr/lib/gentoolkit/bin/qpkg -I -v baselayout
sys-apps/baselayout-1.11.13-r1 *
plus conf.d #



It seems my problem, I am upgrading baselayout now, Later I'll post result here.

Thanks :P
_________________
Trust & Unique...
Back to top
View user's profile Send private message
axa
n00b
n00b


Joined: 17 Jun 2003
Posts: 51
Location: Taiwan

PostPosted: Tue Dec 20, 2005 9:40 am    Post subject: Reply with quote

Hello UberLord:
I have upgraded my baselayout to 1.12 but unfortunately i got fail again...


Quote:

axa ~ # qpkg -I -v baselayout
sys-apps/baselayout-1.12.0_pre11-r1 *
axa ~ # /etc/init.d/net.lo restart
* WARNING: you are stopping a boot service.
* Stopping lo
* Bringing down lo
* Shutting down lo ... [ ok ]
* Starting lo
* Bringing up lo
* 127.0.0.1/8 [ ok ]
* 10.0.0.1/24 [ ok ]
* 20.20.20.20/24 [ ok ]
* Adding routes
* 127.0.0.0/8 ... [ ok ]
axa ~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:48:10:00:0B
inet addr:172.17.4.222 Bcast:172.17.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7673 errors:0 dropped:0 overruns:0 frame:0
TX packets:161 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:837227 (817.6 Kb) TX bytes:20072 (19.6 Kb)
Interrupt:22 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:74 errors:0 dropped:0 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5180 (5.0 Kb) TX bytes:5180 (5.0 Kb)

axa ~ #



my /etc/conf.d/net configuration as following

Quote:

# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
config_eth0="172.17.4.222/16"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
#iface_eth0="dhcp"
#dhcpcd_eth0="..."
config_lo=( "10.0.0.1/24" "20.20.20.20/24" )

# For adding aliases to a interface
#
#alias_eth0="192.168.0.3 192.168.0.4"

# NB: The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly. Leave commented to assign
# defaults for that interface.
#
#broadcast_eth0="192.168.0.255 192.168.0.255"
#netmask_eth0="255.255.255.0 255.255.255.0"


# For setting the default gateway
#
routes_eth0=( "default via 172.17.0.1" )


_________________
Trust & Unique...
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Dec 20, 2005 9:42 am    Post subject: Reply with quote

And what's the output of
Code:
ip addr

_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
axa
n00b
n00b


Joined: 17 Jun 2003
Posts: 51
Location: Taiwan

PostPosted: Tue Dec 20, 2005 10:31 am    Post subject: Reply with quote

:lol:

IT IS WORKING . Just keeping the same configuration that you told me perviously.

I don't know ip addr can verify loopback configuration befor you posted.


Many many thanks. :lol:



Quote:

axa ~ # ip addr
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
inet 10.0.0.1/24 brd 10.0.0.255 scope host lo
inet 20.20.20.20/24 brd 20.20.20.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0a:48:10:00:0b brd ff:ff:ff:ff:ff:ff
inet 172.17.4.222/16 brd 172.17.255.255 scope global eth0

_________________
Trust & Unique...
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Dec 20, 2005 11:17 am    Post subject: Reply with quote

baselayout-1.11 prefers ifconfig - ifconfig requires use of aliases for >1 address per interface
baselayout-1.12 prefers iproute2 - iproute2 has no such requirement and aliases confuse most people, so we don't use em :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum