burnedfaceless
asked on
How to route traffic out through ethernet and WiFi on the same subnet?
I am a college student without a lot of money so I am turning one of my Raspberry Pis into a router.
I followed these instructions in general to create a Raspberry Pi that plugs directly into my modem and creates a WiFi network.
https://medium.com/@edoardo849/turn-a-raspberrypi-3-into-a-wifi-router-hotspot-41b03500080e
Some other things I did were to install Fail2Ban and other basic security things when I first launched the Pi.
I have some devices that will need to connect by Ethernet. I have a USB to Ethernet adapter and a Ethernet Switch. I was hoping to have the internet sent through the USB to Ethernet adapter (ETH 0) to my Switch, that can plug into devices that need a wired connection.
I need the internet that goes out of the eth1 device and out of the wlan0 device to be on the same subnet. How do I set this up where they are both on the same subnet?
I followed these instructions in general to create a Raspberry Pi that plugs directly into my modem and creates a WiFi network.
https://medium.com/@edoardo849/turn-a-raspberrypi-3-into-a-wifi-router-hotspot-41b03500080e
Some other things I did were to install Fail2Ban and other basic security things when I first launched the Pi.
I have some devices that will need to connect by Ethernet. I have a USB to Ethernet adapter and a Ethernet Switch. I was hoping to have the internet sent through the USB to Ethernet adapter (ETH 0) to my Switch, that can plug into devices that need a wired connection.
I need the internet that goes out of the eth1 device and out of the wlan0 device to be on the same subnet. How do I set this up where they are both on the same subnet?
ASKER
In order to route traffic through the eth1 port on the Raspebrry Pi I believe I need to enter the IP Address I assign to it under option-routers in /etc/dhcp/dhcpd.conf.
When I did this it said they needed to be on different subnets.
When I did this it said they needed to be on different subnets.
So what you need to do is to Bridge the eth0 & eth1 into br0 and then run DHCP & the Ip address of the pi on the Bridge.
see man brctl for more info on this.
Also verify the "vlan_bridge=..." setting in the hostapd.conf file.
see man brctl for more info on this.
Also verify the "vlan_bridge=..." setting in the hostapd.conf file.
I'm still confused. What exactly do you want to route from and to? If the Raspberry PI is acting as a router, that would imply two separate networks. Are you trying to separate WiFi and Ethernet into two networks? They don't have to be on separate networks. So can you explain a bit more in what you are trying to do from a network level? Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It should provide the same ip range.