# freebsd router crashes instantly



## verb (Jul 21, 2018)

Hello everyone
I am using freebsd 6.4 i386 router for a long time until soon when i found that if i try to create large number of sessions to some site like 100k freebsd crashes almost instantly. I suspect that sometime it doesn't reach this number because it crashes as soon as i start flooding.
here are some  settings please any advice on how to tune the os are appreciated

```
#netstat -m
8246/8448/128000 mbufs in use (current/peak/max):
    8245 mbufs allocated to data
    1 mbufs allocated to packet headers
8244/8436/32000 mbuf clusters in use (current/peak/max)
18984 Kbytes allocated to network (19% of mb_map in use)
0 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines
```


```
#sysctl kern.ipc          
kern.ipc.maxsockbuf: 262144
kern.ipc.sockbuf_waste_factor: 8
kern.ipc.somaxconn: 128
kern.ipc.max_linkhdr: 16
kern.ipc.max_protohdr: 40
kern.ipc.max_hdr: 56
kern.ipc.max_datalen: 156
kern.ipc.nmbclusters: 32000
kern.ipc.msgmax: 16384
kern.ipc.msgmni: 40
kern.ipc.msgmnb: 2048
kern.ipc.msgtql: 40
kern.ipc.msgssz: 8
kern.ipc.msgseg: 2048
kern.ipc.semmap: 30
kern.ipc.semmni: 10
kern.ipc.semmns: 60
kern.ipc.semmnu: 30
kern.ipc.semmsl: 60
kern.ipc.semopm: 100
kern.ipc.semume: 10
kern.ipc.semusz: 92
kern.ipc.semvmx: 32767
kern.ipc.semaem: 16384
kern.ipc.shmmax: 33554432
kern.ipc.shmmin: 1
kern.ipc.shmmni: 192
kern.ipc.shmseg: 128
kern.ipc.shmall: 8192
kern.ipc.shm_use_phys: 0
kern.ipc.shm_allow_removed: 0
kern.ipc.mbuf_wait: 32
kern.ipc.mbtypes: 117 8278 5 0 0 0 0 0 0 0 0 0 0 0 0 0
kern.ipc.nmbufs: 128000
kern.ipc.nsfbufs: 4608
kern.ipc.nsfbufspeak: 0
kern.ipc.nsfbufsused: 0
kern.ipc.m_clreflimithits: 0
kern.ipc.mcl_pool_max: 0
kern.ipc.mcl_pool_now: 0
kern.ipc.maxsockets: 32000
```


```
#sysctl net.inet.tcp
net.inet.tcp.rfc1323: 0
net.inet.tcp.rfc1644: 0
net.inet.tcp.mssdflt: 512
net.inet.tcp.keepidle: 7200000
net.inet.tcp.keepintvl: 75000
net.inet.tcp.sendspace: 32768
net.inet.tcp.recvspace: 57344
net.inet.tcp.keepinit: 75000
net.inet.tcp.delacktime: 100
net.inet.tcp.log_in_vain: 0
net.inet.tcp.blackhole: 1
net.inet.tcp.delayed_ack: 1
net.inet.tcp.drop_synfin: 1
net.inet.tcp.insecure_rst: 0
net.inet.tcp.reass.maxsegments: 2000
net.inet.tcp.reass.cursegments: 0
net.inet.tcp.reass.overflows: 0
net.inet.tcp.path_mtu_discovery: 1
net.inet.tcp.slowstart_flightsize: 1
net.inet.tcp.local_slowstart_flightsize: 4
net.inet.tcp.newreno: 1
net.inet.tcp.tcbhashsize: 512
net.inet.tcp.do_tcpdrain: 1
net.inet.tcp.pcbcount: 3
net.inet.tcp.icmp_may_rst: 1
net.inet.tcp.isn_reseed_interval: 0
net.inet.tcp.inflight_enable: 0
net.inet.tcp.inflight_debug: 0
net.inet.tcp.inflight_min: 6144
net.inet.tcp.inflight_max: 1073725440
net.inet.tcp.inflight_stab: 20
net.inet.tcp.syncookies: 1
net.inet.tcp.syncache.bucketlimit: 30
net.inet.tcp.syncache.cachelimit: 15359
net.inet.tcp.syncache.count: 0
net.inet.tcp.syncache.hashsize: 512
net.inet.tcp.syncache.rexmtlimit: 3
net.inet.tcp.msl: 30000
net.inet.tcp.rexmit_min: 1000
net.inet.tcp.rexmit_slop: 200
net.inet.tcp.always_keepalive: 1
```
I suspect some network card buffer or something like that the cause . Is it posible that the problem occurs before packets reach the os ???  Also my server has supermicro network card. Tried to adjust net.inet.tcp.inflight_max and net.inet.tcp.inflight_enable but with no success


----------



## diizzy (Jul 21, 2018)

FreeBSD 6.4 End of Life - November 30, 2010
https://www.freebsd.org/security/unsupported.html
Unsupported / Can't help

Please backup your system and reinstall FreeBSD 11.2 instead, it'll be faster than doing the theoretical upgrade path.


----------

