Environnement : VMware Workstation, VyOS 1.2.0 et Windows 7
Schéma :
[laptop1]--[R1]--[R]--[R2]--[laptop2]
laptop1 : 192.168.111.2/24 sans passerelle
laptop2 : 192.168.111.3/24 sans passerelle
R1 : eth0 vers R : 172.30.30.2/29
eth1 vers laptop1 : sans adressage
R : eth0 vers R1 : 172.30.30.1/29
eth1 vers R2 : 172.31.31.1/29
R2 : eth0 vers R : 172.31.31.2/29
eth1 vers laptop2 : sans adressage
Configuration sur R1 :
set interfaces bridge br0 aging 300
set interfaces bridge br0 max-age 20
set interfaces bridge br0 priority 0
set interfaces bridge br0 stp false
set interfaces ethernet eth1 bridge-group bridge br0
set protocols static route 0.0.0.0/0 next-hop 172.30.30.1
set interfaces l2tpv3 l2tpeth0 bridge-group bridge br0
set interfaces l2tpv3 l2tpeth0 destination-port 10000
set interfaces l2tpv3 l2tpeth0 encapsulation udp
set interfaces l2tpv3 l2tpeth0 local-ip 172.30.30.2
set interfaces l2tpv3 l2tpeth0 peer-session-id 1
set interfaces l2tpv3 l2tpeth0 peer-tunnel-id 1
set interfaces l2tpv3 l2tpeth0 remote-ip 172.31.31.2
set interfaces l2tpv3 l2tpeth0 session-id 1
set interfaces l2tpv3 l2tpeth0 source-port 10000
set interfaces l2tpv3 l2tpeth0 tunnel-id 1
commit
save
Configuration sur R2 :
set interfaces bridge br0 aging 300
set interfaces bridge br0 max-age 20
set interfaces bridge br0 priority 0
set interfaces bridge br0 stp false
set interfaces ethernet eth1 bridge-group bridge br0
set protocols static route 0.0.0.0/0 next-hop 172.31.31.1
set interfaces l2tpv3 l2tpeth0 bridge-group bridge br0
set interfaces l2tpv3 l2tpeth0 destination-port 10000
set interfaces l2tpv3 l2tpeth0 encapsulation udp
set interfaces l2tpv3 l2tpeth0 local-ip 172.31.31.2
set interfaces l2tpv3 l2tpeth0 peer-session-id 1
set interfaces l2tpv3 l2tpeth0 peer-tunnel-id 1
set interfaces l2tpv3 l2tpeth0 remote-ip 172.30.30.2
set interfaces l2tpv3 l2tpeth0 session-id 1
set interfaces l2tpv3 l2tpeth0 source-port 10000
set interfaces l2tpv3 l2tpeth0 tunnel-id 1
commit
save
Remarque : il faut s'assurer que les cartes réseau eth0 (WAN) sont configurées en mode "promiscuous" en utilisant la commande "ifconfig eth0 -promisc"
Comments
Post a Comment