[LARTC] Followup Question: Help with GRE Tunneling

Linux Advanced Routing and Traffic Control

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

 



This is a multi-part message in MIME format.

------=_NextPart_000_010B_01C1B481.E676A2C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I would like to make both Network A and B have the same subnet. I did a =
changes to my config pls correct if this will work.

#Network A
/sbin/echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/ipchains -A forward -s 192.168.1.0/24 -j MASQ
#/sbin/ipchains -A forward -s 192.168.2.0/24 -j MASQ   # this will be =
omitted
/sbin/insmod ip_gre

/sbin/ip tunnel add alas mode gre remote x.x.x.x local y.y.y.y ttl 255
/sbin/ip link set netb up
/sbin/ip addr add 192.168.1.1 dev netb
/sbin/ip route add 192.168.1.0/24 dev netb   # this option dont work coz =
theres an existing route in routing table and the routing table is set =
to eth1 interface. so if i force                                         =
                               to add it using "route add -net =
192.168.1.0  netmask 255.255.255.0 dev neta"=20
                                                                  it =
cant ping the internal ip's only the tunnel is working :(


-------------------------------------------------------------------------=
-----

#Network B
/sbin/echo 1 > /proc/sys/net/ipv4/ip_forward
#/sbin/ipchains -A forward -s 192.168.2.0/24 -j MASQ  # this will be =
omitted
/sbin/ipchains -A forward -s 192.168.1.0/24 -j MASQ

/sbin/insmod ip_gre
/sbin/ip tunnel add text mode gre remote y.y.y.y local x.x.x.x ttl 255
/sbin/ip link set neta up
/sbin/ip addr add 192.168.1.2 dev neta
/sbin/ip route add 192.168.1.0/24 dev neta    # this option dont work =
coz theres an existing route in routing table and the routing table is =
set to eth1 interface. so if i force                                     =
                                to add it using "route add -net =
192.168.1.0  netmask 255.255.255.0 dev neta"=20
                                                                  it =
cant ping the internal ip's only the tunnel is working :(

Pls check correct this config if its possible to work. Thanks


------=_NextPart_000_010B_01C1B481.E676A2C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.100" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I would like to make both Network A and =
B have the=20
same subnet. I did a changes to my config pls correct if this will=20
work.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#Network A<BR>/sbin/echo 1 &gt;=20
/proc/sys/net/ipv4/ip_forward<BR>/sbin/ipchains -A forward -s =
192.168.1.0/24 -j=20
MASQ<BR>#/sbin/ipchains -A forward -s 192.168.2.0/24 -j MASQ&nbsp;&nbsp; =
# this=20
will be omitted</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>/sbin/insmod ip_gre</FONT></DIV><FONT =
face=3DArial=20
size=3D2>
<DIV><BR>/sbin/ip tunnel add alas mode gre remote x.x.x.x local y.y.y.y =
ttl=20
255<BR>/sbin/ip link set netb up<BR>/sbin/ip addr add 192.168.1.1 dev=20
netb<BR>/sbin/ip route add 192.168.1.0/24 dev netb&nbsp;&nbsp; # this =
option=20
dont work coz theres an existing route in routing table and the routing =
table is=20
set to eth1 interface. so if i force &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
to&nbsp;add it using "route add -net 192.168.1.0&nbsp;&nbsp;netmask=20
255.255.255.0 dev neta" </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
it cant ping the internal ip's only the tunnel is working :(
<DIV>&nbsp;</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT face=3DArial=20
size=3D2>----------------------------------------------------------------=
--------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#Network B<BR>/sbin/echo 1 &gt;=20
/proc/sys/net/ipv4/ip_forward<BR>#/sbin/ipchains -A forward -s =
192.168.2.0/24 -j=20
MASQ&nbsp; # this will be omitted<BR>/sbin/ipchains -A forward -s =
192.168.1.0/24=20
-j MASQ</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>/sbin/insmod ip_gre<BR>/sbin/ip tunnel =
add text=20
mode gre remote y.y.y.y local x.x.x.x ttl 255<BR>/sbin/ip link set neta=20
up<BR>/sbin/ip addr add 192.168.1.2 dev neta<BR>/sbin/ip route add=20
192.168.1.0/24 dev neta&nbsp;&nbsp;&nbsp; # this option dont work coz =
theres an=20
existing route in routing table and the routing table is set to eth1 =
interface.=20
so if i force&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to&nbsp;add it =
using=20
"route add -net 192.168.1.0&nbsp;&nbsp;netmask 255.255.255.0 dev neta"=20
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
it cant ping the internal ip's only the tunnel is working =
:(</DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Pls check correct this config if its =
possible to=20
work. Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_010B_01C1B481.E676A2C0--



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux