Announcement

Collapse
No announcement yet.

Only see ipv6 addresses in ifconfig - is ipv4 disabled or unused?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Only see ipv6 addresses in ifconfig - is ipv4 disabled or unused?

    Hi all!

    So I've used Kubuntu and Ubuntu before, but I'm using it for something new today - as a media server.

    The media server I'm using seems to be having trouble reaching my network, and vice versa.

    I noticed when I ran ifconfig that I only say ipv6 addresses. The media server only uses ipv4, if I recall correctly.

    By default, is ipv4 disabled or ipv6 favored? And if so, how can I force it to use ipv4 only?

    - Tim

    #2
    What in
    /etc/network/interfaces
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Originally posted by GreyGeek View Post
      What in
      /etc/network/interfaces
      I'll take a look when I get home and report back!

      - Tim

      Comment


        #4
        Originally posted by GreyGeek View Post
        What in
        /etc/network/interfaces
        Ok, so here's what's in /etc/network/interfaces, and the output of ifconfig... I noticed that I am now seeing ipv4 style addresses. But do you see anything here that might cause issues connecting to this machine?

        root@zbox:/etc/network# cat interfaces
        # interfaces(5) file used by ifup(8) and ifdown(8)
        auto lo
        iface lo inet loopback
        root@zbox:/etc/network# ifconfig
        enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 192.168.0.102 netmask 255.255.255.0 broadcast 192.168.0.255
        inet6 fe80::9071:973f:c1d2:bb1e prefixlen 64 scopeid 0x20<link>
        ether 00:01:2e:83:84:2e txqueuelen 1000 (Ethernet)
        RX packets 6453 bytes 6183711 (6.1 MB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 5011 bytes 946063 (946.0 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
        device interrupt 16 memory 0xdc300000-dc320000

        enp108s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
        ether 00:01:2e:83:84:2f txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

        lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
        inet 127.0.0.1 netmask 255.0.0.0
        inet6 ::1 prefixlen 128 scopeid 0x10<host>
        loop txqueuelen 1000 (Local Loopback)
        RX packets 427 bytes 38735 (38.7 KB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 427 bytes 38735 (38.7 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

        wlp109s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
        ether d4:6d:6d:b0:e0:87 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

        Comment


          #5
          Your enp0s31f6 cable connection looks normal
          Your
          enp108s0 cable connection is not connecting
          Your
          wlp109s0 wifi connection is not connecting.

          What does rfkill show?

          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Originally posted by GreyGeek View Post
            Your enp0s31f6 cable connection looks normal
            Your
            enp108s0 cable connection is not connecting
            Your
            wlp109s0 wifi connection is not connecting.

            What does rfkill show?
            Actually, the issues I was having are now gone, without many changes. I made sure to do a few things:

            1. /etc/hosts had my computer aliased to localhost; I commented out that line so that its name was associated with the external interface
            2. My router's name for my computer was different than that used on the machine itself; my router is not set up to provide DNS, but the name I have it set to with DHCP was being reported in netstat; so I changed them names to be the same.

            After that I rebooted, and now the networked devices I've got can connect to the media server. Very odd. I guess it was the entry in /etc/hosts, that's the most likely.

            The other two interfaces are a 2nd NIC and the WiFi, which I haven't set up.

            Thanks for guiding me, in any case, much appreciated!

            - Tim

            Comment


              #7
              An interesting tool for hostnames is hostname
              Do a
              man hostname
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                Originally posted by GreyGeek View Post
                An interesting tool for hostnames is hostname
                Do a
                man hostname
                I appreciate the help, but I think you're barking up the wrong tree with that - I've been a software developer for almost 40 years, including 10 years doing Unix kernel and driver development (though mostly Java in recent years). I've built many of my own computers and installed many flavors of Windows, Unix and Linux on them (I used mostly Slackware for years), written custom Linux drivers and debugged plenty of them as well. Worked doing configuration management for Linux systems for some big companies, etc.

                So... yeah, I know what "hostname" does. :-D

                I only asked the question I did here because the client devices didn't seem able to connect to the media server running on this fresh install of Kubuntu, and I haven't done any management of recent Linux distro versions nor have I tried to run media servers on them, and I was baffled.

                - Tim

                Comment


                  #9
                  Ah, then you are qualified to be your own support staff.
                  I, too, programmed for 40 years, starting with FORTRAN IV in grad school in 1967.

                  You know, then, that during setup of a Debian based system the host name assigned during the install is usually assigned to 127.0.0.1 in the /etc/hosts file.

                  I found your post interesting because of its possible connection to the /etc/hosts file. I've been running Neon for a couple years and during that time I had a Hurricane IPv6 tunnel that appears to be native and is the protocol of choice, falling back to IPv4 < 1 sec. I had a 17mb hosts file and it worked perfectly with Neon. I just installed BIONIC for grins and giggles and was surprised to note that both FireFox and Chromium appeared to be ignoring my /etc/hosts file settings, although the complaint goes back three or four years.

                  I began to suspect that the hosts file layout was the problem when some reported that they got the hosts file to be recognized when they put each domain name on a separate line. That didn't work for me. Then it occured to me that IPv6 was my primary protocol, so I added two lines for facebook, one with the IPv4 address and one with the IPv6 address. That worked. But, for newsroom.fb.com it didn't work. Using "dig -t AAAA newsroom.fb.com" showed that newsroom.fb.com didn't have an IP address, it was redirected to "fbnewsroomus.wordpress.com" which was redirected to "vip-lb.wordpress.com" I added that last domain name to my hosts file and the block worked. My facebook block section ended up looking like this:
                  Code:
                  127.0.0.1    www.facebook.com
                  ::1          www.v6.facebook.com
                  127.0.0.1    vip-lb.wordpress.com
                  The first line did not block facebook until I added the second line. So, perhaps, the moral of the story is always add both IPv4 and IPv6 redirects in hosts for a given domain if you want hosts to work as a DNS. Strange that I didn't have to do this with Neon's (based on 16.04) /etc/hosts installation. Blocking IPv4 was good enough.

                  There are a lot of other facebook related domain names but I'll add them as they arise.
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    Originally posted by GreyGeek View Post
                    Ah, then you are qualified to be your own support staff.
                    I, too, programmed for 40 years, starting with FORTRAN IV in grad school in 1967.
                    I started a LITTLE bit later ;-) My brother took me to UC Santa Cruz to show me the games you could play on the RSTS/E system they had, when I was around 12 or 13, in 1977. A year later, a kid at my school talked about the games there, and I remembered them, so I went up and played the classic "Animal". When I couldn't figure out how to quit the game, someone at school later told me about the magic of "control-c". That fascinated me, so I went out and bought the Wiley Self-Teaching Guide to Basic; and thus started my illustrious career. ;-)

                    You know, then, that during setup of a Debian based system the host name assigned during the install is usually assigned to 127.0.0.1 in the /etc/hosts file.
                    I hadn't remembered that; I had assumed that the hostname would resolve to the NIC's IP and not localhost. Not sure if it was ever that way in other Linux flavors or in Unix-es. But now I'm reacquainted with that fact.

                    I found your post interesting because of its possible connection to the /etc/hosts file. I've been running Neon for a couple years and during that time I had a Hurricane IPv6 tunnel that appears to be native and is the protocol of choice, falling back to IPv4 < 1 sec. I had a 17mb hosts file and it worked perfectly with Neon. I just installed BIONIC for grins and giggles and was surprised to note that both FireFox and Chromium appeared to be ignoring my /etc/hosts file settings, although the complaint goes back three or four years.

                    I began to suspect that the hosts file layout was the problem when some reported that they got the hosts file to be recognized when they put each domain name on a separate line. That didn't work for me. Then it occured to me that IPv6 was my primary protocol, so I added two lines for facebook, one with the IPv4 address and one with the IPv6 address. That worked. But, for newsroom.fb.com it didn't work. Using "dig -t AAAA newsroom.fb.com" showed that newsroom.fb.com didn't have an IP address, it was redirected to "fbnewsroomus.wordpress.com" which was redirected to "vip-lb.wordpress.com" I added that last domain name to my hosts file and the block worked. My facebook block section ended up looking like this:
                    Code:
                    127.0.0.1    www.facebook.com
                    ::1          www.v6.facebook.com
                    127.0.0.1    vip-lb.wordpress.com
                    The first line did not block facebook until I added the second line. So, perhaps, the moral of the story is always add both IPv4 and IPv6 redirects in hosts for a given domain if you want hosts to work as a DNS. Strange that I didn't have to do this with Neon's (based on 16.04) /etc/hosts installation. Blocking IPv4 was good enough.

                    There are a lot of other facebook related domain names but I'll add them as they arise.
                    I've definitely used /etc/hosts to block installed programs from "phoning home" in Windows environments (tho' of course it lives in a different place), and for setting up home network connections without needing DNS for it.

                    As for ipv6 - it has been slowly creeping into use, from what I can see, but I've never enabled it on any computer or router I've used, since it seemed unnecessary. It's a great thing, since it opens up so many more available addresses, but I've only ever noticed it as an interesting curiosity that would be put into place everything "sometime in the distant future", and not applicable to me in general.

                    I guess it's becoming more used these days then?

                    - Tim

                    Comment


                      #11
                      IMO, all programmers are self-taught, even those that took CS in college (I used to teach computer programming in college, among other things). One cannot study in college ALL the languages they'll end up using in the course of their career. Since 1967 I've probably played with or learned 30 or more languages and used a dozen or more of them. The major ones which I made an income using were RPG4 on System36, Apple BASIC, the UCSD Pascal, Turbo Pascal 3.02A, VisualBasic (Borland & Microsoft), Visual C (Borland), AREV, Forth, Prolog, ACE, assembler, and the last was C++.

                      As far as IPv6 is concerned, it now accounts for over 21% of all US Internet traffic. That's a huge chunk. I use a Hurricane tunnel, which is drop dead easy to set up. They give you the script to put into either /etc/network/interfaces or into /etc/network/if-up.d/
                      Even though it is a tunnel I find my IPv6 connection to be 20% or more faster than IPv4 half the time and equal to IPv4 the rest of the time. I think that's because IPv6 internet servers probably don't have the load on them that most IPv4 servers carry. Just a guess, though.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment

                      Working...
                      X