Score:0

How to create network in Ubuntu 20.04 from ethernet Cable

br flag

I have Ubuntu server and I need to connect it to the internet. Its local Ip address is 192.168.0.124. This Server gets the internet from another server using switch ethernet cable. The main server that gives the internet has its private Ip address and has local Ip address 192.168.0.254. Main server gives the internet also to other Gentoo server which has 192.168.0.106 ip iddress. I saw Gentoo server /etc/conf.d/net file and there is written like below.

config_eth0="192.168.0.106/24"
routes_eth0="default via 192.168.0.254"

In second Gentoo server internet is working fine but in Ubuntu server internet is not working. I don't know where to start. Can you please give me some instructions on how to configure it correctly. Which files to change? I connecter ethernet cable correctly, only thing that I should show its internet Ip that comes from 192.168.0.254 server.

Abu Zaid avatar
ru flag
On the server that is not working, type netstat -nr and post the output
Abdusoli avatar
br flag
```netstat -nr``` command is not working. Since it does not have internet I cannot install it
Abdusoli avatar
br flag
If you say specific file data, I can post
Abu Zaid avatar
ru flag
Are you getting an error message? It is a standard command on pretty much all Linux builds. Try 'ip route'
Abdusoli avatar
br flag
```default via 192.168.0.254 dev enp5s0 proto static``` ```192.168.0.0/24 dev enp5s0 proto kernel scope link src 192.168.0.124``` this is the result of ```ip route```
Abu Zaid avatar
ru flag
Looks good. Try traceroute 8.8.8.8 and post the results.
Michael Hampton avatar
cz flag
@AbuZaid `netstat` has been obsolete for more than 10 years. It is not expected to be installed on a system unless some other piece of legacy software depended on it.
Score:1
br flag

I finally resolved an issue. It was related with netplan. I changed configuration file /etc/netplan/ .conf

network: 
   version: 2
   renderer: networkd
   ethernets:
      enp5s0:
        dhcp4: true
        dhcp6: true

Then type netplan apply to apply changes. In some cases enp5s0 can be different for example eth0. It is ethernet name.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.