Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disablnig IPv6 on Solaris 10 x86

Status
Not open for further replies.

f0rmat

IS-IT--Management
Jun 2, 2004
102
US
I have a few build machines that engineers are complaining that their builds are failing because IPv6 is enabled.. now.. I can't for the life of me see where it is enabled, or even drawing an IP address.. an ifconfig -a shows only IPv4 addresses, and an ifconfig -a6 shows nothing..

bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 ind
ex 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.65.4.80 netmask ffffff00 broadcast 10.65.4.255
ether 0:14:22:2d:4a:a5

bash-3.00# ifconfig -a6
bash-3.00#

My question is... how do I turn off IPv6? In Redhat it's nice and easy.. I just disable the ipv6 mod in modprobe.conf.. but I can't see anything.. some posts referred to \etc\inet\ndfd.conf(something like that) but I don't have that particular config file...

Any ideas?
 
some files that have references to IPv6
/etc/nsswitch.nisplus
/etc/protocols
/etc/nsswitch.ldap
/etc/inetd.conf:
 
You can see if there is any SMF service for ipv6 using 'svcs' and then control it using 'svcadm'.
 
should still be disabled, I cant see anything that's using it.
When using the getaddrinfo() function, it's still referencing IPv6 in some way.. check the source code and output.
for the machine that works, the IPv6 portion is not outputted when the program is run. This may be a little out of range of this forum now, so if there's someplace better that I should post this, please do tell.

Cheers,

-bash-3.00$ a.out
IPv4 Address:
Name: localhost
Numeric: 127.0.0.1
IPv6 Address:
Name: localhost
Numeric: ::1
start of program
-------------------------------------
-bash-3.00$ cat test_addrinfo.cpp
#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int main(int argc, char* argv[])
{
addrinfo* res = 0;
addrinfo hints;

memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
//
// get the list of addresses
//
int ret = getaddrinfo("localhost", 0, &hints, &res);
if(ret != 0)
{
std::cerr << "getaddrinfo() returned: " << gai_strerror(ret)
<< std::endl;
return 1;
}

//
// loop and check out the addresses
//
addrinfo* ptr = res;
while(ptr != 0)
{
char name[NI_MAXHOST];
char numeric[NI_MAXHOST];

if(ptr -> ai_family == PF_INET)
std::cout << "IPv4 Address:" << std::endl;
else if(ptr -> ai_family == PF_INET6)
std::cout << "IPv6 Address:" << std::endl;

ret = getnameinfo(ptr -> ai_addr, ptr -> ai_addrlen,
name, NI_MAXHOST - 1, 0, 0, 0);
ret = getnameinfo(ptr -> ai_addr, ptr -> ai_addrlen,
numeric, NI_MAXHOST - 1, 0, 0, NI_NUMERICHOST);

if(ptr -> ai_canonname)
std::cout << "\tCanonical name: " << ptr -> ai_canonname
<< std::endl;
std::cout << "\tName: " << (const char*)name << std::endl;
std::cout << "\tNumeric: " << (const char*)numeric << std::endl;

ptr = ptr -> ai_next;
}

//
// free the list of addresses
//
freeaddrinfo(res);

return 0;
}
 
more info..

I've decided that what I need to do, is disable IPv6 functionality on the loopback interface, which apparently is done elsewhere than where you'd normally do it.

Thoughts?
 
Have any /etc/hostname6.* files? Also, /etc/inet/ipnodes controls ipv6 in Solaris.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top