Ip helper-address with two dhcp server

I have two dhcp server running on vlan1, which serving our workstation on vlan2. 10.10.10.51 is our primary and 10.10.10.52 is secondary server.
My question is:
- Which server would my workstation get the dhcp from?
- If the primary server is down, could I reach the second dhcp server? and if the primary server back online.. Which server would be serving our dhcp client?
interface Vlan1
ip address 10.10.10.1 255.255.255.0
no ip redirects
ip directed-broadcast
interface Vlan2
ip address 10.10.20.1 255.255.255.0
ip helper-address 10.10.10.51
ip helper-address 10.10.10.52
no ip redirects
ip directed-broadcast

Hi,
I don't agree.
AFAIK, using two ip helper-address entries in a router config will cause the dhcp request being sent to BOTH dhcp servers.
So both the primary and secondary dhcp server will send a dhcp offer to the workstation. The workstation will choose one of the offers and confirm it to the server.
So ip helper-address command will not help you to choose if dhcp server is primary or secondary.
You can either use different dynamic address pools on primary and secondary dhcp server (and the same static entries) or to arrange some kind of dhcp server failover:
See
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_DHCP_imp_ClusteringSupport.htm
There is also RFC 2131 describing DHCP Failover Protocol.
Regards,
Milan

Similar Messages

  • WLC 5508, vlan select, reserved address in external DHCP server

    Hi guys,
    I have a deploy with a WLC 5508 version 7.0.116.0, APs mode local and vlan select feature enable. The issue is that the reserved IP address in external DHCP server not work. The DHCP contains a reserved IP address associates with mac address, but the assignement of IP is not match with de policies in DHCP. All others services operate normally.
    This reserved assignment operate previusly to modificate the WLAN to vlan select feature. Help me to improve this situation.
    Thanks.-
    Best regards

    Hello Abhishek, thanks for you quick answer....
    the link was a document used for the deploy, but not especifict nothing about the reserved IP address for particular host. In other words, the reserved IP address (through MAC address) in external DHCP server not work when "vlan select" its enable.

  • Connect one Business system with two Integration Server

    Hello,
    Can we able to connect one Business System with two Integration Server?
    I have one Business system (ECC 6.0 with the client 900) and it is already connected with PI 7.0 system.Can I able to connect the same sytem (with same client) with PI7.1?
    I want to do the HTTP Connection for ABAP Proxy for this two XI system with one business Sytem ?
    Is this possible ?Is there any work around solution there?
    Thanks.

    Hello ,
    This document describes about connecting with Two PI7.1 system using Application Server 7.1 and Application Server 7.0 SP14  .
    I want to connect same ECC system via abap proxy with two different PI system .One is PI7.0 and another one is PI7.1 system.
    Is this possible if i use Application Server 7.1 or Application Server 7.0 SP14  ?
    Thanks.
    Lakshmi
    Edited by: Muthulakshmi Pandi on Apr 16, 2009 11:48 PM
    Edited by: Muthulakshmi Pandi on Apr 17, 2009 12:21 AM

  • WLC 5760 with internal DHCP server, clients no get IP address

    Hi all,
    I have  2  Cisco 5760 WLC (active-standby)  IOS-Xe 03.03.03SE  with  one WLAN.
     sh wlan summary 
    Number of WLANs: 1
    WLAN Profile Name                     SSID                           VLAN Status 
    1    Invitados_ADSL                   Guest                          905  UP
    sh vlan         
    VLAN Name                             Status    Ports
    1    default                          active    Te1/0/3, Te1/0/4, Te1/0/5, Te1/0/6, Te2/0/3
                                                    Te2/0/4, Te2/0/5, Te2/0/6
    100  VLAN0100                         active    Te1/0/1, Te2/0/1
    101  Planta_1                         active    
    905  Internet                         active    Te1/0/2, Te2/0/2
    The DHCP server is internal.
    Sometimes the clients no get IP address and the DHCP pool has IP addresses available.
    The workaround done by me to solve the issue is “clear  ip dhcp  binding *”.
    Some days later the problem appears again.
    I see this bug with a similar problem:
    NGWC blocks DHCP traffic if wireless broadcast disabled
    CSCun88928
    Description
    Symptom:
    Some clients set the BROADCAST flag on the DHCP Discover packet. This requires the DHCP server to reply with a broadcast.
    In that case and if you are not using DHCP snooping on the 5760/3850, then the controller will block the return traffic unless you enable "wireless broadcast" which enables broadcast globally (and is thus not always desirable)
    Conditions:
    Seen on 3.3.2 IOS-XE
    Workaround:
    Use DHCP snooping with the "ip dhcp snooping wireless bootp-broadcast command"
    OR
    Enable "wireless broadcast" globally
    My DHCP configuration is:
    ip dhcp relay information trust-all
    ip dhcp snooping vlan 905
    ip dhcp snooping
    ip dhcp excluded-address 172.16.0.1 172.16.0.19
    ip dhcp excluded-address 172.16.1.250 172.16.1.254
    ip dhcp pool Invitados
     network 172.16.0.0 255.255.254.0
     default-router 172.16.0.1 
     dns-server 212.66.160.2 212.49.128.65 
     lease 0 8
    I see in Cisco documentation (http://www.cisco.com/en/US/docs/wireless/technology/5760_deploy/CT5760_Centralized_Configuration_eg.html) this configuration:
    DHCP Snooping and Trust Configuration on CT5760
    ip dhcp snooping vlan 100, 200
    ip dhcp snooping wireless bootp-broadcast enable
    ip dhcp snooping
    interface TenGigabitEthernet1/0/1
    description Connection to Core Switch
    switchport trunk allowed vlan 100, 200
    switchport mode trunk
    ip dhcp relay information trusted ip dhcp snooping trust
    interface Vlan100
    description Client Vlan
    ip dhcp relay information trusted
    My question is,Do I have to add the command "ip dhcp snooping wireless bootp-broadcast enable" to solve the issue?
    Thanks in advance.
    Regards.
    D

    Yes, test it with the command you mentioned
    ip dhcp snooping wireless bootp-broadcast enable
    HTH
    Rasika
    **** Pls rate all useful responses *****

  • IP address not refreshing with new DHCP Server setup

    Hi all,
    This is a strange issue that I am lost. I had a different Gateway with  a Built in DHCP server on 192.168.0.1 IP address. I installed a new DHCP Server with an IP address 192.168.1.1, but when I connect to the Wireless network with the correct password, I still get an IP address in the old IP range.
    I have done a security wipe with the same result.
    Does anyone have any ideas on what I need to do to flush out all the IP information?

    Yes,
    That is what I ended up doing, altho it seems very weird. I figured out how to correct it, but still am not sure why it happend.
    1. Changed my DHCP Serer IP to 192.168.0.1
    2. Went into the Client list and deleted the IP for the Playbook.
    3. Changed the DHCP Server IP back to 192.168.1.1
    4. Playbook has new IP.
    Anyone with ideas why this happened I would be interested in their thoughts!!!

  • Out of available IP addresses on one DHCP server, will other DHCP servers field the request?

    I have three WinServer 2012 R2 domain controllers that also act as DNS and DHCP servers.
    I have a guest wireless network that has its own subnect, 10.121.176.0/20
    We have our DHCP scopes split this way across the three domain controllers with a DHCP lease time of 1 day
    Domain controller 1, 10.121.176.11 - 10.121.181.255 for a total of 1,525 addresses
    Domain controller 2, 10.121.182.0 - 10.121.186.255 for a total of 1,280 addresses
    Domain controller 3, 10.121.187.0 - 10.121.191.254 for a total of 1,279 addresses
    This gives us a total of 4,084 addresses to hand out on our guest wireless network which is plenty. I just looked at each servers stats and this is what I see
    Domain controller 1 - 717 addresses in use, 808 available
    Domain controller 2 - 900 addresses in use, 380 available
    Domain controller 3 - 1280 address in use, 0 available
    On domain controller 3 I am seeing lots of DHCP events
    Event ID 1063 - There are no IP addresses available for lease in the scope or superscope "GuestWireless-176
    Event ID 20287 - DHCP client request from 28E14CE87EFB was dropped since the applicable IP address ranges in scope/superscope GuestWireless-176 are out of available IP addresses
    Two questions:
    Once Domain Controller 3 rejects the DHCP request since it is out of addresses, will this request be fulfilled by one of my other two domain controllers?
    Is there any way to even out the leases on these DHCP servers? Not sure the mechanism behind a client choosing one DHCP server over another

    1 yes, the dhcp server who's scope is full will not do a dhcp
    'offer'
    2 dhcp that answers fastest with a 'offer' will win. A delay is configurable (but changes nothing
    about the root scenario were the fastest will win)
    Note that if the scopes overlap on the servers, they might not lease out all the addresses in the scope.
    I would enlarge the scope as you will want to fence against unavailability of one of the servers (or a network connection for that matter). you currently have more addresses leased out than any set of two of your servers can offer.
    MCP/MCSA/MCTS/MCITP

  • How do I have a cRIO register its IP address with the DNS server, clearing any previous entries?

    I've run into a problem when I try to move a cRIO-9073 from one network segment to another (say 10.1.33.x to 10.1.36.x):  The old IP address remains registered on our DNS server, so trying to access the cRIO by its DNS name fails as the DNS server tells my PC to look for the old IP address.
    When I search the DNS server from my PC using "NSLOOKUP" with the old IP address, it finds the DNS name of the device.  If I repeat the search with the new IP address (MAX finds the device with its new address, but I hate to have users use MAX to find it), it again returns the DNS name, so it appears the DNS name is registered under two IP addresses on our DNS server.  I've also repeatedly tried to flush my PC's DNS cache using command "IPCONFIG /FLUSHDNS", but it still tries the old IP address.  I also see in MAX that the cRIO is using the same DNS server my PC uses.
    Our IT people say that I have to tell the device to re-register its DNS name.  They told me a command to do it from Windows (command "ipconfig /registerdns"), but obviously this is VxWorks on the cRIO.  Is there a command to do this on the cRIO or a setting in the "NI-RT.INI" file I can change?  I honestly don't think this is the issue (as it successfully registered the new IP address under its name), but I want to try it if it's possible.
    Thanks!
    Erik
    ps - Our IT dept. won't let me use static IPs unless I get them assigned by both their MAC address AND the network jack they're connected to, so that's out.

    Normally this is actually a function of your DNS server. It needs to perform a periodic flush of stale records. You can check the RFC for the DNS protocol and build the necessary packet yourself.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Mac Lion won't accept IP address sent from DHCP server

    Upgraded to Lion a few days ago.  Everything worked for a couple days.  Plug in the ethernet cable today and I never get an ip address with DHCP from my router.  I have 2 other devices plugged into the router and they get ip addresses normally.  Captured the DHCP communication to see if I was getting a valid DHCP offer and I am...it is included.  The Lion firewall is disabled.  For some reason Lion isn't accepting the DHCP offer.  Could this be a bug or maybe something in a cache needs to cleaned out.  I connect to several different networks daily and they all work except for this one.
    The line in Bold type shows the ip address being offered that never gets accepted by lion.
    No.     Time        Source                Destination           Protocol Info
         26 21.993141   10.19.39.97           255.255.255.255       DHCP     DHCP Offer    - Transaction ID 0x4e299603
    Frame 26 (353 bytes on wire, 353 bytes captured)
        Arrival Time: Aug  5, 2011 19:30:01.105566000
        [Time delta from previous captured frame: 0.001086000 seconds]
        [Time delta from previous displayed frame: 0.001086000 seconds]
        [Time since reference or first frame: 21.993141000 seconds]
        Frame Number: 26
        Frame Length: 353 bytes
        Capture Length: 353 bytes
        [Frame is marked: False]
        [Protocols in frame: eth:ip:udp:bootp]
        [Coloring Rule Name: UDP]
        [Coloring Rule String: udp]
    Ethernet II, Src: e8:b7:48:e6:ab:5c (e8:b7:48:e6:ab:5c), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
        Destination: Broadcast (ff:ff:ff:ff:ff:ff)
            Address: Broadcast (ff:ff:ff:ff:ff:ff)
            .... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
            .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
        Source: e8:b7:48:e6:ab:5c (e8:b7:48:e6:ab:5c)
            Address: e8:b7:48:e6:ab:5c (e8:b7:48:e6:ab:5c)
            .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
            .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
        Type: IP (0x0800)
    Internet Protocol, Src: 10.19.39.97 (10.19.39.97), Dst: 255.255.255.255 (255.255.255.255)
        Version: 4
        Header length: 20 bytes
        Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
            0000 00.. = Differentiated Services Codepoint: Default (0x00)
            .... ..0. = ECN-Capable Transport (ECT): 0
            .... ...0 = ECN-CE: 0
        Total Length: 339
        Identification: 0x00fa (250)
        Flags: 0x00
            0.. = Reserved bit: Not Set
            .0. = Don't fragment: Not Set
            ..0 = More fragments: Not Set
        Fragment offset: 0
        Time to live: 255
        Protocol: UDP (0x11)
        Header checksum: 0x882c [correct]
            [Good: True]
            [Bad : False]
        Source: 10.19.39.97 (10.19.39.97)
        Destination: 255.255.255.255 (255.255.255.255)
    User Datagram Protocol, Src Port: bootps (67), Dst Port: bootpc (68)
        Source port: bootps (67)
        Destination port: bootpc (68)
        Length: 319
        Checksum: 0x038d [validation disabled]
            [Good Checksum: False]
            [Bad Checksum: False]
    Bootstrap Protocol
        Message type: Boot Reply (2)
        Hardware type: Ethernet
        Hardware address length: 6
        Hops: 0
        Transaction ID: 0x4e299603
        Seconds elapsed: 0
        Bootp flags: 0x8000 (Broadcast)
            1... .... .... .... = Broadcast flag: Broadcast
            .000 0000 0000 0000 = Reserved flags: 0x0000
        Client IP address: 0.0.0.0 (0.0.0.0)
        Your (client) IP address: 10.19.39.98 (10.19.39.98)
        Next server IP address: 0.0.0.0 (0.0.0.0)
        Relay agent IP address: 0.0.0.0 (0.0.0.0)
        Client MAC address: Apple_17:fd:5d (c4:2c:03:17:fd:5d)
        Client hardware address padding: 00000000000000000000
        Server host name not given
        Boot file name not given
        Magic cookie: (OK)
        Option: (t=53,l=1) DHCP Message Type = DHCP Offer
            Option: (53) DHCP Message Type
            Length: 1
            Value: 02
        Option: (t=54,l=4) DHCP Server Identifier = 10.19.39.97
            Option: (54) DHCP Server Identifier
            Length: 4
            Value: 0A132761
        Option: (t=51,l=4) IP Address Lease Time = 1 day, 23 hours, 39 minutes, 50 seconds
            Option: (51) IP Address Lease Time
            Length: 4
            Value: 00029E46
        Option: (t=58,l=4) Renewal Time Value = 23 hours, 49 minutes, 55 seconds
            Option: (58) Renewal Time Value
            Length: 4
            Value: 00014F23
        Option: (t=59,l=4) Rebinding Time Value = 1 day, 17 hours, 42 minutes, 16 seconds
            Option: (59) Rebinding Time Value
            Length: 4
            Value: 00024A78
        Option: (t=1,l=4) Subnet Mask = 255.255.255.240
            Option: (1) Subnet Mask
            Length: 4
            Value: FFFFFFF0
        Option: (t=6,l=8) Domain Name Server
            Option: (6) Domain Name Server
            Length: 8
            Value: AB44E278AB46A8B7
            IP Address: 171.68.226.120
            IP Address: 171.70.168.183
        Option: (t=44,l=8) NetBIOS over TCP/IP Name Server
            Option: (44) NetBIOS over TCP/IP Name Server
            Length: 8
            Value: AB443935AD2573BF
            IP Address: 171.68.57.53
            IP Address: 173.37.115.191
        Option: (t=3,l=4) Router = 10.19.39.97
            Option: (3) Router
            Length: 4
            Value: 0A132761
        End Option

    I have seen the same issue with my iOS and Mac OS devices (iPhone and MacBook Pro). I have written my own DHCP server (http://notebook.kulchenko.com/embedded/dhcp-and-dns-servers-with-arduino) and have had troubles getting my devices to connect (Windows Vista and Ubuntu devices connect fine). I suspect that this problem happens because the DHCP Offer message is sent to a broadcast address, even though (at least in my case) the broadcast flag is off in the DHCP Discover message I see.
    Unfortunately you didn't include the Discover message, so I can't tell for sure, but if it indeed has the broadcast flag set to 0, then the server should send the response message using unicast as per DHCP spec (http://www.ietf.org/rfc/rfc2131.txt, section 4.1):
      If the broadcast bit is not set and 'giaddr' is zero and
       'ciaddr' is zero, then the server unicasts DHCPOFFER and DHCPACK
       messages to the client's hardware address and 'yiaddr' address.
    So, it seems like in this case the server may be at fault, even though it would be nice for Mac OS to accept broadcast responses (and would solve my problem too).
    Can someone confirm that Mac OS does not accept broadcast responses to DHCP Discover and DHCP Request messages? Thanks.
    Paul.

  • Help me with Report Application Server SDK

    Please, I need help with Report Application Server SDK.
    public static void rpt2xml(ReportClientDocument rcd) {
    IXMLExportFormat xmlExportFormat = new XMLExportFormat();
    XMLExportFormats xmlExportFormats = new XMLExportFormats();
    IXMLExportFormatOptions xmlExpFormatOpts = new XMLExportFormatOptions();
    PrintOutputController rcdPrint = rcd.getPrintOutputController();
    xmlExportFormats = rcdPrint.getSavedXMLExportFormats(); //  <------ ERROR HERE
                                        //" This method is undefined
                                               // for the type PrintOutpupController", ¿why?
    int index = xmlExportFormats.getDefaultExportSelection();
    xmlExpFormatOpts.setXMLExportSelection(index);
    xmlExportFormat = xmlExportFormats.getXMLExportFormat(index);
    Edited by: Diego XMunch on Mar 1, 2011 3:35 PM

    I819738 wrote:
    Ok, so you do have the right version of Crystal Reports.  I would like to see which assemblies you have referenced in your project and their assembly versions.  Might also be good to list your imports/using statements as well.
    Hi, I´m trying to use Report Engine SDK buy I have this error:
    com.businessobjects.rebean.wi.ServerException: Error interno al llamar a la API 'openDocumentMDP'. (Error: ERR_WIS_30270)
         at com.businessobjects.rebean.wi.occa.OccaDocumentComAdapter.checkOpenDocError(Unknown Source)
         at com.businessobjects.rebean.wi.occa.OccaDocumentComAdapter.openDocument(Unknown Source)
         at com.businessobjects.rebean.occa.OccaReportEngineComAdapter.openDocument(Unknown Source)
         at com.businessobjects.rebean.wi.ReportEngineImpl.openDocument(Unknown Source)
         at com.businessobjects.rebean.wi.occa.WebiReportEngine.openDocument(Unknown Source)
         at org.apache.jsp.login_jsp._jspService(login_jsp.java:163)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:619)
    Edited by: Diego XMunch on Mar 10, 2011 3:37 PM

  • Ip helper address with Policy Base Routing

    Does ip helper work with Policy Base Routing? and if so how and what version of the router software do you need?
    thanks

    As first function at the ingress interface is ip_helper, as second function at the same ingress interface is policy-based-routing.
    We have the same situation regarding ip nat in combination with policy-based-routing.

  • IP Address with two NICs

    LabVIEW 7.0
      I have Win2000, my client has XP Pro.
      My program, as a convenience, displays on the front panel the IP address of the machine it's running on. This is so he can enter this address in another machine and communicate with it.
      I'm using the STRING to IP function (input unwired), and the IP to STRING function to display the number.
      My client has TWO NICs installed - one for data acquisition (we are collecting data from Ethernet machines in a test cell), and another for general traffic (printing, inter-cell transfer, etc).
      We discovered recently that the program was displaying the local IP number (192.168.x.x), which is the DAQ net. This is not the one we want.
      So I found the MULTIPLE OUTPUT option on the STRING to IP function and turned it on. I used an INDEX ARRAY function to pick out address #1 (not #0) and display that. That works fine.
      My question is: how do I know that #1 is the right number to use? This app will be deployed on a bunch of machines, will the local be Net #0 on all machines? Is that a system config issue? Do I need to tell him to configure a control panel somewhere a certain way? Do I need to read both addresses and display the one that does NOT start with "192."? How do I make this bulletproof?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    Hi CMB,
    There are several approaches to this.  Some less favorable to others... such as at one extreme:  to identify with a label which NIC goes to what network....
    However,  to keep automation... "automated", how about the following: 
    Since you can automatically detect each IP address, you can then implement a small test to "self-discover" which IP (NIC) talks tho which network.  For instance, you may want to ping a known static address, such as a mail-server to discover that it is part of the WAN and not the test network.  You may also prefer to ping by host name just in case the IP address of that machine changes.   In the event that you do not know any IP address or host names, you may try to ping something outside the LAN (over internet for instance), something that the test network could not reach (your own website for instance??).
    Would you be autodetecting on an ongoing basis (ie. every day) or only during equipment setup and configuration?
    Ray

  • Can any one help me with this chat server

    The code below is of a client and server but the problem is that the msg can be sent only from the server and not the client I want that whenever a msg is sent from the server the control for writing the msg should go on to the client n den vise versa n should continue till the connection is terminated..plz help me....!
    CoDES
    for client
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    class client {
    public static void main(String[] args) throws IOException {
    Socket s =null;
    BufferedReader b=null;
    try{
    s=new Socket( InetAddress.getLocalHost(),98);
    b=new BufferedReader(new InputStreamReader(s.getInputStream()));
    catch(UnknownHostException u) {
    System.err.println("i dont know host");
    System.exit(0);
    String inp;
    while((inp=b.readLine())!=null){
    System.out.println(inp);
    b.close();
    s.close();
    FOR SERVER$
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.nio.channels.ServerSocketChannel;
    public class server {
    public static void main(String[] args) throws IOException {
    ServerSocket s1=null;
    try{
    s1=new ServerSocket(98);
    }catch(IOException u1)
    System.err.println("could not find port 98");
    System.exit(1);
    Socket c=null;
    try{
    c=s1.accept();
    System.out.println("connection from"+c);
    catch(IOException e)
    System.out.println("accept failed");
    System.exit(1);
    PrintWriter out=new PrintWriter(c.getOutputStream(),true);
    BufferedReader in=new BufferedReader(new InputStreamReader(c.getInputStream()));
    String I;
    BufferedReader sin=new BufferedReader(new InputStreamReader(System.in));
    System.out.println("i am ready to type now");
    while((I=sin.readLine())!=null) {
    out.println(I);
    out.close();
    sin.close();
    c.close();
    s1.close();
    }

    What you need is to have two loops running at the same time. One for receiving messages and other for waiting user input. This can be done by using separate threads.
    For example after client has made connection to server, start a new thread that runs loop for receiving messages from the socket and printing them to System.out. Then in the default thread start loop for reading users input. The server could have similar structure.
    So, what I think you are looking for are threads.

  • Working with two X-Serve Raids

    I have two Xserve Raids that, if possible, I would like to hook up simultaneously to my G5. I already have one PCI-X card hooked up. Is it possible to hook up a second card internally? My memory eludes me slightly but I believe the PCI-X slots are on two separate busses (or whatever it's called) with the top slot being one bus and the rest of the slots sharing the other bus. IF I installed a card in the top slot (it's own bus), and the other card in one of the other slots will this work?
    2 other questions:
    Is it possible to remove a set of 7 working drives, take them out of the caddy, replace them with 7 more working drives, plug in and use, then remove the second set and install the original 7 drives in the exact same order they were originally and use them?
    Does anyone have any recommendations of gigabit ethernet switches? And will the cheap netgear devices work with the Xserve Raids or do I need some sorta expensive switch?
    Thanks for any help, matt

    Hi Matt
    +will the cheap netgear devices work with the Xserve Raids?+
    Yes
    +do I need some sorta expensive switch?+
    No
    +any recommendations of gigabit ethernet switches?+
    Cisco, HP ProCurve, 3-Com etc. Google should supply more? If I understand you correctly the question does not really make sense? Connectivity is not made via ethernet. IIRC the built-in NICs are only 10/100Mbts. Connecting to a gigabit switch does not gain you anything in that sense?
    What I have done is this: One XServe, 2 Apple FC Cards, 2 XServe RAIDS (fully populated) one connected to one card, the other connected to the other. Works fine.
    It is possible to transfer ADMs from a one array to the other in the correct sequence. I did not try it without making a backup first. I did not remove the drives from the modules.
    +Is it possible to remove a set of 7 working drives, take them out of the caddy, replace them with 7 more working drives, plug in and use, then remove the second set and install the original 7 drives in the exact same order they were originally and use them?+
    Don't know? Never tried it.
    Tony

  • Help Needed With Basic Client/Server App

    I was wondering if anyone can help with a simple blackjack client/server application i've been writting (basically its a moddified chat application). The problem i'm having seems to lie within the connection management i've written.
    What i'm trying to get is that only 4 players can connect at one time and that each player takes a turn (which i've implemented using threads) to play their hand (as you would if you were playing it for real). The problem is that it will allow the players to connect, but oddly enough, it will not allow a new transaction to be created (i.e. allow a player to take their turn) until 2 players have connected.
    Even when it does create the transaction, after taking input from the client once, the server seems to stop doing anything without any error message of any kind.
    Its really annoyed me now, so you guys are my last hope!
    The code can be found in full here:
    Client Application: http://stuweb3.cmp.uea.ac.uk/~y0241725/WinEchoClient.java
    Server Application: http://stuweb3.cmp.uea.ac.uk/~y0241725/ThreadServer.java
    Card Class: http://stuweb3.cmp.uea.ac.uk/~y0241725/Card.java
    Deck Class: http://stuweb3.cmp.uea.ac.uk/~y0241725/Deck.java
    Please feel free to play around with this code as much as you feel necessary!

    (one last bump back up the forum before i give up on this completely)

  • Please help me with two problems?

    I have a 4GB Nano and whenever I plug it into my PC it will freeze at the menu. I know how to reset it, however my clickwheel button doesn't work all the time because it's been worn out a lot with my 1000+ Klondike games, anyone have any idea how to fix this?

    Have you tried plugging it into a different USB port? If not, try that. If it still freezes, then you most likely have a conflict with ports, such as two devices using the same port. Try running the windows troubleshooter and see if that will help.

Maybe you are looking for

  • ERROR in Message receiving from mobile

    hi, m connecting my mobile(nokia 6270) with computer.all AT command works fine.but when i execute "AT+CNMI=0,0,0,0" command.then it give me ERROR.plz any one help me to slove this prob.due to this prob i can't receive msg of mobile on computer. can a

  • Using Disk Utility to format external drive as Apple extended?

    Hello - I just bought a 750G Lacie USB hard drive, am attempting to reformat it from FAT32 to Mac Extended. However, when I attempt to 'erase' the drive and replace it with Mac Extended, I get the following error message: +2009-04-28 22:12:24 +0100:

  • Solaris express first impressions

    Downloaded solaris express on 10/DEC/05 burned to 4 cd's. Did a complete OEM install Installed 3 times, once with a xircom, 3com and netgear pcmcia cards, no detection of the nics however the pcic slots are detected and show in prtconf -D | grep pcic

  • Content in iframe, open links in browser window

    I have an iframe in my app that points at an external website (not under my control) and I'd like to have any links the user clicks on open that URL in a browser window. As it is it opens the link either in the same iframe or (if the link has target=

  • Unprompted Report parameter

    Hi, I'm running that against Oracle DB. If a report parameter is used within that script, then it will be prompted. If not, it will not be prompted. How can we make that be prompted, as for some situations, they can only be for the control use in the