I would like to virtual machines to be able to communicate with each other. I needs to configure network interfaces according to the following schedule:
In this case, suffice it to any machine assign the IP address using the command ip addr? And I will add ip route on BST routers?
All systems are running on virtual machines. Host is Windows.
BST1, BST2, Eagle-Server - Debian machines
PC1, PC2 - Windows machines
I'm using VirtualBox
Edit
My config:
Eagle:
ip addr add 192.168.254.1/24 dev eth0
ip route add 10.10.10.4/30 via 192.168.254.253 dev eth0
ip route add 172.16.200.0/24 via 192.168.254.253 dev eth0
ip route add 172.16.255.0/24 via 192.168.254.253 dev eth0
BST1
ip addr add 192.168.254.253/24 dev eth0
ip addr add 10.10.10.6/30 dev eth1
ip route add 172.16.200.0/24 via 10.10.10.5 dev eth1
ip route add 172.16.255.0/24 via 10.10.10.5 dev eth1
BST2
ip addr add 10.10.10.5/30 dev eth1
ip addr add 172.16.255.254/24 dev eth0
ip addr add 172.16.200.254/24 dev eth2
ip route add 192.168.254.0/24 via 10.10.10.5 dev eth1
Ping between BST1 and Eagle does not work. Ping from PC1 (172.16.255.128) and PC2 (172.16.255.127) to BST2 - request timed out.
Answer
You need three internal nets:
intern0 between Eagle and BST1
intern1 between BTS1 and BTS2
intern2 between BTS2 and the two pcs;
Thus Eagle and the two pcs need only one network adapter, BTS1 need2 2, and you can configure BTS2 with 3 network adapters.
You need to enable IPv4 forwarding on BTS1 and BTS2 as follows:
echo 1 > /proc/sys/net/ipv4/ip_forward
You may configure all the interfaces of Eagle, BTS1 and BTS2 with the ip command:
Eagle:
ip addr add 192.168.254.1/24 dev eth0
ip route add 10.10.10.4/30 via 192.168.254.253 dev eth0
ip route add 172.16.200.0/24 via 192.168.25.253 dev eth0
ip route add 172.16.255.0/24 via 192.168.25.253 dev eth0
BST1
ip addr add 192.168.254.253/24 dev eth0
ip addr add 10.10.10.6/30 dev eth1
ip route add 172.16.200.0/24 via 10.10.10.5 dev eth1
ip route add 172.16.255.0/24 via 10.10.10.5 dev eth1
BST2
ip addr add 10.10.10.5/30 dev eth1
ip addr add 172.16.255.254/24 dev eth0
ip addr add 172.16.200.254/24 dev eth2
ip route add 192.168.254.0/24 via 10.10.10.5 dev eth1
You will need to configure the PCs in Windows (sorry no hablo Windows and want to keep it that way), to have the two static IPs you chose for them. Also, remember to use 172.16.200.254 as the default gateway for Kowalski, and 172.16.255.254 as the default gateway for Nowak.
That's all.
Comments
Post a Comment