Solved

Can I reserve a port in Linux

Posted on 2011-09-28
6
1,128 Views
Last Modified: 2012-05-12
Can I reserve a port for a application so other application should ignore it?

Let me tell you the scenerio:
On few Linux server an application is not listening on port 1002 because we are mounting 50+ nfs shares through the fstab file and one remote connection is using this port.

netstat -natp | grep "1002"
tcp        0      0 xx.xx.xx.xx:1002            xx.xx.xx.xx:2049            ESTABLISHED -

Could anybody suggest me a way through remote nfs share can ignore the 1002 so that my application work perfectly.

0
Comment
Question by:upanwar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 23

Expert Comment

by:savone
ID: 36718025
I am guessing you can start the application BEFORE you mount the nfs shares and that should do it.

0
 
LVL 12

Author Comment

by:upanwar
ID: 36718071
Hey savone,

Thanks for your reply. While rebooting It will read the fstab file fisrt and then will start the services for selected run level.

Any other way to reserve port. I guess I can define in /etc/services but will it work? Have anybody tried before?

0
 
LVL 8

Expert Comment

by:eager
ID: 36816098
Do you need all NFS mounts to happen at boot-up?  If not, you might look at using automount to mount the NFS file systems when you access them.  See info on "autofs".  
0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 37005562
You cannot do this. Ports above 1000 are up for grabs, and assigned sequentially. Either make your application privileged so it can use a port below 1000 or have it use a much higher port number. Many high port numbers are in fact reserved - see assigned numbers but for the most part you can ignore these.
0
 
LVL 12

Author Comment

by:upanwar
ID: 37006128
Hi Duncan,

I already gave it a try... but I will try it again and let you know... the way you suggested is something what which I was looking.

I appriciate it.

0
 
LVL 12

Author Closing Comment

by:upanwar
ID: 37466283
This solution given me a idea but I couldn't implement it. I have opened a case with HP for the same.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question