May 20

While trying to set up a meteor server I stumble upon a small issue. I need it to access the same network card using 2 different IP addresses. My favorite linux distribution for server is Ubuntu Server, but as far as I know this should apply to all Linux distros.
1. Open for editing /etc/network/interfaces file using vim, Joe or mcedit.I used:

# mcedit /etc/network/interfaces

2. Modify the content to look something like this, keeping in mind that these are the settings suitable for my environment. You should customize the ip addresses to match your network configuration:

#first address
auto eth1
iface eth1 inet static
address 192.168.2.109
netmask 255.255.255.0
network 192.168.2.255
gateway 192.168.2.1

#seccond address
auto eth1:1
iface eth1:1 inet static
address 192.168.2.110
netmask 255.255.255.0
network 192.168.2.255
gateway 192.168.2.1

3. Now restart the network

# /etc/init.d/networking restart

4. Check the new configuration

# ifconfig

Share

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.