[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Multiple GRE tunnels question.



Hello !!

 I`d like to setup a virtual network consisting of networks located at the
headquarters and subsidiaries of a company. Let`s say there are four
subsidiaries. Each network will be using a different address space, for
instance: 192.168.1.0/24 (headquarters` network), 192.168.2.0/24,
192.168.3.0/24, 192.168.4.0/24, 192.168.5.0/24 and will be masqueraded to
access the internet. The routers` external interfaces will have the
addresses: 213.77.100.2 (the headquarters), 213.77.100.5, 213.77.100.4,
213.77.100.3, 213.77.100.1 (not real ones).

So on the headquarters` router I do the following:

...to establish a tunnel from the headquartes to subsidiary1:

ip tunnel add subsidiary1 mode gre remote 213.77.100.5 local 213.77.100.2 
ttl 255
ip link set subsidiary1 up
ip addr add 192.168.1.1 dev subsidiary1
ip route add 192.168.2.0/24 dev subsidiary1

...to establish a tunnel from the headquartes to subsidiary2:

ip tunnel add subsidiary2 mode gre remote 213.77.100.4 local 213.77.100.2 
ttl 255
ip link set subsidiary2 up
ip addr add ? dev subsidiary2
ip route add 192.168.3.0/24 dev subsidiary2

... and so on for other subsidiaries...

192.168.1.1 - ip address of headquarters` internal ethernet interface.

There is however a question that arises in connection with the above outlined
setup (if it is correct at all). As I need to create several tunnel devices
(subsidiary1, subsidiary2 and so on...) and I need to assign each tunnel
device an ip address, what that address should be ? Should it be the
address of the headquarters` internal ethernet interface for all tunnel
devices ? Can anybody enlighten me on this ?

Best regards,
Przemyslaw Tokarski
Lodz, Poland

  










[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]