ethernet bridge for a LAN (ubuntu)
Hi - I have a problemo that is stumping me. I am trying to get a machine on a LAN to get to the internet. Seems quite like a standard problem, and its solution I presume involves an ethernet bridge. But so far, I have been unsuccessful.
The set up as follows (all machines are Ubuntu): Machine A has two NICs (eth0 and eth1). Machine B connects to Machine A through a switch connected to eth0. Machine A connects to internet via eth1. Machine A also is a dhcp server giving a local IP to Machine B. Here is a drawing Code:
MACHINE A I have tried to build a bridge by getting "bridge-utils" on ubuntu and running the following commands on Machine A: Code:
sudo brctl addbr br0 If I do "sudo brctl show", I get Code:
bridge name bridge id STP enabled interfaces I'm out of options now. My two main questions are 1) To get Machine B to talk to the internet in the above scenario is it necessary to make a ethernet bridge, or is some other method to be used, if so, what? 2) If an ethernet bridge is correct, is there something obviously wrong with my setup. thanks in advance, mark Code:
andrews@wotan ~> cat /etc/network/interfaces |
You need to set up NAT, not bridging, on machine A. There are plenty of howto's on setting up NAT in ubuntu.
|
many thanks for the tip on NAT. I'll look into it.
-m |
indeed I was barking up the wrong tree with the ethernet bridge. Nat is what I wanted, and with a few lines in my /etc/rc.local, namely
Code:
sysctl -w net.ipv4.ip_forward=1 Many thanks to samborambo for the tip. -m |
All times are GMT -5. The time now is 02:22 PM. |