net: RFC3069, private VLAN proxy arp support
Subsystems (5)
PATCH 1/1 net: RFC3069, private VLAN proxy arp support
This is to be used together with switch technologies, like RFC3069, that where the individual ports are not allowed to communicate with each other, but they are allowed to talk to the upstream router. As described in RFC 3069, it is possible to allow these hosts to communicate through the upstream router by proxy_arp'ing.
This patch basically allow proxy arp replies back to the same interface (from which the ARP request/solicitation was received).
Tunable per device via proc "proxy_arp_pvlan":
/proc/sys/net/ipv4/conf/*/proxy_arp_pvlan
This switch technology is known by different vendor names:
- In RFC 3069 it is called VLAN Aggregation.
- Cisco and Allied Telesyn call it Private VLAN.
- Hewlett-Packard call it Source-Port filtering or port-isolation.
- Ericsson call it MAC-Forced Forwarding (RFC Draft).
---
Documentation/networking/ip-sysctl.txt | 19 ++++++++++++ include/linux/inetdevice.h | 1 + include/linux/sysctl.h | 1 + net/ipv4/arp.c | 52 ++++++++++++++++++++++++++++++-- net/ipv4/devinet.c | 1 + net/ipv4/route.c | 7 ++++ 6 files changed, 76 insertions(+), 5 deletions(-)
Documentation/networking/ip-sysctl.txt +19 -0
@@ -692,6 +692,25 @@ proxy_arp - BOOLEAN conf/{all,interface}/proxy_arp is set to TRUE, it will be disabled otherwise +proxy_arp_pvlan - BOOLEAN + Private VLAN proxy arp. + Basically allow proxy arp replies back to the same interface + (from which the ARP request/solicitation was received). + + This is done to support (ethernet) switch features, like RFC + 3069, where the individual ports are NOT allowed to + communicate with each other, but they are allowed to talk to + the upstream router. As described in RFC 3069, it is possible + to allow these hosts to communicate through the upstream + router by proxy_arp'ing. Don't need to be used together with + proxy_arp. + + This technology is known by different names: + In RFC 3069 it is called VLAN Aggregation. + Cisco and Allied Telesyn call it Private VLAN. + Hewlett-Packard call it Source-Port filtering or port-isolation. + Ericsson call it MAC-Forced Forwarding (RFC Draft). + shared_media - BOOLEAN Send(router) or accept(host) RFC1620 shared media redirects. Overrides ip_secure_redirects.
include/linux/inetdevice.h +1 -0
@@ -88,6 +88,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)#define IN_DEV_LOG_MARTIANS (in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS)#define IN_DEV_PROXY_ARP (in_dev) IN_DEV_ORCONF((in_dev), PROXY_ARP) +#define IN_DEV_PROXY_ARP_PVLAN (in_dev) IN_DEV_CONF_GET(in_dev, PROXY_ARP_PVLAN)#define IN_DEV_SHARED_MEDIA (in_dev) IN_DEV_ORCONF((in_dev), SHARED_MEDIA)#define IN_DEV_TX_REDIRECTS (in_dev) IN_DEV_ORCONF((in_dev), SEND_REDIRECTS)#define IN_DEV_SEC_REDIRECTS (in_dev) IN_DEV_ORCONF((in_dev), \
include/linux/sysctl.h +1 -0
@@ -482,6 +482,7 @@ enumNET_IPV4_CONF_ARP_ACCEPT =21 ,NET_IPV4_CONF_ARP_NOTIFY =22 ,NET_IPV4_CONF_ACCEPT_LOCAL =23 , +NET_IPV4_CONF_PROXY_ARP_PVLAN =24 , __NET_IPV4_CONF_MAX };
net/ipv4/arp.c +48 -4
80 lines not on this page · raw message
net/ipv4/devinet.c +1 -0
@@ -1407,6 +1407,7 @@ static struct devinet_sysctl_table {DEVINET_SYSCTL_RW_ENTRY (ARP_IGNORE ,"arp_ignore" ),DEVINET_SYSCTL_RW_ENTRY (ARP_ACCEPT ,"arp_accept" ),DEVINET_SYSCTL_RW_ENTRY (ARP_NOTIFY ,"arp_notify" ), +DEVINET_SYSCTL_RW_ENTRY (PROXY_ARP_PVLAN ,"proxy_arp_pvlan" ),DEVINET_SYSCTL_FLUSHING_ENTRY (NOXFRM ,"disable_xfrm" ), DEVINET_SYSCTL_FLUSHING_ENTRY(NOPOLICY, "disable_policy"),
net/ipv4/route.c +6 -1
@@ -1988,8 +1988,13 @@ static int __mkroute_input(struct sk_buff *skb,if (skb->protocol !=htons (ETH_P_IP )) {/* Not IP (i.e. ARP). Do not create route, if it is * invalid for proxy arp. DNAT routes are always valid. +* +* Proxy arp feature have been extended to allow, ARP +* replies back to the same interface, to support +* Private VLAN switch technologies. See arp.c. */ -if (out_dev == in_dev) { +if (out_dev == in_dev && +IN_DEV_PROXY_ARP_PVLAN (in_dev) ==0 ) { err = -EINVAL ; goto cleanup; }
Quoted 6 lines · Jesper Dangaard Brouer
This is to be used together with switch technologies, like RFC3069, that where the individual ports are not allowed to communicate with each other, but they are allowed to talk to the upstream router. As described in RFC 3069, it is possible to allow these hosts to communicate through the upstream router by proxy_arp'ing.
Reading RFC 3069, I dont understand why it needs support on hosts themselves.
Quoted 2 lines
This patch basically allow proxy arp replies back to the same interface (from which the ARP request/solicitation was received).
Could you give me an example of how it is used ? Last time I played with proxy arp was 6 years ago :)
Thanks
Quoted 10 lines · Eric Dumazet
Quoted 6 lines · Jesper Dangaard Brouer
This is to be used together with switch technologies, like RFC3069, that where the individual ports are not allowed to communicate with each other, but they are allowed to talk to the upstream router. As described in RFC 3069, it is possible to allow these hosts to communicate through the upstream router by proxy_arp'ing.
Reading RFC 3069, I dont understand why it needs support on hosts themselves.
They don't, this patch does NOT implement support on the hosts (most of the "hosts" in our ISP setup is peoples Windows machines). This is intended only to be used on the router.
Quoted 4 lines
Quoted 2 lines
This patch basically allow proxy arp replies back to the same interface (from which the ARP request/solicitation was received).
Could you give me an example of how it is used ?
Okay, that first requires an understanding of our setup, then how we use it...
As an ISP we use this stuff on our Linux based Internet routers (these boxes are Ethernet Layer 2 connected via VLANs to the Ethernet switches in the customers apartment buildings).
Our primary customers are entire apartment buildings, where we basically establish an Ethernet based network, which all apartments are connected to.
One big Ethernet based network gives a lot of problems with people misbehaving, viruses, broadcast packets and so on. Thus, to solve these issues we shield every customer/ethernet-port from each other, by using RFC 3069 like switch technologies.
This seemed like a good solution, until customers started to run e.g. web-servers on their home PCs. This meant that the entire Internet could browse their homepage, but they could not show it to their neighbor...
This patch solved the issue by doing proxy arp'ing on the router against the "local" network, thus making it possible for customers to communicate, but via the router. This also gives the ability to do firewalling on the router between customers on an Ethernet. (In our solution the Linux router also have a personal firewall configurable per customer.)
It is simply enabled on an interface via e.g.:
echo 1 > /proc/sys/net/ipv4/conf/eth2.1013/proxy_arp_pvlan
Hope that helps your understand the idea and usage :-)
Signature · 7 lines
Med venlig hilsen / Best regards Jesper Brouer ComX Networks A/S Linux Network Kernel Developer Cand. Scient Datalog / MSc.CS Author of http://adsl-optimizer.dk LinkedIn: http://www.linkedin.com/in/brouer
Quoted 7 lines · Jesper Dangaard Brouer
This patch solved the issue by doing proxy arp'ing on the router against the "local" network, thus making it possible for customers to communicate, but via the router. This also gives the ability to do firewalling on the router between customers on an Ethernet. (In our solution the Linux router also have a personal firewall configurable per customer.)
Quoted 6 lines
It is simply enabled on an interface via e.g.:
echo 1 >
/proc/sys/net/ipv4/conf/eth2.1013/proxy_arp_pvlanHope that helps your understand the idea and usage :-)
Excellent, thanks for sharing !
Quoted 42 lines · On Wed, 06 Jan 2010 10:49:29 +0100 Jesper Dangaard Brouer <[email protected]> wrote:
Quoted 10 lines · Eric Dumazet
Quoted 6 lines · Jesper Dangaard Brouer
This is to be used together with switch technologies, like RFC3069, that where the individual ports are not allowed to communicate with each other, but they are allowed to talk to the upstream router. As described in RFC 3069, it is possible to allow these hosts to communicate through the upstream router by proxy_arp'ing.
Reading RFC 3069, I dont understand why it needs support on hosts themselves.
They don't, this patch does NOT implement support on the hosts (most of the "hosts" in our ISP setup is peoples Windows machines). This is intended only to be used on the router.
Quoted 4 lines
Quoted 2 lines
This patch basically allow proxy arp replies back to the same interface (from which the ARP request/solicitation was received).
Could you give me an example of how it is used ?
Okay, that first requires an understanding of our setup, then how we use it...
As an ISP we use this stuff on our Linux based Internet routers (these boxes are Ethernet Layer 2 connected via VLANs to the Ethernet switches in the customers apartment buildings).
Our primary customers are entire apartment buildings, where we basically establish an Ethernet based network, which all apartments are connected to.One big Ethernet based network gives a lot of problems with people misbehaving, viruses, broadcast packets and so on. Thus, to solve these issues we shield every customer/ethernet-port from each other, by using RFC 3069 like switch technologies.
This seemed like a good solution, until customers started to run e.g. web-servers on their home PCs. This meant that the entire Internet could browse their homepage, but they could not show it to their neighbor...
Quoted 7 lines
This patch solved the issue by doing proxy arp'ing on the router against the "local" network, thus making it possible for customers to communicate, but via the router. This also gives the ability to do firewalling on the router between customers on an Ethernet. (In our solution the Linux router also have a personal firewall configurable per customer.)
I can see value in that - you're forcing all traffic through the upstream router for policy enforcement purposes, without having to have point-to-point (simulated or otherwise) links between customers and the router, and avoiding IP address waste by not using /30s. You're pretty much making the ethernet a Non-broadcast Multi-Access link.
Quoted 19 lines
It is simply enabled on an interface via e.g.:
echo 1 >
/proc/sys/net/ipv4/conf/eth2.1013/proxy_arp_pvlanHope that helps your understand the idea and usage :-)
Signature · 12 lines
Med venlig hilsen / Best regards Jesper Brouer ComX Networks A/S Linux Network Kernel Developer Cand. Scient Datalog / MSc.CS Author of http://adsl-optimizer.dk LinkedIn: http://www.linkedin.com/in/brouer -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Mark Smith
Quoted 8 lines · On Wed, 06 Jan 2010 10:49:29 +0100 Jesper Dangaard Brouer <[email protected]> wrote:
This patch solved the issue by doing proxy arp'ing on the router against the "local" network, thus making it possible for customers to communicate, but via the router. This also gives the ability to do firewalling on the router between customers on an Ethernet. (In our solution the Linux router also have a personal firewall configurable per customer.)
Quoted 5 lines
I can see value in that - you're forcing all traffic through the upstream router for policy enforcement purposes, without having to have point-to-point (simulated or otherwise) links between customers and the router, and avoiding IP address waste by not using /30s. You're pretty much making the ethernet a Non-broadcast Multi-Access link.
Yes, its actually a quite nice trick, and several switch vendors have supported this technology for years (although they all annoying call it something differently). And we/ComX have actually also been using this for years, including my patch (sorry for being so slow with upstream submission).
Signature · 7 lines
Med venlig hilsen / Best regards Jesper Brouer ComX Networks A/S Linux Network Kernel Developer Cand. Scient Datalog / MSc.CS Author of http://adsl-optimizer.dk LinkedIn: http://www.linkedin.com/in/brouer
Quoted 18 lines · On Wed, 06 Jan 2010 15:17:22 +0100 Jesper Dangaard Brouer <[email protected]> wrote:
Quoted 11 lines · Mark Smith
Quoted 8 lines · On Wed, 06 Jan 2010 10:49:29 +0100 Jesper Dangaard Brouer <[email protected]> wrote:
This patch solved the issue by doing proxy arp'ing on the router against the "local" network, thus making it possible for customers to communicate, but via the router. This also gives the ability to do firewalling on the router between customers on an Ethernet. (In our solution the Linux router also have a personal firewall configurable per customer.)
Quoted 5 lines
I can see value in that - you're forcing all traffic through the upstream router for policy enforcement purposes, without having to have point-to-point (simulated or otherwise) links between customers and the router, and avoiding IP address waste by not using /30s. You're pretty much making the ethernet a Non-broadcast Multi-Access link.
Quoted 6 lines
Yes, its actually a quite nice trick, and several switch vendors have supported this technology for years (although they all annoying call it something differently). And we/ComX have actually also been using this for years, including my patch (sorry for being so slow with upstream submission).
Do you have any issues with router redundance e.g. VRRP? I can't really think of any, as long as the proxy-arp responses are using the VRRP virtual router address, rather than the actual NIC's address, and the routers can see each other via the switch.
Quoted 13 lines
Signature · 12 lines
Med venlig hilsen / Best regards Jesper Brouer ComX Networks A/S Linux Network Kernel Developer Cand. Scient Datalog / MSc.CS Author of http://adsl-optimizer.dk LinkedIn: http://www.linkedin.com/in/brouer -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Mark Smith
I can see value in that - you're forcing all traffic through the upstream router for policy enforcement purposes, without having to have point-to-point (simulated or otherwise) links between customers and the router, and avoiding IP address waste by not using /30s. You're pretty much making the ethernet a Non-broadcast Multi-Access link.
Similar to what DSLAMs do...
Jan
From: Jesper Dangaard Brouer <[email protected]>
Date: Tue, 05 Jan 2010 16:50:47 +0100
Quoted 12 lines
This is to be used together with switch technologies, like RFC3069, that where the individual ports are not allowed to communicate with each other, but they are allowed to talk to the upstream router. As described in RFC 3069, it is possible to allow these hosts to communicate through the upstream router by proxy_arp'ing.
This patch basically allow proxy arp replies back to the same interface (from which the ARP request/solicitation was received).
Tunable per device via proc "
proxy_arp_pvlan":
/proc/sys/net/ipv4/conf/*/proxy_arp_pvlan
Quoted 7 lines
This switch technology is known by different vendor names:
- In RFC 3069 it is called VLAN Aggregation.
- Cisco and Allied Telesyn call it Private VLAN.
- Hewlett-Packard call it Source-Port filtering or port-isolation.
- Ericsson call it MAC-Forced Forwarding (RFC Draft).Signed-off-by Jesper Dangaard Brouer <[email protected]>
Applied.