Re: iproute2 ping question

Linux Advanced Routing and Traffic Control

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

 



lartc user wrote:
> 
> Hi List,

> Would somebody please explain how to use ip to attach the addresses to
> that interface and have it respond to them?

I use ProxyARP because it is the only thing that made sense to me.  In
"iptables speak", the external interface receives all packets destined for my
/29 network but it puts into INPUT only those with the IP I assign to the
NIC.  The rest go to the FORWARD chain and thus on to 4 "internal" machines
that have external IPs.  Two of those "internal" machines have 2 external
IPs.  I do that like this:

ifconfig eth1 IPAddr1 broadcast BcastIP1 netmask 255.255.255.248
ifconfig eth1:0 IPAddr2 broadcast BcastIP2 netmask 255.255.255.248
ip route add GatewayIP2/32 dev eth1 src IPAddr2

On the machine doing ProxyARP:
ip link set eth1 up
ip addr flush dev eth1
ip addr add dev eth1 local 1.1.1.2/32 brd 1.1.1.255
ip route add GatewayIP/32 dev eth1 src 1.1.1.2

You can see my scripts at http://yesican.chsoft.biz/lartc and you can get more
from ftp://andthatsjazz.org/pub/lartc
--
gypsy
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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