Sponsored Content
Full Discussion: testing a dhcp connection
Top Forums Shell Programming and Scripting testing a dhcp connection Post 302331736 by deaconf19 on Tuesday 7th of July 2009 04:58:15 AM
Old 07-07-2009
Which OS are you using?
I would post this thread in the area of the OS you are using since this is really for scripts and other items.

If Solaris it will tell you if DCHP is enabled once you setup everything correctly and you can also bind a static IP to the adapter ie bge0:1 with a static so you can access it in case the DHCP does not take
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Testing ssh connection from KSH script

Hi. I have a kornshell script that runs on a daily basis as a cron job. Part of what the script does is copy the folder contents from another server to the current server (server where KSH script is running). I have a scp command, as follows: scp $REMOTE_HOST:$REMOTE_FILE_DIR/* $TMP_DIR ... (8 Replies)
Discussion started by: dmilks
8 Replies

2. Shell Programming and Scripting

Testing VPN Connection

Hi All: I need a script that can be timed to run every half hour to an hour to run a traceroute through a VPN to test that a connection is still up from a Win XP system. Which would be the best, C++ or Perl and what are some good resources to look at. (If anyone has a script to do this... (1 Reply)
Discussion started by: maxhewitt
1 Replies

3. Solaris

Testing physical network connection

How do you test the physical network connection of an interface in solaris. I know that if you have an active connection and the cable gets yanked, you can look in the messages file to check for link failure messages. But is there any better way to see if you have good layer 2 connectivity? (1 Reply)
Discussion started by: tjlst15
1 Replies

4. UNIX for Dummies Questions & Answers

ssh_exchange_identification: Connection closed by remote host Connection closed

Hi Everyone, Good day. Scenario: 2 unix servers -- A (SunOS) and B (AIX) I have an ftp script to sftp 30 files from A to B which happen almost instantaneously i.e 30 sftp's happen at the same time. Some of these sftp's fail with the following error: ssh_exchange_identification: Connection... (1 Reply)
Discussion started by: jeevan_fimare
1 Replies

5. UNIX for Advanced & Expert Users

Connection reset by peer..closing connection

Hello I'm facing the above problem while doing a performance run. I've a script which I'm launching from my windows desktop using mozilla. The script will invoke backend action on a Solaris host which in turn feeds the records to a driver located on a linux box(Cent OS). What's happening is... (1 Reply)
Discussion started by: subramanyab
1 Replies

6. Shell Programming and Scripting

Testing connection with a script

I have a box that has to start dhcpd when a certain connection is down and stop the dhcpd when the connection is up again. I would appriciate any help making this script: From server A: ping server B if connection is ok then do nothing if connection is not ok then start dhcpd until... (8 Replies)
Discussion started by: KimJensen
8 Replies

7. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

8. Shell Programming and Scripting

testing postgres connection in shell script

I have a script that does db query in postgres. I'm trying to put in some error checking in the script. I keep running into the password prompt problem where when invalid credentials/or database is put it, it would prompt me for a password which hangs the script. Is there a way that I can check for... (0 Replies)
Discussion started by: zerofire123
0 Replies

9. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

10. IP Networking

Get DHCP relay interfaces IP address using DHCP

Hi All , please view the set up below: ------------------------------------------------------------------- | DHCP Server |-----------| ROUTER & |-----------| Clients | | 192.168.99.1 | - -<eth1>| DHCP-RELAY|<eth2>-- | 192.168.88.X | ... (2 Replies)
Discussion started by: gdangoor
2 Replies
BINDRESVPORT(3) 					     Linux Programmer's Manual						   BINDRESVPORT(3)

NAME
bindresvport - bind a socket to a privileged IP port SYNOPSIS
#include <sys/types.h> #include <netinet/in.h> int bindresvport(int sockfd, struct sockaddr_in *sin); DESCRIPTION
bindresvport() is used to bind a socket descriptor to a privileged anonymous IP port, that is, a port number arbitrarily selected from the range 512 to 1023. If the bind(2) performed by bindresvport() is successful, and sin is not NULL, then sin->sin_port returns the port number actually allo- cated. sin can be NULL, in which case sin->sin_family is implicitly taken to be AF_INET. However, in this case, bindresvport() has no way to return the port number actually allocated. (This information can later be obtained using getsockname(2).) RETURN VALUE
bindresvport() returns 0 on success; otherwise -1 is returned and errno set to indicate the cause of the error. ERRORS
bindresvport() can fail for any of the same reasons as bind(2). In addition, the following errors may occur: EACCES The caller did not have superuser privilege (to be precise: the CAP_NET_BIND_SERVICE capability is required). EADDRINUSE All privileged ports are in use. EAFNOSUPPORT (EPFNOSUPPORT in glibc 2.7 and earlier) sin is not NULL and sin->sin_family is not AF_INET. ATTRIBUTES
Multithreading (see pthreads(7)) Before glibc 2.17, the bindresvport() function uses a static variable that is not protected, so it is not thread-safe. Since glibc 2.17, the bindresvport() function uses a lock to protect static variable, so it is thread-safe. CONFORMING TO
Not in POSIX.1-2001. Present on the BSDs, Solaris, and many other systems. NOTES
Unlike some bindresvport() implementations, the glibc implementation ignores any value that the caller supplies in sin->sin_port. SEE ALSO
bind(2), getsockname(2) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2013-06-21 BINDRESVPORT(3)
All times are GMT -4. The time now is 08:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy