Example below assumes you have eth0 with 172.31.0.1 for Host A and 172.31.0.2 for Host B.
Connect test PC to Host A port eth1 and try pinging Host B (10.10.10.2). Yes, it really is that easy.
P.S. Test your setup well as usually you can't get full 1500 byte MTU with configuration like this!
Host A:
ip link add gretap0 type gretap local 172.31.0.1 remote 172.31.0.2 ip link set dev gretap0 up ip link set dev eth1 up brctl addbr br0 brctl addif br0 gretap0 brctl addif br0 eth1 ip addr add 10.10.10.1/24 dev br0 ip link set br0 up
Host B:
ip link add gretap0 type gretap local 172.31.0.2 remote 172.31.0.1 ip link set dev gretap0 up ip link set dev eth1 up brctl addbr br0 brctl addif br0 gretap0 brctl addif br0 eth1 ip addr add 10.10.10.2/24 dev br0 ip link set br0 up
No comments:
New comments are not allowed.