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.

Similar Messages

  • Best way to pass IPv4 and IPv6 traffic over a GRE Tunnel

    Hello,
    We have two 3825 routers with Advanced Enterprise IOS 12.4.9(T). Each of them serves many IPv4 (private and public) and IPv6 networks on their respective site.
    We have created a wireless link between the two, using 4 wireless devices, with IP Addresses 10.10.2.2, 3, 4, 5 respectively (1 and 6 are the two end Ethernet interfaces on the routers).
    Then we created a GRE tunnel over this link using addresses 172.16.1.1 and 2 (for the two ends) to route traffic over this link.
    Now we want to route IPv6 traffic over the same link. However, we found that simply routing the IPv6 traffic over the above GRE / IP tunnel did not work.
    Questions:
    Is there a way we can use the same (GRE / IP) tunnel to transport both IPv4 and IPv6 traffic?
    If not, can we setup two GRE tunnels over the same wireless link, that is, one GRE / IP for IPv4 traffic and a second one GRE / IPv6 for IPv6 traffic?
    In brief, what is the suggested way to transport IPv4 and IPv6 traffic over the aforementioned (wireless) link?
    I have read http://www.cisco.com/c/en/us/td/docs/ios/12_4/interface/configuration/guide/inb_tun.html#wp1061361 and other Internet material, however I am still confused.
    Please help.
    Thanks in advance,
    Nick

    We have set up two tunnels over the same link, one GRE / IP for the IPv4 traffic and one IPv6 / IP ("manual") for the IPv6 traffic. This setup seems to be working OK.
    If there are other suggestions, please advise.
    Thanks,
    Nick

  • IPv4 vs IPv6 comparison

    hello everyone, i was wondering if it is possible that ipv6 dropping more packets than ipv4.  i run a test using D-ITG, to test data and voice, but on IPv6 lost more packets than ipv4, special when i sent voice and data together, i was wodering why could that be?, another question, in order to have a dual stack router, i would put ipv4 and ipv6 address on the interfaces, do i need enable something else, because i tried with packets tracer, and i could not ping from an ipv4 host to a ipv6 host, dual stack should allow that right?  thank you in advance
    thank you in advance

    Duplicate post. 
    Go HERE.

  • Migrate UAG internal adapter from IPv4 to IPv6

    I have DirectAccess running successfully for a couple of years now.
    However, we now need to migrate our servers from IPv4 to IPv6 (will run side by side). The IPv6 range is a /48 range we received from our ISP
    The internal interface of our DA UAG server will also get a IPv6 address. After that DA needs to be reconfigured with the new internal IPv6 interface and a client range for IP-HTTPS and NAT64/DNS64 needs to be specified.
    The question is, what will happen with the laptops that are outside of the LAN and don't come inside for new domain policies?  Will they reconnect with the new settings or will they loose connectivity? Do they get the new IPv6 routes for the tunnel
    adapters?

    I have DirectAccess running successfully for a couple of years now.
    However, we now need to migrate our servers from IPv4 to IPv6 (will run side by side). The IPv6 range is a /48 range we received from our ISP
    The internal interface of our DA UAG server will also get a IPv6 address. After that DA needs to be reconfigured with the new internal IPv6 interface and a client range for IP-HTTPS and NAT64/DNS64 needs to be specified.
    The question is, what will happen with the laptops that are outside of the LAN and don't come inside for new domain policies?  Will they reconnect with the new settings or will they loose connectivity? Do they get the new IPv6 routes for the tunnel
    adapters?

  • Need help understanding how ipv4 and ipv6 co-exist

    I'm trying to understand something that happened in our network recently. Current, we're all ipv4 based, but a few machines here and there have ipv6 enabled by mistake. Everything has been working ok, but recently we had some dhcp issues. I'm trying to understand how exactly ipv6 and ipv4 work together.
    Questions:
    - if we have workstations with ipv6 enabled but no dhcpv6 servers, does the ff02::1:2 multicast address exist on the network? If something starts up a dhcpv6 server somewhere, would that explain why several workstations have started sending out dhcpv6 solicit messages?
    - If workstations attempt to get an address via dhcpv6 and get no response, will it try dhcp with ipv4, or will it just assign a 169.254.*.* address?

    Muse allows you to create websites without knowing HTML / CSS etc...
    If you can use Indesign you'll be able to use Muse.
    A site created in Muse can be published with just a couple of clicks to Business Catalyst.
    However Business Catalyst can do much more ~ it can allow you to create and manage the website of almost any kind of business.
    Here is a short blurb from the BC / FAQ:
    "Once your clients log in, they will have immediate access to their contact database, orders, web form submissions, products, catalogs, web pages, and email marketing campaigns from one central location — all built to work together."
    find out more here: http://www.adobe.com/products/business-catalyst/faq.html

  • Getaddrinfo function returns IPv4-mapped IPv6 addresses in canonical name

    When I use the getaddrinfo function with flag AI_CANONNAME, then in ai_canonname  IPv4-mapped IPv6 addresses is returned even for IPV6 disabled machine.
    So my question is that from where this canonical name is returned, I didn't found in /etc/nodename /etc/hosts or in /etc/inet/hosts or in /etc/interfacefile files.

    It's only showing "unknown" for the IPv6 address.
    Go into your IPv6 properties, and set the IP and DNS address settings to be obtained automatically.
    Then in Manage network adapters windows, change the view options to show Menu, then click on Advanced, Advanced, and make sure IPv4 is on top instead of IPv6.
    Ace Fekay
    MVP, MCT, MCITP/EA, MCTS Windows 2008/R2 & Exchange 2007, Exchange 2010 EA, MCSE & MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services
    Technical Blogs & Videos: http://www.delawarecountycomputerconsulting.com/
    This post is provided AS-IS with no warranties or guarantees and confers no rights.

  • Problem running apache dual stack IPv4 and IPv6

    Hello!
    I am running a single Lion-Server with one public IPv4 address. Because my Provider is able to support IPv6 now, I ordered a public IPv6 address for my server. (To learn IPv6)
    I setup IPv6 address and setup the firewall with ip6fw - everything works fine, I can connect to ssh and afp via IPv4 or IPv6 but when I try to connect to my wiki over IPv6 I get the certificate question (unknown certificate ... blah) click continue and the certificate is loeded againe - I end up in an infinte loop of certificate questions.
    The part of the firewall config looks like this:
    20515 allow tcp from any to any 443
    20516 allow tcp from any to any 8443
    20517 allow tcp from any to any 1640
    I looked into apache config:
    /etc/apache2/sites/virtual_host_global.conf has this entries:
    Listen  *:443
    NameVirtualHost *:443
    Listen  *:80
    NameVirtualHost *:80
    I have only one domain and only one single virtual host as defined in /etc/apache2/sites/0000_any_443_.conf:
    ## Default Virtual Host Configuration
    <VirtualHost *:443>
            ServerAdmin [email protected]
            DocumentRoot "/Library/Server/Web/Data/Sites/Default"
            DirectoryIndex index.html index.php /wiki/ default.html
            CustomLog "/var/log/apache2/access_log" combinedvhost
            ErrorLog "/var/log/apache2/error_log"
            <IfModule mod_ssl.c>
                    SSLEngine On
                    SSLCipherSuite "ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM"
                    SSLProxyEngine On
                    SSLProtocol -ALL +SSLv3 +TLSv1
                    SSLCertificateFile "/etc/certificates/www.ABCDE.de.1A00F8DFC2738F25D26E3248A4C8F687D7EA7F32.cert.p em"
                    SSLCertificateKeyFile "/etc/certificates/www.ABCDE.de.1A00F8DFC2738F25D26E3248A4C8F687D7EA7F32.key.pe m"
                    SSLCertificateChainFile "/etc/certificates/www.ABCDE.de.1A00F8DFC2738F25D26E3248A4C8F687D7EA7F32.chain. pem"
                    SSLProxyProtocol -ALL +SSLv3 +TLSv1
            </IfModule>
            <Directory "/Library/Server/Web/Data/Sites/Default">
                    Options All +MultiViews -ExecCGI -Indexes
                    AllowOverride None
                    <IfModule mod_dav.c>
                            DAV Off
                    </IfModule>
            </Directory>
    </VirtualHost>
    I have not modified the apache config by hand until now - but this was an upgrade from Snow Leopard Server. At the moment I am a littel scared to upgrade to Mountain Lion server because this server runs mail and calender services for my company.
    I tried to setup "Listen" entry with dedicated IP-addresses, one for IPv4 and one for IPv6 but this only leads to the same problem - IPv4 works, IPv6 ends in an infinte loop.
    I found somewhere that I had to duplicate virtual hosts setup for IPv4 and IPv6 but afaik "Server.app" will overwrite it, right?
    Every hint is welcome, bye
    Christoph
    P.S. Sorry just saw that I posted to ML-Server discussions not Lion-Server, but maybe someone can tell me that I can upgrade without scare.
    Message was edited by: Christoph Ewering1

    Hello!
    Did some more testing and found that FireFox works with the loopback-address.
    https://[::1]/
    So, the address above works with FireFox after accepting the certificate - Safari loops in the dialog accepting the certificate.
    Then I tried the link-local-address but it looks like apache does not listen to that address at all
    Then I tried the global-address and got to:
    Safari looping in the certificate dialog
    FireFox brings an alert „sec_err_bad_database"
    BTW this tests were made on the server that runs the apache. So no firewall between the browser and the server.
    No one using Mac OS X server in a dual stack enviroment?
    Bye,
    eweri

  • EA4500 loses IPv4 and IPv6 information

    No changes made but router will lose all information for IPv connectivity.  I have paid twice to support to fix this issue and it still occurs every few months. 
    I tried rebooting router, and doing an IP Release/ Renew and router does not get IP address. I'd prefer not to have to pay again to fix this router. Any ideas?

    Sorry - thought I had info:
    I don't see anything on the router indicating a model other than EA4500. There is a serial number. Its plugged directly into a
    Toshiba PCX2500 modem. If I connect my PC directly to the modem I have internet. 
    The router maintains all settings that Cisco helped me set up before except there are not IPv4 or IPv6 settings. I have screen shots from the setup. The Cisco rep had to clone the MAC of the modem to get the router to work. (Admin tab). 
    I unplugged modem and router and rebooted each. Everything appears to come up normally except for no IPv4/6 settings. I tried a release/renew but those settings stay blank.
    I have internal network connectivity with the router, just no internet. I use Road Runner. I have a second network also on Road Runner but on a different modum and domain that is working fine. Unfortunately I have hard wired connections and kids games that rely on the EA4500

  • Convention for embedding IPv4 into IPv6?

    All,
    I read in rfc 4038 that representing IPv4 address in an IPv6 address should be like 2001::FFFF:192.168.1.1, which would be  2001::FFFF:c0a8:101, or 2001.2.3.4::FFFF:192.168.1.1 (2001:2:3:4:0:ffff:c0a8:101).  However, setting up NAT-PT any 96 bit prefix will work.  So I'm wondering if the standard set forth in rfc4038 (its informational) really applies to NAT-PT, or just for IPv4 applications not being natted (which doesn't make sense unless some other 4to6 mechanism is involved). 
    Any thoughts?
    John

    John,
    it is not very clear what are you trying to achieve by "embedding" ipv4 (address|traffic) into ipv6.
    By what you are discussing apperaars you are talking about the rappresentation of an IPv4 address into an IPv6 address field. Fact is that all bit being born equal they mean differently based on contest.
    Each 4 hex digit are 16 bit and two groups of 4 hex digits (any)  can contain and IPv4 address.
    So an IPv4 compatible IPv6 address would be 0:0:0:0:0:0:192.168.1.1 which can also be rapresented as ::c0a8:101.
    What that means and how edge routers/devices and gateway would handle such address depends on context/configuration. 6to4 6rd autotunnels ipv4 compatible ipv6 and ISATAP tunnels carry within their address field tunnel end point/ipv4 destination addresses that are extracted and used to route traffic.
    I know I did not clear the issue up but it really depends on what you are doing/trying to achieve how you embed an ipv4 address (of what) in an IPv6 address field and what that meas.
    I would definitely recommand:
    http://www.cisco.com/en/US/docs/ios/ipv6/configuration/guide/ip6-addrg_bsc_con_ps10890_TSD_Products_Configuration_Guide_Chapter.html#wp1038821
    and
    http://www.cisco.com/en/US/docs/ios/ipv6/configuration/guide/ip6-tunnel_ps10890_TSD_Products_Configuration_Guide_Chapter.html#wp1055999
    Actually the whole book is a good read.
    Hope this helps
    Cheers
    Fabio

  • 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

  • I have a programming question

    Hi
    I have a programming question here. I spent a lot of time doing it, but I still can't get it. Here is the question :
    Write a method called countTo that takes one integer as a parameter and prints a
    comma-separated list of the numbers from 1 to the value of the parameter, or an
    appropriate error message if the parameter is less than one. In either case (if a list
    of numbers is printed, or an error message is printed), after printing, the cursor
    should be advanced to the next line.
    For example, if the parameter has a value of 1, the method should just print the
    the value 1 to the screen followed by a new-line character. If parameter has a value
    of 5, the method should print the following (exactly as shown, make sure there is
    no comma after the last value, and that all values are on one line with no spaces
    between them):
    1,2,3,4,5
    This method should only print to the screen, and should not return a value.

    I have a programming question here. I spent a lot of
    time doing it, but I still can't get it. Please post what you have done so far.

  • IPv4 to IPv6 RDP Access

    Hi;
    In our ınfrastructure we use dual-stack. We configured our cluster firewall and router (BGPv6).
    Now we have an application server whichs 's run only over IPv6 address. We want to connect this server over RDP service from our edge sites which's run on IPv4 public address. Is it possible ? If possible what we're supposed to do ?
    Best regards
    Umut

    If your firewall has NAT46 capability it is possible, but of all the possible NAT things you can try, that direction is the ugliest.  The "right" answer is to dual-stack the edge networks, but that is presumably a long-run solution for you, not a short run one.  I don't think RDP embeds IPv4 addresses in the content, so it can probably work.  In general, doing protocol translation between IPv4 and IPv6 in either direction on things that aren't simple 1:1 TCP connections is a bad idea.
    -- Jim Leinweber, WI State Lab of Hygiene

  • ZBF in a mixed ipv4 and ipv6 environment, don't touch ipv4

    I have a dual stacked router for both ipv4 and ipv6. Ipv4 traffic should pass the zbf untouched due to the fact that there is another rock solid ipv4 firewall egress of the inside Interface. Is there a way that a class map like this could function on ipv6 traffic only?:
    class-map type inspect match-any fullproto
     description Permitted Traffic to internet
     match protocol http
     match protocol https
     match protocol dns
     match protocol imaps
     match protocol icmp
     match protocol ftp
     match protocol ntp
     match protocol rtsp
     match protocol realmedia
     match protocol netshow
     match protocol appleqtc
     match protocol streamworks
     match protocol vdolive
     match protocol ssh
     match protocol user-rdp
    So far there is only a CBAC solution in place for ipv6.
    I'm showing my Interfaces:
    interface FastEthernet0/0
     description *** Inside IPV6 ***
     no ip address
     speed auto
     full-duplex
     ipv6 address FE80::1 link-local
     ipv6 address ????:????:????:10::1/64
     ipv6 nd other-config-flag
     ipv6 dhcp relay destination ?:?:?:10::12
     ipv6 traffic-filter inne6-inn in
     no cdp enable
     no mop enabled
    interface FastEthernet0/0.4
     description *** Inside IPV4 ***
     encapsulation dot1Q 4
     ip address 82.?.?.129 255.255.255.248
     no cdp enable
    interface FastEthernet0/1
     description *** Outside ***
     ip address 82.?.?.42 255.255.255.252
     no ip redirects
     no ip unreachables
     no ip proxy-arp
     speed auto
     full-duplex
     ipv6 address FE80::2 link-local
     ipv6 address ?:599::2/126
     ipv6 enable
     ipv6 nd prefix default no-advertise
     ipv6 nd prefix ?:599::/126 no-advertise
     ipv6 nd managed-config-flag
     ipv6 nd other-config-flag
     ipv6 nd router-preference High
     ipv6 inspect ipv6-cbac out
     ipv6 traffic-filter ut-inn6 in
     no cdp enable
     no mop enabled
    Please advise.
    Regards,
    Henning

    I didn't test it, but what about the following:
    Configure a new class-map where you match on an ipv6 access-list "any to any"
    Configure a third class map of type ""match all" where you match on your "fullproto" class-map and also the above ipv6 class-map. For this class map you configure your inspections.
    For ipv4-traffic you configure a class with a "pass" action in both directions.

  • Uprading deployed Cluster from Ipv4 to Ipv6

    Hi Friends,
    i have already running and deployed a windows cluster for my SQL 2008 and Exchange 2010 Dag in different servers  with ipv4 however the company management decided that we have to upgrade all servers connection from ipv4 to ipv6.
    as you know that when we create a cluster it also create a virtual connection for connecting users in my case its created with ipv4.
    now how am i suppose to change that virtual connection from ipv4 to ipv6 in windows 2008 R2 clustering i mean overall how to achieve my target without destroying anything.
    please advise.
    thanks greenman

    Hi GreeMann,
    Start with Windows Server 2008 IPv6 using in the Cluster service will support this functionality as well. This includes being able to support IPv6 IP address resources
    and IPv4 IP address resources either alone or in combination in a failover cluster.
    Failover clustering also supports 6-4 and Intra-site Automatic Tunneling Addressing Protocol (ISATAP). Additionally, failover clustering supports only IPv6 addresses that
    allow for dynamic registration in Domain Name System (DNS) (AAAA host records and the IP6.ARPA reverse look-up zone). Currently, there are three types of IPv6 address types: global, site local, and link local. Dynamic DNS registrations will not occur for link
    local addresses and therefore cannot be used in a failover cluster.
    But there have some
     application has the limited IPv6 support  or full IPv6 support, the Exchange Server 2010 has the limited IPv6 support and general speaking, IPV6 is supported for SQL server 2005,2008,2008r2 and SQL 2012, the detail supported
    service you can refer the following KB:
    IPv6 Support in Microsoft Products and Services
    http://technet.microsoft.com/en-us/network/hh994905.aspx
    More information:
    IPv6 Security Considerations and Recommendations
    http://technet.microsoft.com/en-us/library/bb726956.aspx
    I’m glad to be of help to you!
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Prefer IPv4 over IPv6

    Hi. I want use ipv4 before ipv6. For 2008 R2 i used fix "Microsoft Fix it 50410"
    But this not support server 2012.
    How i can correct change prefer on 2012?
    Thank you!

    Please, tell me, WHY man, who create IPv6 began use this fe80::6c02:573b:178c:dd8f naming.
    Blame that on the Internet Engineering Task Force (IETF) standards committee that came up with this naming convention back in 1998 (http://tools.ietf.org/html/rfc2460).  <grin> 
    Not sure what you mean by "reliable source with describe 'native IPv6 for 8\12'".  Microsoft has lots of documentation on IPv6 - I think the majority of it came out with Windows Server 2008 because that was the first release with the dual-stack as a
    default.  IpV6 was available for Windows Server 2003, but it was an add-on.  Go to Barnesandnoble.com or amazon.com to find a good reference book on IPv6 if you want to learn more - they are not small books.  It is the way the industry is moving
    because it offers many advantages over IPv4 (which, by the way, has officially run out of addresses which can be handed out).  Microsoft is simply helping customers move into future by providing a dual-stack that can automatically switch back and forth
    between IPv4 applications and IPv6 applications without the end-user even knowing it goes on.  Some things, like Direct Access, would be almost impossible to implement on IPv4, but becomes (relatively) easy when using IPv6.
    tim

Maybe you are looking for

  • Small business network issues!!!

    I am at my wits end with this problem:  We have a small business network consisting of 6 Mac Pro computers and 2 Windows PCs.  Everything was working fine until we needed to replace one of the WinXP machines with a Windows 7 machine.  None of the Mac

  • How can i sync music and notes etc... to a new itunes?

    My old desktop (guest account) on my computer was deleted. It had my original itunes on it. I made a new guest account on my computer. Obviously, there was no music, no app's, no anything on this particular account. I did sync the "purchased" app's o

  • ITunes 11 - a complete catastrophe!

    It's been 6 month since the release of iTunes 11 and I haven't managed yet to work with it. I hate it! What's wrong with iTunes 11? The sorting by Title, Album Interpret, Play Lists or Radio is confusing. Every page has its own Layout and I once I sw

  • Web Dynpro ABAP in BPM?

    Hi all, I would like to know whether WDAbap can be used as ui elements in BPM CE7.11. Any related link would be highly useful Thanks and regards Vincenzo Turco

  • CS6 locks up

    CS6 locks up when I open a RAW file.  Doesn't matter how I open the file.  Other files open fine.  This just started happening and I haven't changed anything on my PC.  I'm running Windows 7 and have plenty of RAM.