SME Server Second (Alias) IP HOWTO (BETA)
 

Sonora Communications, Inc.

  • Increase font size
  • Default font size
  • Decrease font size

SME Server Second (Alias) IP HOWTO (BETA)

E-mail Print PDF

This is only a guide. Modify for your situation. Tested on SME 7.

This procedure can also be used to create a 802.1q VLAN interface by using ifcfg-eth0.1 (.2, .3, etc.) and modifying the following fragment appropriately.  Use vconfig (man vconfig) as necessary.

Create the Network Configuration File Template

Enter all commands as root. Be careful to enter each command all on one line. Do not make any spelling errors.

mkdir -p /etc/e-smith/templates-custom/etc/sysconfig/network-scripts

cp /etc/sysconfig/network-scripts/ifcfg-eth0 \
   /etc/e-smith/templates/etc/sysconfig/network-scripts/ifcfg-eth0\:0

cp /etc/sysconfig/network-scripts/ifcfg-eth0 \
   /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-eth0\:0

Edit the custom template for your particular network.

vi /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-eth0\:0

It will look something like:

# Add a second (alias) IP address to eth0 (eth0:0)
TYPE=Ethernet
# use DEVICE=eth0.1 (.2, .3, etc.) for VLAN
DEVICE=eth0:0
USERCTL=no
ONBOOT=yes
PEERDNS=no
IPV6INIT=no
BOOTPROTO=none
# uncomment the following for VLAN
# VLAN=yes
IPADDR=192.168.1.2
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255

Expand the Template to Create the New Configuration File and Check the Result

/sbin/e-smith/expand-template /etc/sysconfig/network-scripts/ifcfg-eth0:0

cat /etc/sysconfig/network-scripts/ifcfg-eth0:0

Restart Networking and Check the New Interface

service network restart

ifconfig 

Inform SME Server of the New Network

If necessary, use the Server Manager web console to enable the new network or subnetwork. (Security - Local Networks) This would not be necessary if you simply gave the NIC another IP from the already-configured local network for some reason.

Last Updated on Sunday, 06 July 2008 18:21