LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 02-27-2008, 01:14 AM   #1
the_rock
LQ Newbie
 
Registered: Feb 2008
Location: Manila, Philippines
Posts: 2

Rep: Reputation: 0
Cannot create an IPv6 (alias IP) using ifconfig RHEL 4 AS/ES


Hello there,
Thank you very much for viewing this thread.

Currently I'm porting my application from Solaris 10 to RHEL 4 AS.
I'm having a problem in creating an IPv6 alias interface in the RHEL4 environment.

# uname -a
Linux harrier 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/issue
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
Kernel \r on an \m


Question 1:
Why is it when using the "ifconfig" command you can successfully
create an IPv4 alias interface (Ex. eth0:1). But, when it comes to creating an IPv6 alias interface, the logical interface (Ex. eth0:10)
specified with the ifconfig command is not created.
Kindly view the execution below.

*****************************************************************
When creating an IPv4 alias IP using ifconfig
- Here the eth0:1 logical interface with the IPv4 address
192.168.30.128 is successfully created.
*****************************************************************

# ifconfig eth0:1 192.168.30.128
# ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:15:17:35:55:F4
inet addr:192.168.136.127 Bcast:192.168.137.255 Mask:255.255.254.0
inet6 addr: fe80::215:17ff:fe35:55f4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1071513 errors:0 dropped:0 overruns:0 frame:0
TX packets:562793 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:367872667 (350.8 MiB) TX bytes:381006432 (363.3 MiB)
Base address:0x2000 Memory:88180000-881a0000

eth0:1 Link encap:Ethernet HWaddr 00:15:17:35:55:F4
inet addr:192.168.30.128 Bcast:192.168.30.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Base address:0x2000 Memory:88180000-881a0000


*****************************************************************
When creating an IPv6 alias IP using ifconfig
- Here the logical interface eth0:10 is not created.
Instead the IPv6 2001:470:1f01:115::4 address is directly bounded
to eth0.
*****************************************************************

# ifconfig eth0:10 inet6 add 2001:470:1f01:115::4
# ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:15:17:35:55:F4
inet addr:192.168.136.127 Bcast:192.168.137.255 Mask:255.255.254.0
inet6 addr: 2001:470:1f01:115::4/0 Scope:Global
inet6 addr: fe80::215:17ff:fe35:55f4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1072665 errors:0 dropped:0 overruns:0 frame:0
TX packets:563211 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:368000764 (350.9 MiB) TX bytes:381047116 (363.3 MiB)
Base address:0x2000 Memory:88180000-881a0000


Question 2:
Are there other ways to create the logical interface for
IPv6. The way it did with ifconfig IPv4?

I also tried programming using the ioctl() with the SIOCSIFADDR request. But, the ioctl() failed and returned a perror "No such device"

************************ Code snippet ************************
int cli_LIFsd;
struct sockaddr_in6 *stSockAddr6;

cli_LIFsd = socket(AF_INET6, SOCK_STREAM, 0);

// set the logical interface name
memset (&stLIF, 0x00, sizeof (struct ifreq));
strncpy( stLIF.ifr_name, "eth0:10", sizeof( stLIF.ifr_name )); stLIF.ifr_addr.sa_family = AF_INET6;
stSockAddr6 = (struct sockaddr_in6 *)&(stLIF.ifr_addr);
inet_pton(AF_INET6, argv[1], &(stSockAddr6->sin6_addr));

rtnval = ioctl (cli_LIFsd, SIOCSIFADDR, &stLIF);

if (rtnval < 0)
{
perror("Perror message " );
printf ("Errno: %s [%d] \n", strerror( errno ), errno );
close (cli_LIFsd);
exit (1);
}

Output:
#./cli 2001:470:1f01:115::55
Perror message : No such device
Errno: Illegal seek [29]
#

Any comment or help is greatly appreciated.
Thank you very much.

Last edited by the_rock; 02-27-2008 at 01:32 AM. Reason: Added RHEL4 version
 
Old 09-07-2011, 03:07 AM   #2
itismohit
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Rep: Reputation: 0
Facing same issue.

Hi, I am facing a similar issue. Can you please update the thread with your findings to benefit all.

Thanks.
 
Old 11-09-2011, 09:31 PM   #3
nikole
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Rep: Reputation: 0
Quote:
Originally Posted by itismohit View Post
Hi, I am facing a similar issue. Can you please update the thread with your findings to benefit all.

Thanks.

I am also facng same issue
can someone pleaase help
thank you
 
Old 11-12-2011, 06:32 AM   #4
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
Why do you want a logical interface?
 
Old 07-15-2014, 08:28 AM   #5
Suprava
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
Unhappy

Hi

I am also facing same issue.
I just want to confirm whether ipv6 alias supports virtual interface.
If it supports why ipv6 address is not appearing on virtual interface ?
 
Old 07-15-2014, 04:25 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
if you have the SAME issue you have a much bigger problem
RHEL4 is no longer supported

and predates most ipv6 software specifications

please BUY the required RHEL 7 license
and install RHEL 7.0
 
  


Reply

Tags
ipv6, network



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
Cannot create an IPv6 virtual IP (alias interface) using ioctl(SIOCSIFADDR) the_rock Linux - Newbie 2 08-20-2010 04:14 PM
create alias ohade Mandriva 1 08-09-2005 04:12 PM
IP alias in ifconfig barrythai SUSE / openSUSE 1 07-30-2005 04:30 AM
IPv6 ifconfig at boot? (SuSE) Brian Knoblauch Linux - Networking 0 07-29-2005 07:32 AM
openbsd ifconfig alias question mylesridgely Linux - Networking 1 09-06-2003 07:19 AM

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

All times are GMT -5. The time now is 11:23 PM.

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