Skip to contentSkip to conversation

gre tunnel between networks with same subnet

LARTC Gabriel 1 participant 2 messages Jul 8, 2005 – Jul 15, 2005

lore
Share & tools
lore

Gabriel

author
#0 lore raw
            /-----------------------\
            |                       |
            |eth0                   |eth0
        |-------|               |-------|
        |       |eth1      eth1 |       |
--------    A   |____    _______|   B   |-----
        |       |    \  /       |       |
        --------|    |  |       --------|
                     |  |
                     |  |
                 -----------
                |___________|
                    switch

What you see above is my setup. Box A is connected to Box B through a switch. Box A is connected to the Internet through eth0, same with Box B. The link that goes through the switch is not very reliable, so I want to connect the two boxes using their Internet link via a gre tunnel. The problem is that the boxes are on the same subnet (and I can't change that). I've read about proxy arp, about bridging, but things are still confused. Here are some numbers: eth1 on Box A is 192.168.1.1/24, eth1 on Box B is 192.168.1.31/24. On Box B there are 4 NICs, 3 of them (including eth1) are bridged, with the bridge interface being br0 (192.168.1.31 is actually assigned to br0, not eth1). I've read the lartc howto, so I created a tun0 interface on both boxes: ip tunnel add tun0 mode gre remote remote_ip_here local local_ip_here ttl 255; ip link set tun0 up. The problem is what do I do from here? Do I bridge tun0 and eth1 on Box A and add tun0 to br0 on Box B? Or do I just enable proxy_arp for eth1 and tun0 on Box A and for br0 and tun0 on B? Are there any routes neccesary (my guess is no, but I'm not very sure)? And about proxy_arp: what do I have to do to turn it on, just set /proc/sys/net/ipv4/conf/<iface>/proxy_arp to 1 and that's it? One last thing:
http://leaf.sourceforge.net/doc/howto/proxyarp.html#id2805973
says proxy-arp is not bridging (agreed) so DO NOT CONFIGURE BRIDGE OPTIONS!!! Does this mean using bridging and doing proxy-arp on the same box is not possible?

Thanks.

(hope the ascii art comes out well)

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

author
#1 lore raw

Ok, so I tried the bridging thing. I tried to bridge eth1 and tun0 on A, but apparently linux can't bridge tunnel interfaces (I got an error saying invalid argument when I issued 'brctl addif br0 tun0'). I was told to try using the vtun interface, so I'll dig into that for now.

Quoted 31 lines · --- Gabriel
            /-----------------------\
            |                       |
            |eth0                   |eth0
        |-------|               |-------|
        |       |eth1      eth1 |       |
--------    A   |____    _______|   B   |-----
        |       |    \  /       |       |
        --------|    |  |       --------|
                     |  |
                     |  |
                 -----------
                |___________|
                    switch

What you see above is my setup. Box A is connected to Box B through a switch. Box A is connected to the Internet through eth0, same with Box B. The link that goes through the switch is not very reliable, so I want to connect the two boxes using their Internet link via a gre tunnel. The problem is that the boxes are on the same subnet (and I can't change that). I've read about proxy arp, about bridging, but things are still confused. Here are some numbers: eth1 on Box A is 192.168.1.1/24, eth1 on Box B is 192.168.1.31/24. On Box B there are 4 NICs, 3 of them (including eth1) are bridged, with the bridge interface being br0 (192.168.1.31 is actually assigned to br0, not eth1). I've read the lartc howto, so I created a tun0 interface on both boxes: ip tunnel add tun0 mode gre remote remote_ip_here local local_ip_here ttl 255; ip link set tun0 up. The problem is what do I do from

Quoted 9 lines

here? Do I bridge tun0 and eth1 on Box A and add tun0 to br0 on Box B? Or do I just enable proxy_arp for eth1 and tun0 on Box A and for br0 and tun0 on B? Are there any routes neccesary (my guess is no, but I'm not very sure)? And about proxy_arp: what do I have to do to turn it on, just set /proc/sys/net/ipv4/conf/<iface>/proxy_arp to 1 and that's it? One last thing:

http://leaf.sourceforge.net/doc/howto/proxyarp.html#id2805973

Quoted 9 lines

says proxy-arp is not bridging (agreed) so DO NOT CONFIGURE BRIDGE OPTIONS!!! Does this mean using bridging and doing proxy-arp on the same box is not possible?

Thanks.

(hope the ascii art comes out well)

Quoted 10 lines

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc