1 / 28

Network Tuning Parameter 2002. 9. 17 강사 : 최원규 과장 HPCS/TSEC

Network Tuning Parameter 2002. 9. 17 강사 : 최원규 과장 HPCS/TSEC. Ndd parameter Oracle DB Server Tuning Web Server Tuning ndd parameter for security 100BT NIC configuration Nettl trace APA Utilization 측정. Agenda. NDD Parameter.

ncyr
Download Presentation

Network Tuning Parameter 2002. 9. 17 강사 : 최원규 과장 HPCS/TSEC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Tuning Parameter2002. 9. 17강사 : 최원규과장HPCS/TSEC

  2. Ndd parameter • Oracle DB Server Tuning • WebServer Tuning • ndd parameter for security • 100BT NIC configuration • Nettl trace • APA • Utilization 측정 Agenda

  3. 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

  4. NDD / IP ip_forwarding HP hosts가 gateway로 사용시 IP을 forward할 것인가 말것인가. 0 -> forward안함. 1 -> forward함. 2 -> Interface가 2이상인 경우에만 forward함.

  5. 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.

  6. 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“

  7. NDD / IP ip_ire_gw_probe_interval HP-UX 11.0에서는 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한 경우.

  8. 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하지 않는다.

  9. 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

  10. 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에서 준수하기 때문에 발생한 문제.

  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 For a web server it might be a good idea to set this value to 1024 or higher.

  12. NDD / TCP tcp_fin_wait_2_timeout

  13. 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에 들어 간다.

  14. 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)

  15. NDD / TCP tcp_discon ndd -get /dev/tcp tcp_status | grep -e state -e TCP_FIN_WAIT_2 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

  16. 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"

  17. NDD / Sockets socket_buf_max Specifies the maximum socket buffer size for AF_UNIX sockets.

  18. 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 above512 will set that value.

  19. 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

  20. Apache 1.3.x WebServer 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)

  21. 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

  22. 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)

  23. 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

  24. 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

  25. 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

  26. 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

  27. Utilization 측정 FTP 는 performance 측정도구로 적절하지 않다. System 에서 제공하는 command 는 lanadmin, netstat, glance 등이 있다 정확한 측정은 NMS나 analyze가 있어야 한다. 정확한 계산방법은 packet의 수가 아니라 bit 수이다. (IfInOctet + IfOutOctet) * 8 /IfSpeed * 1/100

  28. Thanks

More Related