From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Singh Date: Tue, 07 Feb 2006 13:23:17 +0000 Subject: Re: [lartc] Virtual Interface Message-Id: MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1246098766==" List-Id: References: <43E3A576.2080604@mailinator.com> In-Reply-To: <43E3A576.2080604@mailinator.com> To: lartc@vger.kernel.org --===============1246098766== Content-Type: multipart/alternative; boundary="----=_Part_18865_4260335.1139318597897" ------=_Part_18865_4260335.1139318597897 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Mike, Thanks. I will try it.. I have not explained the puspose for this doing this - just to give you an idea I want to create around 200 virtual interfaces and send traffice through all the interfaces simulating traffic comming from different networks. Do you think this approach will scale to that level? Roger On 2/3/06, list user wrote: > > Hi Roger, > > [big snip: lost o.p.] > > There are a couple of different approaches you might try. One is to use > uml-utilities' tunctl to create an ethernet tap. Another is to use the > dummy interface. With either method you can bridge, route, configure as > you would a physical device using ifconfig and/or ip. > > The following methods work for me. I use Fedora Core 4. Its network > setup methods are in /etc/sysconfig/network-scripts. > > cd /etc/sysconfig/network-scripts > ln -s ifup-eth ifup-tap > ln -s ifdown-eth ifdown-tap > echo 'ip link show tap0 | grep "tap0" 2>&1 >/dev/null || tunctl -t tap0 > DEVICE=3Dtap0 > TYPE=3Dethernet > ONBOOT=3Dyes > BOOTPROTO=3Dstatic > MACADDR=3D5a:5a:5a:5a:5a:5a > NETWORK=3D192.168.0.0 > IPADDR=3D192.168.0.1 > BROADCAST=3D192.168.0.255 > NETMASK=3D255.255.255.0' > ifcfg-tap0 > ifup tap0 > > ln -s ifup-eth0 ifup-dummy > ln -s ifdown-eth ifdown-dummy > echo 'ip link show dummy0 | grep "dummy0" 2>&1 >/dev/null || { > ip link set dummy0 up > ip link set dummy0 arp on > ip link set dummy0 multicast on > } > DEVICE=3Ddummy0 > TYPE=3Dethernet > ONBOOT=3Dyes > BOOTPROTO=3Dstatic > MACADDR=3Da4:a5:a5:a5:a5:a5 > NETWORK=3D192.168.0.0 > IPADDR=3D192.168.0.2 > BROADCAST=3D192.168.0.255 > NETMASK=3D255.255.255.0' > ifcfg-dummy0 > ifup dummy0 > > If all went well there should now be two new virtual ethernet devices, > tap0 and dummy0. > > Hope this information is useful to you, > Mike Wright :m) > > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc > ------=_Part_18865_4260335.1139318597897 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Mike,
 
Thanks. I will try it..
I have not explained the puspose for this doing this - just to give yo= u an idea I want to create around 200 virtual interfaces and send traffice = through all the interfaces simulating traffic comming from different networ= ks. Do you think this approach will scale to that level?
 
Roger

 
On 2/3/06, l= ist user <nhgxfjijdrc= d@mailinator.com> wrote:
Hi Roger,

[big snip: lost= o.p.]

There are a couple of different approaches you might try.&nbs= p; One is to use
uml-utilities' tunctl to create an ethernet tap.   Another is= to use the
dummy interface.  With either method you can bridg= e, route, configure as
you would a physical device using ifconfig and/or= ip.

The following methods work for me.  I use Fedora Core= 4.  Its network
setup methods are in /etc/sysconfig/network-scripts.

cd /etc/sys= config/network-scripts
ln -s ifup-eth ifup-tap
ln -s ifdown-eth ifdow= n-tap
echo 'ip link show tap0 | grep "tap0" 2>&1 >/d= ev/null ||  tunctl -t tap0
DEVICE=3Dtap0
TYPE=3Dethernet
ONBOOT=3Dyes
BOOTPROTO=3Dstatic<= br>MACADDR=3D5a:5a:5a:5a:5a:5a
NETWORK=3D= 192.168.0.0
IPADDR=3D192.168.0.1<= br>BROADCAST=3D 192.168.0.255
NETMASK=3D255.255.255= .0' > ifcfg-tap0
ifup tap0

ln -s ifup-eth0 ifup-dummy
l= n -s ifdown-eth ifdown-dummy
echo 'ip link show dummy0 | grep "dumm= y0" 2>&1 >/dev/null || {
ip link set dummy0 up
ip link set dummy0 arp on
ip link set dummy= 0 multicast on
}
DEVICE=3Ddummy0
TYPE=3Dethernet
ONBOOT=3DyesBOOTPROTO=3Dstatic
MACADDR=3Da4:a5:a5:a5:a5:a5
NETWORK=3D 192.168.0.0
IPADDR=3D192.168.0.2<= br>BROADCAST=3D192.168.0.255
NETMAS= K=3D255.255.255.0' > ifcfg-dummy0ifup dummy0

If all went well there should now be two new virtual ethernet devic= es,
tap0 and dummy0.

Hope this information is useful to you,
M= ike Wright :m)

_______________________________________________
LARTC mailing list
LARTC@mailma= n.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

------=_Part_18865_4260335.1139318597897-- --===============1246098766== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1246098766==--