Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 965e33040dd61030a94f0eb89877aee8 > files > 3247

howto-html-en-20080722-2mdv2010.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Prefix lengths for routing</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux IPv6 HOWTO (en)"
HREF="index.html"><LINK
REL="UP"
TITLE="Address types"
HREF="chapter-addresstypes.html"><LINK
REL="PREVIOUS"
TITLE="Address types (host part)"
HREF="x658.html"><LINK
REL="NEXT"
TITLE="IPv6-ready system check"
HREF="chapter-systemcheck.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux IPv6 HOWTO (en)</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x658.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Address types</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="chapter-systemcheck.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN683"
></A
>3.4. Prefix lengths for routing</H1
><P
>In the early design phase it was planned to use a fully hierarchical routing approach to reduce the size of the routing tables maximally. The reasons behind this approach were the number of current IPv4 routing entries in core routers (&#62; 104 thousand in May 2001), reducing the need of memory in hardware routers (ASIC &#8220;Application Specified Integrated Circuit&#8221; driven) to hold the routing table and increase speed (fewer entries hopefully result in faster lookups).</P
><P
>Todays view is that routing will be mostly hierarchically designed for networks with only one service provider. With more than one ISP connections, this is not possible, and subject to an issue named multi-homing (infos on multi-homing: <A
HREF="http://www.ietf.org/ids.by.wg/multi6.html"
TARGET="_top"
>drafts-ietf-multi6-*</A
>,<A
HREF="http://arneill-py.sacramento.ca.us/ipv6mh/"
TARGET="_top"
>IPv6 Multihoming Solutions</A
>).</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN689"
></A
>3.4.1. Prefix lengths (also known as "netmasks")</H2
><P
>Similar to IPv4, the routable network path for routing to take place. Because standard netmask notation for 128 bits doesn't look nice, designers employed the IPv4 Classless Inter Domain Routing (CIDR, <A
HREF="http://www.faqs.org/rfcs/rfc1519.html"
TARGET="_top"
>RFC 1519 / Classless Inter-Domain Routing</A
>) scheme, which specifies the number of bits of the IP address to be used for routing. It is also called the "slash" notation.</P
><P
>An example: </P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>2001:0db8:100:1:2:3:4:5/48</PRE
></FONT
></TD
></TR
></TABLE
><P
>This notation will be expanded:</P
><P
></P
><UL
><LI
><P
>Network: </P
></LI
></UL
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>2001:0db8:0100:0000:0000:0000:0000:0000</PRE
></FONT
></TD
></TR
></TABLE
><P
></P
><UL
><LI
><P
>Netmask: </P
></LI
></UL
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>ffff:ffff:ffff:0000:0000:0000:0000:0000</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN704"
></A
>3.4.2. Matching a route</H2
><P
>Under normal circumstances (no QoS), a lookup in a routing table results in the route with the most significant number of address bits being selected. In other words, the route with the biggest prefix length matches first.</P
><P
>For example if a routing table shows following entries (list is not complete):</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>2001:0db8:100::/48     ::            U  1 0 0 sit1 
2000::/3               ::192.88.99.1 UG 1 0 0 tun6to4</PRE
></FONT
></TD
></TR
></TABLE
><P
>Shown destination addresses of IPv6 packets will be routed through shown device</P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>2001:0db8:100:1:2:3:4:5/48  -&#62;  routed through device sit1
2001:0db8:200:1:2:3:4:5/48  -&#62;  routed through device tun6to4</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x658.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="chapter-systemcheck.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Address types (host part)</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="chapter-addresstypes.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>IPv6-ready system check</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>