point-to-point network with unknown peer ip address

M. V. bored_to_death85 at yahoo.com
Wed Feb 20 10:57:04 UTC 2013


hi,

I have 2 FreeBSD8.2 systems. I have a point-to-point interface (myif0) on each side connected together, but on each side I don't know IP address of the other side. to make the connection work, On each side I set IP address (2.2.2.32/24 and 2.2.2.33/24) and added a route which sends all traffic to the network to interface:
#route add 2.2.2.0/24 -interface myif0

#ifconfig myif0
myif0: flags=89d1<UP,POINTOPOINT,RUNNING,NOARP,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500


now my routing table looks like this:

#netstat -r

Destination Gateway Flags  Refs  Use  Netif Expire
...
2.2.2.0           myif0      US     0       145    myif0

2.2.2.32         link#9    UH     0       0        lo0
...

now, from one side if I ping the other side (say 2.2.2.33/24) everything seems ok. but if I ping any other IP in the network (say 2.2.2.100/24) the other endpoint sends back packet + an ICMP REDIRECT packet. but sender doesn't care about the received ICMP-REDIRECT and resends packet to interface. this causes a loop and each packet is being sent back and forth till its TTL expires.

my sysctl output:
...

net.inet.ip.redirect: 1
net.inet.icmp.drop_redirect: 0
...


now I wanted to ask:
- is there any other way to do this? how can I manipulate routes to have a working point-to-point interface with an unknown peer ip address? 
- if not, shouldn't FreeBSD handle received ICMP-REDIRECT and stop sending packet to interface after that? how can I make this happen?



thank you.


More information about the freebsd-net mailing list