Results 1 to 9 of 9

Thread: No inet address (IPv4) but inet6 address (IPv6) using eth0

  1. #1
    Join Date
    Jan 2013
    Beans
    5

    No inet address (IPv4) but inet6 address (IPv6) using eth0

    Hi, I'm new to Ubuntu (well actually UNIX).

    I've installed Ubuntu 12.10 (Laptop is running Win7 as well) and so far everything is working quite well, but now I'm stuck.
    I can dial my DSL modem (ppp0) but for some strange reason I do not get an inet address (IPv4) only an inet6 address (IPv6).

    ifconfig
    Code:
    eth0      Link encap:Ethernet  HWaddr e8:03:9a:97:61:b1  
              inet6 addr: fe80::ea03:9aff:fe97:61b1/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:29576 errors:0 dropped:1 overruns:0 frame:0
              TX packets:17045 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:37185910 (37.1 MB)  TX bytes:1622658 (1.6 MB)
              Interrupt:20 Memory:f7100000-f7120000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:1289 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1289 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:114509 (114.5 KB)  TX bytes:114509 (114.5 KB)
    /etc/network/interfaces
    Code:
    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    lshw -C network
    Code:
    *-network               
           description: Ethernet interface
           product: 82579V Gigabit Network Connection
           vendor: Intel Corporation
           physical id: 19
           bus info: pci@0000:00:19.0
           logical name: eth0
           version: 04
           serial: e8:03:9a:97:61:b1
           size: 100Mbit/s
           capacity: 1Gbit/s
           width: 32 bits
           clock: 33MHz
           capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
           configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=2.0.0-k duplex=full firmware=0.13-3 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
           resources: irq:50 memory:f7100000-f711ffff memory:f7129000-f7129fff ioport:e080(size=32)
      *-network
           description: Network controller
           product: BCM4313 802.11b/g/n Wireless LAN Controller
           vendor: Broadcom Corporation
           physical id: 0
           bus info: pci@0000:02:00.0
           version: 01
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress bus_master cap_list
           configuration: driver=bcma-pci-bridge latency=0
           resources: irq:16 memory:f6700000-f6703fff
      *-network:0 DISABLED
           description: Ethernet interface
           physical id: 2
           logical name: usb0
           serial: 02:e9:88:ad:f6:69
           capabilities: ethernet physical
           configuration: broadcast=yes driver=cdc_ether driverversion=22-Aug-2005 firmware=CDC Ethernet Device link=no multicast=yes
      *-network:1 DISABLED
           description: Wireless interface
           physical id: 3
           logical name: wlan0
           serial: 30:14:4a:31:73:64
           capabilities: ethernet physical wireless
           configuration: broadcast=yes driver=brcmsmac driverversion=3.5.0-21-generic firmware=N/A link=no multicast=yes wireless=IEEE 802.11bgn
    I tried adding 'iface eth0 inet dhcp' to /etc/network/interfaces
    blacklisting IPv6, disabling IPv6 among other things, but nothing has worked so far.

    I'm trying to mount a folder from my desktop PC but as there is no IPv4 I cannot connect to the desktop PC.
    On Win7 my laptop is getting the IPv4 via DHCP.
    Any help is greatly appreciated.

  2. #2
    Join Date
    Nov 2006
    Location
    Craggy Island.
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: No inet address (IPv4) but inet6 address (IPv6) using eth0

    Hello


    Most implementations are dual stack now which means you get an IPV4 address and a IPV6 address,

    The IPV6 address in your case is being derived from your mac address automatically, so its not being obtained from the network. THis is called the link local address and means you dont need DHCP.


    Here is your mac

    e8:03:9a:97:61:b1

    Your IPV6 is generated by splitting the mac address in two and inserting FF:FE in the middle and adding

    e8:03:9a:ff:fe:97:61:b1

    Grouping in 4's as per IPV6 notation

    e803:9aff:fe97:61b1

    Convert e8 to binary and invert the 7th bit and convert back to Hex)
    (E8-> 11101000 -> 11101010 -> EA)

    Replace what was there
    ea03:9aff:fe97:61b1


    Then add fe80 to show its a link local address

    fe80::ea03:9aff:fe97:61b1

    The question for you is whether your connecting to your router with ethernet?

    If so try opening a terminal window and type

    sudo /etc/init.d/netwroking restart
    see if you get an IP by manually restarting eth0
    You can tell a man who boozes by the company he chooses, as the pig got up and slowly walked away.

  3. #3
    Join Date
    Jan 2013
    Beans
    5

    Re: No inet address (IPv4) but inet6 address (IPv6) using eth0

    I tried

    sudo /etc/init.d/networking restart
    sudo restart networking
    sudo stop networking

    each one of those crashed Ubuntu

    If I click on the 'networking' icon in the top right corner, there's an entry 'Enable Networking' (checked)
    But unchecking and checking that entry does not solve the problem.

    Quote Originally Posted by jonobr View Post
    The question for you is whether your connecting to your router with ethernet?
    Atm ifconfig looks like this
    Code:
    eth0      Link encap:Ethernet  HWaddr e8:03:9a:97:61:b1  
              inet6 addr: fe80::ea03:9aff:fe97:61b1/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:580 errors:0 dropped:7 overruns:0 frame:0
              TX packets:476 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:460038 (460.0 KB)  TX bytes:56172 (56.1 KB)
              Interrupt:20 Memory:f7100000-f7120000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:201 errors:0 dropped:0 overruns:0 frame:0
              TX packets:201 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:17775 (17.7 KB)  TX bytes:17775 (17.7 KB)
    
    ppp0      Link encap:Point-to-Point Protocol  
              inet addr:78.49.202.105  P-t-P:213.191.64.108  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
              RX packets:484 errors:0 dropped:0 overruns:0 frame:0
              TX packets:433 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:3 
              RX bytes:425649 (425.6 KB)  TX bytes:35507 (35.5 KB)
    If I do 'sudo ifconfig eth0 down' I lose the connection to the internet.

    And my 'router' is a strange 'black box' (= no config) provided by my ISP, it's a DSL-modem that also runns a DHCP server and has 4 RJ45 female connectors (as well as some more female connectors; e.g. for phones)
    Last edited by MarvinTheRobot; January 4th, 2013 at 08:24 PM.

  4. #4
    Join Date
    Apr 2012
    Beans
    5,524

    Re: No inet address (IPv4) but inet6 address (IPv6) using eth0

    The networking service (e.g. sudo service networking restart) defined in /etc/network/interfaces is separate from the network-manager service that is configured by the networking applet on the taskbar - you shouldn't normally mess with that for a standard desktop configuration. The correct setup for most users is to have only the original 'lo' (loopback) interface in /etc/network/interfaces

    Since your laptop is showing a ppp type interface with a public IP (i.e. not in the usual private LAN block 192.168.x.x), it seems like the box provided by your ISP is a modem not a router. I think you will probably need to create a new ppp (DSL?) connection via the connection manager applet. Also be aware that in some cases the ISP will limit the connection to a particular hardware MAC address, so you may need to 'spoof' the MAC of your (working) laptop interface before it will provide you with an IP address and/or internet connectivity - try without spoofing first though

  5. #5
    Join Date
    Jan 2013
    Beans
    5

    Re: No inet address (IPv4) but inet6 address (IPv6) using eth0

    Quote Originally Posted by steeldriver View Post
    The correct setup for most users is to have only the original 'lo' (loopback) interface in /etc/network/interfaces
    That was the original config, but I tried different things as I was not getting the inet address. But it's not working now, so I'll change it back.


    Quote Originally Posted by steeldriver View Post
    Since your laptop is showing a ppp type interface with a public IP (i.e. not in the usual private LAN block 192.168.x.x), it seems like the box provided by your ISP is a modem not a router.
    It's kind of a hybrid.
    I've had my desktop pc, my laptop (running Win7) and a MacBook of a friend connected to it at the same time. They can all dial in (dsl) and they all get a different public IP address. This part does also work if I'm running Ubuntu (Laptop).

    When my Windows PCs are configured to use DHCP, I get a LAN ip via DHCP from my modem/router as soon as I hook them in (RJ45 plug).
    But it's not the normal 192.168.... IPv4 but 169.254.... instead.
    But it still works like a normal LAN, as I can access the folder I tried to mount on Ubuntu from my Laptop if it's running Win7, so can my friend from his MacBook.

    Once I dial in (dsl) I get a second IP (PPP; public).

    Quote Originally Posted by steeldriver View Post
    I think you will probably need to create a new ppp (DSL?) connection via the connection manager applet.
    I already did that (so I can connect to the internet from my Laptop, oterwise I would have to add a 'real router' on top, that dials my hybrid box)

    Quote Originally Posted by steeldriver View Post
    Also be aware that in some cases the ISP will limit the connection to a particular hardware MAC address, so you may need to 'spoof' the MAC of your (working) laptop interface before it will provide you with an IP address and/or internet connectivity - try without spoofing first though
    That should not be an issue as there are 3 devices (my desktop pc, my laptop (Ubuntu) and said MacBook) connected to it right now. The only problem is that I'm not getting the eth0 inet address under Ubuntu.

    /etc/networks shows this though
    Code:
    # symbolic names for networks, see networks(5) for more information
    link-local 169.254.0.0
    Not sure how it got that IP (must have been DHCP) or what that file does, but this looks like the IP range of my LAN, as the subnetmask of my LAN connection under Windows is 255.255.0.0
    Last edited by MarvinTheRobot; January 5th, 2013 at 01:03 PM.

  6. #6
    Join Date
    Apr 2012
    Beans
    5,524

    Re: No inet address (IPv4) but inet6 address (IPv6) using eth0

    AFAIK the 169.254.x.x is a 'link-local' or APIPA address block - it is used in zeroconf configurations to provide peer-to-peer networking where there is no DHCP server or actual router

    http://en.wikipedia.org/wiki/Link-local_address

    I don't know how Ubuntu handles that kind of config - sorry

  7. #7
    Join Date
    Jan 2013
    Beans
    5

    Re: No inet address (IPv4) but inet6 address (IPv6) using eth0

    Interesting... that explains quite a bit, I'll look into it and report the results.
    Last edited by MarvinTheRobot; January 5th, 2013 at 08:46 PM.

  8. #8
    Join Date
    Jan 2013
    Beans
    5

    Re: No inet address (IPv4) but inet6 address (IPv6) using eth0

    I just ended up adding a 169.254.x.x address manually.

    In case someone else should have a similar problem and stumbles upon this thread:

    Top right corner (networking icon)
    Edit Connections... -> Wired -> Add
    Tab: IPv4 Settings
    Method: Manual
    Address: 169.254.20.20 (for example)
    Netmask: 255.255.0.0

    Same as adding any other ip manually...

    Thanks again to everyone who replied. I learned a few new things. Now I'm off to see if mounting works

  9. #9
    Join Date
    Apr 2012
    Beans
    5,524

    Re: No inet address (IPv4) but inet6 address (IPv6) using eth0

    Glad you got it working

    Just out of curiosity, did you try the 'Link-Local' option in the networking applet? you probably should check the 'require IPv4 address' if you try it

    If that works, it would be a better solution imho - just in case the address you chose manually ever conflicts with another device on your network
    Attached Images Attached Images

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •