LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-23-2011, 04:41 AM   #1
getin
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
loopback address problem in Fedora


Hi,

I'm using Fedora 14 (I encountered same problem in the other versions). I'm trying to do socket programming for IPv6. But I always get the same error: "bind error". I coded all program to IPv6 (AF_INET6, sockaddr_in6, sin6_family, ..etc). I think that bind use the Ipv6 lo address ::1. I ping to ::1 address and I access that. But I don't understand that bind don't access that.

thank in advance
 
Old 11-23-2011, 09:43 PM   #2
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,681
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
The default for Linux is that an attempt to bind with "::" as the local address ALSO binds "0.0.0.0" over in the IPv4 space. If you already have a separate socket bound to "0.0.0.0" for the same port number, then doing this with IPv6 will collide. There are two ways around this:

1. Only bind to the IPv6 and it let it also handle the IPv4 connections on this one socket.

2. Change the behavior system wide with: sysctl -w net.ipv6.bindv6only=1

If you choose method #2 it will affect all programs, where others might need to be reconfigured to specifically listen on 2 sockets to listen to both IPv4 and IPv6. Also, if you want this to be persistent across reboots, you need to configure an init/rc script to do that command (again).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
loopback ip address to be configured on SUSE version 10 ChiragN Linux - Newbie 2 12-03-2010 11:59 PM
[SOLVED] problem with ethernet loopback test using loopback plug/stub: receiving socket not se mcha Linux - Kernel 3 08-26-2010 11:28 AM
ipv6 redirecting to loopback address vikasmca05 Linux - Newbie 7 05-06-2009 02:24 AM
Changing hostname in /etc/hosts so that it is defined to ip-address and not loopback Azazwa Linux - Newbie 1 03-09-2009 08:48 AM
internal modem loopback address sumathi Linux - Hardware 3 07-28-2005 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration