Linux系统中sysctl命令详解 sysctl -p、sysctl -a、sysctl -w

sysctl命令用于运行时配置内核参数,这些参数位于/proc/sys目录下。sysctl配置与显示在/proc/sys目录中的内核参数.可以用sysctl来设置或重新设置联网功能,如IP转发、IP碎片去除以及源路由检查等。用户只需要编辑/etc/sysctl.conf文件,即可手工或自动执行由sysctl控制的功能。

    命令格式:

    sysctl [-n] [-e] -w variable=value

    sysctl [-n] [-e] -p (default /etc/sysctl.conf)

    sysctl [-n] [-e] -a

    常用参数的意义:

    -w   临时改变某个指定参数的值,如

        sysctl -w net.ipv4.ip_forward=1

    -a   显示所有的系统参数

    -p   从指定的文件加载系统参数,如不指定即从/etc/sysctl.conf中加载

    如果仅仅是想临时改变某个系统参数的值,可以用两种方法来实现,例如想启用IP路由转发功能:

    1) #echo 1 > /proc/sys/net/ipv4/ip_forward

    2) #sysctl -w net.ipv4.ip_forward=1

    以上两种方法都可能立即开启路由功能,但如果系统重启,或执行了

    # service network restart

 命令,所设置的值即会丢失,如果想永久保留配置,可以修改/etc/sysctl.conf文件

 将 net.ipv4.ip_forward=0改为net.ipv4.ip_forward=1


1, sysctl命令的作用
     在运行时配置内核参数
2,用法举例:
      -w 用此选项来改变一个sysctl设置
     例:sysctl -w net.ipv4.ip_forward=1
     -p   载入sysctl配置文件
           如-p后未指定路径,则载入 /etc/sysctl.conf
     例: sysctl -p /etc/sysctl.conf


