Networking : how to bridge two NICs to share internet access ?
Vincent Trouilliez
vincent.trouilliez at modulonet.fr
Thu Aug 25 07:16:02 UTC 2005
> That's exactly how I have my current home network, I'll show you a
> "diagram" of what it would look like:
>
> eth0 eth1
> (Internet)-----[Modem]----{Linux Box}-----[Switch]---[AccessPoint]
> |-----{Machine1}
> |-----{Machine2}
> '-----{MachineN}
Ah thanks, it's very clear now, I need to do the same thing ! :-)
> You can check which IP is assigned by the modem by running the command
> ifconfig on a terminal as the normal user (i.e. with your username), it
> will give you an output of all the active network cards, just check the
> one that's connected to the modem, for example if you have the modem
> connected to the eth0 then you should check the data regarding that
> card, in my case I have:
>
> eth0 Link encap:Ethernet HWaddr 00:E0:7D:B9:45:75
> inet addr:10.140.8.230 Bcast:255.255.255.255
> Mask:255.255.255.248
> inet6 addr: fe80::2e0:7dff:feb9:4575/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:714273 errors:0 dropped:0 overruns:0 frame:0
> TX packets:650267 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:572206986 (545.6 MiB) TX bytes:60408886 (57.6 MiB)
> Interrupt:10 Base address:0xe800
>
> Look at the line that says "inet addr" the number after that is the IP
> address that the modem has assigned my Linux box, so then I have to set
> the eth1 with an IP of 192.168.1.1 (this can be done with the network
> configuration utility that Ubuntu has). Finally tell firestarter that
> which is the internal and external network cards.
On my machine... the modem gave my eth0 card the address 85.68.198.44
it's not a fixe dIP (changes everytime I start the computer) but the
first two bytes are always 85.68 IIRC. Maybe my ISP was allocated this
address range only...
> I'm glad I have helped. You can contact me personally and I'll help you
> with anything I can :)
Given that I saw switches on ebay for as cheap as 15 Euros, I certainly
won't wait ages before I buy one, so I will archive your e-mail and you
can be sure that I will contact you, either on or off list ! ;o)
It's amazing that a thing as useful as a switch, costs so little
money ! :o)
--
Vince
More information about the ubuntu-users
mailing list