[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: About two eth alias in single ethernet !!!

On 02/01/2013 04:17 AM, Lic. Néstor Rodríguez-Triana Domínguez wrote:
Hello everybody:

Enybody can tellme how to setup al eth alias (like eth0:0) in a debian box with a sigle ethernet?

One way doing it if you are looking for mutiple ipnumbers on eth0

cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0

iface eth0 inet static
    address xx.xx.xx.11
    network xx.xx.xx.0
    broadcast xx.xx.xx.255
    post-up /etc/firewall/eth0_route_up
    pre-down /etc/firewall/eth0_route_down
    gateway xx.xx.xx.1
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers xx.xx.yy.11
    dns-search xxx.se

cat /etc/firewall/eth0_route_up
ip a add xx.xx.xx.12/24 dev eth0
ip a add xx.xx.xx.13/24 dev eth0

cat /etc/firewall/eth0_route_down
ip a del xx.xx.xx.12/24 dev eth0
ip a del xx.xx.xx.13/24 dev eth0

// Björn M.

Reply to: