Networking Forums

Networking Forums > Computer Networking > Linux Networking > Re: NAT using iproute2

Reply
Thread Tools Display Modes

Re: NAT using iproute2

 
 
Pascal Hambourg
Guest
Posts: n/a

 
      08-21-2009, 02:51 PM
Hello,

Martin a écrit :
>
> I just get started using the iproute2 package instead of the good old
> ifconfig/route/arp commands, because I
> need the policy based routing funcionality. Standard IP and route
> configuration works out pretty good so far, but I'm getting problems
> enabling stateless NAT. The command
>
> # ip route add nat 192.168.50.2 via 192.168.60.2
>
> and
>
> # ip rule add nat 192.168.50.2 from 192.168.60.2
>
> should do the job both SNAT and DNAT but already the first command
> throws the error
>
> RTNETLINK answers: Invalid argument


"Routing NAT" (CONFIG_IP_ROUTE_NAT) controlled by ip rule/ip route has
been deprecated for quite a long time now in 2.6 kernels. It was
replaced in kernel 2.6.24 and above by a new stateful NAT controlled by
tc in recent versions of the iproute2 package (at least 2-2.6.24).
 
Reply With Quote
 
 
 
 
Martin Bley
Guest
Posts: n/a

 
      08-21-2009, 05:43 PM
Hi Pascal,

Pascal Hambourg <boite-a-(E-Mail Removed)> schrieb:
> "Routing NAT" (CONFIG_IP_ROUTE_NAT) controlled by ip rule/ip route has
> been deprecated for quite a long time now in 2.6 kernels. It was
> replaced in kernel 2.6.24 and above by a new stateful NAT controlled by
> tc in recent versions of the iproute2 package (at least 2-2.6.24).


thanks a lot for this info - I guessed that somehow.

Regards,
Martin

 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      08-25-2009, 11:38 AM
Pascal Hambourg a écrit :
>
> "Routing NAT" (CONFIG_IP_ROUTE_NAT) controlled by ip rule/ip route has
> been deprecated for quite a long time now in 2.6 kernels. It was
> replaced in kernel 2.6.24 and above by a new stateful NAT controlled by
> tc in recent versions of the iproute2 package (at least 2-2.6.24).


Oops. I meant stateless, not stateful. Stateful NAT is the one performed
by netfilter.
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      08-25-2009, 10:53 PM
Dave {Reply Address In.Sig} a écrit :
> Pascal Hambourg wrote:
>>
>> "Routing NAT" (CONFIG_IP_ROUTE_NAT) controlled by ip rule/ip route has
>> been deprecated for quite a long time now in 2.6 kernels. It was
>> replaced in kernel 2.6.24 and above by a new stateless NAT controlled
>> by tc in recent versions of the iproute2 package (at least 2-2.6.24).

>
> Is there a good HOWTO or other reading on the new stuff then?


I don't know. Maybe in the iproute2 package documentation or tc manpage.

> I wasn't aware
> the older stuff was deprecated because it's been working fine here.


What kind of kernel are you using ? It was removed from the 2.6 kernel
in version 2.6.9, which is quite old (2004). It is still supported (and
broken) in the current 2.4 kernel though.
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      08-26-2009, 07:19 PM
Dave {Reply Address In.Sig} a écrit :
>>
>>> I wasn't aware
>>> the older stuff was deprecated because it's been working fine here.

>>
>> What kind of kernel are you using ? It was removed from the 2.6 kernel
>> in version 2.6.9, which is quite old (2004). It is still supported (and
>> broken) in the current 2.4 kernel though.

>
> Maybe I'm misunderstanding and mixing up what I thought was iproute2, but my
> Fedora 10 machine has iproute-2.6.27-2.fc10.i386 in its installed RPM
> database. My router machine, which is where the stuff is being used for
> real, load-sharing between a couple of internet feeds, is running 2.6.20
> kernel.


If your router machine does NAT, it is probably the *stateful* NAT from
netfilter controlled by iptables.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iproute2 problems. ichi.brown@gmail.com Linux Networking 1 02-20-2007 10:52 PM
iproute2 source routing Sven Boeckelmann Linux Networking 0 10-31-2005 01:50 PM
iproute2 source routing Sven Boeckelmann Linux Networking 0 10-30-2005 01:11 PM
iproute2 question Rob Hill Linux Networking 1 10-22-2004 08:02 AM
iproute2 question sam Linux Networking 1 10-17-2003 10:13 AM



1 2 3 4 5 6 7 8 9 10 11