Koozali.org: home of the SME Server

How do I assign 2 IPs to External NIC

David Mendoza

How do I assign 2 IPs to External NIC
« on: May 28, 2003, 05:59:41 PM »
I am setting up an E-smith server with a DirecWay satellite conexion.  However, I seem to need to use both a Private and a Public IP.  I already have the gateway working and everyone on the network can get to the Internet.  However, in order to host a site, email, etc, I have been told I also need to have the External NIC handle/manage a Public IP, which I have been given.

I know in Windows this is possible with the Advance feature on configuration, but how do I do it with E-smith.  

Suggestions?  Ideas?


Thank YOU!

Nathan Fowler

Re: How do I assign 2 IPs to External NIC
« Reply #1 on: May 28, 2003, 06:15:57 PM »
I also use DirecWay professional edition and have a static IP, how is it that you are able to interface the USB-only modem with your E-Smith box?  Did you get the expensive hardware that gives you a ethernet port?

Despite my expertise with Linux and E-Smith and my desire to run E-Smith as my Direcway router, I've been unable to do so because of the specfic DpNav software that requires a Win32 OS and the USB ITU/IRU.  All my routing and caching of DNS is done by Kerio WinRoute Pro, which works well, but it still isn't as robust as E-Smith.

From what I understand you want to assign two IP addresses to your external network card, this is easily done by something called IP-Aliasing.

I'm going to assume eth1 is your external interface.  Basically you would want to:

cd /etc/sysconfig/network-scripts
cp ifcfg-eth1 ifcfg-eth1a
pico ifcfg-eth1a

Where is says DEVICE=eth1, change this to DEVICE=eth1:0
Update the IPADDR, NETMASK, NETWORK, BROADCAST according to the values Direcway gave you.

Add a line called GATEWAY= and add the default gateway.

Save your changes and run:
ifup eth1a

You should now have the card aliased and should be able to host using that public IP address.  Type "ifconfig" and you should entries for eth1 and eth1:0

Hope this helped also please answer the questions concerning Direcway with Ethernet, you've sparked my interest ;)

Thanks,
Nathan

David Mendoza

Re: How do I assign 2 IPs to External NIC
« Reply #2 on: May 29, 2003, 08:35:42 AM »
Nathan,

Thanks for the input.  Some of my other colleagues have jumped in and sent a few differing responses, all along the same lines as yours.  In summary they have given me the two following observations:

1.  That I have to make a template in E-smith so that when I reboot, I don't have to setup the settings once more.
2.  I had also failed to mention that the Gateway also seems to be using a private IP, whereby it seems that setting up the E-smith with a public IP may most likely not work


Regarding the equipment I am using for DirecWay, its the DW4020.  You may want to try and pick up the DW4000 which is an older model (Ebay maybe), which does provide you with RJ45 Ethernet connection.  These are more expensive pieces of equipment, but for a business environment I think quite worth the expense.  Best of luck and thanks for the input.

Nathan Fowler

Re: How do I assign 2 IPs to External NIC
« Reply #3 on: May 29, 2003, 08:55:31 AM »
Sounds good.  I'm not sure you'll need to template the virtual alias because the system doesn't have a reference template for it, so it shouldn't be removed/overwritten.  I'm curious as to why you have both a public and private IP on the system, I'm using the PE (Professional Edition) and they just gave me a public IP (direcway.stickit.nu).  I've got the two-way system with the newest IRU/ITU's, I guess their the 4020's, they are the ones with USB (They are blue and grey).  I was able to find some 2.4.x kernel modules for one way and two way systems, that supports USB so pass on the information to any of your buddies using Direcway, but I have not tried them yet.

Have you signed up for anything that exceeds a 300MB FAP?  WIth PE, I get a 300MB FAP, but I'm looking for a bit more.

Thanks,
Nathan