interface eth0 /ethernet not appearing

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
jesus6828
Level 1
Level 1
Posts: 4
Joined: Mon Aug 13, 2018 5:24 pm

interface eth0 /ethernet not appearing

Post by jesus6828 » Mon Aug 13, 2018 6:05 pm

I am trying to follow this tutorial to connect a Raspberry Pi through Ethernet cable + SSH login, as I don't have a monitor with HDMI.
http://www.circuitbasics.com/how-to-con ... net-cable/
or https://www.youtube.com/watch?v=WBlXvGwkZa8

The thing is, I don't see eth0 interface in the output of ifconfig, although it seems the first is Ethernet.
Shouldn't I see an adress of the form XXX.YYY.ZZZ.AAA? , adress which I would use in Putty to connect to my Pi.

Code: Select all

jesus@jesus-PC:~$ ifconfig -a
enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 3c:97:0e:a5:26:9b  txqueuelen 1000  (Ethernet)
        RX packets 15391  bytes 18270178 (18.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8412  bytes 913552 (913.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf2500000-f2520000  

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 9098  bytes 780151 (780.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9098  bytes 780151 (780.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.131  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::8762:3c12:a5f1:8df3  prefixlen 64  scopeid 0x20<link>
        ether 6c:88:14:a0:76:24  txqueuelen 1000  (Ethernet)
        RX packets 979230  bytes 1328043150 (1.3 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 528785  bytes 61685837 (61.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And when I plug the Ethernet cable, an extra line appears:

Code: Select all

jesus@jesus-PC:~$ ifconfig -a
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        [b]inet6 fe80::8b4e:b40a:f486:3ddc  prefixlen 64  scopeid 0x20<link>[/b]
        ether 3c:97:0e:a5:26:9b  txqueuelen 1000  (Ethernet)
        RX packets 15402  bytes 18272438 (18.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8437  bytes 917433 (917.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf2500000-f2520000 

Code: Select all

jesus@jesus-PC:~$ inxi -Fxz
System:    Host: jesus-PC Kernel: 4.15.0-20-generic x86_64
           bits: 64 gcc: 7.3.0
           Desktop: Cinnamon 3.8.8 (Gtk 3.22.30-1ubuntu1)
           Distro: Linux Mint 19 Tara
Machine:   Device: laptop System: LENOVO product: 23245QG v: ThinkPad X230 serial: N/A
           Mobo: LENOVO model: 23245QG serial: N/A
           UEFI [Legacy]: LENOVO v: G2ET92WW (2.52 ) date: 02/22/2013
Battery    BAT0: charge: 18.1 Wh 29.7% condition: 61.0/86.6 Wh (70%)
           model: LGC 45N1029 status: Discharging
CPU:       Dual core Intel Core i5-3320M (-MT-MCP-) 
           arch: Ivy Bridge rev.9 cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10375
           clock speeds: max: 3300 MHz 1: 1213 MHz 2: 1210 MHz 3: 1304 MHz
           4: 1414 MHz
Graphics:  Card: Intel 3rd Gen Core processor Graphics Controller
           bus-ID: 00:02.0
           Display Server: x11 (X.Org 1.19.6 )
           drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1366x768@60.02hz
           OpenGL: renderer: Mesa DRI Intel Ivybridge Mobile
           version: 4.2 Mesa 18.0.0-rc5 Direct Render: Yes
Audio:     Card Intel 7 Series/C216 Family High Def. Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.15.0-20-generic
Network:   Card-1: Intel 82579LM Gigabit Network Connection
           driver: e1000e v: 3.2.6-k port: 5080 bus-ID: 00:19.0
           IF: enp0s25 state: up speed: 100 Mbps duplex: full mac: <filter>
           Card-2: Intel Centrino Advanced-N 6205 [Taylor Peak]
           driver: iwlwifi bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: 180.0GB (6.8% used)
           ID-1: /dev/sda model: INTEL_SSDSC2BW18 size: 180.0GB
Partition: ID-1: / size: 165G used: 12G (8%) fs: ext4 dev: /dev/sda1
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 61.0C mobo: N/A
           Fan Speeds (in rpm): cpu: 3829
Info:      Processes: 218 Uptime: 5:23 Memory: 1721.5/3644.5MB
           Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56
I also tried changing interfaces file as this user suggested viewtopic.php?t=244210#p1348637
So the current file is in the picture
interfaces.png
Its important to mention, I tried connecting my laptop directly through Ethernet cable to my Router, and I can perfectly navigate Internet :o
Best regards.
Last edited by jesus6828 on Tue Aug 14, 2018 4:20 am, edited 1 time in total.

sgtor
Level 3
Level 3
Posts: 163
Joined: Sat May 13, 2017 9:39 pm

Re: interface eth0 /ethernet not appearing

Post by sgtor » Mon Aug 13, 2018 7:12 pm

In mint it's not called eth0, it looks like yours is called enp0s25

Code: Select all

ifconfig enp0s25 up
Edit:
Oh yeah. You can also run this to see all interfaces.

Code: Select all

ifconfig -a

jesus6828
Level 1
Level 1
Posts: 4
Joined: Mon Aug 13, 2018 5:24 pm

Re: interface eth0 /ethernet not appearing

Post by jesus6828 » Thu Aug 16, 2018 7:36 am

Thank you sgtor!

Yeah, I guess it will be that, it's just another name of the interface.
About the command, yeah I actually run it 2 times in my post xD

Kind regards.

sgtor
Level 3
Level 3
Posts: 163
Joined: Sat May 13, 2017 9:39 pm

Re: interface eth0 /ethernet not appearing

Post by sgtor » Thu Aug 16, 2018 6:12 pm

jesus6828 wrote:
Thu Aug 16, 2018 7:36 am
it's just another name of the interface.
np glad to help. In case you're wondering why it's named that way it's part of systemd

enp0s25
en = ethernet
p0 = pci bus 0
s25 = slot 25

jesus6828
Level 1
Level 1
Posts: 4
Joined: Mon Aug 13, 2018 5:24 pm

Re: interface eth0 /ethernet not appearing

Post by jesus6828 » Thu Aug 16, 2018 6:42 pm

Oh I didn't inagined that.
Thank a lot for the help mate!

sgtor
Level 3
Level 3
Posts: 163
Joined: Sat May 13, 2017 9:39 pm

Re: interface eth0 /ethernet not appearing

Post by sgtor » Thu Aug 16, 2018 7:58 pm

np
Actually if you want to have a bit of fun exploring more give this a try.

Code: Select all

lspci | grep 00:25
I'm sure you can see how the numbers relate. Give it a try for the wireless interface as well.

That in turn is related to /sys/bus/pci/devices/0000:00:25*

Edit: I guess I should add too don't mess with your system while logged in as root or sudo bash.

jesus6828
Level 1
Level 1
Posts: 4
Joined: Mon Aug 13, 2018 5:24 pm

Re: interface eth0 /ethernet not appearing

Post by jesus6828 » Fri Aug 17, 2018 4:43 am

1. About what you told me. Interesting, I tried that, but it seems there isn't any 25, the Ethernet is 19 !
lspci.png
2. About the address. I was forgetting my main point lol; apart from the different name, do you know why the "inet addr" doesn't appear for the Ethernet interface.
I mean like in https://code-maven.com/slides/linux/ifconfig or http://wiki.kolmisoft.com/images/1/1f/L ... config.png

I am very confused, Im trying to follow basically these steps (Laptop is connected through Wifi of course):
1. Connect Ethernet cable Raspberry pi <----> Laptop
2. Get the "inet addr" of the Ethernet interface
3. Connect to that address by SSH.

The thing is I just don't see any address at all (apart from the MAC) !:?

sgtor
Level 3
Level 3
Posts: 163
Joined: Sat May 13, 2017 9:39 pm

Re: interface eth0 /ethernet not appearing

Post by sgtor » Fri Aug 17, 2018 1:51 pm

jesus6828 wrote:
Fri Aug 17, 2018 4:43 am
1. About what you told me. Interesting, I tried that, but it seems there isn't any 25, the Ethernet is 19 !
I wondered about that myself, I thought 25 seemed a bit high a number for a laptop but 19 seems high too.
My best guess is they are virtual slots allocated by some firmware schema. I don't know the actual answer though, I would have to read the manual and research it, I may end up doing that eventually if I truly want to know the answer.
If someone else knows they'll have to chime in. Or you can read the manual. ;)
jesus6828 wrote:
Fri Aug 17, 2018 4:43 am
2. About the address. I was forgetting my main point lol; apart from the different name, do you know why the "inet addr" doesn't appear for the Ethernet interface.
Well a few things if you're connecting with a cable directly
laptop <-----> pi
That won't work without a crossover cable.

With a crossover cable you need to set each address manually.

Code: Select all

ifconfig enp0s25 192.168.0.1
you might need to set the netmask

Code: Select all

ifconfig netmask 255.255.255.0
I really encourage you to read the manual for ifconfig

Code: Select all

man ifconfig
or

Code: Select all

info ifconfig
If you connect both devices to a router and set up DHCP you can just plug each device in with a regular network cable and it will work.

sgtor
Level 3
Level 3
Posts: 163
Joined: Sat May 13, 2017 9:39 pm

Re: interface eth0 /ethernet not appearing

Post by sgtor » Fri Aug 17, 2018 2:07 pm

On the first read of your post it looks like I missed the fact that you said laptop was through wifi.
That would mean you have to connect through a router for it to work. However I would suggest getting it to work through a network cable connected through a router first. Establish that you can get it working first then give the wireless a try.

And also if the laptop is wi-fi then remember what I told you about ifconfig?

Code: Select all

ifconfig -a
You can't use enp0s25, remember en=ethernet. You need to use whatever it says for wireless.
wl=wireless

Post Reply

Return to “Newbie Questions”