Skip to main content
7 of 9
added 692 characters in body

How can I stay connected wirelessly online but also set the ethernet to a set ip address to connect to a piece of hardware

I am currently working on Raspberry Pi 3B+ (Stretch 9) and I have been stumped on how to be connected online wirelessly while also having my LAN port configured to receive and send data via a crossover Ethernet cable to an external piece of hardware (Note: the hardware via the LAN port is being interrogated with a Java program and does not need a bridged connection). The hardware defaults to the following settings:

IP Address: 192.168.1.100
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1

I can make the hardware work by the edit shown below but it disables my wireless connection.

Editing the /etc/dhcpcd.conf with:

interface eth0
static ip_address=192.168.1.200/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

If this might be any help hardware works but disconnected wirelessly from the internet, here is the output of route -n:

Kernel IP routing table
        Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
        0.0.0.0         192.168.1.1     0.0.0.0         UG    202    0        0 eth0
        0.0.0.0         192.168.1.8     0.0.0.0         UG    303    0        0 wlan0
        192.168.1.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0
        192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0

Edit: When disconnecting the Ethernet cable the wifi works again. As far as I can tell it is due to the default route of the Ethernet (thanks softweyr), however I am still unsure as to how to solve this. In "route -v" it shows:

Kernel IP routing table
        Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
        default         192.168.1.1     0.0.0.0         UG    202    0        0 eth0
        default         192.168.1.8     0.0.0.0         UG    303    0        0 wlan0
        192.168.1.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0
        192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0