On 2013/05/26 12:52, Cesar Calvo wrote: > Hi, thanks for sharing > > >http://marc.info/?l=openbsd-misc&m=134643340822363 > >hostname.if: > > !route add -llinfo -iface -net 10.255.0.0/16 10.255.255.1 -ifp nfe0 > > inet 1.2.3.4 255.255.255.255 > > inet 1.2.4.3 255.255.255.255 > > ... > > > >mygate: > > 10.255.255.1 > > > I change all inet values for sanbox testing before apply settings in > production machine > ---------------------------------------------------------------------------------------- > > > > PF=no > net.inet.ip.forwarding=1 > > My test ip is 10.1.1.1 in a usb wireless nic (urtwn0), and the gateway must > be 192.168.1.1 where is a linksys router/gateway
You do realise that having a gateway outside of your own subnet is a totally broken setup normally only done by some "root server" operators to avoid using an additional IP address? As well as needing special setup on their customers machines they will most likely be doing something special on their side of the network too which you'll also need to replicate if you're trying to emulate this for a test... > hostname.urtwn0: > > nwid wifi > wpakey **** > inet 10.1.1.1 255.255.255.255 > !route add -llinfo -iface -net 192.168.1.0/24 192.168.1.1 -ifp urtwn0 > > mygate: > 192.168.1.1 > > > And the result is... Network is Unreachable and ping icmp packets are lost. > > > urtwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr f8:1a:67:18:16:eb > priority: 4 > > groups: wlan egress > media: IEEE802.11 autoselect (OFDM54 mode 11g) > status: active > ieee80211: nwid wifi chan 1 bssid 00:25:9c:2f:43:a0 198dB wpakey <not > displayed> wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp > wpagroupcipher tkip > > inet 10.1.1.1 netmask 0xffffff00 broadcast 10.255.255.255 > > > > Thanks all for comments. > > > > 2013/5/26 Stuart Henderson <[email protected]> > > On 2013-05-25, Cesar Calvo <[email protected]> wrote: > > Hi people. > > I have a linux server a try to migrate to openbsd 5.3/amd64. I am > totatly > > new in this amazing OS. > > > > In linux I have: > > > > - ip addr 200.124.200.125/32 dev net1 > > - ip route add 190.64.x.x dev net1 > > - ip route add default via 190.64.x.x > > > > All packets from net1 ip are delivery via 190.64.x.x gateway. > > But on openbsd, route syntax is different. > > I have hostname.em0 with: > > inet 200.124.200.125 255.255.255.248 none > > !route add 190.64.x.x -iface em0 > > > > And in mygate I put only 190.64.x.x > > > > The result is bad address and network is unreachable. > > > > > > See http://marc.info/?l=openbsd-misc&m=134643340822363 for an > example > of one way you might work around this broken network configuration.

