Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    how to add an ip alias in opensuse?


    How does one add an ip alias to an eth device using the ip command instead of the ifconfig command?

    I do not want the alias to be permanet.

  2. #2
    man ip
    ip addr { add | del } IFADDR dev STRING

  3. #3
    when I run

    ip addr add dev eth0:0
    The IP address is indeed added. But it is not added in the form eth0:0

    Does this matter?

    When I add a address alias through yast2 in opensuse, I see that the alias is added as eth0:0.

  4. $spacer_open
  5. #4
    You need to modify your ip command just a bit:
    ip addr add dev eth0 label eth0:0
    Then verify it, e.g.:
    [root@host] ip addr show dev eth0
    2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
        link/ether 00:11:22:33:aa:bb brd ff:ff:ff:ff:ff:ff
        inet brd scope global eth0
        inet scope global eth0:0
    Last edited by atreyu; 08-19-2011 at 02:33 PM. Reason: typo

  6. #5
    Awesome, thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts