LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-07-2017, 10:48 AM   #1
RogueWarrior65
Member
 
Registered: Aug 2010
Posts: 48

Rep: Reputation: 0
Question Bridging Ethernet to Wifi


Does anyone have a working procedure for routing/bridging an ethernet interface to a wifi interface?

My SBC is running Yocto Linux 4.1.15 which is using systemd (very important).
I've tried using parprouted but I haven't gotten it to work. All the google references assume you are using init instead of systemd but even trying this manually, no soap, Doc.

Basically, what I want to be able to do is connect something like an IP camera to an ethernet port on a single-board computer, then have the SBC's wifi connect to a regular wifi router and then be able to view the camera feed on a laptop.

No, I don't want to use OpenWRT to do this.
 
Old 08-07-2017, 11:15 AM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
On the client machine:

# ifconfig eth0 192.168.3.3 netmask 255.255.255.0 mtu 1440 up
# route add default gw 192.168.3.1

or

# ip link set eth0 up mtu 1440
# ip addr add 192.168.3.3/24 dev eth0
# ip route add default via 192.168.3.1 dev eth0

-----

On the bridge machine

# dhclient -4 -v eth0
(connect to the internet / router, replace the device name as needed like wlan0 for wireless or wlp1s0)


# ifconfig eth2 192.168.3.1 netmask 255.255.255.0 mtu 1440 up

or

# ip link set eth2 up mtu 1440
# ip addr add 192.168.3.1/24 dev eth2
(note, no route needed since the gateway of the client is the route, plus a different subnet)

Then

# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
(where eth0 is the internet facing interface)

Of course this is the double NAT route, assuming the router also NATs. Which is why there's a modification to the MTU. It helps to keep speed up by keeping packet fragmentation down. Technically you only need 40 bytes per tcp/ip header, but I do 60.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 10:24 PM
Bridging Wireless To Ethernet jrtayloriv Linux - Wireless Networking 3 12-17-2006 12:05 AM
SMP+ethernet bridging = no-no? Toshiba-Laptop Linux - Networking 0 07-01-2006 10:34 PM
Ethernet bridging pepolez Linux - Networking 3 06-12-2005 06:07 AM
ethernet bridging not working twsnnva Linux - Networking 2 01-27-2005 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration