0

When I use ifconfig command I get the following output:

eth0      Link encap:Ethernet  HWaddr 2C:59:E5:49:54:10
          inet addr:172.16.128.132  Bcast:172.16.128.255  Mask:255.255.255.128
          inet6 addr: 2405:201:fffb:87:2e59:e5ff:fe49:7410/64 Scope:Global
          inet6 addr: fe80::2e59:e5ff:fe49:7410/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20268132 errors:7874 dropped:0 overruns:7874 frame:0
          TX packets:6389014 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:24111394418 (22.4 GiB)  TX bytes:2699115198 (2.5 GiB)
          Interrupt:32 Memory:f6000000-f67fffff

As you can see, the ethernet interface has got both IPv4 and IPv6 address. However, if you check out contents of the /etc/sysconfig/network-scripts/ifcfg-eth0 file below:

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=172.16.128.132
NETMASK=255.255.255.128
GATEWAY=172.16.128.129
IPV6INIT=no
USERCTL=no
DNS1=172.16.46.142

It doesn't contain the IPv6 address. Why this inconsistency? Is the IPv6 address configured separately somewhere else?

RHEL: 6.5
Vishal Sharma
  • 391
  • 1
  • 3
  • 8

1 Answers1

0

There are other means of assigning IP addresses to interfaces than just the scripts in network-scripts, for example the ip address add ... command that may have been invoked since the system was booted. Or maybe the ifcfg-eth0 script itself has been changed since boot.

It's probable that in this case the server has dynamically generated that address after hearing router advertisements from a router in its local network (a.k.a. StateLess Address AutoConfiguration - SLAAC). Basically the router clues it into the subnet address and the server picks a random address within that and adopts it (after checking for duplicates).

It's slightly confusing that IPV6INIT=no is present and yet we still have an address bound, but as I say above this might not have been the case at the actual time the interface was initialised. Also it's not entirely clear from a cursory search that this command is 100% effective - there are other factors involved.

Mintra
  • 561
  • 3
  • 7