001 了解这些内核参数的意义对于解决问题会很有帮助。
002 sh-# sysctl -a
003 kernel.sched_child_runs_first = 0
004 kernel.sched_min_granularity_ns = 750000
005 kernel.sched_latency_ns = 6000000
006 kernel.sched_wakeup_granularity_ns = 1000000
007 kernel.sched_tunable_scaling = 1
008 kernel.sched_migration_cost = 500000
009 kernel.sched_nr_migrate = 32
010 kernel.sched_time_avg = 1000
011 kernel.sched_shares_window = 10000000
012 kernel.timer_migration = 1
013 kernel.sched_rt_period_us = 1000000
014 kernel.sched_rt_runtime_us = 950000
015 kernel.panic = 0
016 kernel.core_uses_pid = 0
017 kernel.core_pattern = core
018 kernel.core_pipe_limit = 0
019 kernel.tainted = 1
020 kernel.print-fatal-signals = 0
021 kernel.ctrl-alt-del = 0
022 kernel.modprobe = /sbin/modprobe
023 kernel.modules_disabled = 0
024 kernel.hotplug = /sbin/hotplug
025 kernel.sg-big-buff = 32768
026 kernel.cad_pid = 1
027 kernel.threads-max = 4606
028 kernel.random.poolsize = 4096
029 kernel.random.entropy_avail = 152
030 kernel.random.read_wakeup_threshold = 64
031 kernel.random.write_wakeup_threshold = 128
032 kernel.random.boot_id = 9e7b0657-6f91-4e94-9c05-55c49dd99da9
033 kernel.random.uuid = 309f03a1-28d0-47e0-9616-a390bb0349ba
034 kernel.usermodehelper.bset = 4294967295 4294967295
035 kernel.usermodehelper.inheritable = 4294967295  4294967295
036 kernel.overflowuid = 65534
037 kernel.overflowgid = 65534
038 kernel.pid_max = 32768
039 kernel.panic_on_oops = 0
040 kernel.printk = 7       4       1       7
041 kernel.printk_ratelimit = 5
042 kernel.printk_ratelimit_burst = 10
043 kernel.printk_delay = 0
044 kernel.dmesg_restrict = 0
045 kernel.kptr_restrict = 0
046 kernel.ngroups_max = 65536
047 kernel.randomize_va_space = 1
048 kernel.max_lock_depth = 1024
049 kernel.poweroff_cmd = /sbin/poweroff
050 kernel.blk_iopoll = 1
051 kernel.ostype = Linux
052 kernel.osrelease = 3.0.13
053 kernel.version = #1 PREEMPT Tue Oct 8 16:24:52 CST 2013
054 kernel.hostname= 1234
055 kernel.domainname = (none)
056 kernel.shmmax = 33554432
057 kernel.shmall = 2097152
058 kernel.shmmni = 4096
059 kernel.msgmax = 8192
060 kernel.msgmni = 575
061 kernel.msgmnb = 16384
062 kernel.sem = 250        32000   32      128
063 kernel.auto_msgmni = 1
064 kernel.pty.max = 4096
065 kernel.pty.nr = 0
066 vm.overcommit_memory = 0
067 vm.panic_on_oom = 0
068 vm.oom_kill_allocating_task = 0
069 vm.oom_dump_tasks = 1
070 vm.overcommit_ratio = 50
071 vm.page-cluster = 3
072 vm.dirty_background_ratio = 10
073 vm.dirty_background_bytes = 0
074 vm.dirty_ratio = 20
075 vm.dirty_bytes = 0
076 vm.dirty_writeback_centisecs = 500
077 vm.dirty_expire_centisecs = 3000
078 vm.nr_pdflush_threads = 0
079 vm.swappiness = 60
080 vm.lowmem_reserve_ratio = 256   32      32
081 vm.drop_caches = 0
082 vm.min_free_kbytes = 2188
083 vm.min_free_order_shift = 1
084 vm.percpu_pagelist_fraction = 0
085 vm.max_map_count = 65530
086 vm.laptop_mode = 0
087 vm.block_dump = 0
088 vm.vfs_cache_pressure = 100
089 vm.mmap_min_addr = 4096
090 vm.highmem_is_dirtyable = 0
091 vm.scan_unevictable_pages = 0
092 fs.inode-nr = 2145      0
093 fs.inode-state = 2145   0       0       0       0       0       0
094 fs.file-nr = 297        0       29469
095 fs.file-max = 29469
096 fs.nr_open = 1048576
097 fs.dentry-state = 2777  2184    45      0       0       0
098 fs.overflowuid = 65534
099 fs.overflowgid = 65534
100 fs.leases-enable= 1
101 fs.dir-notify-enable= 1
102 fs.lease-break-time= 45
103 fs.aio-nr = 0
104 fs.aio-max-nr = 65536
105 fs.inotify.max_user_instances = 128
106 fs.inotify.max_user_watches = 8192
107 fs.inotify.max_queued_events = 16384
108 fs.epoll.max_user_watches = 111805
109 fs.suid_dumpable = 0
110 fs.pipe-max-size = 1048576
111 fs.mqueue.queues_max = 256
112 fs.mqueue.msg_max = 10
113 fs.mqueue.msgsize_max = 8192
114 dev.scsi.logging_level = 0
115 net.core.somaxconn = 128
116 net.core.xfrm_aevent_etime = 10
117 net.core.xfrm_aevent_rseqth = 2
118 net.core.xfrm_larval_drop = 1
119 net.core.xfrm_acq_expires = 30
120 net.core.wmem_max = 108544
121 net.core.rmem_max = 108544
122 net.core.wmem_default = 108544
123 net.core.rmem_default = 108544
124 net.core.dev_weight = 64
125 net.core.netdev_max_backlog = 1000
126 net.core.netdev_tstamp_prequeue = 1
127 net.core.message_cost = 5
128 net.core.message_burst = 10
129 net.core.optmem_max = 10240
130 net.core.netdev_budget = 300
131 net.core.warnings = 1
132 net.ipv4.route.gc_thresh = 4096
133 net.ipv4.route.max_size = 65536
134 net.ipv4.route.gc_min_interval = 0
135 net.ipv4.route.gc_min_interval_ms = 500
136 net.ipv4.route.gc_timeout = 300
137 net.ipv4.route.gc_interval = 60
138 net.ipv4.route.redirect_load = 4
139 net.ipv4.route.redirect_number = 9
140 net.ipv4.route.redirect_silence = 4096
141 net.ipv4.route.error_cost = 200
142 net.ipv4.route.error_burst = 1000
143 net.ipv4.route.gc_elasticity = 8
144 net.ipv4.route.mtu_expires = 600
145 net.ipv4.route.min_pmtu = 552
146 net.ipv4.route.min_adv_mss = 256
147 net.ipv4.neigh.default.mcast_solicit = 3
148 net.ipv4.neigh.default.ucast_solicit = 3
149 net.ipv4.neigh.default.app_solicit = 0
150 net.ipv4.neigh.default.retrans_time = 100
151 net.ipv4.neigh.default.base_reachable_time = 30
152 net.ipv4.neigh.default.delay_first_probe_time = 5
153 net.ipv4.neigh.default.gc_stale_time = 60
154 net.ipv4.neigh.default.unres_qlen = 3
155 net.ipv4.neigh.default.proxy_qlen = 64
156 net.ipv4.neigh.default.anycast_delay = 100
157 net.ipv4.neigh.default.proxy_delay = 80
158 net.ipv4.neigh.default.locktime = 100
159 net.ipv4.neigh.default.retrans_time_ms = 1000
160 net.ipv4.neigh.default.base_reachable_time_ms = 30000
161 net.ipv4.neigh.default.gc_interval = 30
162 net.ipv4.neigh.default.gc_thresh1 = 128
163 net.ipv4.neigh.default.gc_thresh2 = 512
164 net.ipv4.neigh.default.gc_thresh3 = 1024
165 net.ipv4.neigh.lo.mcast_solicit = 3
166 net.ipv4.neigh.lo.ucast_solicit = 3
167 net.ipv4.neigh.lo.app_solicit = 0
168 net.ipv4.neigh.lo.retrans_time = 100
169 net.ipv4.neigh.lo.base_reachable_time = 30
170 net.ipv4.neigh.lo.delay_first_probe_time = 5
171 net.ipv4.neigh.lo.gc_stale_time = 60
172 net.ipv4.neigh.lo.unres_qlen = 3
173 net.ipv4.neigh.lo.proxy_qlen = 64
174 net.ipv4.neigh.lo.anycast_delay = 100
175 net.ipv4.neigh.lo.proxy_delay = 80
176 net.ipv4.neigh.lo.locktime = 100
177 net.ipv4.neigh.lo.retrans_time_ms = 1000
178 net.ipv4.neigh.lo.base_reachable_time_ms = 30000
179 net.ipv4.neigh.eth0.mcast_solicit = 3
180 net.ipv4.neigh.eth0.ucast_solicit = 3
181 net.ipv4.neigh.eth0.app_solicit = 0
182 net.ipv4.neigh.eth0.retrans_time = 100
183 net.ipv4.neigh.eth0.base_reachable_time = 30
184 net.ipv4.neigh.eth0.delay_first_probe_time = 5
185 net.ipv4.neigh.eth0.gc_stale_time = 60
186 net.ipv4.neigh.eth0.unres_qlen = 3
187 net.ipv4.neigh.eth0.proxy_qlen = 64
188 net.ipv4.neigh.eth0.anycast_delay = 100
189 net.ipv4.neigh.eth0.proxy_delay = 80
190 net.ipv4.neigh.eth0.locktime = 100
191 net.ipv4.neigh.eth0.retrans_time_ms = 1000
192 net.ipv4.neigh.eth0.base_reachable_time_ms = 30000
193 net.ipv4.neigh.sit0.mcast_solicit = 3
194 net.ipv4.neigh.sit0.ucast_solicit = 3
195 net.ipv4.neigh.sit0.app_solicit = 0
196 net.ipv4.neigh.sit0.retrans_time = 100
197 net.ipv4.neigh.sit0.base_reachable_time = 30
198 net.ipv4.neigh.sit0.delay_first_probe_time = 5
199 net.ipv4.neigh.sit0.gc_stale_time = 60
200 net.ipv4.neigh.sit0.unres_qlen = 3
201 net.ipv4.neigh.sit0.proxy_qlen = 64
202 net.ipv4.neigh.sit0.anycast_delay = 100
203 net.ipv4.neigh.sit0.proxy_delay = 80
204 net.ipv4.neigh.sit0.locktime = 100
205 net.ipv4.neigh.sit0.retrans_time_ms = 1000
206 net.ipv4.neigh.sit0.base_reachable_time_ms = 30000
207 net.ipv4.tcp_timestamps = 1
208 net.ipv4.tcp_window_scaling = 6
209 net.ipv4.tcp_sack = 1
210 net.ipv4.tcp_retrans_collapse = 1
211 net.ipv4.ip_default_ttl = 64
212 net.ipv4.ip_no_pmtu_disc = 0
213 net.ipv4.ip_nonlocal_bind = 0
214 net.ipv4.tcp_syn_retries = 5
215 net.ipv4.tcp_synack_retries = 5
216 net.ipv4.tcp_max_orphans = 8192
217 net.ipv4.tcp_max_tw_buckets = 8192
218 net.ipv4.ip_dynaddr = 0
219 net.ipv4.tcp_keepalive_time = 7200
220 net.ipv4.tcp_keepalive_probes = 9
221 net.ipv4.tcp_keepalive_intvl = 75
222 net.ipv4.tcp_retries1 = 3
223 net.ipv4.tcp_retries2 = 15
224 net.ipv4.tcp_fin_timeout = 60
225 net.ipv4.tcp_tw_recycle = 0
226 net.ipv4.tcp_abort_on_overflow = 0
227 net.ipv4.tcp_stdurg = 0
228 net.ipv4.tcp_rfc1337 = 0
229 net.ipv4.tcp_max_syn_backlog = 128
230 net.ipv4.ip_local_port_range = 32768    61000
231 net.ipv4.ip_local_reserved_ports =
232 net.ipv4.igmp_max_memberships = 20
233 net.ipv4.igmp_max_msf = 10
234 net.ipv4.inet_peer_threshold = 65664
235 net.ipv4.inet_peer_minttl = 120
236 net.ipv4.inet_peer_maxttl = 600
237 net.ipv4.inet_peer_gc_mintime = 10
238 net.ipv4.inet_peer_gc_maxtime = 120
239 net.ipv4.tcp_orphan_retries = 0
240 net.ipv4.tcp_fack = 1
241 net.ipv4.tcp_reordering = 3
242 net.ipv4.tcp_ecn = 2
243 net.ipv4.tcp_dsack = 1
244 net.ipv4.tcp_mem = 7014 9354    14028
245 net.ipv4.tcp_wmem = 4096        16384   299328
246 net.ipv4.tcp_rmem = 4096        87380   299328
247 net.ipv4.tcp_app_win = 31
248 net.ipv4.tcp_adv_win_scale = 2
249 net.ipv4.tcp_tw_reuse = 0
250 net.ipv4.tcp_frto = 2
251 net.ipv4.tcp_frto_response = 0
252 net.ipv4.tcp_low_latency = 0
253 net.ipv4.tcp_no_metrics_save = 0
254 net.ipv4.tcp_moderate_rcvbuf = 1
255 net.ipv4.tcp_tso_win_divisor = 3
256 net.ipv4.tcp_congestion_control = cubic
257 net.ipv4.tcp_abc = 0
258 net.ipv4.tcp_mtu_probing = 0
259 net.ipv4.tcp_base_mss = 512
260 net.ipv4.tcp_workaround_signed_windows = 0
261 net.ipv4.tcp_slow_start_after_idle = 1
262 net.ipv4.tcp_available_congestion_control = cubic reno
263 net.ipv4.tcp_allowed_congestion_control = cubic reno
264 net.ipv4.tcp_max_ssthresh = 0
265 net.ipv4.tcp_cookie_size = 0
266 net.ipv4.tcp_thin_linear_timeouts = 0
267 net.ipv4.tcp_thin_dupack = 0
268 net.ipv4.udp_mem = 7014 9354    14028
269 net.ipv4.udp_rmem_min = 4096
270 net.ipv4.udp_wmem_min = 4096
271 net.ipv4.conf.all.forwarding = 0
272 net.ipv4.conf.all.mc_forwarding = 0
273 net.ipv4.conf.all.accept_redirects = 1
274 net.ipv4.conf.all.secure_redirects = 1
275 net.ipv4.conf.all.shared_media = 1
276 net.ipv4.conf.all.rp_filter = 0
277 net.ipv4.conf.all.send_redirects = 1
278 net.ipv4.conf.all.accept_source_route = 0
279 net.ipv4.conf.all.accept_local = 0
280 net.ipv4.conf.all.src_valid_mark = 0
281 net.ipv4.conf.all.proxy_arp = 0
282 net.ipv4.conf.all.medium_id = 0
283 net.ipv4.conf.all.bootp_relay = 0
284 net.ipv4.conf.all.log_martians = 0
285 net.ipv4.conf.all.tag = 0
286 net.ipv4.conf.all.arp_filter = 0
287 net.ipv4.conf.all.arp_announce = 0
288 net.ipv4.conf.all.arp_ignore = 0
289 net.ipv4.conf.all.arp_accept = 0
290 net.ipv4.conf.all.arp_notify = 0
291 net.ipv4.conf.all.proxy_arp_pvlan = 0
292 net.ipv4.conf.all.disable_xfrm = 0
293 net.ipv4.conf.all.disable_policy = 0
294 net.ipv4.conf.all.force_igmp_version = 0
295 net.ipv4.conf.all.promote_secondaries = 0
296 net.ipv4.conf.default.forwarding = 0
297 net.ipv4.conf.default.mc_forwarding = 0
298 net.ipv4.conf.default.accept_redirects = 1
299 net.ipv4.conf.default.secure_redirects = 1
300 net.ipv4.conf.default.shared_media = 1
301 net.ipv4.conf.default.rp_filter = 0
302 net.ipv4.conf.default.send_redirects = 1
303 net.ipv4.conf.default.accept_source_route = 1
304 net.ipv4.conf.default.accept_local = 0
305 net.ipv4.conf.default.src_valid_mark = 0
306 net.ipv4.conf.default.proxy_arp = 0
307 net.ipv4.conf.default.medium_id = 0
308 net.ipv4.conf.default.bootp_relay = 0
309 net.ipv4.conf.default.log_martians = 0
310 net.ipv4.conf.default.tag = 0
311 net.ipv4.conf.default.arp_filter = 0
312 net.ipv4.conf.default.arp_announce = 0
313 net.ipv4.conf.default.arp_ignore = 0
314 net.ipv4.conf.default.arp_accept = 0
315 net.ipv4.conf.default.arp_notify = 0
316 net.ipv4.conf.default.proxy_arp_pvlan = 0
317 net.ipv4.conf.default.disable_xfrm = 0
318 net.ipv4.conf.default.disable_policy = 0
319 net.ipv4.conf.default.force_igmp_version = 0
320 net.ipv4.conf.default.promote_secondaries = 0
321 net.ipv4.conf.lo.forwarding = 0
322 net.ipv4.conf.lo.mc_forwarding = 0
323 net.ipv4.conf.lo.accept_redirects = 1
324 net.ipv4.conf.lo.secure_redirects = 1
325 net.ipv4.conf.lo.shared_media = 1
326 net.ipv4.conf.lo.rp_filter = 0
327 net.ipv4.conf.lo.send_redirects = 1
328 net.ipv4.conf.lo.accept_source_route = 1
329 net.ipv4.conf.lo.accept_local = 0
330 net.ipv4.conf.lo.src_valid_mark = 0
331 net.ipv4.conf.lo.proxy_arp = 0
332 net.ipv4.conf.lo.medium_id = 0
333 net.ipv4.conf.lo.bootp_relay = 0
334 net.ipv4.conf.lo.log_martians = 0
335 net.ipv4.conf.lo.tag = 0
336 net.ipv4.conf.lo.arp_filter = 0
337 net.ipv4.conf.lo.arp_announce = 0
338 net.ipv4.conf.lo.arp_ignore = 0
339 net.ipv4.conf.lo.arp_accept = 0
340 net.ipv4.conf.lo.arp_notify = 0
341 net.ipv4.conf.lo.proxy_arp_pvlan = 0
342 net.ipv4.conf.lo.disable_xfrm = 1
343 net.ipv4.conf.lo.disable_policy = 1
344 net.ipv4.conf.lo.force_igmp_version = 0
345 net.ipv4.conf.lo.promote_secondaries = 0
346 net.ipv4.conf.eth0.forwarding = 0
347 net.ipv4.conf.eth0.mc_forwarding = 0
348 net.ipv4.conf.eth0.accept_redirects = 1
349 net.ipv4.conf.eth0.secure_redirects = 1
350 net.ipv4.conf.eth0.shared_media = 1
351 net.ipv4.conf.eth0.rp_filter = 0[ 2414.137398] process `sysctl' is using deprecated sysctl (syscall) net.ipv6.neigh.default.retrans_time; Use net.ipv6.neigh.default.retrans_time_ms instead.
352  
353 net.ipv4.conf.eth0.send_redirects = 1
354 net.ipv4.conf.eth0.accept_source_route = 1
355 net.ipv4.conf.eth0.accept_local = 0
356 net.ipv4.conf.eth0.src_valid_mark = 0
357 net.ipv4.conf.eth0.proxy_arp = 0
358 net.ipv4.conf.eth0.medium_id = 0
359 net.ipv4.conf.eth0.bootp_relay = 0
360 net.ipv4.conf.eth0.log_martians = 0
361 net.ipv4.conf.eth0.tag = 0
362 net.ipv4.conf.eth0.arp_filter = 0
363 net.ipv4.conf.eth0.arp_announce = 0
364 net.ipv4.conf.eth0.arp_ignore = 0
365 net.ipv4.conf.eth0.arp_accept = 0
366 net.ipv4.conf.eth0.arp_notify = 0
367 net.ipv4.conf.eth0.proxy_arp_pvlan = 0
368 net.ipv4.conf.eth0.disable_xfrm = 0
369 net.ipv4.conf.eth0.disable_policy = 0
370 net.ipv4.conf.eth0.force_igmp_version = 0
371 net.ipv4.conf.eth0.promote_secondaries = 0
372 net.ipv4.conf.sit0.forwarding = 0
373 net.ipv4.conf.sit0.mc_forwarding = 0
374 net.ipv4.conf.sit0.accept_redirects = 1
375 net.ipv4.conf.sit0.secure_redirects = 1
376 net.ipv4.conf.sit0.shared_media = 1
377 net.ipv4.conf.sit0.rp_filter = 0
378 net.ipv4.conf.sit0.send_redirects = 1
379 net.ipv4.conf.sit0.accept_source_route = 1
380 net.ipv4.conf.sit0.accept_local = 0
381 net.ipv4.conf.sit0.src_valid_mark = 0
382 net.ipv4.conf.sit0.proxy_arp = 0
383 net.ipv4.conf.sit0.medium_id = 0
384 net.ipv4.conf.sit0.bootp_relay = 0
385 net.ipv4.conf.sit0.log_martians = 0
386 net.ipv4.conf.sit0.tag = 0
387 net.ipv4.conf.sit0.arp_filter = 0
388 net.ipv4.conf.sit0.arp_announce = 0
389 net.ipv4.conf.sit0.arp_ignore = 0
390 net.ipv4.conf.sit0.arp_accept = 0
391 net.ipv4.conf.sit0.arp_notify = 0
392 net.ipv4.conf.sit0.proxy_arp_pvlan = 0
393 net.ipv4.conf.sit0.disable_xfrm = 0
394 net.ipv4.conf.sit0.disable_policy = 0
395 net.ipv4.conf.sit0.force_igmp_version = 0
396 net.ipv4.conf.sit0.promote_secondaries = 0
397 net.ipv4.ip_forward = 0
398 net.ipv4.xfrm4_gc_thresh = 32768
399 net.ipv4.ipfrag_high_thresh = 262144
400 net.ipv4.ipfrag_low_thresh = 196608
401 net.ipv4.ipfrag_time = 30
402 net.ipv4.icmp_echo_ignore_all = 0
403 net.ipv4.icmp_echo_ignore_broadcasts = 1
404 net.ipv4.icmp_ignore_bogus_error_responses = 1
405 net.ipv4.icmp_errors_use_inbound_ifaddr = 0
406 net.ipv4.icmp_ratelimit = 1000
407 net.ipv4.icmp_ratemask = 6168
408 net.ipv4.rt_cache_rebuild_count = 4
409 net.ipv4.ping_group_range = 1   0
410 net.ipv4.ipfrag_secret_interval = 600
411 net.ipv4.ipfrag_max_dist = 64
412 net.ipv6.neigh.default.mcast_solicit = 3
413 net.ipv6.neigh.default.ucast_solicit = 3
414 net.ipv6.neigh.default.app_solicit = 0
415 net.ipv6.neigh.default.retrans_time = 200
416 net.ipv6.neigh.default.base_reachable_time = 30
417 net.ipv6.neigh.default.delay_first_probe_time = 5
418 net.ipv6.neigh.default.gc_stale_time = 60
419 net.ipv6.neigh.default.unres_qlen = 3
420 net.ipv6.neigh.default.proxy_qlen = 64
421 net.ipv6.neigh.default.anycast_delay = 100
422 net.ipv6.neigh.default.proxy_delay = 80
423 net.ipv6.neigh.default.locktime = 0
424 net.ipv6.neigh.default.retrans_time_ms = 1000
425 net.ipv6.neigh.default.base_reachable_time_ms = 30000
426 net.ipv6.neigh.default.gc_interval = 30
427 net.ipv6.neigh.default.gc_thresh1 = 128
428 net.ipv6.neigh.default.gc_thresh2 = 512
429 net.ipv6.neigh.default.gc_thresh3 = 1024
430 net.ipv6.neigh.lo.mcast_solicit = 3
431 net.ipv6.neigh.lo.ucast_solicit = 3
432 net.ipv6.neigh.lo.app_solicit = 0
433 net.ipv6.neigh.lo.retrans_time = 200
434 net.ipv6.neigh.lo.base_reachable_time = 30
435 net.ipv6.neigh.lo.delay_first_probe_time = 5
436 net.ipv6.neigh.lo.gc_stale_time = 60
437 net.ipv6.neigh.lo.unres_qlen = 3
438 net.ipv6.neigh.lo.proxy_qlen = 64
439 net.ipv6.neigh.lo.anycast_delay = 100
440 net.ipv6.neigh.lo.proxy_delay = 80
441 net.ipv6.neigh.lo.locktime = 0
442 net.ipv6.neigh.lo.retrans_time_ms = 1000
443 net.ipv6.neigh.lo.base_reachable_time_ms = 30000
444 net.ipv6.neigh.eth0.mcast_solicit = 3
445 net.ipv6.neigh.eth0.ucast_solicit = 3
446 net.ipv6.neigh.eth0.app_solicit = 0
447 net.ipv6.neigh.eth0.retrans_time = 200
448 net.ipv6.neigh.eth0.base_reachable_time = 30
449 net.ipv6.neigh.eth0.delay_first_probe_time = 5
450 net.ipv6.neigh.eth0.gc_stale_time = 60
451 net.ipv6.neigh.eth0.unres_qlen = 3
452 net.ipv6.neigh.eth0.proxy_qlen = 64
453 net.ipv6.neigh.eth0.anycast_delay = 100
454 net.ipv6.neigh.eth0.proxy_delay = 80
455 net.ipv6.neigh.eth0.locktime = 0
456 net.ipv6.neigh.eth0.retrans_time_ms = 1000
457 net.ipv6.neigh.eth0.base_reachable_time_ms = 30000
458 net.ipv6.neigh.sit0.mcast_solicit = 3
459 net.ipv6.neigh.sit0.ucast_solicit = 3
460 net.ipv6.neigh.sit0.app_solicit = 0
461 net.ipv6.neigh.sit0.retrans_time = 200
462 net.ipv6.neigh.sit0.base_reachable_time = 30
463 net.ipv6.neigh.sit0.delay_first_probe_time = 5
464 net.ipv6.neigh.sit0.gc_stale_time = 60
465 net.ipv6.neigh.sit0.unres_qlen = 3
466 net.ipv6.neigh.sit0.proxy_qlen = 64
467 net.ipv6.neigh.sit0.anycast_delay = 100
468 net.ipv6.neigh.sit0.proxy_delay = 80
469 net.ipv6.neigh.sit0.locktime = 0
470 net.ipv6.neigh.sit0.retrans_time_ms = 1000
471 net.ipv6.neigh.sit0.base_reachable_time_ms = 30000
472 net.ipv6.xfrm6_gc_thresh = 1024
473 net.ipv6.conf.all.forwarding = 0
474 net.ipv6.conf.all.hop_limit = 64
475 net.ipv6.conf.all.mtu = 1280
476 net.ipv6.conf.all.accept_ra = 1
477 net.ipv6.conf.all.accept_redirects = 1
478 net.ipv6.conf.all.autoconf = 1
479 net.ipv6.conf.all.dad_transmits = 1
480 net.ipv6.conf.all.router_solicitations = 3
481 net.ipv6.conf.all.router_solicitation_interval = 4
482 net.ipv6.conf.all.router_solicitation_delay = 1
483 net.ipv6.conf.all.force_mld_version = 0
484 net.ipv6.conf.all.max_addresses = 16
485 net.ipv6.conf.all.accept_ra_defrtr = 1
486 net.ipv6.conf.all.accept_ra_pinfo = 1
487 net.ipv6.conf.all.proxy_ndp = 0
488 net.ipv6.conf.all.accept_source_route = 0
489 net.ipv6.conf.all.disable_ipv6 = 1
490 net.ipv6.conf.all.accept_dad = 1
491 net.ipv6.conf.all.force_tllao = 0
492 net.ipv6.conf.default.forwarding = 0
493 net.ipv6.conf.default.hop_limit = 64
494 net.ipv6.conf.default.mtu = 1280
495 net.ipv6.conf.default.accept_ra = 1
496 net.ipv6.conf.default.accept_redirects = 1
497 net.ipv6.conf.default.autoconf = 1
498 net.ipv6.conf.default.dad_transmits = 1
499 net.ipv6.conf.default.router_solicitations = 3
500 net.ipv6.conf.default.router_solicitation_interval = 4
501 net.ipv6.conf.default.router_solicitation_delay = 1
502 net.ipv6.conf.default.force_mld_version = 0
503 net.ipv6.conf.default.max_addresses = 16
504 net.ipv6.conf.default.accept_ra_defrtr = 1
505 net.ipv6.conf.default.accept_ra_pinfo = 1
506 net.ipv6.conf.default.proxy_ndp = 0
507 net.ipv6.conf.default.accept_source_route = 0
508 net.ipv6.conf.default.disable_ipv6 = 1
509 net.ipv6.conf.default.accept_dad = 1
510 net.ipv6.conf.default.force_tllao = 0
511 net.ipv6.conf.lo.forwarding = 0
512 net.ipv6.conf.lo.hop_limit = 64
513 net.ipv6.conf.lo.mtu = 16436
514 net.ipv6.conf.lo.accept_ra = 1
515 net.ipv6.conf.lo.accept_redirects = 1
516 net.ipv6.conf.lo.autoconf = 1
517 net.ipv6.conf.lo.dad_transmits = 1
518 net.ipv6.conf.lo.router_solicitations = 3
519 net.ipv6.conf.lo.router_solicitation_interval = 4
520 net.ipv6.conf.lo.router_solicitation_delay = 1
521 net.ipv6.conf.lo.force_mld_version = 0
522 net.ipv6.conf.lo.max_addresses = 16
523 net.ipv6.conf.lo.accept_ra_defrtr = 1
524 net.ipv6.conf.lo.accept_ra_pinfo = 1
525 net.ipv6.conf.lo.proxy_ndp = 0
526 net.ipv6.conf.lo.accept_source_route = 0
527 net.ipv6.conf.lo.disable_ipv6 = 1
528 net.ipv6.conf.lo.accept_dad = -1
529 net.ipv6.conf.lo.force_tllao = 0
530 net.ipv6.conf.eth0.forwarding = 0
531 net.ipv6.conf.eth0.hop_limit = 64
532 net.ipv6.conf.eth0.mtu = 1500
533 net.ipv6.conf.eth0.accept_ra = 1
534 net.ipv6.conf.eth0.accept_redirects = 1
535 net.ipv6.conf.eth0.autoconf = 1
536 net.ipv6.conf.eth0.dad_transmits = 1
537 net.ipv6.conf.eth0.router_solicitations = 3
538 net.ipv6.conf.eth0.router_solicitation_interval = 4
539 net.ipv6.conf.eth0.router_solicitation_delay = 1
540 net.ipv6.conf.eth0.force_mld_version = 0
541 net.ipv6.conf.eth0.max_addresses = 16
542 net.ipv6.conf.eth0.accept_ra_defrtr = 1
543 net.ipv6.conf.eth0.accept_ra_pinfo = 1
544 net.ipv6.conf.eth0.proxy_ndp = 0
545 net.ipv6.conf.eth0.accept_source_route = 0
546 net.ipv6.conf.eth0.disable_ipv6 = 1
547 net.ipv6.conf.eth0.accept_dad = 1
548 net.ipv6.conf.eth0.force_tllao = 0
549 net.ipv6.conf.sit0.forwarding = 0
550 net.ipv6.conf.sit0.hop_limit = 64
551 net.ipv6.conf.sit0.mtu = 1480
552 net.ipv6.conf.sit0.accept_ra = 1
553 net.ipv6.conf.sit0.accept_redirects = 1
554 net.ipv6.conf.sit0.autoconf = 1
555 net.ipv6.conf.sit0.dad_transmits = 1
556 net.ipv6.conf.sit0.router_solicitations = 3
557 net.ipv6.conf.sit0.router_solicitation_interval = 4
558 net.ipv6.conf.sit0.router_solicitation_delay = 1
559 net.ipv6.conf.sit0.force_mld_version = 0
560 net.ipv6.conf.sit0.max_addresses = 16
561 net.ipv6.conf.sit0.accept_ra_defrtr = 1
562 net.ipv6.conf.sit0.accept_ra_pinfo = 1
563 net.ipv6.conf.sit0.proxy_ndp = 0
564 net.ipv6.conf.sit0.accept_source_route = 0
565 net.ipv6.conf.sit0.disable_ipv6 = 1
566 net.ipv6.conf.sit0.accept_dad = -1
567 net.ipv6.conf.sit0.force_tllao = 0
568 net.ipv6.ip6frag_high_thresh = 262144
569 net.ipv6.ip6frag_low_thresh = 196608
570 net.ipv6.ip6frag_time = 60
571 net.ipv6.route.gc_thresh = 1024
572 net.ipv6.route.max_size = 4096
573 net.ipv6.route.gc_min_interval = 0
574 net.ipv6.route.gc_timeout = 60
575 net.ipv6.route.gc_interval = 30
576 net.ipv6.route.gc_elasticity = 9
577 net.ipv6.route.mtu_expires = 600
578 net.ipv6.route.min_adv_mss = 1220
579 net.ipv6.route.gc_min_interval_ms = 500
580 net.ipv6.icmp.ratelimit = 1000
581 net.ipv6.bindv6only = 0
582 net.ipv6.ip6frag_secret_interval = 600
583 net.ipv6.mld_max_msf = 64
584 net.unix.max_dgram_qlen = 10
585 sh-#

你可能感兴趣的:(Linux系统中sysctl命令详解 sysctl -p、sysctl -a、sysctl -w)