Ask Your Question
1

why ethernet bridge need ip address

asked 2012-01-22 03:49:08 -0500

Majid Azimi gravatar image

hi guys,

I'm studding openvpn cookbook. There is a example for TAP style network. After creating a bridge, it has set an IP address to it.

Question 1: Why a bridge needs to be assigned with an IP address? It is something like software switch.

Then it switched the IP address of eth0 and tap0 to 0.0.0.0:

ifconfig tap0 0.0.0.0 promisc up
ifconfig eth0 0.0.0.0 promisc up

Question 2: Why should we change the IP?

Question 3: what does that promisc mean? I read the man pages, but I don't get what is the usage of it in this example.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-01-22 04:48:06 -0500

sagarun gravatar image

updated 2012-01-22 04:48:41 -0500

Answering your first question:

Bridges are virtual interface between one are more network interfaces. Bridge can be assigned with an IP address like a normal network interface and allowed to participate in the network.

Answering your 3rd question:

promisc means, promiscuous mode. Normally the network interface cards accept only the data/traffic meant/addressed to it. By switching to promiscuous mode, it will process all the traffic not just the traffic/data meant for it.

Not all network interface card's support promiscuous mode.

edit flag offensive delete link more
0

answered 2015-01-14 11:01:29 -0500

Basically all of these things allow the bridging to work. The first and second question are actually directly related and are more a matter of convenience. The third deals with how the interfaces handle network traffic.

Why assign an IP to the bridge and then change eth0 and tap0 to 0.0.0.0?

We can assign an IP to the bridge interface and use that to talk over eth0 and tap0; eth0 and tap0 don't need their own IP anymore. It is perfectly fine for tap0 and eth0 to keep their IP's, doing it this way just saves you 2 IP addresses.

What is promiscuous mode?

Normally, interfaces only care about data that is addressed to it and ignore everything else. But you want your bridged interfaces tap0 and eth0 to care about everything on the network because they have to transport it across the bridge when necessary.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-01-22 03:49:08 -0500

Seen: 2,426 times

Last updated: Jan 14 '15