Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Arrg... IP alias troubles
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
baylock
n00b
n00b


Joined: 26 Oct 2004
Posts: 3

PostPosted: Fri Aug 05, 2005 3:21 pm    Post subject: Arrg... IP alias troubles Reply with quote

please help....
recently i needed to rebuild my gentoobox, and noticed something about the base layout... so i upgraded it.
now im stuck with a problem.

a litttle background first.

When i moved in with some mates they already had a network up and running, so it was jsut a case of getting the box to work with it,
first thin i tryed was static IP, and the box worked, and all, but i could not get on the internet with it. so i come to the conclusion of useing dhcp. the problem with that was that the IP would keep changeing on each boot, so i assighned som alias's in the /ect/conf.d/net file, and everything worked.
for some reason the router we are useing will not let an IP connect to the net unless it was assighned by dhcp. So with dhcp up an running, and alias's assighned everything was great.

now with the new base lay out, the alias_eth0="xxx.xxx.xxx.xxx" command does not work.

does any one know how to assighn eather an alias, or preferably something like a hostname that i can use putty to access the system with?? as i am unable to ping the box via the hostname i have set in the hostname file

and yes i searched, eather im searching for the wrong thing, or not understanding the answers... thanc for your help
Back to top
View user's profile Send private message
the_mgt
Apprentice
Apprentice


Joined: 05 Aug 2005
Posts: 259
Location: Germany, near Hannover

PostPosted: Fri Aug 05, 2005 4:30 pm    Post subject: Reply with quote

Can't you just hardwire an ip to your MAC adress?
Or change the lease time to something longer than a year.
What is the dhcp server you are using for your network? Both solutions only work if you have acces to the dhcp server.

Hostnames only work, if you have a DNS Server on your network.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Fri Aug 05, 2005 11:18 pm    Post subject: Reply with quote

Here's the problem.

baselayout-1.8 and earlier where ifconfig only and supported the iface="foo" alias="bar" syntax
baselayout-1.9 introduced iproute2 syntax iproute_eth0 (no aliases) and ifconfig_eth0 with the old iface aliases syntax
baselayout-1.10 was a bust
baselayout-1.11 joined the two together with a universal config_eth0=( "addr1" "addr2" ) syntax which also took care of aliases
baselayout-1.11 also defaulted to ifconfig so the joining was pretty much error free.

With baselayout-1.12.0 we are confident we have joined to two - but with one exception. The old way of doing aliases is ifconfig specific and we have changed the default to iproute2. iproute2 has no concept of an "alias" (which is basically a work-around for an ifconfig limitation) and neither do modern kernels as it's still the same interface.

I would rather bring peoples config up to date with modern concepts and ideals rather than support aliases.

If you disagree, open a bug. I'll close it and explain why - basically what I've said here. If a patch is provided (to the 1.12.0 series) then I may listen.

Have a nice day :)
Back to top
View user's profile Send private message
baylock
n00b
n00b


Joined: 26 Oct 2004
Posts: 3

PostPosted: Sat Aug 06, 2005 2:44 am    Post subject: Reply with quote

Thax uber... i think i understsand.

basicly to make lots of other things work better, some others had to be sacrificed??
fair nuf...

how about getting it to broadcast the hoas name?? im probably missing something simple to get it to work, but i just cant seem to get it to work.


once again thanx for your help
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sat Aug 06, 2005 10:48 am    Post subject: Reply with quote

baylock wrote:
how about getting it to broadcast the hoas name?? im probably missing something simple to get it to work, but i just cant seem to get it to work.


You don't broadcast the hostname as such. You need to register your hostname with a DNS server. This can be accomplished by using a DHCP server on the same machine as the DNS server and get the two to talk to each other

DHCP - "Hey DNS,I got a machine called 'foo' and I've given him 1.1.1.2"
DNS - "OK - I'll instruct everyone that 'foo' is 1.1.1.2 until you tell me that foo has released"

dnsmasq in portage does both DNS and DHCP and is very easy to setup
Back to top
View user's profile Send private message
baylock
n00b
n00b


Joined: 26 Oct 2004
Posts: 3

PostPosted: Sun Aug 07, 2005 9:16 am    Post subject: Reply with quote

ok... kewl... looks like lease times for me then... thanx for ur time
Back to top
View user's profile Send private message
STEDevil
Apprentice
Apprentice


Joined: 24 Apr 2003
Posts: 156

PostPosted: Sat Aug 27, 2005 7:03 pm    Post subject: Reply with quote

UberLord wrote:

baselayout-1.11 joined the two together with a universal config_eth0=( "addr1" "addr2" ) syntax...

With baselayout-1.12.0 we are confident we have joined to two - but with one exception. The old way of doing aliases is ifconfig specific and we have changed the default to iproute2. iproute2 has no concept of an "alias" (which is basically a work-around for an ifconfig limitation) and neither do modern kernels as it's still the same interface.

I would rather bring peoples config up to date with modern concepts and ideals rather than support aliases.


Ok, but if there will be no aliases, how will I NAT between LAN & WAN with only 1 NIC in the box once I upgrade from baselayout 1.11 to 1.12? TIA
Back to top
View user's profile Send private message
akbarstatx
n00b
n00b


Joined: 14 Oct 2002
Posts: 67
Location: Minneapolis, MN

PostPosted: Thu Mar 09, 2006 5:15 am    Post subject: Reply with quote

iproute may not technically support aliases but it does allow you to label an interface so that ifconfig displays the labeled interface as an alias. e.g.
Code:

ip addr add 192.168.0.1/24 dev eth0 brd 192.168.0.255 label eth0:0

This interface will show up in ifconfig as eth0:0.

So what I don't understand is why using iproute in conf.d/net exclusively or preferentially is not able to use the label syntax to create an alias. The iproute docs say the label syntax is usefull for backwards compatibilty with ifconfig style aliasing.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Mar 09, 2006 8:30 am    Post subject: Reply with quote

akbarstatx wrote:
So what I don't understand is why using iproute in conf.d/net exclusively or preferentially is not able to use the label syntax to create an alias. The iproute docs say the label syntax is usefull for backwards compatibilty with ifconfig style aliasing.


You said it yourself - it's for backwards compatibilty.

Basic rule of thumb with >1 address
ifconfig - requires aliases so you get aliases
iproute2 does not so you don't
_________________
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
red-wolf76
l33t
l33t


Joined: 13 Apr 2005
Posts: 714
Location: Rhein-Main Area

PostPosted: Wed Dec 13, 2006 8:21 am    Post subject: Reply with quote

EDIT: The problem was solved by adding the default route, in my case route add default gw 192.168.1.1. Haven't the foggiest why my config didn't do that. Has the sensitivity to comments increased, by any chance? The commented lines are kept in the config because I sometimes move the box to my network at home.

EDIT2: *bump* The problem persists after re-booting. Even though I have defined the default via, as per spec, I positively must manually add the route to be able to access the internet. What gives? Sth broken? Output of route is as follows:
Prior to manually adding route:
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo

After route add default gw 192.168.1.1:
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0


Hi, I've got an idiotic question but my box is unable to reach the internet via our router, while local networking is just fine.

Here's my /etc/conf.d/net:
Code:
# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 $

modules=(
"ifconfig"
)

config_eth0=(
"192.168.1.111/24"
)

#config_eth0=(
#"192.168.6.102/24"
#"192.168.0.102/24"
#"192.168.1.102/24"
#"192.168.2.102/24"
#)

dns_servers=(
"192.168.1.1"
#"192.168.6.1"
)

gateways=(
"192.168.1.1"
#"192.168.6.1"
)

routes_eth0=(
"default via 192.168.1.1"
#"default via 192.168.6.1"
)

mtu_eth0=1492
It worked up to my installing (yes, I may be getting what I deserve) baselayout-1.12.7 yesterday. But yes, I did update all config files :wink:.

I get a "network unreachable" upon trying to ping anything other than my subnet. The router connects other boxen (running various windows versions) on the network to the internet just fine.

Now, I fear that my box at home (on which I also updated baselayout, but had trouble) will have the same problem.
_________________
0mFg, G3nt00 r0X0r$ T3h B1g!1111 ;)

Use sane CFLAGS! If for no other reason, do it for the lulz!
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