Routing with alias source address

Hello guys im new in this themes, i have a big problem y have to make an alias for the eth0 interface, i made it with yast and my alias was eth0:1, first, if i try to shutdown the interface i can´t it give an error and tell me that the interface don´t exist and the second threat is if i can put a default gateway for this alias something like this in other distributions:

route add 128.26.6.11 gw 192.168.28.201 dev eth0:1

I hope you can´t help me i really desperate

Thanks

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The example you have posted is not for a default gateway. I have not
tested this myself but I am also not sure what the difference is, really,
if your default route is set on eth0 (which is really eth0:0) or eth0:1.
When you send data over the network destined for a default route that will
be done with the destination IP address in the IP header but with the
router’s MAC address in the MAC header so nothing between your box and the
available router will care much otherwise. The only concern I have is if
the TCP stack tries to be clever and realizes that the IP address of the
gateway is not available via the virtual network device and then throws a
fit, but a quick test should tell us one way or another.

On my SLED 11 x86_64 laptop I added a new IP address to eth0:1 and then a
route to some foreign network through a made-up IP address which was
within the network of the new IP added to my laptop. When I did this,
even when explicitly stating eth0;1 as my device for the remote network’s
gateway, the ‘ip route’, ‘/sbin/route’ and ‘netstat -nr’ commands all
showed the device as simply eth0 instead of eth0:1. While that is a bit
interesting I do not think it is relevant since the packets are being put
on the same wire in any case.

I may be misunderstanding what you’re after and if that’s the case I
apologize.

Good luck.

ingenriqueromero wrote:
> Hello guys im new in this themes, i have a big problem y have to make an
> alias for the eth0 interface, i made it with yast and my alias was
> eth0:1, first, if i try to shutdown the interface i can´t it give an
> error and tell me that the interface don´t exist and the second threat
> is if i can put a default gateway for this alias something like this in
> other distributions:
>
> route add 128.26.6.11 gw 192.168.28.201 dev eth0:1
>
> I hope you can´t help me i really desperate
>
> Thanks
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJLV0j+AAoJEF+XTK08PnB5p7gP/iug3t/rpIC6xiEt3UWDDFw1
IslPgvmaHsBOUgB43K4xFgghzDCnyB0gELb3lMjJArUXKUaMCxstF8H2Z03xApK0
SRA8VSfigLhBqNLvYyDlp5Q+M/6TRn6Um+LNjMpesDzHJo7kbhxiTgL/nO2Zqmhf
ZB3zZApZEGym/78rPhEKlZeQ0WcDegyVBnbI/7C2IlybRiTcnTs26SkqbX5xPlm/
PqE07/RT9/+7QK+Em/bAHd8S96a+86aFSWE4zVzRkIcTz4c5V+oFBKAklhYwYKSR
D2jqkEMEcafOpE1Mers+axYcqt0JNC5V8eHNID9tCtzhyjcOBazQeD1DMLQpJ1nm
Hy6AJuJtShpTomrSJ/jN4gyhKjrsCyDhlhR1AE1MyYnX5bIe1RfntgRrfxBEDyax
tg19iaY/EL97V0R7TTn6kdSD2nFWfP0kq6fk4fgHBkcw3mQNo80ThwSHF4ugNBLI
AG3h4qGLirS1KNtcw9fU99M5OaCaZDayn2OvDUMnmBGQDSPYJjL/ym6kWQX6/d+m
E04SjK/C7Jl5he7NhFJqjAHx2z8dgLx1bgPt0LvFSHSamARikNya2xzmSxDMwm1k
mz0EWVHjU+Kd7IRTX0Pc2z43fsmo4oxQMMAJt1DOQDak7//6NZyajLuoPaXZSZyb
Yt8jKPeRGXSCelDE1F39
=rJtW
-----END PGP SIGNATURE-----

What version openSUSE? There is a “bug” in the 11.1 YaST that it cannot delete an alias interface. But it can be done from the command line. Because alias interfaces are deprecated it will not be fixed that way. (Alias interfaces are not needed anymore to bind multiple addresses.)

https://bugzilla.novell.com/show_bug.cgi?id=495142

I Have de SuSe 11.3.

Thanks