How to determine which IP address and port is used to make DNS queries?

I am using JNDI/DNS API to query a Enum server (Tel URI resolution in VOIP world) what is a DNS server.
But I have many network interfaces, in a VLAN environment, and I must to specify from which interface (and port)
all the requests are sent.
When I read the code of JNDI/DNS API (in JDK 1.5) and specially the DNSClient class, I can see that the
DatagramSocket is created without parameters... : udpSocket = new DatagramSocket();
How can I specify the IP address and port to use for my client???
Thanks for your help.

I must to specify from which interface (and port) all the requests are sent. You don't have to specify the interface unless your static unicast routing tables are incorrect, and you never have to specify the port unless some lunatic is in control of your firewall.

Similar Messages

  • How to extract Weblogic Listen Address and port.

    Hi All,
    I want to extract Weblogic Admin server's Listen address and port via Java to perform some admin actions.
    Can someone please help on this.
    Thanks,
    GJ

    Hi,
    Try this code.
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.util.Hashtable;
    import javax.management.MBeanServerConnection;
    import javax.management.MalformedObjectNameException;
    import javax.management.ObjectName;
    import javax.management.remote.JMXConnector;
    import javax.management.remote.JMXConnectorFactory;
    import javax.management.remote.JMXServiceURL;
    import javax.naming.Context;
    import java.lang.*;
    public class ServerDetails
    private static MBeanServerConnection connection;
    private static JMXConnector connector;
    private static final ObjectName service;
    static
    try {
    service=new ObjectName("com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean");
    catch (MalformedObjectNameException e)
    throw new AssertionError(e.getMessage());
    public static void initConnection(String hostname, String portString,String username, String password) throws IOException,MalformedURLException
    System.out.println("ServerDetails---Started in initConnection");
    String protocol="t3";
    Integer portInteger=Integer.valueOf(portString);
    int port=portInteger.intValue();
    String jndiroot="/jndi/";
    String mserver="weblogic.management.mbeanservers.domainruntime";
    JMXServiceURL serviceURL=new JMXServiceURL(protocol, hostname,port, jndiroot + mserver);
    Hashtable h=new Hashtable();
    h.put(Context.SECURITY_PRINCIPAL, username);
    h.put(Context.SECURITY_CREDENTIALS, password);
    h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,"weblogic.management.remote");
    connector=JMXConnectorFactory.connect(serviceURL, h);
    connection=connector.getMBeanServerConnection();
    public static ObjectName[] getServerRuntimes() throws Exception
    return (ObjectName[]) connection.getAttribute(service,"ServerRuntimes");
    public void printServerDetails() throws Exception
    ObjectName[] serverRT=getServerRuntimes();
    for (int i=0;i < serverRT.length;i++)
    String name=(String)connection.getAttribute(serverRT,"Name");
    String listenAddress=(String)connection.getAttribute(serverRT[i],"ListenAddress");
    Integer listenPort=(Integer)connection.getAttribute(serverRT[i],"ListenPort");
    System.out.println("Server Name : " + name +"\t Address: "+listenAddress+"\t Port: "+listenPort);
    public static void main(String[] args) throws Exception
    System.out.println("ServerDetails---Started");
    String hostname=args[0];
    String portString=args[1];
    String username=args[2];
    String password=args[3];
    System.out.println("Hostname : " + hostname);
    System.out.println("PortString : " + portString);
    System.out.println("Username : " + username);
    System.out.println("Password : " + password);
    ServerDetails sd=new ServerDetails();
    initConnection(hostname, portString, username, password);
    sd.printServerDetails();
    connector.close();
    Regards,
    Kal

  • How to determine which SUS Scenario my company is using?

    Hello,
    How can I quickly determine which SUS Scenario my company is using?  Is this a configuration option in SPRO? 
    We are using ECC to create PO -> IDOC-XML -> PI -> Proxy -> SUS
    SUS creates PO Confirmation, ASN, Invoice response documents to ECC.
    Is this classic/ extended classic/ plan driven? 
    Thanks,
    Matt

    Matt,
      In IMG check this setting.
    Activate Extended Classic Scenario: This setting determines whether Enterprise Buyer processes processes carts with the extended classic scenario
    If this setting is not on, the implementation is either classic or standalone.
    Check define backend systems used. If the backend system is defined as non-sap systems, the implementation is standalone.
    SG

  • To know IP address and port no using DB Link

    Hi -
    Is it possiable to know the IP address and port no of other oracle database that are connected with DB link. i.e for example
    we have 2 oracle databases(For example A and B and it's schemas are A_A and B_B) on two different IP address and DB link is created on B database i.e using B_B user to access A database i.e A_A user. Now By using A database i.e A_A user can we know the IP and PORT NO of database B?

    user4587979 wrote:
    Hi -
    Is it possiable to know the IP address and port no of other oracle database that are connected with DB link. i.e for example
    we have 2 oracle databases(For example A and B and it's schemas are A_A and B_B) on two different IP address and DB link is created on B database i.e using B_B user to access A database i.e A_A user. Now By using A database i.e A_A user can we know the IP and PORT NO of database B?you can also know the ip address and port number by tnsping command.
    $tnsping B
    eg:-
    C:\Documents and Settings\rajesh-kg>tnsping TESTDB
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 07-JUN-2
    011 18:44:48
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    Used parameter files:
    D:\oracle\product\10.2.0\db_2\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxxx)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SER
    VICE_NAME = testdb)))
    OK (50 msec)

  • How to determine the Xcelsius Theme and Colour scheme used in a dashboard

    I would like to know what colour scheme and xcelsius Theme has been used in creating a given dashboard.  Kindly share this information
    Thanks

    Hi,
    Xcelisus Thems cannot be used in professional dashboards.If you are doing any dashboard's for your internal team ,It would be ok..
    But the best pratice is to create ur own colors,all along the dashboard..
    Regards,
    satish.p

  • API method to query multicast address and port of a cluster

    I am new to Tangosol and I'm looking to write a quick Java dashboard that will display current information on our cluster, such as the clustername and the multicast address and port that is being used. Looking at the API I've found the Cluster object and I'm able to get the memeberset and the clustername.But I have not been able to find a way to query the multicast address and port being used by the cluster.
         Any help or links would be appreciated.
         Thanks,
         Len

    Hi Len,
         All this information could be retrieved via JMX. Please see this Wiki page. Detailed documentation about the semantics of all exposed attributes and method could be found in the Javadoc for the <a href ="http://tinyurl.com/r75sy">Registry interface</a>.
         Regards,
         Gene

  • Find host name and port number using query

    Hi,
    How do find the system_name, host_name and port no
    using sql query or data dictionary.
    plz

    SELECT i.instance_name, i.host_name, f.release_name RELEASE, i.version, k.patch_level FROM
    v$instance i, fnd_product_groups f, fnd_product_installations k WHERE
    UPPER(SUBSTR(i.instance_name, 1, 4)) = UPPER(SUBSTR(f.applications_system_name, 1, 4)) AND
    k.application_id = '200';

  • How do you print a list of bookmarks which includes addresses and properties?

    How do you print a list of bookmarks which includes addresses and properties?

    Which properties do you want included?
    See also:
    *[[/questions/748417]]

  • Essbase1113 IP Address and Port Questions

    hello,
    everyone, i'm puzzled on a question about essbase.
    it'll be so kind if you give me some suggestions.
    in our project, we install EMP System 1113 on Win Server2003, but it's in local network. there is no problem when we connect it using client tools in local network environment.
    however, we wanna connect the Essbase Server through Internet, we map the server address (such as 10.163.163.163) as an Internet address (such as 111.111.111.111).
    we didn't use VPN such tools, and, the address is just a mapping, if we don't map the port, we couldn't connect the essbase server.
    here comes the question, how do we map the essbase address and port ? i mean which port should we use, so that we could connect it through Internet ?
    thank you so much.
    wish to reply.
    hawk.

    The ports that essbase use are outlined at :- http://download.oracle.com/docs/cd/E12825_01/epm.111/epm_install_start_here/ch06s05s01.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to determine which elements are queryable via Web Services QueryPage

    I am trying to query opportunities by associated opportunity product revenue records, but I continue to receive errors like "Unexpected text: = '9598015'".
    From reviewing the forums, it looks like this is when I am querying a field that is not defined to be queryable.
    Could someone please tell me how to determine which fields are queryable on a particular record type like this? I have tried using basic short text fields and indexed short text fields - but continue to receive the error message above.
    Thanks in advance.

    I found at least partial answers to my questions.
    MessageContext.getPropertyNames() can be used to see the properties on a given flow.
    MessageContext.getProperty(prop) can be used to get information for paroperties such as:
    prop=javax.xml.rpc.service.endpoint.address
    prop=wsdl.portName
    -- Frank

  • How can I determine which profile Firefox 5 is currently using?

    How can I determine which profile Firefox 5 is currently using?

    in address bar type:
    '''''about:cache'''''
    and look at '''''Offline cache device -> Cache Directory'''''

  • Changing the multicast Address and Port giving error

    I am using Coherence 3.3.1 jar files (Coherence.jar and tangosol.jar) in my local application. But when I try to change the multicast Address and Port in tangosole-coherence.xml(in Coherence.jar) then it is giving this error -
    "This member could not join the cluster because of an incompatibility between the cluster protocol used by this member and the one being used by the rest of the cluster. This is most likely caused by a Coherence version mismatch, or by mismatched protocol filters (e.g. compression, or encryption)"
    If i am using unique IP and Port then how can it be in a Cluster as this error stating. Please reply ASAP.

    Hi,
    There is a good chance that there is already the IP and port is being used by another cluster (which uses different versions of jars or configurations) and hence, when you are starting your cluster, throwing the error.
    Can you double check if another cluster is already using it or not ?
    Thanks,
    Amit

  • In a Smart Group in AddressBook 6.1, how do I designate which email addresses I want to use?

    In a Smart Group in AddressBook 6.1, how do I designate which email address I want to use for contacts who have more than one address when I'm mailing to the whole group? The "Edit Distribution List" is grayed out.

    Thanks, Barney, but that's not really my question. The "Edit Distribution List" is in the Edit menu on my version, too, but I can't use it to edit the email addresses of contacts who are in Smart Groups. In the version of AddressBook I was using before I bought a new MacBook Pro and upgraded to Mac OSX Lion, I could use the "Edit Distribution List" to pick which email address I wanted to use for contacts in Smart Groups with more than one address. Apparently that isn't an option in Lion. The Help menus for AddressBook 6.1 even say that "Edit Distribution Lists" doesn't work for Smart Groups.
    Okay. I get that. But some of my contacts have more than one email address, so how do I choose which email address I want Mail to use for these contacts when I send an email to a Smart Group they're in?

  • EEWB :  how to determine the business object and the extension type ?

    Hi,
    I ask myself how to determine the business object and the extension type to use to add new fields in a new tab of a specific transaction ? what means each business object, does that correspond to a specific transaction ?
    I need to add a new tab in the ‘BaMI’ business activity in transaction CRMD_ORDER just after the tab 'Actions' at header level.
    Could you help me please to determine which business object and extension type I have to select during creation of the project and which business object category I have to select during creation of the extension (wizard) ?
    Thanks for your help,
    Marie

    Marie,
    In order to determine what type of transaction you are extending, you will need to look at the customizing for the transaction.
    In the IMG:
    Goto:
    Customer Relationship Management->Transactions->Basic Settings->Define Transaction Types.
    You will then choose the transaction defined that you want to extend.  If you display the details of the transaction you will find an attribute called:
    "Leading Transaction Category".  This tells you the general context in which the transaction is used.  The other item to view is the assignment of business transaction categories found in the maintenance screen.
    This information general corresponds to one of the options that the EEWB will give you on the transaction type.
    As far as extensions go, my recommendation is the following:
    - Use CUSTOMER_H Customer Header Extensions for any new fields at the header level.
    - Use CUSTOMER_I Customer Item Extensions for any new fields at the item level.
    Unless you have a specific requirement to extend a segment of the transaction, I recommend placing all new fields in these segments.  The CUSTOMER_H & CUSTOMER_I segments are considered "standard" segments, that are already built into all the necessary API structures. 
    Let me know if you have any further questions.
    Good luck,
    Stephen

  • How to determine which chipset my Satellite L300/700 has?

    I have a SATELLITE L300/700 (PSLB8A-047004). The User Guide covers several models. It indicates that the chipset determines which memory modules I need for a memory upgrade. How do I find out which chipset I have, please?
    Kev.

    > I'm still curious about how to determine which chipset I have - any thoughts?
    Go to the device manger and click on IDE Ata/Atapi controllers:
    http://img814.imageshack.us/img814/7321/chipset.jpg
    There you will see your chipset installed on your laptop. In my case, as shown on the screenshot is Intel ICH9m

Maybe you are looking for