LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-26-2021, 04:11 AM   #16
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100

With Qemu, 2 nics per machine, one for internet, other for LAN.
Ssh on 1002x ports.

As root:
Code:
ip link add virt-br0 type bridge
ip link set virt-br0 up

ip tuntap add tap0 mode tap group netdev
ip tuntap add tap1 mode tap group netdev
ip tuntap add tap2 mode tap group netdev
ip link set tap0 up
ip link set tap1 up
ip link set tap2 up

# connect tun/tap interfaces with bridge
ip link set tap0 master virt-br0
ip link set tap1 master virt-br0
ip link set tap2 master virt-br0
As user:
Code:
#Machine 1
qemu-system-x86_64 -name PC-1 -m 2048 -smp cpus=1 -enable-kvm -netdev user,ipv6=off,id=net0,hostfwd=tcp::10021-:22 -device e1000,netdev=net0 -netdev tap,id=net1,ifname=tap0,script=no,downscript=no -device e1000,netdev=net1,mac=52:54:00:00:00:00 m1.img

#Machine 2
qemu-system-x86_64 -name PC-2 -m 2048 -smp cpus=1 -enable-kvm -netdev user,ipv6=off,id=net0,hostfwd=tcp::10022-:22 -device e1000,netdev=net0 -netdev tap,id=net1,ifname=tap1,script=no,downscript=no -device e1000,netdev=net1,mac=52:54:00:00:00:01 m2.img

#Machine 3
qemu-system-x86_64 -name PC-3 -m 2048 -smp cpus=1 -enable-kvm -netdev user,ipv6=off,id=net0,hostfwd=tcp::10023-:22 -device e1000,netdev=net0 -netdev tap,id=net1,ifname=tap2,script=no,downscript=no -device e1000,netdev=net1,mac=52:54:00:00:00:02 m3.img

Last edited by Linux.tar.gz; 05-26-2021 at 04:13 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to pass through both the graphic cards that I have on two different virtual machines and one only PC marietto2008 Linux - Virtualization and Cloud 2 08-12-2020 02:43 PM
setting up clients to establish tcp connection on virtual ip keif Linux - Networking 2 05-08-2018 08:31 AM
[SOLVED] How do i establish connection between host and guest in KVM Jerico91 Linux - Newbie 9 10-20-2013 11:24 AM
How to establish direct connection between Linux machine and Windows 7 machine capodicapi Linux - Newbie 7 10-12-2012 08:44 AM
Communicating between 2 linux machines / windows-lunux machines xombboxer Linux - Newbie 2 03-15-2012 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration