* [LARTC] iproute2 ping question
@ 2005-06-29 23:20 lartc user
2005-06-30 2:11 ` gypsy
0 siblings, 1 reply; 2+ messages in thread
From: lartc user @ 2005-06-29 23:20 UTC (permalink / raw)
To: lartc
Hi List,
New subscriber/lartc user here. Have read the entire lar&tc howto,
alexy's ip_cref, etc. and must say, this makes iptables seem downright
*easy*.
I'm trying to build a three-legged linux router (WAN/LAN/DMZ) and have
had it more or less working with iptables but would like to learn layer2
routing with iproute2.
I have an adsl/29 network and would like my router to answer on all five
of my static addresses on the WAN side of the router. For testing
purposes I'm using tcpdump and ping.
For list purposes the WAN is
$ADSL.0 network
$ADSL.1 gateway
$ADSL.2 WAN-address1 (eth1)
$ADSL.3 WAN-address2
$ADSL.4 WAN-address3
$ADSL.5 WAN-address4
$ADSL.6 WAN-address5
$ADSL.7 broadcast
First I bring up the nic.
"ifup eth1"
Ping and eth1 ($ADSL.2) replies correctly.
Next I add a second address to the nic.
"ip addr add $ADSL.3/29 dev eth1"
Ping gets no response from the new address but tcpdump shows the nic
receiving the request.
If instead I bring the addresses up as aliases on eth1 the pings work.
Would somebody please explain how to use ip to attach the addresses to
that interface and have it respond to them?
Many thanks in advance, and apologies for the thickness of my skull.
:m)
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] iproute2 ping question
2005-06-29 23:20 [LARTC] iproute2 ping question lartc user
@ 2005-06-30 2:11 ` gypsy
0 siblings, 0 replies; 2+ messages in thread
From: gypsy @ 2005-06-30 2:11 UTC (permalink / raw)
To: lartc
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@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-30 2:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 23:20 [LARTC] iproute2 ping question lartc user
2005-06-30 2:11 ` gypsy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.