Search This Blog

Thursday, January 31, 2013

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
netmask 255.255.255.0
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
#!/bin/bash
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
#!/bin/bash
ip a del xx.xx.xx.12/24 dev eth0
ip a del xx.xx.xx.13/24 dev eth0


// Björn M.


--
To UNSUBSCRIBE, email to debian-firewall-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/510AD175.1070609@bjorn-helena.se

No comments: