Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Ip-aliasing how do you make it stick?

  1. #1

    Default Ip-aliasing how do you make it stick?

    Hi all,

    Over the last week I have spend many hours tying to set up two virual hosts using SSL on my Development server. I initially got it working using ip-based virtual hosting, but had to revert back to name-based instead. The problem I had was setting up the alias Ip address for my second domain. I didn't have any problems using ifconfig to set it up and test the setup but couldn't find the actual config file to put the ifconfig commands in so the aliased address would be there after reboot. I want to use ip-based virtual hosting as it will be the route I will need to go when I publish bothe of these sites. Below are the ifconfig commands which do work, but where do I put them to make them work after a reboot? Or is there a different way to add more than one ip alias to a single network card?

    ifconfig eth0:0 192.1.1.3
    rout add -host 192.1.1.3 dev eth0:0

    I found this referenced in more than three different tutorials on the web and they all point to a file in /etc/rc.d/rc.local. I can't find it in SUSE 11. Is it even done that way on Suse 11?

    Thanks again in advance for any help.
    jtaitt

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Ip-aliasing how do you make it stick?

    You can set up aliases in YaST > Network Devices > Network Settings > Edit. You can also directly edit /etc/sysconfig/network/ifcfg-ethX, but you have to know the format of the alias entry, so add one using YaST and see what it looks like for future reference.

  3. #3

    Default Re: Ip-aliasing how do you make it stick?

    Thanks again for all of your help in all three of my threads.

    To be honest, I thought I tried to add an ip-alias in Yast but couldn't get access to the part of the screen that lets you enter the alias. It's wasn't available. I did find the file you suggested and added some entries I found in a google search and they didn't work. At least I couldn't see them when I used the ifconfig command to verify if they were there. I'll go back and try to see why I can't create aliases in Yast and get back with you on this.

    Thanks,
    jtaitt

  4. #4

    Default Re: Ip-aliasing how do you make it stick?

    Hi again ken_yap,

    I took a look at the Network Settings in YAST and as I remember, the part of the form to add aliases to is not accessible. No matter what I tried to do it would not allow me to add an alias via the GUI. I did find some info about manually adding an alias in the conf file. After I added commands for the aliass I rebooted and checked YAST again and found what looks like a valid entry in the alias form even though it is still locked. I tried to look for the new alias using ifconfig but it doesn't showup. One thing I did notice in the document I read about setting up the alias manually said something about under certain circumstances ifconfig would no longer work and to use ip. Ip is a new command for me and I tried to use some of the flags and optons from it's man page but still couldn't see the new alias. All to say, it looks like it is there, but I don't know how to verify it. Do you have any suggestions?

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Ip-aliasing how do you make it stick?

    Of course it's accessible. I just tried it this morning.

    YaST > Network Devices > Network Settings > Overview > Select Device > Edit.

    One possibility it's not accessible is you are using a dynamic address from your router. In which case you should switch to a static address. If you hope to run a webserver on that machine you'll need a static address anyway. Not much fun when a webserver's address is at the whim of the DHCP server in the router.

  6. #6

    Default Re: Ip-aliasing how do you make it stick?

    I'm sure I'm using a static address but I'll go back and check it out again and get back to you. One question though, once it is working will I be able to see the aliased address using ifconfig? As I stated above, on the man page I was reading, I believe it was for ifcfg made some kind of comment about it not working and having to use ip.

  7. #7

    Default Re: Ip-aliasing how do you make it stick?

    I went back and checked my router and the address is definitely static as well as how it's defined on the network Setting Address dialog. But I'm sorry to say I still don't have access to the ip-alias part of the form. I know it doesn't make sense, if I could give you a screen print here I would show you. As I stated above, I entered some commands into /etc/sysconfig/network/ifcfg-eth0 and the results display in the ip-alias form even though I can't edit them.

    ifcfg-eth0:

    BOOTPROTO='static'
    BROADCAST=''
    ETHTOOL_OPTIONS=''
    IPADDR='192.1.1.108/24'
    MTU='1492'
    NAME='RTL-8139/8139C/8139C+'
    NETMASK=''
    NETWORK=''
    REMOTE_IPADDR=''
    STARTMODE='ifplugd'
    USERCONTROL='no'
    IFPLUGD_PRIORITY='20'
    BOOTPROTO_1='auto'
    BROADCAST_1=''
    ETHTOOL_OPTIONS_1=''
    IPADDR_1='192.1.1.208/24'
    MTU_1='1492'
    NAME_1='RTL-8139/8139C/8139C+'
    NETMASK_1=''
    NETWORK_1=''
    REMOTE_IPADDR_1=''
    STARTMODE_1='off'
    USERCONTROL_1='no'
    IFPLUGD_PRIORITY_1='20'
    PREFIXLEN_1=''
    LABEL_1='1'

    Ip-Alias listing:

    Alias Name = 1
    IP Address = 192.1.1.208
    Netmask = 255.255.255.0

    Looks like its working but I can't prove it. The alias eth0:1 does not show up when I use ifconfig. I'll re-configure my Virtual Host setup back to an ip-based setup and see if it works. I assume there is a separate listing in the Software Management module in YAST to delete the Network Setting Module. Perhaps it's corrupted in some way. If all else fails I'll try re-installing it and re-configuring my Network stuff again.

    I'll be gone the rest of the day but will post my finding as soon as I can get back to it.

    Again, many thanks

  8. #8
    Join Date
    Jun 2008
    Location
    Israel - Karmiel
    Posts
    33

    Default Re: Ip-aliasing how do you make it stick?

    Is your firewall up and running?

    I had some issues regarding not being able to do some things with the IPs configurations if the iface was not set to one zone. (don't remember if was ip aliases).


    Cheers
    - OpenSuse 11 with KDE4.1 - Amazing!

  9. #9

    Default Re: Ip-aliasing how do you make it stick?

    Looks like its working but I can't prove it. The alias eth0:1 does not show up when I use ifconfig.
    Forget about ifconfig and use ip instead.

  10. #10

    Default Re: Ip-aliasing how do you make it stick?

    I checked and the firewall is set to the External Zone. One other discovery I made though is I have Suse 11 installed on both my Laptop as well as my Server. All of the testing and setup I'm doing first on my Laptop and then applying it to the server if it proves to be working properly. I just checked my server which I haven't set up virtual hosting yet until I have the ip-alasing figured out first, has the ip-alias screen in YAST inaccessible also. I'm really confused now, it looks like they both are that way from the initial installation.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •