A router needs to be sized for the load it is expected to handle. In our campus network, the big 6500's in the middle of the networks are orders of magnitude more powerful than the router that links us to our ISPs. This is because most of our generated traffic is internal oriented. That border device is shoveling around 500Mb/s, but the backplane on our core routers are handling well above that, and multiple VLANs as well.
Concurrency isn't a terribly big issues so long as the router is just routing packets. Even small routers can handle terribly high concurrency rates. Internal tables are kept for routing, which networks are available on what interfaces, and the ARP table, which hardware devices are visible to each interface. The big 6500's at our core have ARP-tables around 10K in size, where the ISP border router is probably closer to 30 entries.
Once a router starts having to maintain connection-state for either firewall or NAT duties, that greatly increases the CPU and memory requirements for a router. Small home-routers doing FW/NAT can only go so far before the NAT table gets exhausted. Behind our border router is a Cisco ASA firewall, and that DOES have to handle all of our incoming and outgoing connections in memory. I don't know what the average connection-count is, but we're able to consistently do around 450Mb/s with simple web-browsing traffic so it has to be very high.
If we had a second firewall surrounding our server subnets specifically, that firewall wouldn't have to be as beefy as the one at our gateway. The Gateway firewall has to monitor all traffic to the server subnets as well as traffic leaving from all of the internal LANs with end-user generated outgoing connections.
The first thing that should be mentioned about IPv6 subnetting is that a different mode of thought is called for. In IPv4 you usually think about how many addresses you have available and how you can allocate enough of them to each end user. In IPv6 you usually think about how many /64
-subnets you have available and how you can allocate them to end users. You almost never worry about how many IP addresses will be used in a given subnet. Except for some special cases like point to point links, each subnet just simply has far more addresses available than it will ever require, so instead you worry only about allocating subnets, not hosts inside them.
IPv6 subnets are usually /64
because that is required in order for SLAAC (stateless address auto-configuration) to work. Even where SLAAC is not in use, there may be other reasons to use /64
. For example, there might be some end user devices out there that just assume /64
, or else routing subnets narrower than /64
might be inefficient on some routers because the router implementer has optimized the case of /64
or wider routes in order to save routing table memory.
Why is it recommended to use /127
for point to point links?
For the specific case of point-to-point links, /127
is recommended instead of /64
in order to avoid a vulnerability where packets addressed to any one of the quadrillions of unused addresses on the subnet cause unwanted neighbour solicitation requests and table entries that could drown a router. Such misaddressed packets may be malicious or accidental. But even if you actually configure a point-to-point link as /127
, some people advocate assigning a whole /64
anyway just to be consistent.
Why would virtual machines be provisioned with subnets narrower than /64
?
I don't know specifically why virtual machines would be provisioned with subnets narrower than /64
. Perhaps because a hosting provider assumed that a server was like an end-user and required only a single /64
subnet, not anticipating that the server would actually be a collection of VMs requiring an internal routing topology? It could be done also simply as a matter of making the addressing plan easier to memorize: the host gets PREFIX::/64
, then each VM gets PREFIX:0:NNNN::/96
where NNNN is unique to the VM and the VM can allocate PREFIX:0:NNNN:XXXX:YYYY
as it pleases.
Can I map directly from IPv4 subnets to IPv6 subnets? For instance, does an IPv4 /24
correspond directly to an IPv6 /56
or /120
?
From a low-level perspective of how addressing and routing works, the prefix length has the same meaning in IPv6 and IPv4. On that level, you can make an analogy such as "an IPv4 /16
uses half the bits for the network address and half the bits for the host address, that's like a /64
in IPv6". But this comparison is not really apt. Strong conventions have emerged in IPv6 which make the divisions of network sizes look somewhat more like the old world of classful networks in IPv4. To be sure, IPv6 didn't reintroduce classful addressing in which the most significant few bits of the address force a particular netmask, but what IPv6 does have is certain [de facto/conventional] standard network sizes:
/64
: the basic size of a single subnet: LAN, WAN, block of addresses for web virtual hosts, etc... "Normal" subnets are never expected to be any narrower (longer prefix) than /64
. No subnets are ever expected to be wider (shorter prefix) than /64
since a /64
's worth of host addresses is much more than we can imagine needing.
/56
: a block of 256
basic subnets. Even though current policies permit ISPs to hand out blocks as large as /48
to every end user and still consider their address utilisation well justified, some ISPs may (and already do) choose to allocate a /56
to consumer-grade customers as a compromise between allocation lots of subnets for them and address economy.
/48
: a block of 65536
basic subnets and the recommended size of block that every ISP customer end site should receive.
/32
: the default size of block that most ISPs will receive each time they request more addresses from a regional address registry.
Inside service provider and enterprise networks, many more prefix lengths than these 4 can be seen. When looking at the routing tables of routers inside these networks, IPv4 and IPv6 have much in common including most of the way routing works: routes for longer prefixes override covering routes for shorter prefixes, so it is possible to aggregate (make shorter) and drill down (make longer) routes. Like in IPv4, routes can be aggregated or summarized to larger blocks with shorter prefixes in order to minimize the size of routing tables.
A different question of mapping between IPv4 and IPv6 would be how to harmonize IPv4 and IPv6 assignments on dual-stack machines so that addressing plans can be readily understood. Far that, there are certainly conventions in common use to do this: embed the IPv4 "subnet number" into a portion of the IPv6 prefix, either with BCD (e.g. 10.0.234.0/24
becomes 2001:db8:abcd:234::/64
) or binary (10.0.234.0/24
becomes 2001:db8:abcd:ea::/64
).
My interfaces have several IPv6 addresses. Must the subnet be the same for all of them?
Absolutely not! IPv6 hosts are expected to be able to be multihomed by having several IP addresses simultaneously that come from different subnets, just like IPv4. If they are autoconfigured with SLAAC then the different subnets might have come from router advertisements from different routers.
Why do I sometimes see a % rather than a / in an IPv6 address and what does it mean?
You would not see one instead of the other. They have different meanings. A slash denotes a prefix (subnet), meaning a block of addresses that all start with the same n
bits. An address without a slash is a host address. You may think of such an address as having an implied /128
at the end, meaning all 128 bits are specified.
The percent sign accompanies a link-local address. In IPv6, every interface has a link-local address in addition to any other IP addresses it might have. But the thing is, link-local addresses are always, without exception, in the fe80::/10
block. But if we attempt to talk to a peer using a link local address and the local host has multiple interfaces, how are we to know which interface to use to talk to this peer? Normally the routing table tells us which interface to use for a particular prefix, but here it will tell us than fe80::/10
is reachable via every interface.
The answer is that we must tell it which interface to use using the syntax address%interface
. For example, fe80::1234:5678:8765:4321%eth0
.
Am I wasting too many subnets? Aren't we just going to run out again?
Nobody knows. Who can tell the future?
But consider this. In IPv6 the number of available subnets is the square of the number of available individual addresses in IPv4. That's really quite a lot. No, I mean really quite a lot!
But still: we are automatically handing out a /32
to any ISP who requests one, we are handing out a /48
to every single ISP customer. Perhaps we're exaggerating and we will squander IPv6 after all. But there is a provision for this: Only one eighth of the IPv6 space has been made available for use so far: 2000::/3
. The idea is that if we make a horrible mess of the first eighth and we have to drastically revise the liberal allocation policies, we get to try 7 more times before we're in trouble.
And finally: IPv6 doesn't have to last forever. Perhaps it will have a longer lifetime than IPv4 (an impressive lifetime already and it's not over) but like every technology it will someday stop mattering. We only need to make it until then.
Best Answer
With all due respect, Paula Bean's answer is wrong.
client 1 does know whether or not client 2 is on the same subnet (layer 3). It doesn't know or care whether it's on a wireless or wired network (layers 1 and 2). It only knows and cares whether it's on the same subnet. Data meant for hosts on the same subnet is sent directly to those hosts, whether they're on a wired or wireless connection, no routing takes place, so the router does not replace the sender's MAC address with it's own MAC address and forward the data from client 1 to client 2. In fact, the routing function of the wireless router is not called in to play at all in this scenario as the data doesn't need to be routed because it's local to the same subnet. The wireless network is merely the physical medium on which the data is sent/recieved but it works like any other network at layers 1, 2, and 3. Data meant for hosts not on the same subnet operate as in scenario A, data meant for hosts on the same subnet operate as in scenario B.
EDIT:
Here's the layer 2 information for a network capture of a wireless client (Client 2) pinging a wired client (Client 1) on my home network. You'll see that the MAC address of the packet from the wireless client (SourceAddress) is the MAC address of the wireless NIC, not the MAC address of the wireless router.
Client 1:
Ethernet adapter Local Area Connection:
Physical Address. . . . . . . . . : 00-21-9B-06-71-B5
Client 2:
Wireless LAN adapter Wireless Network Connection:
Physical Address. . . . . . . . . : 00-22-5F-B0-5E-66
Network Capture:
Ethernet: Etype = Internet IP (IPv4),DestinationAddress:[00-21-9B-06-71-B5],SourceAddress:[00-22-5F-B0-5E-66]
So as you see, because both clients are local to the same subnet, no routing takes place and the packets from the wireless client are sent directly to the wired client and the wireless router performs no routing and no MAC address replacement, and acts soley as the physical medium for intra-subnet communication.
EDIT:
When dealing with intra-subnet traffic the wireless router acts as a layer 2 device (switch). When dealing with inter-subnet traffic the wireless router acts as a layers 3 device (router).