Results 1 to 2 of 2

Thread: Multiple loopback interfaces

  1. #1
    Join Date
    Feb 2010
    Beans
    32

    Multiple loopback interfaces

    Hi guys,
    I wanted to know that is there any way in ubuntu that we can create multiple loopback adapters as in the case of windows.If yes please tell me how to do it.I know that ubuntu has by default one loopback lo.but my problem is due to some networking issue i want to create multiple loopback adapters and assign ip to them.Please tell me how to create them and how to assign ip address to them.

  2. #2
    Join Date
    Apr 2010
    Beans
    3

    Re: Multiple loopback interfaces

    Hey,

    You can use the following to create a new loopback interface

    Code:
    ifconfig lo:40 192.168.40.1 netmask 255.255.255.0 up
    Or add them permanently to /etc/network/interfaces


    Code:
    auto lo lo:10 lo:20
    iface lo inet loopback
    
    iface lo:10 inet static
            address 192.168.10.1
            netmask 255.255.255.0
            network 192.168.10.0
    
    iface lo:20 inet static
            address 192.168.20.1
            netmask 255.255.255.0
            network 192.168.20.0
    Then use ifup to enable each lo interface after you've configured the file. You won't have to use ifup after reboot.
    HTH
    Last edited by rvt; April 25th, 2010 at 02:52 AM. Reason: wrong network address

Bookmarks

Posting Permissions

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