Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to add a second loopback network device on Linux, so that I have lo and (e.g.) lo2. This is so that I can use netem to simulate a throttled network over lo2 without compromising my standard loopback interface.

Note that I can not use an alias interface here (such as lo:1) since netem will affect the underlying (lo) interface, not the interface alias.

How can that be done?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Can you add a virtual tap device and do the testing on that?

ip tuntap add dev tap0 mode tap

You may need to install/insmod the tun driver first.

share|improve this answer
    
Thanks. That sounds like it should work. –  Paul Cager Feb 21 '13 at 12:57

Can't do. The net 127.0.0.0/8 is always loopback (127.0.0.1 is just conventional). This is enforced by the kernel.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.