testing a dhcp connection


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting testing a dhcp connection
Prev   Next
# 1  
Old 07-07-2009
testing a dhcp connection

Hi there,

I have a computers that has a fixed address :
Code:
terminal48:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 172.16.150.151
netmask 255.255.0.0
network 172.16.0.0
broadcast 172.16.255.255
gateway 172.16.100.3

I'd like to switch it to a dhcp address but before editing the file, I need to be sure it will be able to contact the dhcp server. Indeed, I can only remote control the computer (ssh) and have no physical access to it. If I edit the file, restart the networking and if the computer cannot get an dhcp ip address, I permanently loose control over it.

Is there a command that can test a dhcp connection without actually modifying the current parameters?

Thanks for your help

Santiago
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

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

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

10. 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
Login or Register to Ask a Question
dhcp(5) 						Standards, Environments, and Macros						   dhcp(5)

NAME
dhcp - Dynamic Host Configuration Protocol DESCRIPTION
Dynamic Host Configuration Protocol (DHCP) enables host systems in a TCP/IP network to be configured automatically for the network as they boot. DHCP uses a client/server mechanism: servers store configuration information for clients, and provide that information upon a client's request. The information can include the client's IP address and information about network services available to the client. This manual page provides a brief summary of the Solaris DHCP implementation. Solaris DHCP Client The Solaris DHCP client is implemented as background daemon, dhcpagent(1M). This daemon is started automatically during bootup if there exists at least one dhcp.interface file in /etc. Only interfaces with a corresponding /etc/dhcp.interface file are automatically configured during boot. Network parameters needed for system configuration during bootup are extracted from the information recieved by the daemon through the use of the dhcpinfo(1) command. The daemon's default behavior can be altered by changing the tunables in the /etc/default/dhc- pagent file. The daemon is controlled by the ifconfig(1M) utility. Check the status of the daemon using the netstat(1M) and ifconfig(1M) commands. Solaris DHCP Server The Solaris DHCP server is implemented as a background daemon, in.dhcpd(1M). This daemon can deliver network configuration information to either BOOTP or DHCP clients. The Solaris DHCP service can be managed using the dhcpmgr(1M) GUI or the command line utilities dhcpcon- fig(1M), dhtadm(1M), and pntadm(1M). DHCP Configuration Tables The Solaris DHCP server stores client configuration information in the following two types of tables: dhcptab tables Contain macros and options (also known as symbols), used to construct a package of configuration information to send to each DHCP client. There exists only one dhcptab for the DHCP service. The dhcptab(4) can be viewed and mod- ified using the dhtadm(1M) command or dhcpmgr(1M) graphical utility. See dhcptab(4) for more information about the syntax of dhcptab records. See dhcp_inittab(4) for more information about the DHCP options and symbols. DHCP network tables DHCP network tables, which contain mappings of client IDs to IP addresses and parameters associated with those addresses. Network tables are named with the IP address of the network, and can be created, viewed, and modified using the pntadm command or dhcpmgr graphical utility. See dhcp_network(4) for more information about network tables. SEE ALSO
dhcpinfo(1), dhcpagent(1M), dhcpconfig(1M), dhcpmgr(1M), dhtadm(1M), ifconfig(1M), in.dhcpd(1M), netstat(1M), pntadm(1M), syslog(3C), dhcp_network(4), dhcptab(4), dhcpsvc.conf(4), dhcp_inittab(4), dhcp_modules(5) Solaris DHCP Service Developer's Guide Alexander, S., and R. Droms. RFC 2132, DHCP Options and BOOTP Vendor Extensions. Silicon Graphics, Inc. Bucknell University. March 1997. Droms, R. RFC 1534, Interoperation Between DHCP and BOOTP. Bucknell University. October 1993. Droms, R. RFC 2131, Dynamic Host Configuration Protocol. Bucknell University. March 1997. Wimer, W. RFC 1542, Clarifications and Extensions for the Bootstrap Protocol. Carnegie Mellon University. October 1993. SunOS 5.10 13 Mar 2001 dhcp(5)