Jump to content

cant get ubuntu to manage ethernet

Hi guys, i cant seem to get ubuntu (server iso install) to manage ethernet connection, i am able to connect to the internet though just not my network. i just need it so that i can start doing file serving amongst other things.

i have gnome core gui installed to try ease into getting used to linux.

Spoiler

nano 2.6.3              File: /etc/network/interfaces 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback
# Primary Network
allow-hotplug enp2s0
iface enp2s0 inet dhcp
#static
#       address 192.168.0.3
#       netmask 255.255.255.0
#       gateway 192.168.0.1
#       #network 192.168.0.0
#       dns-nameservers 8.8.4.4 8.8.8.8


 nano 2.6.3      File: /etc/NetworkManager/NetworkManager.conf                 

[main]
plugins=ifupdown,keyfile
#,ofono
#dns=dnsmasq

#no-auto-default=D0:50:99:AA:2B:9A,

[ifupdown]
managed=true

  nano 2.6.3    File: /var/lib/NetworkManager/NetworkManager.state              

[main]
NetworkingEnabled=true
WirelessEnabled=true

 

 

Just a guy with a beard

Link to comment
Share on other sites

Link to post
Share on other sites

are you saying you cannot connect to your network

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, SCHISCHKA said:

are you saying you cannot connect to your network

i can connect to the internet just not my network

Just a guy with a beard

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, PCGeek said:

could you send through your /etc/network/interfaces file?

is it not in the spoilers-code text box?

Just a guy with a beard

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, LordGarth6 said:

is it not in the spoilers-code text box?

sorry i missed that.  Okay how about the output to "ip route" and "ip a".  Also what is the network segment of the devices you want to connect to or host?

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, PCGeek said:

sorry i missed that.  Okay how about the output to "ip route" and "ip a".  Also what is the network segment of the devices you want to connect to or host?

Spoiler

$ ip route
default via 192.168.0.1 dev enp2s0
192.168.0.0/24 dev enp2s0  proto kernel  scope link  src 192.168.0.9
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d0:50:99:aa:2b:9a brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.9/24 brd 192.168.0.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::d250:99ff:feaa:2b9a/64 scope link
       valid_lft forever preferred_lft forever

 

i wish to server files across the whole of the network basically a NAS and media server if thats what you mean by network segment? sorry linux and networking are sorta new to me at this level

Just a guy with a beard

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, LordGarth6 said:
  Hide contents

$ ip route
default via 192.168.0.1 dev enp2s0
192.168.0.0/24 dev enp2s0  proto kernel  scope link  src 192.168.0.9
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d0:50:99:aa:2b:9a brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.9/24 brd 192.168.0.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::d250:99ff:feaa:2b9a/64 scope link
       valid_lft forever preferred_lft forever

 

i wish to server file across the whole of the network if thats what you mean by network segment? sorry linux and networking are sorta new to me at this level

Ok cool that helps.  Can you ping hosts within the 192.168.0.0/24 subnet?  Essentially any host that starts with 192.168.0.x.  If you can ping it then you have connectivity to hosts internally unless they have a internal firewall that is blocking ICMP traffic.

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, LordGarth6 said:
  Reveal hidden contents

$ ip route
default via 192.168.0.1 dev enp2s0
192.168.0.0/24 dev enp2s0  proto kernel  scope link  src 192.168.0.9
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d0:50:99:aa:2b:9a brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.9/24 brd 192.168.0.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::d250:99ff:feaa:2b9a/64 scope link
       valid_lft forever preferred_lft forever

 

i wish to server files across the whole of the network basically a NAS and media server if thats what you mean by network segment? sorry linux and networking are sorta new to me at this level

Also check if firewalld is running on the server itself.  Run "systemctl status firewalld" to check the status of the firewall.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, PCGeek said:

Also check if firewalld is running on the server itself.  Run "systemctl status firewalld" to check the status of the firewall.

using Network Tools, i can ping 192.168.0.0/24 subnet and specifically my windows pc, using a "ping 192.168.0.x" results in 100% packet loss. higher pings than to google like 40ms to 20ms. "systemctl status firewalld"  results in  unit firewalld.service could not be found.

Just a guy with a beard

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, LordGarth6 said:

using Network Tools, i can ping 192.168.0.0/24 subnet and specifically my windows pc, using a "ping 192.168.0.x" results in 100% packet loss. higher pings than to google like 40ms to 20ms. "systemctl status firewalld"  results in  unit firewalld.service could not be found.

Okay so you can access hosts on your network.  At this point you can create services (i.e. CIFS, NFS, SSH, etc) on your server and they should be accessible from your other devices.  When accessing it, it would be over IP address so it would be worthwhile assigning a static IP.  You probably don't have name resolution so you could manage a HOSTS file or setup a local DNS server.

Link to comment
Share on other sites

Link to post
Share on other sites

21 minutes ago, PCGeek said:

Okay so you can access hosts on your network.  At this point you can create services (i.e. CIFS, NFS, SSH, etc) on your server and they should be accessible from your other devices.  When accessing it, it would be over IP address so it would be worthwhile assigning a static IP.  You probably don't have name resolution so you could manage a HOSTS file or setup a local DNS server.

i had it set as a static before but i changed it back to dynamic while messing around but if theres a correct way of setting static up in ubuntu then at least i'll know that is right haha. "name resolution so you could manage a HOSTS file or setup a local DNS server. " i dont have that or know how to go about that at all haha

 

Just a guy with a beard

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, LordGarth6 said:

i had it set as a static before but i changed it back to dynamic while messing around. "name resolution so you could manage a HOSTS file or setup a local DNS server. " i dont have that or know how to go about that at all haha

 

So you probably should set it to static.  To do that do the following:

 

Comment out the "iface enp2s0 inet dhcp" line by adding a hash in front of it.  Underneath it add the following lines:

iface enp2s0 inet static

address 192.168.0.9  # or whatever static IP you want.  Ensure that it's not one that is part of your DHCP scope

netmask 255.255.255.0

network 192.168.0.0

broadcast 192.168.0.255

gateway 192.168.0.1

 

In your /etc/resolv.conf file ensure you have your name servers identified like the following example:

search localdomain # or whatever your local name suffix is

nameserver 8.8.8.8 # google DNS

nameserver 8.8.4.4

 

Now you can't just access it by it's computer name, that's what I meant by name resolution.  You need a way to translate the name into an IP address.  IMO I would just use pure IP addresses in your setup to start.  Read up on "HOSTS files" which are just text files that sit in /etc/hosts for *NIX machines and c:\windows\system32\drivers\etc\hosts on Windows machines.  HOSTS files basically tell the client for a certain name map to a certain IP.  Okay for testing but other than that they are pure evil and pain to manage.  DNS is more elegant but again requires additional skills and complexity.  Windows machines talk to each other natively due to the fact they uses NetBIOS. You can use that on Linux as well but I generally steer away from it for various reasons.

 

Hope this helps :) 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×