Download presentation
Presentation is loading. Please wait.
Published byDale Hancock Modified over 9 years ago
1
Page 1 GSC/Backline 최원규 NDD Parameter tuning © 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice
2
Page 2 NDD Parameter The command ndd is a networking configuration tool used to customize the behavior of the networking kernel. To make the 11i system more internet friendly and easier to get running "out of the box", some of the ndd tunables have been enhanced. Network parameter 를 “tune” 할 수 있는 tool
3
Page 3 NDD / IP ip_forwarding HP hosts 가 gateway 로 사용시 IP 을 forward 할 것인가 말것인가. 0 -> forward 안함. 1 -> forward 함. 2 -> Interface 가 2 이상인 경우에만 forward 함. VerMinMaxDefault 11.0022 11.i022
4
Page 4 NDD / IP ip_ire_gw_probe Turns the Dead Gateway Detection on and off. HP-UX 11.0 에서는 default gateway 를 ICMP 을 이용하여 주기적으로 check 하는데 일부 router 의 경우 ICMP 에 응답을 하지 않는 경우가 있는데 대개의 경우 Firewall 에서 default router 로 ping 이 않되게 setting 하는 경우가 대부분. 그때 이 시간을 넘어서면 router 넘어로 network connection fail. ndd -get /dev/ip ip_ire_status | grep -e IRE_GATEWAY -e flagip_ire_status VerMinMaxDefault 11.0011 11.i011
5
Page 5 NDD / IP ip_pmtu_strategy 0 -> any non-local networks have a maximum MTU of 576 1 -> All outbout packet 에 DF(Don't Fragment) 를 set 한다. 의미는 HP machine 의 outbound MTU size 를 그대로 두라는 것이다. destination 과 HP machine 사이의 MTU size 값이 틀려 fragmenetion 이 필요한 필요한 경우 router 로 부터 ICMP Fragmentation Needed 를 받으면 IP 는 MTU size 을 수정한다. 이를 지원하지 않는 router 의 경우는 순차적으로 작은 MTU 을 사용한다. 2 -> Disable 3 -> pmtu option "-p“ VerMinMaxDefault 11.0031 11.i031
6
Page 6 NDD / IP ip_ire_gw_probe_interval HP-UX 11.x 에서는 default gateway 를 ICMP 을 이용하여 주기적으로 check 하는데 일부 router 의 경우 ICMP 에 응답을 하지 않는 경우가 있는데 대개의 경우 Firewall 에서 default router 로 ping 이 않되게 setting 하는 경우가 대부분. 그때 이 시간을 넘어서면 router 넘어로 network connection fail. IBM 2212 router 에 VRRP(Virtaul Router Redundancy Protocol RFC 2338) 을 enable 한 경우 primary router 에 문제가 발생하여 backup 으로 넘어가는 경우 이 backup router 에서 ICMP ECHO reply 을 하지 않음으로 HP machin 에서 gateway 를 인식하지 못함. CISCO 의 HSRP(Hot Standby Routing Protocol) 에서 firewall 로 ICMP Reply 을 disable 한 경우. VerMinMaxDefault 11.015000X180000 11.i15000X180000
7
Page 7 NDD / IP ip_send_source_quench IP packets 이 처리할 수 있는 용량보다 빨리 node 에 도착하는것인데 ICMP packet 을 받아서 처리 할때 만일 ICMP 을 처리하는 Process 가 system 에 running 중인 경우 ICMP packet 을 해당 process 의 socket 에 넣는데 socket full 이 발생시 ICMP Source Quench Message 가 상대방에게 보내진다. 이를 0 로 하면 Source Quench 을 check 하지 않는다. VerMinMaxDefault 11.0011 11.i011
8
Page 8 NDD / IP ip_max_bcast_ttl Hop count 가 1 로 bcast packet 이 router 을 넘어가지 못함. C class 로 subnet 하여 사용시. 199.3.20 199.3.201 199.3.208 20 subnet 에서 braodcast 가 208 에 도달하게 하기위한 방법. Broadcast 하는 program 에서 조정하는 방법. System gloval 변수 조정. ndd -set /dev/ip ip_max_bcast_ttl 3 보통 16 정도 주면 됨. 증권사에서 자주 사용함. VerMinMaxDefault 11.002551 11.i02551
9
Page 9 NDD / IP ip_check_subnet_addr Controls the subnet portion of a host address RFC 1122 을 check, 즉 subnet mask 255.255.255.192 을 허용하지 않음. 0 -> RFC 1122 check 을 bypass 함. Host IP 205.185.219.252 subnet mask 255.255.255.192. The error he gets is: ifconfig: ioctl (SIOCSIFADDR). RFC 1122 에 따른 Guide 을 HP 에서 준수하기 때문에 발생한 문제. VerMinMaxDefault 11.0010 11.i011
10
Page 10 NDD / IP ip_strong_es_model This tunable controls the support for the "Strong End-System Model" described in the RFC1122, Section 3.3.4.2. This means that the source address of a packet (that the host wants to send out) affects the selection of the gateway for the outbound packet. It is meaningful in the case that the host is multihomed (means several IP addresses for the interfaces).RFC1122, Section 3.3.4.2 Here are the key requirements from the RFC regarding the multihomed environments for the ES model: A host MUST silently discard an incoming datagram whose destination address does not correspond to the physical interface through which it is received. A host MUST restrict itself to sending (non-source- routed) IP datagrams only through the physical interface that corresponds to the IP source address of the datagrams. In restricted network environments it may be a wanted behavior to know exactly which of the addresses are valid and which not. in most grown environments it is not very useful to enable this, since it will be not too easy to fulfill the restrictions always. VerMinMaxDefault 11.0010 11.i010
11
Page 11 NDD / TCP tcp_conn_request_max Max number of outstanding connection request 동시에 Connection 을 맺을 수 있는 각 socket 에 대한 listen queue limit. socket program 에서 listen() 에서 define 할 수 있는 최대크기. Application 에서의 Create 한 socket port 에대한 listen queue 의 제한은 실제로 Application program 내부의 listen() 에서 사용된 size 에의해서 제한을 받는다. /usr/include/sys/socket.h: #define SOMAXCONN 20 netstat –s : connect requests dropped due to full queue For a web server it might be a good idea to set this value to 1024 or higher. VerMinMaxDefault 11.01 undefined 20 11.i1 undefined 4096
12
Page 12 NDD / TCP tcp_recv_hiwater_def : receive buffer window size tcp_xmit_hiwater_def : send buffer window size 개별 TCP session 에 대해 buffer size 할당 VerMinMaxDefault 11.04096 Bytes undefined 32768(32KB) 11.i4096 Bytes undefined 32768(32KB)
13
Page 13 NDD / TCP tcp_fin_wait_2_timeout VerMinMaxDefault 11.00 undefined 0 11.i0 undefined 0
14
Page 14 NDD / TCP tcp_syn_rcvd_max Controls the SYN attack defense of TCP effective. SYN packet 을 (SYN_RECV in netstat -a) 보관하는 table space 을 지정한다. 여기을 거쳐서 각 socket 별로 listen queue 에 들어 간다. VerMinMaxDefault 11.01 1000 500 connections 11.i1 1000 500
15
Page 15 NDD / TCP tcp_time_wait_interval How long stream persists in TIME_WAIT Amount of time TCP endpoints persist in TCPS_TIME_WAIT state. netstat -an 으로 확인시 모든 TCP session 은 정상적으로 Session 이 종료시 TIME_WAIT 상태을 거치게 된다. 이 값을 조정하는 Parameter 임. 10.X 에서는 default 로 2MSL 을 사용하며 MSL 이 60 Second 이기에 2 분을 Waiting 하다 Session 이 netstat -an 시 보이지 않는다. 10.x OS 에서는 조정이 불가능함. /usr/conf/h/protosw.h: #define PR_SLOWHZ 2 /usr/conf/netinet/tcp_timer.h: #define TCPTV_MSL ( 30*PR_SLOWHZ) VerMinMaxDefault 11.0 1000 (1sec)600000(10min)60000 (1min) 11.i 1000 (1sec)600000(10min)60000 (1min)
16
Page 16 NDD / TCP tcp_status TCP dst snxt suna swnd cwnd rnxt rack rwnd rto mss [lport,fport] state 00000001015d1468 015.043.232.202 361e667e 361e667e 00008000 000005b4 06dda013 06dda013 00008000 24000 01460 ca16,9e9 TCPTCP instance number destdestination IP-address snxtSenders next sequence number sunaData the sender has not acknowledged yet swndSenders window (relative to suna) cwndCongestion window rnxtSequence number we expect to receive next rackSequence number we have acknowledged rwndCurrent receive window rtoRound trip timeout mssMax segment size lportSource port fportDestination port stateTCP state this connection is in
17
Page 17 NDD / TCP tcp_discon ndd -get /dev/tcp tcp_status | grep -e state -e TCP_FIN_WAIT_2tcp_status tcp_discon - Terminate a TCP connection -> TCP session 을 disconnection 하기 위한 ndd option $ ndd -get /dev/tcp tcp_status TCP dest snxt suna swnd cwnd rnxt rack rwnd rto mss [lport,fport] state 0183b8b4 015.043.233.086 533cb8ce 533cb8ce 00008000 00003000 533bc583 533bc583 00000000 02812 04096 [c00a,cea9] TCP_FIN_WAIT_2 $ ndd -set /dev/tcp tcp_discon 0x0183b8b4
18
Page 18 NDD / TCP tcp_discon_by_addr TCP session disconnection by address. Local IP: 192.1.2.3 (0xc0010203) Local Port: 1024 (0x0400) Remote IP : 192.4.5.6 (0xc0040506) Remote Port: 2049 (0x0801) $ ndd -set /dev/tcp tcp_discon_by_addr "c00102030400c00405060801"
19
Page 19 NDD / TCP retransmission( 접속할때 ) tcp_ip_notify_cinterval [10,undefined] : R1 timer tcp_ip_abort_cinterval [75, undefined] : R2 timer Cinterval 같이 앞에 c 가 붙는것은 보내는 것이다.
20
Page 20 NDD / TCP retransmission( 접속중일때 ) tcp_rexmit_interval_initial [3, 20] [0.5,20 :11.0] [1.5,20 :< PHNE_ 27730] tcp_rexmit_interval_min [0.5, 20] tcp_rexmit_interval_max [1m, 1h] tcp_ip_notify_interval [10,undefined] : R1 timer tcp_ip_abort_interval [10m, undefined] : R2 timer tcp_time_wait_inteval [1m, 10m]
21
Page 21 NDD / TCP tcp_keepalive_interval [2h] Idle connection 에도 TCP 상태를 가지고 있는 timer Established connection - tcp_ip_abort_interval [10m, -]tcp_ip_abort_interval Connection establishment - tcp_ip_abort_cinterval [75s, -]tcp_ip_abort_cinterval Connection terminating - tcp_keepalive_detached_interval [2m, 10d]tcp_keepalive_detached_interval setsockopt() 에서 enable 해야 적용됨
22
Page 22 NDD / Sockets socket_buf_max Specifies the maximum socket buffer size for AF_UNIX sockets. VerMinMaxDefault 11.0 XXX 11.i 10242147483647256000
23
Page 23 NDD / Sockets socket_caching_tcp ( 웹서버 용도로 사용될시 효과 만점 ) Used to enable socket caching on TCP AF_INET sockets. This value determines how many cached data structures for TCP sockets the system keeps. This could cause the system to speed up considerably if there are many short-lived connections on the system. A value between 1 and 512 will set a minimum of 512. Any number above 512 will set that value. VerMinMaxDefault 11.0 XXX 11.i 021474836470
24
Page 24 Oracle DB Server Tuning Parameter Default value Suggested value ip_send_source_quench 1 0 tcp_conn_request_max 20 20000 tcp_rexmit_interval_max 60000 10000 tcp_rexmit_interval_min 500 1500 tcp_xmit_lowater_def 8192 24576 tcp_syn_rcvd_max 500 1024 tcp_xmit_hiwater_def 32768 1048576
25
Page 25 Apache 1.3.x Web Server Tuning Parameter Default value Suggested value tcp_conn_request_max 20 1024 tcp_fin_wait_2_timeout 0 (infinite) 900000 tcp_ip_abort_interval 600000 60000 tcp_keepalive_interval 72000000 900000 tcp_rexmit_interval_initial 500 Site-specific (see note)
26
Page 26 Netscape & Iplanet Web Server Tining Parameter Default value Suggested value tcp_time_wait_interval 60000 60000 tcp_conn_request_max 20 1024 --> 4096 tcp_ip_abort_interval 600000 60000 tcp_keepalive_interval 72000000 900000 tcp_rexmit_interval_initial 1500 1500 tcp_rexmit_interval_max 60000 60000 tcp_rexmit_interval_min 500 500 tcp_xmit_hiwater_def 32768 32768 tcp_recv_hiwater_def 32768 32768
27
Page 27 ndd parameter for security Parameter Default value Suggested value Comment ip_forward_directed_broadcasts 1 0 Don't forward directed broadcasts ip_forward_src_routed 1 0 Don't forward packets with source route options ip_forwarding 2 0 Disable IP forwarding ip_ire_gw_probe 1 0 Disable dead gateway detection (currently no ndd help text; echo-requests interact badly with firewalls) ip_pmtu_strategy 1 1 Don't use echo-request PMTU strategy (can be used for amplification attacks and we don't want to send echo-requests anyway) ip_send_redirects 1 0 Don't send ICMP redirect messages (if we have no need to send redirects) ip_send_source_quench 1 0 Don't send ICMP source quench messages (deprecated) tcp_conn_request_max 20 500 Increase TCP listen queue maximum (performance) tcp_syn_rcvd_max 500 500 HP SYN flood defense ip_check_subnet_addr 1 0 Permit 0 in local network part (should be the default) ip_respond_to_address_mask_broadcast 0 0 Don't respond to ICMP address mask request broadcasts ip_respond_to_echo_broadcast 1 0 Don't respond to ICMP echo request broadcasts ip_respond_to_timestamp_broadcast 0 0 Don't respond to ICMP timestamp request broadcasts ip_respond_to_timestamp 0 0 Don't respond to ICMP timestamp requests tcp_text_in_resets 1 0 Don't send text messages in TCP RST segments (should be the default)
28
Page 28 100BT configuration file Configuration File in /etc/rc.config.d Variables btlan hpbtlanconf xxx_INTERFACE_NAME : Name of interface (lan0, lan1...) xxx_STATION_ADDRESS : Station address of interface. This will be the MAC address of your interface. xxx_SPEED : set the card speed. Value are : 10HD, 10FD,100HD, 100FD, auto_on. For EISA see Note1. 11.0 btlan0 -> hpeisabtconf btlan1 -> hpbasetconf btlan3 -> hpbase100conf btlan4 -> hpgsc100conf btlan5 -> hppci100conf btlan6 -> hpsppci100conf 11.I hpbtlanconf
29
Page 29 Nettl trace packet 분석 tool #nettl -start #nettl -tn pduin pduout -e ns_ls_ip -s 1024 –tm 99999 -f /tmp/trace -> 이러면 /tmp/trace.TRC00 와 trace1.TRC01 의 file 이 생깁니다. 필요한 action 수행 #nettl -tf -e all #vi /tmp/filter filter ip_saddr 10.1.61.212 filter ip_daddr 10.1.61.212 -> 대상 장비의 IP #netfmt -c /tmp/filter -Nlf /tmp/trace.TRC00 > /tmp/trace.txt0
30
Page 30 APA(Auto Port Aggregation) 1. Cisco’s Protocol for Automatic Trunk Discovery and Automatic Link Aggregate Configuration 2. High Availability via Multiple Links with Failover Capability 3. High Availability Servers 4. Load Balancing 5. High Throughput 6. Advanced Interoperability 7. Basic Interoperability 8. Single IP Address Capability 9. Flexibility 10. Application Transparency
31
Page 31 APA(Example) /etc/rc.config.d/hp_apaconf HP_APA_INTERFACE_NAME[0]=lan100 HP_APA_LOAD_BALANCE_MODE[0]=LB_MAC HP_APA_MANUAL_LA[0]=1,2 HP_APA_HOT_STANDBY[0]=on /etc/rc.config.d/hp_apaportconf HP_APAPORT_INTERFACE_NAME[0]=lan1 HP_APAPORT_GROUP_CAPABILITY[0]=5 HP_APAPORT_PRIORITY[0]=0 HP_APAPORT_CONFIG_MODE[0]=MANUAL # HP_APAPORT_INTERFACE_NAME[1]=lan2 HP_APAPORT_GROUP_CAPABILITY[1]=5 HP_APAPORT_PRIORITY[1]=0 HP_APAPORT_CONFIG_MODE[1]=MANUAL /etc/rc.config.d/netconf INTERFACE_NAME[1]=lan100 IP_ADDRESS[1]=150.100.1.3 SUBNET_MASK[1]="255.255.0.0" BROADCAST_ADDRESS[1]="" INTERFACE_STATE[1]=up DHCP_ENABLE[1]=0
32
Page 32 Utilization 측정 FTP 는 performance 측정도구로 적절하지 않다. System 에서 제공하는 command 는 lanadmin, netstat, glance 등이 있다 정확한 측정은 NMS 나 analyze 가 있어야 한다. 정확한 계산방법은 packet 의 수가 아니라 bit 수이다. (IfInOctet + IfOutOctet) * 8 /IfSpeed * 1/100
33
Page 33
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.