Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Cisco > Is this doable? Bridging using NICs.

Reply
Thread Tools

Is this doable? Bridging using NICs.

 
 
unix
Guest
Posts: n/a
 
      02-29-2012
I have a task to connect 2 Linux servers using a cross-over cable (but
with a twist).


SWITCH
|
|
Server-A - [NIC-A1 , NIC-A2]
/
/
x-over cable
/
/
Server-B - [NIC-B1 , NIC-B2]



NIC-A1 is the only interface connected to a switch. I need to connect
Server-B to the same switch but have no more switch ports.

My idea (may be silly) is to run a x-over cable from NIC-A2 to NIC-B1
and thus be on the same VLAN as NIC-A1.
For this, I need to somehow internally bridge NIC-A1 and NIC-A2 so
when I run the x-over cable, NIC-B1 will be part of the same segment.
Then I can assign IP to NIC-B1 and have my L2 connection via Server-A.
Is this at all doable???

Thanks
Ron
 
Reply With Quote
 
 
 
 
Rob
Guest
Posts: n/a
 
      02-29-2012
unix <> wrote:
> I have a task to connect 2 Linux servers using a cross-over cable (but
> with a twist).
>
>
> SWITCH
> |
> |
> Server-A - [NIC-A1 , NIC-A2]
> /
> /
> x-over cable
> /
> /
> Server-B - [NIC-B1 , NIC-B2]
>
>
>
> NIC-A1 is the only interface connected to a switch. I need to connect
> Server-B to the same switch but have no more switch ports.
>
> My idea (may be silly) is to run a x-over cable from NIC-A2 to NIC-B1
> and thus be on the same VLAN as NIC-A1.
> For this, I need to somehow internally bridge NIC-A1 and NIC-A2 so
> when I run the x-over cable, NIC-B1 will be part of the same segment.
> Then I can assign IP to NIC-B1 and have my L2 connection via Server-A.
> Is this at all doable???
>
> Thanks
> Ron


Of course this is possible in Linux.
It can be debated whether it is a good idea to do this, but it is your
own decision.
 
Reply With Quote
 
 
 
 
KR
Guest
Posts: n/a
 
      02-29-2012
On 29.02.2012 17:47, unix wrote:
>
> For this, I need to somehow internally bridge NIC-A1 and NIC-A2 so
> when I run the x-over cable, NIC-B1 will be part of the same segment.
> Then I can assign IP to NIC-B1 and have my L2 connection via Server-A.
> Is this at all doable???


Certainly. You'll need to create a bridge interface on server A and add
NIC-A1 and NIC-A2 to the bridge. Assuming NIC-A1 and NIC-A2 are called
eth0 and eth1 respectively:

modprobe bridge
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1

