Definir Interfaces Ethernet Virtuales - Virtual Ethernet Interfaces

19 04 2008

Aquí les dejo un breve ejemplo de como definir una interfaz virtual es nuestro querido Debian (claro está que puede hacerse en cualquier distro).

En primer lugar vemos que interfaces tenemos en el equipo:

debian-os# ifconfig -a

lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:7961 errors:0 dropped:0 overruns:0
TX packets:7961 errors:0 dropped:0 overruns:0

eth0 Link encap:Ethernet HWaddr 00:80:AD:A8:35:A1
inet addr:172.16.0.6 Bcast:172.16.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:268557 errors:0 dropped:0 overruns:0
TX packets:18870 errors:0 dropped:0 overruns:0
Interrupt:5 Base address:0×300

Luego, definimos la nueva interface:

# vi /etc/network/interfaces

auto eth0
iface eth0 inet static
address 172.16.0.6
netmask 255.255.255.0

auto eth0:1
iface eth0:1 inet static
address 192.168.30.128
netmask 255.255.255.0

Para finalizar reiniciamos networking

# /etc/init.d/networking restart

Y verificamos la nueva interface:

# ifconfig -a

lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:7961 errors:0 dropped:0 overruns:0
TX packets:7961 errors:0 dropped:0 overruns:0

eth0 Link encap:Ethernet HWaddr 00:80:AD:A8:35:A1
inet addr:172.16.0.6 Bcast:172.16.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:268557 errors:0 dropped:0 overruns:0
TX packets:18870 errors:0 dropped:0 overruns:0
Interrupt:5 Base address:0×300

eth0:1 Link encap:Ethernet HWaddr 00:80:AD:A8:35:A1
inet addr:192.168.30.128 Bcast:192.168.30.255 Mask:255.255.255.0
UP RUNNING MTU:1500 Metric:1
RX packets:2762 errors:0 dropped:0 overruns:0
TX packets:4761 errors:0 dropped:0 overruns:0

:wq!

Mas info aquí.


Acciones

Informacion

Deje un comentario

usted puede usar estos tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>