IPv6 question

Hello all,
I inherited some code that implements client socket code using Socket(String hostname, int port) over the IPv4 infrastructure. Now, the move is to make sure this code will work if the user inputs either IPv6 or IPv4 address in the input field. From what I understand the OS needs to have "dual-stack" but that is OS dependent and not sure if Java code needs to be changed if the underlying infrastructure is either IPv4/IPv6 mix or just IPv6.
Can you please advise if I need to modify the code? Or, will the Socket object with String hostname? Or, do I need to add more code to make IPv6 address work?

I don't believe there is a single simple answer without the details of your code. Some ipv6 functionality is automatically supported, some isn't.
This document [url http://java.sun.com/j2se/1.4.2/docs/guide/net/ipv6_guide/] Networking IPv6 User Guide for J2SDK/JRE 1.4 has information that should allow you to make that determination.

Similar Messages

  • Airport Express & IPV6 Question

    I've been using my airport express (V6.3) to print wirelessly and to stream itunes to my stereo. I have it connected through my AirPort router. It is not an extension of my wireless network. Everything worked fine until the other day.
    I can still print to my printer wirelessly but itunes refused to connect to my remote speakers, stating there was an error connecting.
    After researching the issue online, I disable my IPV6 setting on my AirPort and I can now stream to my stereo again.
    I have a few questions I hope to get answered.
    1. Why did this problem start happening out of the blue after years of using the airport express?
    2. Did I do the right thing by turning off IPV6? Am I compromising any security or performance?
    3. Should I have remedied the problem in some other way?
    As always - thanks in advance.
    Steve

    to answer your question,
    1. some devices support IPV6 and some don't. so if you have some that do and some that don't then your devices can not communicate. look at it this way. if we are talking on a cell phone, then we can communicate clearly. if i were to put down the phone and pick up a radio and try to talk to you and you dont have a radio then my message will not get to you. understand?
    2. you did do the right thing by disabling IPV6. until your entire network is ready for IPV6 then it is best to just disable it. the only thing that will happen by you disabling IPV6 is your connection time will speed up by maybe a second or two. but thats about it. it will not effect any security at all.
    3.you did the best possible thing to your network. that is the very same thing that i would have done.

  • IPv4 vs. IPv6 question

    I have a machine that I believe is running only IPv6 and here is why, when I try to compile and run this example I found on the internet:
    import java.net.*;
    import java.io.*;
    public class ip
    public static void main ( String[] args ) throws IOException
    String hostname;
    BufferedReader input = new BufferedReader ( new InputStreamReader(System.in) );
    System.out.print("\n");
    System.out.print("Host name: ");
    hostname = input.readLine();
    try
    InetAddress ipaddress = InetAddress.getByName(hostname);
    System.out.println("IP address: " + ipaddress.getHostAddress());
    catch ( UnknownHostException e )
    System.out.println("Could not find IP address for: " + hostname);
    When I run the example and type in liveupdate.symantec.com I get this from the program:
    Host name: liveupdate.symantec.com
    Could not find IP address for: liveupdate.symantec.com
    If I run it like this java –Djava.net.preferIPv4Stack=true ip I get the following results:
    Host name: liveupdate.symantec.com
    IP address: 207.148.159.25
    Can someone here help explain what the system property java.net.preferIPv4Stack=true means? And which way should I change the code so that it will work without having to set this system property?
    Thank you very much for your time

    Can someone here help explain what the system property java.net.preferIPv4Stack=true means?I answered that. It tells Java to prefer the IPv4 stack in situations like yours where both are available. See [IPv6 Support|http://java.sun.com/j2se/1.5.0/docs/guide/net/ipv6_guide/index.html] for more info on IPv6 in Java. See also [Networking Properties|http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html].
    And which way should I change the code so that it will work without having to set this system property?In this case you could try InetAddress.getAllByName() and traversing the result array until you find an IPv4 address. Or you could set that property in the code rather than the command line.
    I have no idea about IPv6 configuration on your machine, it's dependent on everything except Java.

  • Newbie: DHCP, HostName, sys-unconfig

    Sun Ultra 5
    Solaris 8
    Linksys BEFSR41 Router
    Background:
    I am configuring my first Sun system.
    I installed Solaris 8 (02/02) and have the system running. This is actually my second install on this machine due to a problem (caused by me).
    Problem:
    The system reports that there is no hostname. I have looked at the online documentation and have run sys-unconfig several times.
    When I run sys-unconfig, as root, I open a console, type sys-uncofig, and then answer y to reboot. The system reboots (usually -- sometimes there is a RPC error and the system halts. I press STOP + A to regain access and then type boot at the ok prompt). When the system reboots, I get a language question, IPv6 question, and usually a DHCP question. I answer yes to IPv6 andselect DHCP. Then I usuallly get an error after confirming all prompts indicating that since the machine booted from the network, DHCP was not available. My problem is (probably many), I am never prompted for a hostname. I also never seem to complete the sys-uncofig scripts without some type of error. Oddly, my previous install did not have this problem and I was able to set my hostname previously.
    I have referred to the online documentation (recommending using sys-uncofig to reset the hostname). There is no /etc/nodename file on the machine currently so I cannot just change this file.
    Any help would be appreciated. I am concerned that the sys-unconfig never seems to prompt me for the appropriate questions.
    Shannon Brown

    Thank you for the help.
    The problem does seem to be due to my selection of
    DHCP first. I probably got confused following the
    first installation. I thought that I did this before
    (select DHCP right away) but may not have. I will try
    the suggestions and post the results.The problem here, which I have as well with this Linksys router, is the DHCP server. It does serve IP addresses but not hostnames. It's really TurboLinux inside the router, you'd think one could specify hostnames as well but there is no way to configure such things. The Sun box simply gets an IP without the hostname.
    I tried changing the two files specified previously, I don't believe this works. I had CDE going crazy trying to associate unknown with loopback or something. Try setting these, then selecting Host->This Host. No go.

  • IPv6 Address Management and Security Questions

    I'm trying to draft an IPv6-based version of our location's current routing configuration in anticipation of when our ISP will finally roll it out, and address management has been giving me the biggest headache - ironic, considering IPv6 was supposed to simplify address allocation.
    My first config draft was made assuming that I would be getting a static /56 or /60 prefix from the ISP, and I was just going to insert the prefix into my DHCP pools and there would be no issues. That was before reading around and discovering that some ISPs are considering prefix delegation (PD) for both residential and business accounts instead of static blocks. Now I have questions about how to stick as close to the current IPv4 configuration as possible.
    For the PD scenario, what I am looking at now are two addresses ranges for each network - a ULA /120 space that I want to control using stateful DHCPv6, and the global space which can be /64 and auto-configured. That way there will be a "private" address space for internal routing in the event of a prefix change or an extended outage. But I'm not sure how the config should look for such a scenario. What I have drafted so far is this:
    ipv6 dhcp pool DHCP6_INTERNAL
     address prefix FDAB::1:0/120
     domain-name whatever.net
     dns-server FDAB::1:1
    ipv6 dhcp pool DHCP6_DMZ-WIFI
     address prefix FDAB::2:0/120
     domain-name guest.whatever.net
     dns-server FDAB::2:1
    interface GigabitEthernet0
     description WAN-LINK
     ipv6 enable
     ipv6 address dhcp
     no ipv6 unreachables
     no ipv6 redirects
     ipv6 flow ingress
     ipv6 flow egress
     ipv6 virtual-reassembly in
     ipv6 nd autoconfig default-route
     ipv6 dhcp client pd hint ::/56
     ipv6 dhcp client pd ISP-PREFIX
     zone-member security OUTSIDE
     speed auto
     duplex auto
     no cdp enable
    interface FastEthernet8.1
     description VLAN_1-INTERNAL
     encapsulation dot1Q 1 native
     ipv6 enable
     ipv6 address FDAB::1:1/120
     ipv6 address ISP-PREFIX ::1:0:0:0:1/64
     ipv6 flow ingress
     ipv6 flow egress
     ipv6 virtual-reassembly in
     zone-member security INSIDE
     ip tcp adjust-mss 1300
     ipv6 dhcp server DHCP6_INTERNAL
     ipv6 nd managed-config-flag
     ipv6 nd other-config-flag
    interface FastEthernet8.2
     description VLAN_2-DMZ-WIFI
     encapsulation dot1Q 2
     ipv6 enable
     ipv6 address FDAB::2:1/120
     ipv6 address ISP-PREFIX ::2:0:0:0:1/64
     ipv6 flow ingress
     ipv6 flow egress
     ipv6 virtual-reassembly in
     zone-member security DMZ
     ip tcp adjust-mss 1300
     ipv6 dhcp server DHCP6_DMZ-WIFI
     ipv6 nd managed-config-flag
     ipv6 nd other-config-flag
    Will this config work? By which I mean: will the DHCPv6 servers provide ULA addresses, and will SLAAC work for global address allocation? If not, what needs to be changed?
    Also, another question. I found a few references to a prefix name (the "ISP-PREFIX") which can be used as part of a static IPv6 address on an interface, which is a good idea in case the prefix changes. But that brings up another concern - if the prefix changes, that will invalidate ACLs referencing the global addresses using the previous prefix. Is there anything similar to the prefix name string that can be used in ACLs to keep this from occurring?

    DHCPv6-PD is not necessarily dynamic the same way as DHCP was with the public IPv4 addresses in the IPv4 world.
    While the outside network (PPPoE, DHCPv6, anything) might be truly dynamic and changing with possibly every login session, the DHCPv6 delegated prefix might be tied to your login credentials or DHCPv6 client's DUID after the first connection. A bit like a DHCP lease reservation.
    If that is the case, there is some possibility that your ISP will run reverse route injection, and will always route your "fixed" prefix  to the currently active dynamic "outside" address.
    Talk to your ISP and have them confirm that, once the PD'd /48 or /56 is initially assigned, it won't change, and that the same prefix will be delegated every time. Then you can treat it as if it were fully static, and you won't have to go down the ULA path.
    I contacted one of our local ISPs, and they're doing it exactly that way: PPPoE for IPv4 and IPv6 (fully dynamic), and DHCPv6-PD with the /48 tied to the PPPoE login credentials. I might change to that ISP sooner or later.
    With my current ISP, my IPv6 access is 6RD based. I get a /60, with my current public ipv4 address (by DHCP) embedded into those 60 bits. Readressing is bound to happen sooner or later, and it happens every so often, and it breaks my IPv6 ACLs.
    I'm also looking for a way to write IPv6 ACLs with wildcard bits, not prefix/mask, so I can use them with ZBFW. So far, no sign of it.
    A few more comments:
    ULA addressing: 
    It may look tempting, plausible and intuitive to use dual global and ULA addressing. 
    I started this way as well. However, it turns out that Windows 7 has (had?) some issues with proper source address selection. The "longest common prefix" rule never seemed to work properly. In some cases, it would pick the global address to talk to ULA hosts, or stubbornly insist to use the ULA address to talk to an IPv6 internet host. It was a frustrating experience. Be sure to test this to the full extent (and back, and again and then some more) with every operating system you intend to use.
    Using /120:
    Be sure to test this as well, and very thoroughly. Subnet masks longer than /64 are sometimes called "uncharted territory" in IPv6. Longer subnet masks will break SLAAC, and there may be (embedded) devices that will not react benevolently to a subnet mask other than /64, or simply lack support for DHCPv6.
    adjust-mss
    I see you have "ip tcp adjust-mss 1300". While PMTUd may be mandatory with IPv6, I found it being broken already :-( . "ipv6 tcp adjust-mss .... " is now a separate command since IOS 15.4(1). I would suggest considering it, depending with your experience with PMTUd on IPv6.

  • IPv6 address questions

    I'm having trouble understanding IPv6 addresses. In IPv4 the CIDR slash notation means what subnet the address is in. But a /48 in IPv6 does not mean subnet. I have no idea what it means. For instance I've seen the address 2001:0:1:5::1/64, and I have no idea what the /64 means. Can someone explain it?
    Link local address: it's not enough to put an FE80 to identify this kind of address, but for some reason, they decided to put FFFE in the middle of the ipv6 address. What were they thinking? Why do they need to identify this kind of address TWICE within the address, AND why couldn't they put the FFFE at the end or the beginning, but instead they put it right in the middle? WTF?
    3 types of addresses? What why? with that many bits in an address there's no reason to have 3 of them. Theres enough for everyone.
    Illogical allocation of bits. A global ip address reserves the last 64 bits for the host ip. This is equivalent to 18 quintillion hosts on ONE SUBNET! YEAH RIGHT! There's no way that's even remotely logical, feasible, or practical. The more I look at IPv6 notation, the more I think my 5th grader could have come up with a better design.
    Also, why didn't they adopt the OSI model of addressing, like in ISIS. That has more than enough addresses for everyone.
    Obviously i'm missing the point completely on IPv6. It sounds like the most unthoughtful pile of rubbish ever conceived. So can someone please direct me to a place or explain what the thought process was when creating this new addressing scheme?
    bonus points: what happened to ipv5, and what was ipv1,ipv2,ipv3? I think the inventor should have called it IPv2000, because he really went overboard.

    Hi Richee,
    ISPs generally give ipv6 addresses to companies with /48 prefix length.
    The company receiving this can create its own subnets within the /48 and /64 range.
    The last 64 for bits of the address are generally used to insert the mac-address of the local interface when using stateless auto-configuration, but you can use it for subnetting as well, if you configure your addresses manually.
    For the other questions I think this link could give you more info:
    http://www.cisco.com/en/US/tech/tk872/tsd_technology_support_protocol_home.html
    And one more little addition:
    Nothing is perfect in this universe. Everything can be considered good or bad, it is just a question of viewpoint.
    Try to look at ipv6 from both viewpoints. You will have surprises.
    Cheers:
    Istvan

  • Question about Oracle10g Net Services'IPv6 Support

    I'm working in a network group which is studying the IPv6.Recently I installed oracle10g in the RedHat Linux-9(kernel-2.4.22,which supported the IPv4/IPv6 dual mode),but I can't configure the oracle10g in IPv6.
    I tried every method to find the solution,including read the oracle10g document,use the google,ask the support service,but there was no answer.And I can't login into the metlink to ask question because I didn't have the CSI number.
    So who can give me some advice about the configuration.Thank you very muck!

    I read the document before it was taken down a couple weeks ago. It said that IPv6 support would be introduced with Oracle11g and not back ported.
    Kind regards,
    Russ Cannon

  • IPv6 Global Prefix RA question from R1 to R2

    Hello,
    I've a questiona about IPv6 Global Prefix RA.
    I have 2 routers (r1 and r2) connected via fastethernet0/0 interface.
    On the first router i have gone trough the ipv6 set up:
    1. I have create a ipv6 address: #ipv6 address 2001:aaa:bbbb:cccc::/64 eui-64
    2. told the router that it can route ipv6: #ipv6 unicast-routing
    Below is a #show ipv6 interface on R1:
    FastEthernet0/0 is up, line protocol is up
      IPv6 is enabled, link-local address is FE80::CA00:10FF:FE84:0
      Global unicast address(es):
        2001:AAA:BBBB:CCCC:CA00:10FF:FE84:0, subnet is 2001:AAA:BBBB:CCCC::/64
      Joined group address(es):
        FF02::1
        FF02::2
        FF02::1:FF84:0
    On the second router I have gone trough the ipv6 steps:
    1. I have enable ipv6: #ipv6 enable.
    I do see that the link-local address has been created: FE80::CA02:10FF:FE84:0
    Below is a # show ipv6 interface on R2:
    FastEthernet0/0 is up, line protocol is up
      IPv6 is enabled, link-local address is FE80::CA02:10FF:FE84:0
      No global unicast address is configured
      Joined group address(es):
        FF02::1
        FF02::2
        FF02::1:FF84:0
    My question is as follows: why doesn't get Router2 the global prefix information in the ipv6 address from Router 1
    I do see a RA send from R1 to R2.
    R1#
    *Mar  1 00:40:37.455: ICMPv6-ND: Sending RA to FF02::1 on FastEthernet0/0
    *Mar  1 00:40:37.455: ICMPv6-ND:     MTU = 1500
    *Mar  1 00:40:37.455: ICMPv6-ND:     prefix = 2001:AAA:BBBB:CCCC::/64 onlink autoconfig
    *Mar  1 00:40:37.455: ICMPv6-ND:             2592000/604800 (valid/preferred)
    *Mar  1 00:40:37.455: IPV6: source FE80::CA00:10FF:FE84:0 (local)
    *Mar  1 00:40:37.455:       dest FF02::1 (FastEthernet0/0)
    *Mar  1 00:40:37.455:       traffic class 224, flow 0x0, len 104+1396, prot 58, hops 255, originating
    *Mar  1 00:40:37.455: IPv6: Sending on FastEthernet0/0
    R2(config)#
    *Mar  1 00:39:42.275: ICMPv6-ND: Received RA from FE80::CA00:10FF:FE84:0 on FastEthernet0/0
    What I also see is that R1 is getting RA from R2:
    R1#
    *Mar  1 00:47:56.199: ICMPv6-ND: Received RA from FE80::CA02:10FF:FE84:0 on FastEthernet0/0
    Thank I great advance,
    Lino

    Hi Lino,
    My question is as follows: why doesn't get Router2 the global prefix  information in the ipv6 address from Router 1
    You need to configure "ipv6 address autoconfig". When you have it enabled, IPv6 router on receiving RA will get the prefixes with A flag set and will append 64 bit Interface ID.
    What I also see is that R1 is getting RA from R2:
    Per my understanding, RA is not only for stateless autoconfiguration. SLAAC is one benefit from RA while there are otehr benefits like MAC learning, default router advertisement etc..
    Thanks,
    Nagendra

  • IPv6 DNS Questions with DirectAccess

    Hey,
    I'm hoping someone can answer some fundamental questions that I am having around DirectAccess for a customer that I'm working with.  We are putting in Direct Access with a more complicated scenario, but there are some fundamental questions about IPv6
    that I cannot quite get answered.  We have the tunnel established over IPHTTPS, however, I am not able to resolve internal resources.
    We have a red x next to the DNS Monitoring in the Operations Console.  DNS64 is green. 
    1) I know that you don't need IPv6 on our internal servers to use DirectAccess.  However, in this situation they have IPv6 unbound from the NICs on all the servers except for the DA server (and the Windows 7 clients).
    2) Brings me to the DNS question.  Internal DNS servers do not have IPv6 bound to the NIC and they do not register AAAA records in DNS.  Does that pose any issues with the NRPT?
    Thanks for your help!
    Bob

    Hello,
    After talking with Microsoft support here was the actual issue.
    First, the issue around the DNS going red:
    Set-DAClientDnsConfiguration -DnsSuffix '.internal.company.com' -DnsIPAddress @('ipv6 address of the DA server') -Verbose -ComputerName 'DAServer.internal.company.com’
    That fixed that issue, however, we were still having issues with the routing to internal servers. 
    We did the following further troubleshooting with Microsoft,
    We checked if client was able to get to the IPv6 address of the server – failed
    Checked if the client was able to get to the IPHTTPS address of the server – worked
    On the DA server itself, we were unable to ping the IPv6 address of the server      (fd58:c2f1:4a56:5555::1). We tried pinging this IP address using the IPHTTPS address on the DA server and that failed
    as well.
    Since we were unable to get to the IP address on the server itself, we just removed and re-added      the IPv6 address of the server, on the Internal NIC, and we were then able to ping the server’s IPv6
    address.
    But, clients were still unable to connect.
    So we realized that the forwarding must have not been enabled on the NICs.
    We checked for Forwarding being enabled on the IPHTTPS and Internal interface of the DA server
    and found that this was not enabled on the Internal interface.
    Once we enabled this, client machine was then able to connect to internal resources over Direct Access.
    To enable forwarding on the NIC we ran the below command,
    netsh int ipv6 set int <interface_id> forwarding=enabled
    Thanks,
    Bob

  • IPv6 internet routing question. To NAT or to Route

    Hello!
    I've gotten 2 /56 block of IPv6 addresses from our ISP. We're in the process of rolling out a new website and along with that I'm pushing that we create our IPv6 presence at the same time. 
    My Question is in regards to Routing vs NAT-ing... in my "Internet" environment, the space between my ISP routers and my firewalls, I have configured one of my 256 /64 networks 2001:XXXX:YY:100::1/64. That would mean My firewall could be 2001:XXXX:YY:100::B/64. My web servers sit in a DMZ off my firewall.
    Should I:
    A. Provision a random IPv6 subnet in the DMZ and use the firewall to NAT to an IP in the 2001:XXXX:YY:100::/64 range. I thought one of the points of IPv6 was to do away with NAT.
    B. Provision 2001:XXXX:YY:101::/64 network in DMZ and ROUTE to the DMZ server. I am thinking this is the solution, but what Protocol to use? Im guessing I advertise my /56 via BGP to ISP, and use what? OSPFv3 between internet routers and firewalls? Use Static Routes? Is there anything that's considered 'best practice' for this type of situation?
    To Route or to NAT?

    Hi,
    if I understand correctly you have /64 on the external interface of your firewall facing your isp.
    you should not use stateless auto config SLAAC on your Dmz. Setup your servers statically.
    also there is not nat in ipv6, just ensure your stateful firewall handles ipv6 ok, taking special care for icmpv6.
    That means you should use a /64 from your /56 for your Dmz. No nat.
    whether you setup a static route towards your firewall to reach your Dmz from outside the firewall depends on your network design. 
    Whether you use bgp with your isp depends on what you agreed with your isp. Has your isp setup a static route of your /56 on their router to you, or are they expecting you to use bgp ?
    hope this helps
    mark

  • IPv6 - Newb Question (BGP Advertisement)

    Hi Everyone - Quick question on IPv6 subnetting
    If we are allocated a /32 from an RIR (eg 2001:0DB0::/32), and we advertise the /32 to our upstream Inet providers - Assigning
    2001:0DB0:0:10::1/64 to a loop Interface, we *should* be able to reach the Upstream providers IPv6 addresses with a source of the loop interface(As the /64 is within the /32 subnet)?
    Cheers.

    Hi John,
    Correct. You should be able to use that technique to perform initial testing for your ipv6 connectivity. You can use extended ping for instance to specify the loopback interface as the source address.
    Regards

  • IPv6 address question

    Good morning everyone,
    I need to find this address:
    fe80::404d:9415:115a:f39c
    It looks like a link local address.  But there is no ffee inserted between the 6th and 10th bits where the mac address would be inserted.  Can I find the mac address from this IP address?
    Thanks
    Shane

    If the address is being seen on a span port, your best bet might be snooping ICMPv6 neighbor solicitation packets with that address as the source.  It's probably a windows-7 box somewhere; other vendors such as Apple or Linux tend to use the EUI-64 mappings on their link-local addresses.   In an Active Directory environment you can use group policy to discourage use of v6 privacy addresses by windows systems.
    Depending on your DNS infrastructure, the dual-stack (presumably) box might be registering 6to4 or other AAAA records.   The 6to4 case is only likely if it's IPv4 address is public, rather than rfc-1918 private.
    For SNMP, I shouldn't have said ports; you want the MIB that lets you query the neighbor discovery table of whatever is doing the vlan routing; be that a switch, firewall, or an actual router.
    An example of a European university doing this sort of monitoring is described at:
      http://www.terena.org/activities/campus-bp/pdf/gn3-na3-t4-cbpd132.pdf
    FYI, if you have dual-stack devices on your network, I presume you are filtering for rogue RA devices and rogue DHCPv6 servers, e.g. on our client switchs we define:
    ip access-list extended v4client
    deny   udp any eq bootps any eq bootpc
    deny   icmp any any redirect
    permit ip any any
    ipv6 access-list v6client
      deny udp any eq 547 any eq 546
      deny icmp any any router-advertisement
      deny icmp any any redirect
      permit ipv6 any any
    and then on the client device interface switchports we filter:
    ip access-group v4client in
    ipv6 traffic-filter v6client in
    This requires v6 allocations in the TCAM of course, e.g.
       sdm prefer dual-ipv4-and-ipv6 default
    -- Jim Leinweber, WI State Lab of Hygiene

  • IPv6 ASN question

    Hi Harold,
    We were just issued our IPv6 address block by Arin, and it came with three ASNs. Could you provide any information on why there are three (instead of just one)?  Also, would I use one of those ASNs for my EIGRP routing on the inside or are those only for use with my BGP routing to our ISPs? (in other words, can I use a private ASN for EIGRP on the inside or will that mess things up?) Thanks much!

    EIGRP AS number isn't related to BGP AS number.  As a general rule, to communicate with other ISPs via BGP you need a public AS number given to you by someone like arin.  You can pick whatever AS number you like to use for EIGRP.  Your EIGRP AS number has no bearing whatsoever on your BGP AS number.  They can be the same, or they can be different.
    hth

  • IPv4 vs. IPv6 programming question

    I have a machine that I believe is running only IPv6 and here is why, when I try to compile and run this example I found on the internet:
    import java.net.*;
    import java.io.*;
    public class ip
    public static void main ( String[] args ) throws IOException
    String hostname;
    BufferedReader input = new BufferedReader ( new InputStreamReader(System.in) );
    System.out.print("\n");
    System.out.print("Host name: ");
    hostname = input.readLine();
    try
    InetAddress ipaddress = InetAddress.getByName(hostname);
    System.out.println("IP address: " + ipaddress.getHostAddress());
    catch ( UnknownHostException e )
    System.out.println("Could not find IP address for: " + hostname);
    When I run the example and type in liveupdate.symantec.com I get this from the program:
    Host name: liveupdate.symantec.com
    Could not find IP address for: liveupdate.symantec.com
    If I run it like this java –Djava.net.preferIPv4Stack=true ip I get the following results:
    Host name: liveupdate.symantec.com
    IP address: 207.148.159.25
    Can someone here help explain what the system property java.net.preferIPv4Stack=true means? And which way should I change the code so that it will work without having to set this system property?
    Thank you very much for your time

    ... and it's crossposted there. Locking this thread.

  • IPv6 config question

    What am I missing? If I leave my network 10.5.5 configuration in it's default (automatic) mode the net interface is configured as
    inet6 fe80::21e:c2ff:fe15:f0f6%en0 prefixlen 64 scopeid 0x4
    My system will not respond to neighbor solicitation from another host. If I configure the IPv6 router, address, and prefix manually then ifconfig shows NO v6 configuration. The only way to get ipv6 to work is apparently to manually ifconfig the interface, in my case using
    ifconfig en0 inet6 alias ipv6-address-goes-here/64
    I'm sure I'm doing something wrong.... but what? If a manual ifconfig is necessary where is the best place to put it so the command will be run whenever the box is rebooted.
    Thanks for any advice.
    // marc

    It turned out to be a server issue.

Maybe you are looking for

  • How to pass a variable in a servlet to another jsp file?

    The variable that I wanted to pass is in a doGet function.... import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.net.*; import java.sql.*; import java.io.*; import java.util.*; public class www extends HttpServlet     

  • How to design Flat file for loading attribute dimension in a planning application

    Dear Gurus, I have a requirement to extract attribute dimensions from an essbase application and load it to another planning application. I have a dimension called Program and two attribute dimensions Sales Manager, Accounts manager associated with P

  • Not asking for TR while re-creating TMG for DB Table?

    Hello Folks, I have added the field in the DB table in DEV server but it wont reflect on Quality server. I cheked it on DEV, it is showing there. There is no issue with the SM30 also. But still it wont reflect on quality. So I deleted the existing TM

  • ASR9K PPPoE ERROR - bad session data

    In a month the second case all are disconnected Rrroyesessii and new aren't connected not to reboot a router yet. Messages RP/0/RSP0/CPU0:Feb 12 20:17:00.396 : pppoe_ma[378]: Bundle-Ether100.10: I dst ffff.ffff.ffff src bcee.7bed.90a0: len 46 0x11090

  • TopLink in WebLogic Server 10

    Hi, does anybody have experience with the use of TopLink in WebLogic Server 10.0? Wenn I use TopLink as JPA persistence provider, I receive a javax.persistence.TransactionRequiredException ("Exception Description: No transaction is currently active")