Score:0

Ubuntu server 20.04 change network connection

pl flag

Getting to grips with Ubuntu server, after a couple of messed up set up attempts, I've actually got everything configured how I want and I'm buzzing with having my own home server. I've had an old pc kicking about for a few years and I never thought to turn it into a server.

Anyway, there is no ethernet connection where I currently have the server so I setup with WiFi. However, I'm wanting to now connect it to the network with ethernet via a couple of power line adaptors. Is this possible without messing up my install and any connections I have already made to the server? Is there a way I can give the ethernet connection the same IP address as the WiFi connection? My router has DCHP but I can get into it and turn it off if needs be.

I'm not exactly new to linux but I'm no expert either. If anyone can help then it would be appreciated

@heynnema thanks for your reply. Here's the info you asked for. I'm now connected by ethernet but not getting full speed. Any help?

sudo lshw -C network

 *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0
       version: 03
       serial: 00:25:64:86:47:57
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl_nic/rtl8168d-1.fw ip=192.168.1.237 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:18 ioport:e800(size=256) memory:fdfff000-fdffffff memory:fdff8000-fdffbfff memory:febe0000-febfffff

cat /etc/netplan/*.yaml

# This is the network config written by 'subiquity'
network:
  ethernets:
    enp2s0:
      dhcp4: true
  version: 2

cat /etc/network/interfaces

# ifupdown has been replaced by netplan(5) on this system.  See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
#    sudo apt install ifupdown
cn flag
Ray
What do you mean by "same IP address"? Presumably, you mean not at the same time? Your server got the WiFi's IP address via DHCP. So, all you have to do is to get the wired Ethernet's MAC address and force it to have the same IP address from the router. I don't think that's what you're asking, though? Can you explain in your question why the wired connection has to have the same IP address?
heynnema avatar
ru flag
Edit your question and show me `sudo lshw -C network` and `cat /etc/netplan/*.yaml` and `cat /etc/network/interfaces`. Start comments to me with @heynnema or I'll miss them.
Rew82 avatar
pl flag
Sorry, maybe should have been clearer. I wanted the ethernet connection to have the same ip as the ip that was occupied by the WiFi connection. I'm still how I would do that. I'm the end I opted to reinstalled Ubuntu server but this time with the ethernet connected to the my mobo's ethernet socket and didn't set up wireless.
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.