This assumes that your kernel has bridge support compiled as a module,
and that you have the bridge userspace tools installed (see
http://tldp.org/HOWTO/BRIDGE-STP-HOW...he-bridge.html).

The IP configuration on NIC-A1 must then be moved to the new bridge
interface (br0). Also, the commands above must be added to the startup
scripts of your Linux distribution.
 
Reply With Quote
 
unix
Guest
Posts: n/a
 
      03-01-2012
On Feb 29, 1:34*pm, KR <kristian.rasmus...@broadpark.no.spam.com>
wrote:
> On 29.02.2012 17:47, unix wrote:
>
>
>
> > For this, I need to somehow internally bridge NIC-A1 and NIC-A2 so
> > when I run the x-over cable, NIC-B1 will be part of the same segment.
> > Then I can assign IP to NIC-B1 and have my L2 connection via Server-A.
> > Is this at all doable???

>
> Certainly. You'll need to create a bridge interface on server A and add
> NIC-A1 and NIC-A2 to the bridge. Assuming NIC-A1 and NIC-A2 are called
> eth0 and eth1 respectively:
>
> modprobe bridge
> brctl addbr br0
> brctl addif br0 eth0
> brctl addif br0 eth1
>
> This assumes that your kernel has bridge support compiled as a module,
> and that you have the bridge userspace tools installed (seehttp://tldp.org/HOWTO/BRIDGE-STP-HOWTO/set-up-the-bridge.html).
>
> The IP configuration on NIC-A1 must then be moved to the new bridge
> interface (br0). Also, the commands above must be added to the startup
> scripts of your Linux distribution.


THANKS! THAT WAS VERY HELPFULL! I'll try it.
 
Reply With Quote
 
unix
Guest
Posts: n/a
 
      03-01-2012
On Feb 29, 1:34*pm, KR <kristian.rasmus...@broadpark.no.spam.com>
wrote:
> On 29.02.2012 17:47, unix wrote:
>
>
>
> > For this, I need to somehow internally bridge NIC-A1 and NIC-A2 so
> > when I run the x-over cable, NIC-B1 will be part of the same segment.
> > Then I can assign IP to NIC-B1 and have my L2 connection via Server-A.
> > Is this at all doable???

>
> Certainly. You'll need to create a bridge interface on server A and add
> NIC-A1 and NIC-A2 to the bridge. Assuming NIC-A1 and NIC-A2 are called
> eth0 and eth1 respectively:
>
> modprobe bridge
> brctl addbr br0
> brctl addif br0 eth0
> brctl addif br0 eth1
>
> This assumes that your kernel has bridge support compiled as a module,
> and that you have the bridge userspace tools installed (seehttp://tldp.org/HOWTO/BRIDGE-STP-HOWTO/set-up-the-bridge.html).
>
> The IP configuration on NIC-A1 must then be moved to the new bridge
> interface (br0). Also, the commands above must be added to the startup
> scripts of your Linux distribution.


I looked at this and it seems once you bridge NIC-A1 and NIC-A2 you
can't assign IPs to NIC-A1. I need NIC-A1 to be reachable via L3 still
and have another IP for NIC-B1 in the same subnet. Can be done ???
 
Reply With Quote
 
KR
Guest
Posts: n/a
 
      03-01-2012
On 01.03.2012 19:30, unix wrote:
>
> I looked at this and it seems once you bridge NIC-A1 and NIC-A2 you
> can't assign IPs to NIC-A1. I need NIC-A1 to be reachable via L3 still
> and have another IP for NIC-B1 in the same subnet. Can be done ???


You can't IP addresses to interfaces enslaved under a bridge interface,
but the bridge interface can have any number of different IP addresses
assigned to aliases (br0:0, br0:1 etc).

BTW, you're in the wrong newsgroup.
 
Reply With Quote
 
Martijn Lievaart
Guest
Posts: n/a
 
      03-03-2012
On Thu, 01 Mar 2012 21:46:11 +0100, KR wrote:

> You can't IP addresses to interfaces enslaved under a bridge interface,
> but the bridge interface can have any number of different IP addresses
> assigned to aliases (br0:0, br0:1 etc).


Nitpicks:

- Yes you can assign IP adresses to enslaved interfaces and that does
work. It's even the default Xen bridge setup. Whether it's a good idea in
terms of clarity is debatable, but it does work.

- Aliases are a thing of the past, of the 2.2 kernel. They are supported
nowadays only for backward compatibility. Today you just assign multiple
addresses to the same interface.

HTH,
M4
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bridging Connections using a Netgear PCI Wireless Network Card =?Utf-8?B?RnJlYWs0SkM=?= Wireless Networking 4 11-09-2007 04:31 PM
wireless ad hoc networking using network bridging =?Utf-8?B?YXVkZ3V5?= Wireless Networking 2 05-31-2007 06:48 PM
Wireless Bridging??? =?Utf-8?B?VGhlQmlnRG9n?= Wireless Networking 2 10-24-2004 12:15 AM
using cisco routers for bridging Jason Cisco 4 05-13-2004 10:52 PM
HELP: Possible to do LAN bridging over IPSEC VPN (using ADSL)? Jason Cisco 5 11-08-2003 03:51 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57