Hi,
Steve M Bibayoff schrieb:
> internal infaces on linux boxes eth0 on x.x.x.1neta=192.168.0.0/24
> netb=192.168.1.0/24ip rules on east:
> # ip tunnel add netb mode gre remote a.b.c.e local f.g.h.i ttl 255
> # ip link set netb up arp on
> # ip addr add 192.168.0.254/24 dev netb
-^^
> # ip route add 192.168.1.0/24 dev netb
> ip rules on west:
> # ip tunnel add neta mode gre remote f.g.h.i local a.b.c.e ttl 255
> # ip link set neta up arp on
> # ip addr add 192.168.1.254/24 dev neta
-^^
> # ip route add 192.168.0.0/24 dev neta
> [east]# route -n
[...]
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 netb
[...]
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 neta
[...]
> If I'm listening on west at neta when I first try to ping anyone on
> netb, nothing is coming though unless I have just pinged from netb to
> neta first.
>
I don't know where this ping effect comes from, but your setup is
somewhat ... confusing.
First, you use /24 subnet masks on the tunnel interfaces ... why? This
results in having 2 routes for your local subnet, one over eth1, and one
over the tunnel ...
- A possible setup would be:
east:
# ip tunnel add netb mode gre remote a.b.c.e local f.g.h.i ttl 255
# ip link set netb up
# ip addr add 192.168.0.254/32 peer 192.168.1.0/24 dev netb
west:
# ip tunnel add neta mode gre remote f.g.h.i local a.b.c.e ttl 255
# ip link set neta up
# ip addr add 192.168.1.254/32 peer 192.168.0.0/24 dev neta
- *Or* another possibility:
east:
# ip tunnel add netb mode gre remote a.b.c.e local f.g.h.i ttl 255
# ip link set netb up
# ip addr add 192.168.2.1/30 dev netb
# ip route add 192.168.1.0/24 via 192.168.2.2 dev netb
west:
# ip tunnel add neta mode gre remote f.g.h.i local a.b.c.e ttl 255
# ip link set neta up
# ip addr add 192.168.2.2/30 dev neta
# ip route add 192.168.0.0/24 via 192.168.2.1 dev neta
The second possibility will work better when using some "sensible"
software like zebra, mrouted or pimd.
Note that tunnels usually are used as point-to-point interfaces.
David Lamparter