Hello, I assign IP 172.25.0.1 and 172.25.1.1 on one interface of my router. This interface is connected to local LAN switch. If I ping from my box on lan with IP 172.25.0.22 I get icmp reply, but if I assig to my box IP 172.25.1.22 I don''t get icmp reply. My setup: ip addr add 172.25.0.1/24 brd + dev eth0 ip addr add 172.25.1.1/24 brd + dev eth0 kernel 2.4.3, iproute2-current, iptables-1.2.1a Why second adress don''t respond for ping ? PSIkappa psi@atlantis.sk
Guy Van Den Bergh
2001-Apr-09 17:40 UTC
Re: Multiple IP adresses on one interface and ping
This should work if at least one of the two following conditions are fulfilled: 1. You have a default route from your box to your router''s primary address (172.25.0.1). The icmp packets will then be sent to the router, because your box uses the default route. 2. You also have a 2nd address on your box, let''s say 172.25.1.22. Your box will then think that 128.25.1.1 is directly connected to your LAN, and it will issue an ARP request for 172.25.1.1. Unless your router decides not to answer to this request, your "box" will recieve an ARP reply and after that it knows which MAC address it has to send the icmp request. You can also use tcpdump to find out what is really sent and received over the link. It is either your box not really sending the icmp requests or your router not sending icmp replies. Regards, Guy M.F. PSIkappa wrote:> Hello, > I assign IP 172.25.0.1 and 172.25.1.1 on one interface of my router. This > interface is connected to local LAN switch. If I ping from my box on lan > with IP 172.25.0.22 I get icmp reply, but if I assig to my box IP > 172.25.1.22 I don''t get icmp reply. > > My setup: > ip addr add 172.25.0.1/24 brd + dev eth0 > ip addr add 172.25.1.1/24 brd + dev eth0 > > kernel 2.4.3, iproute2-current, iptables-1.2.1a > > Why second adress don''t respond for ping ? > > PSIkappa > psi@atlantis.sk > > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/