For HP-UX (click here for latest release) you can tune the UDP local ephemeral port range separately from the TCP local ephemeral port range.
In a previous post it was shown how to alter/view the ephemeral port range for a Linux system.
To follow up the example from my Linux post in order to set on HP-UX the local port range from 15000 till 61000 we can use the ndd utility for the change on the fly.
For TCP we use:
In a previous post it was shown how to alter/view the ephemeral port range for a Linux system.
To follow up the example from my Linux post in order to set on HP-UX the local port range from 15000 till 61000 we can use the ndd utility for the change on the fly.
For TCP we use:
#/usr/bin/ndd -set /dev/tcp tcp_smallest_anon_port 15000
#/usr/bin/ndd -set /dev/tcp tcp_largest_anon_port 61000
For UDP connections we use:#/usr/bin/ndd -set /dev/udp udp_smallest_anon_port 15000
#/usr/bin/ndd -set /dev/udp udp_largest_anon_port 61000
To make the change persistent after reboot we can append the following entries in /etc/rc.config.d/nddconf:
TRANSPORT_NAME[0]=tcp
NDD_NAME[0]=tcp_largest_anon_port
NDD_VALUE[0]=61000
TRANSPORT_NAME[1]=tcp
NDD_NAME[1]=tcp_smallest_anon_port
NDD_VALUE[1]=15000
TRANSPORT_NAME[2]=udp
NDD_NAME[2]=udp_largest_anon_port
NDD_VALUE[2]=61000
TRANSPORT_NAME[3]=udp
NDD_NAME[3]=udp_smallest_anon_port
NDD_VALUE[3]=15000
No comments:
Post a Comment