Академический Документы
Профессиональный Документы
Культура Документы
| VyattaSystem
BasicRouting
REFERENCEGUIDE
ForwardingandRouting
StaticRoutes
Vyatta
Suite200
1301ShorewayRoad
Belmont,CA94002
vyatta.com
6504137200
1888VYATTA1(USandCanada)
COPYRIGHT
Copyright20052011Vyatta,Inc.Allrightsreserved.
Vyattareservestherighttomakechangestosoftware,hardware,anddocumentationwithoutnotice.Forthemostrecentversionof
documentation,visittheVyattawebsiteatvyatta.com.
PROPRIETARYNOTICES
VyattaisaregisteredtrademarkofVyatta,Inc.
VMware,VMwareESX,andVMwareserveraretrademarksofVMware,Inc.
XenServer,andXenCenteraretrademarksofCitrixSystems,Inc.
Allothertrademarksarethepropertyoftheirrespectiveowners.
RELEASEDATE:July2011
DOCUMENTREVISION.R6.3v01
RELEASEDWITH:R6.3.0
PARTNO.A00215100011
iii
TableofContents
QuickReferencetoCommands......................................................................v
QuickListofExamples.............................................................................vi
Preface.........................................................................................viii
IntendedAudience.......................................................................................... ix
OrganizationofThisGuide .................................................................................... ix
DocumentConventions ....................................................................................... x
VyattaPublications .......................................................................................... xi
iv
showipv6routeforward.................................................................................26
showipv6routekernel...................................................................................27
showipv6routeripng ...................................................................................28
showipv6routestatic ...................................................................................29
showipv6routesummary ................................................................................30
showtable .............................................................................................31
Chapter2 StaticRoutes.......................................................................... 32
StaticRouteConfiguration ....................................................................................33
StaticRoutesOverview ..................................................................................33
ConfiguringStaticRoutes.................................................................................33
FloatingStaticRoutes....................................................................................34
ShowingStaticRoutesintheRoutingTable ..................................................................35
StaticIPv6RouteConfiguration ................................................................................35
VerifyThatIPv6ForwardingisEnabled .....................................................................36
AddtheDefaultIPv6Route...............................................................................37
AddaStaticIPv6Route ..................................................................................38
ConfirmConnectivity....................................................................................38
StaticRouteCommands ......................................................................................40
protocolsstaticinterfaceroute<subnet>nexthopinterface<interface>.........................................41
protocolsstaticinterfaceroute6<subnet>nexthopinterface<ethx> ...........................................43
protocolsstaticroute<subnet>blackhole ...................................................................45
protocolsstaticroute<subnet>nexthop<address>..........................................................47
protocolsstaticroute6<subnet>blackhole ..................................................................49
protocolsstaticroute6<subnet>nexthop<address>.........................................................51
GlossaryofAcronyms............................................................................. 53
BasicRouting
R6.3v01
Vyatta
QuickReferencetoCommands
vi
QuickListofExamples
Use this list to help you locate examples youd like to try or look at.
Example11 DisplayingIPforwardingstatus .....................................................................8
Example12 DisplayingroutesintheRIBandFIB .................................................................9
Example13 Displayingroutinginformationaboutaspecificaddress................................................10
Example14 Displayingrouteswithlongerprefixes ..............................................................11
Example15 Listingroutesinthekernelroutecache .............................................................12
Example16 Displayinginformationaboutarouteinthekernelroutecache .........................................13
Example17 Displayingconnectedroutes ......................................................................14
Example18 DisplayingroutesintheFIB .......................................................................15
Example19 DisplayinginformationaboutarouteintheFIB.......................................................16
Example110 Displayingkernelroutes .........................................................................17
Example111 Displayingstaticroutes..........................................................................18
Example112 Displayingasummaryofroutes...................................................................19
Example113 Displayingsupernetroutes.......................................................................20
Example114 showipv6routesummary:DisplayingasummaryofIPv6routes......................................30
Example115 Displayingtheroutingtable ......................................................................31
Example21 Creatingastaticroute...........................................................................34
Example23 DetermineifforwardingisenabledonR1 ...........................................................36
Example24 EnableforwardingonR1 .........................................................................36
Example25 AddthedefaultrouteonR4......................................................................37
Example26 AddastaticrouteonR2 .........................................................................38
Example27 ConfirmconnectivitybetweenR2andR4 ...........................................................38
Example28 ConfirmconnectivitybetweenR2andR4viaR1......................................................39
BasicRouting
vii
R6.3v01
Vyatta
viii
Preface
This document presents information about forwarding and routing on the Vyatta
system.
This preface provides information about using this guide. The following topics are
presented:
BasicRouting
Intended Audience
Document Conventions
Vyatta Publications
R6.3v01
Vyatta
IntendedAudience ix
IntendedAudience
This guide is intended for experienced system and network administrators.
Depending on the functionality to be used, readers should have specific knowledge
in the following areas:
TCP/IP protocols
Routing protocols
Network administration
Network security
IP services
OrganizationofThisGuide
This guide has the following aid to help you find the information you are looking for:
Description
Page
Chapter 1:ForwardingandRouting
Thischapterdescribescommandsfor
forwardingandbasicrouting.
Chapter 2:StaticRoutes
Thischapterexplainshowtosetstaticroutes
usingtheVyattasystem.
32
GlossaryofAcronyms
BasicRouting
53
R6.3v01
Vyatta
DocumentConventions x
DocumentConventions
This guide uses the following advisory paragraphs, as follows.
WARNINGWarningsalertyoutosituationsthatmayposeathreattopersonalsafety.
CAUTIONCautionsalertyoutosituationsthatmightcauseharmtoyoursystemordamageto
equipment,orthatmayaffectservice.
NOTENotesprovideinformationyoumightneedtoavoidproblemsorconfigurationerrors.
boldMonospace
bold
BasicRouting
italics
<key>
[ key1 | key2]
num1numN
arg1..argN
arg[ arg...]
arg[,arg...]
R6.3v01
Vyatta
VyattaPublications xi
VyattaPublications
Full product documentation is provided in the Vyatta technical library. To see what
documentation is available for your release, see the Guide to Vyatta Documentation.
This guide is posted with every release of Vyatta software and provides a great
starting point for finding the information you need.
Additional information is available on www.vyatta.com and www.vyatta.org.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 2
ForwardingandRoutingCommands
This chapter contains the following commands.
ConfigurationCommands
None
OperationalCommands
clearipprefixlist
Clearsprefixliststatisticsorstatus.
cleariproutecache
Flushesthekernelroutecache.
clearipv6prefixlist
Clearsprefixliststatisticsorstatus.
clearipv6routecache
FlushesthekernelIPv6routecache.
showipforwarding
DisplaysIPforwardingstatus.
showiproute
DisplaysroutesstoredintheRIBandFIB.
showiproute<ipv4net>longerprefixes
Displaysprefixeslongerthanaspecifiedprefix.
showiproutecache
Displaysthekernelroutecache.
showiprouteconnected
Displaysdirectlyconnectedroutes.
showiprouteforward
DisplaysroutesstoredintheFIB.
showiproutestatic
Displaysstaticroutes.
showiproutekernel
Displayskernelroutes.
showiproutesummary
Displaysroutessummary.
showiproutesupernetsonly
Displayssupernetroutes.
showipv6route
DisplaysIPv6routesstoredintheRIBandFIB.
showipv6route<ipv6net>longerprefixes
DisplaysIPv6prefixeslongerthanaspecifiedprefix.
showipv6routebgp
DisplaysIPv6BGProutes.
showipv6routecache
DisplaysthekernelIPv6routecache.
showipv6routeconnected
DisplaysIPv6connectedroutes.
showipv6routeforward
DisplaysIPv6routesstoredintheFIB.
showipv6routekernel
DisplaysIPv6kernelroutes.
showipv6routeripng
DisplaysIPv6RIPngroutes.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 3
showipv6routestatic
DisplaysIPv6staticroutes.
showipv6routesummary
DisplaysIPv6routessummary.
showtable
Displaysthesystemsroutingtable.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 4
clearipprefixlist
Clears prefix list statistics or status.
Syntax
clear ip prefix-list [list-name [ipv4net]]
CommandMode
Operational mode.
Parameters
list-name
ipv4net
Default
Statistics for all prefix-lists are cleared.
UsageGuidelines
Use this command to clear prefix list statistics or status.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 5
cleariproutecache
Flushes the kernel route cache.
Syntax
clear ip route cache [ipv4net]
CommandMode
Operational mode.
Parameters
ipv4net
Default
Flushes the entire route cache.
UsageGuidelines
Use this command to flush the kernel route cache or a flush a specific route from the
cache.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 6
clearipv6prefixlist
Clears prefix list statistics or status.
Syntax
clear ipv6 prefix-list [list-name [ipv6net]]
CommandMode
Operational mode.
Parameters
list-name
ipv6net
Default
Statistics for all prefix-lists are cleared.
UsageGuidelines
Use this command to clear prefix list statistics or status.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 7
clearipv6routecache
Flushes the kernel IPv6 route cache.
Syntax
clear ipv6 route cache [ipv6net]
CommandMode
Operational mode.
Parameters
ipv6net
Optional. Flushes the specified route from the kernel IPv6 route
cache.
Default
Flushes the entire IPv6 route cache.
UsageGuidelines
Use this command to flush the kernel IPv6 route cache or a flush a specific route from
the cache.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 8
showipforwarding
Displays IP forwarding status.
Syntax
show ip forwarding
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display the current IP forwarding status.
Examples
Example 1-1 shows how to display the status of IP forwarding.
Example11DisplayingIPforwardingstatus
vyatta@vyatta:~$showipforwarding
IPforwardingison
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 9
showiproute
Displays routes stored in the RIB and FIB.
Syntax
show ip route [ipv4 | ipv4net]
CommandMode
Operational mode.
Parameters
ipv4
ipv4net
Default
Lists all routes in the RIB and FIB.
UsageGuidelines
Use this command to display active prefixes stored in the Routing Information Base
(RIB), as well as those stored in the Forwarding Information Base (FIB).
The routes shown in the FIB can also be seen using show ip route forward command.
Examples
Example 1-2 shows how to display routes in the RIB and FIB
Example12DisplayingroutesintheRIBandFIB
vyatta@vyatta:~$showiproute
Codes:Kkernelroute,Cconnected,Sstatic,RRIP,OOSPF,
IISIS,BBGP,>selectedroute,*FIBroute
S>*0.0.0.0/0[1/0]via10.1.0.1,eth0
O10.1.0.0/24[110/10]isdirectlyconnected,eth0,05:35:15
C>*10.1.0.0/24isdirectlyconnected,eth0
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 10
O>*10.192.32.0/24[110/20]via10.1.0.45,eth0,05:35:15
O>*10.192.128.0/24[110/11]via10.1.0.66,eth0,05:35:15
O>*10.192.128.1/32[110/11]via10.1.0.66,eth0,05:35:15
O>*10.192.129.0/24[110/11]via10.1.0.66,eth0,05:35:15
O>*10.192.130.0/24[110/11]via10.1.0.66,eth0,05:35:15
O>*10.192.131.0/24[110/11]via10.1.0.66,eth0,05:35:15
C>*127.0.0.0/8isdirectlyconnected,lo
O>*172.16.0.0/24[110/11]via10.1.0.4,eth0,05:35:15
O>*172.16.1.0/24[110/11]via10.1.0.4,eth0,05:35:15
O>*172.16.2.0/24[110/11]via10.1.0.4,eth0,05:35:15
O>*172.16.3.0/24[110/11]via10.1.0.4,eth0,05:35:15
O>*172.16.4.0/24[110/11]via10.1.0.4,eth0,05:35:15
O>*172.16.5.0/24[110/11]via10.1.0.4,eth0,05:35:15
O>*172.16.6.0/24[110/11]via10.1.0.4,eth0,05:35:15
O>*172.16.7.0/24[110/11]via10.1.0.4,eth0,05:35:15
O>*172.16.8.0/24[110/11]via10.1.0.4,eth0,05:35:15
O>*172.16.9.0/24[110/11]via10.1.0.4,eth0,05:35:15
C>*172.16.234.0/25isdirectlyconnected,eth1
S>*192.94.202.0/24[1/0]via172.16.234.27,eth1
vyatta@vyatta:~$
Example 1-3 shows information how to display information for the route to address
10.192.128.1.
Example13Displayingroutinginformationaboutaspecificaddress
vyatta@vyatta:~$showiproute10.192.128.1
Routingentryfor10.192.128.1/32
Knownvia"ospf",distance110,metric11,best
Lastupdate09:47:07ago
*10.1.0.66,viaeth0
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 11
showiproute<ipv4net>longerprefixes
Displays prefixes longer than a specified prefix.
Syntax
show ip route ipv4net longer-prefixes
CommandMode
Operational mode.
Parameters
ipv4net
Default
None.
UsageGuidelines
Use this command to display all prefixes in the Routing Information Base (RIB) that
are longer than a given IP address or prefix.
Examples
Example 1-4 shows how to list prefixes longer than the prefix 10.192.128.0/24.
Example14Displayingrouteswithlongerprefixes
vyatta@vyatta:~$showiproute10.192.128.0/24longerprefixes
Codes:Kkernelroute,Cconnected,Sstatic,RRIP,OOSPF,
IISIS,BBGP,>selectedroute,*FIBroute
O>*10.192.128.0/24[110/11]via10.1.0.66,eth0,09:36:20
O>*10.192.128.1/32[110/11]via10.1.0.66,eth0,09:36:20
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 12
showiproutecache
Displays the kernel route cache.
Syntax
show ip route cache [ipv4net]
CommandMode
Operational mode.
Parameters
ipv4net
Default
Lists routes in the kernel route cache.
UsageGuidelines
Use this command to display information about routes stored in the kernel route
cache. The route cache contains all paths currently in use by the cache. Multiple
equal-cost paths are necessary before equal-cost-multi-path (ECMP) routing can be
performed.
Examples
Example 1-5 shows how to list routes in the kernel route cache.
Example15Listingroutesinthekernelroutecache
vyatta@vyatta:~$showiproutecache
local10.1.0.62from10.1.0.1devlosrc10.1.0.62
cache<local,srcdirect>users1age42seciifeth0
multicast224.0.0.5from10.1.0.45devlosrc10.1.0.62
cache<local,mc>users1used8age5seciifeth0
local10.1.0.62from69.59.150.131devlosrc10.1.0.62
cache<local>users1used3age47seciifeth0
10.1.0.1from10.1.0.62deveth0
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 13
cacheusers1age42secmtu1500advmss1460hoplimit64
10.0.0.30from10.1.0.62toslowdelayvia10.1.0.1deveth0
cacheusers2age0secmtu1500advmss1460hoplimit64
multicast224.0.0.5from10.1.0.56devlosrc10.1.0.62
cache<local,mc>users1used8age8seciifeth0
multicast224.0.0.5from10.1.0.66devlosrc10.1.0.62
cache<local,mc>users1used8age0seciifeth0
multicast224.0.0.6deveth0src10.1.0.62
cache<mc>users1age21secmtu1500advmss1460hoplimit64
multicast224.0.0.5from10.1.0.4devlosrc10.1.0.62
cache<local,mc>users1used9age1seciifeth0
69.59.150.131via10.1.0.1deveth0src10.1.0.62
cacheusers1age47secmtu1500advmss1460hoplimit64
multicast224.0.0.5deveth0src10.1.0.62
cache<local,mc>users1used8age5secmtu1500advmss1460hoplimit
64
69.59.150.131from10.1.0.62via10.1.0.1deveth0
cacheusers1used1age47secmtu1500advmss1460hoplimit64
local10.1.0.62from10.0.0.30toslowdelaydevlosrc10.1.0.62
cache<local>users1used1age0seciifeth0
vyatta@vyatta:~$
Example 1-6 shows how to display information about route 10.1.0.62 in the kernel
route cache.
Example16Displayinginformationaboutarouteinthekernelroutecache
vyatta@vyatta:~$showiproutecache10.1.0.62
local10.1.0.62from10.1.0.1devlosrc10.1.0.62
cache<local,srcdirect>users1used3age9seciifeth0
local10.1.0.62from69.59.150.131devlosrc10.1.0.62
cache<local>users1used7age102seciifeth0
local10.1.0.62from10.0.0.30toslowdelaydevlosrc10.1.0.62
cache<local>users1used33iifeth0
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 14
showiprouteconnected
Displays directly connected routes.
Syntax
show ip route connected
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display routes directly connected to the local system.
Examples
Example 1-7 shows how to list directly connected routes.
Example17Displayingconnectedroutes
vyatta@vyatta:~$showiprouteconnected
Codes:Kkernelroute,Cconnected,Sstatic,RRIP,OOSPF,
IISIS,BBGP,>selectedroute,*FIBroute
C>*10.1.0.0/24isdirectlyconnected,eth0
C>*127.0.0.0/8isdirectlyconnected,lo
C>*172.16.234.0/25isdirectlyconnected,eth1
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 15
showiprouteforward
Displays routes stored in the FIB.
Syntax
show ip route forward [ipv4net]
CommandMode
Operational mode.
Parameters
ipv4net
Default
Lists routes in the FIB.
UsageGuidelines
Use this command to display the FIB.
The FIB contains multiple equal-cost paths if existed. Multiple equal-cost paths are
necessary before equal-cost multi-path (ECMP) routing or WAN load balancing can
be performed.
Examples
Example 1-8 shows how to display routes recorded in the FIB.
Example18DisplayingroutesintheFIB
vyatta@vyatta:~$showiprouteforward
defaultvia10.1.0.1deveth0protozebra
10.1.0.0/24deveth0protokernelscopelinksrc10.1.0.62
10.192.32.0/24via10.1.0.45deveth0protozebrametric20
10.192.128.0/24via10.1.0.66deveth0protozebrametric11
10.192.128.1via10.1.0.66deveth0protozebrametric11
10.192.129.0/24via10.1.0.66deveth0protozebrametric11
10.192.130.0/24via10.1.0.66deveth0protozebrametric11
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 16
10.192.131.0/24via10.1.0.66deveth0protozebrametric11
172.16.0.0/24via10.1.0.4deveth0protozebrametric11
172.16.1.0/24via10.1.0.4deveth0protozebrametric11
172.16.2.0/24via10.1.0.4deveth0protozebrametric11
172.16.3.0/24via10.1.0.4deveth0protozebrametric11
172.16.4.0/24via10.1.0.4deveth0protozebrametric11
172.16.5.0/24via10.1.0.4deveth0protozebrametric11
172.16.6.0/24via10.1.0.4deveth0protozebrametric11
172.16.7.0/24via10.1.0.4deveth0protozebrametric11
172.16.8.0/24via10.1.0.4deveth0protozebrametric11
172.16.9.0/24via10.1.0.4deveth0protozebrametric11
172.16.234.0/25deveth1protokernelscopelinksrc172.16.234.23
192.94.202.0/24via172.16.234.27deveth1protozebra
vyatta@vyatta:~$
Example 1-9 shows how to display information from the FIB about route
10.1.0.0/24.
Example19DisplayinginformationaboutarouteintheFIB
vyatta@vyatta:~$showiprouteforward10.1.0.0/24
10.1.0.0/24deveth0protokernelscopelinksrc10.1.0.62
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 17
showiproutekernel
Displays kernel routes.
Syntax
show ip route kernel
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display kernel routes. Kernel routes are routes that have been
added through means other than by using the Vyatta CLI; for example by using the
operating system route command, as in the following:
routeaddnet10.172.24.0netmask255.255.255.0gw10.1.0.1
Examples
Example 1-10 shows how to display kernel routes.
Example110Displayingkernelroutes
vyatta@vyatta:~$showiproutekernel
Codes:Kkernelroute,Cconnected,Sstatic,RRIP,OOSPF,
IISIS,BBGP,>selectedroute,*FIBroute
K>*10.172.24.0/24via10.1.0.1,eth0
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 18
showiproutestatic
Displays static routes.
Syntax
show ip route static
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display static routes in the Routing Information Base (RIB).
Examples
Example 1-11 shows how to list static routes.
Example111Displayingstaticroutes
vyatta@vyatta:~$showiproutestatic
Codes:Kkernelroute,Cconnected,Sstatic,RRIP,OOSPF,
IISIS,BBGP,>selectedroute,*FIBroute
S>*0.0.0.0/0[1/0]via10.1.0.1,eth0
S>*192.94.202.0/24[1/0]via172.16.234.27,eth1
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 19
showiproutesummary
Displays routes summary.
Syntax
show ip route summary
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display a summary of the various routes by route source.
Examples
Example 1-12 shows how to display a summary of routes.
Example112Displayingasummaryofroutes
vyatta@vyatta:~$showiproutesummary
RouteSourceRoutesFIB
connected44
static22
ospf10
ebgp00
ibgp289016289011
Totals289023289017
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 20
showiproutesupernetsonly
Displays supernet routes.
Syntax
show ip route supernets-only
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display supernet routes.
Supernet routes are routes that have a subnet mask thatis less specific than the
natural classful mask.
Examples
Example 1-13 shows how to list supernet routes.
Example113Displayingsupernetroutes
vyatta@vyatta:~$showiproutesupernetsonly
Codes:Kkernelroute,Cconnected,Sstatic,RRIP,OOSPF,
IISIS,BBGP,>selectedroute,*FIBroute
S>*0.0.0.0/0[1/0]via10.1.0.1,eth0
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 21
showipv6route
Displays IPv6 routes stored in the RIB and FIB.
Syntax
show ipv6 route [ipv6 | ipv6net]
CommandMode
Operational mode.
Parameters
ipv6
ipv6net
Default
Lists all IPv6 routes in the RIB and FIB.
UsageGuidelines
Use this command to display active IPv6 prefixes stored in the Routing Information
Base (RIB), as well as those stored in the Forwarding Information Base (FIB).
The routes shown in the FIB can also be seen using show ip route forward command.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 22
showipv6route<ipv6net>longerprefixes
Displays IPv6 prefixes longer than a specified prefix.
Syntax
show ipv6 route ipv6net longer-prefixes
CommandMode
Operational mode.
Parameters
ipv6net
Default
None.
UsageGuidelines
Use this command to display all prefixes in the Routing Information Base (RIB) that
are longer than a given IPv6 address or prefix.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 23
showipv6routebgp
Displays IPv6 BGP routes.
Syntax
show ipv6 route bgp
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display IPv6 BGP routes.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 24
showipv6routecache
Displays the kernel IPv6 route cache.
Syntax
show ipv6 route cache [ipv6net]
CommandMode
Operational mode.
Parameters
ipv6net
Default
Lists routes in the kernel IPv6 route cache.
UsageGuidelines
Use this command to display information about routes stored in the kernel IPv6
route cache. The route cache contains all paths currently in use by the cache.
Multiple equal-cost paths are necessary before equal-cost-multi-path (ECMP)
routing can be performed.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 25
showipv6routeconnected
Displays IPv6 connected routes.
Syntax
show ipv6 route connected
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display IPv6 routes directly connected to the local system.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 26
showipv6routeforward
Displays IPv6 routes stored in the FIB.
Syntax
show ipv6 route forward [ipv6net]
CommandMode
Operational mode.
Parameters
ipv6net
Default
Lists IPv6 routes in the FIB.
UsageGuidelines
Use this command to display the FIB.
The FIB contains multiple equal-cost paths if existed. Multiple equal-cost paths are
necessary before equal-cost multi-path (ECMP) routing or WAN load balancing can
be performed.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 27
showipv6routekernel
Displays IPv6 kernel routes.
Syntax
show ipv6 route kernel
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display IPv6 kernel routes. Kernel routes are routes that have
been added through means other than by using the Vyatta CLI.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 28
showipv6routeripng
Displays IPv6 RIPng routes.
Syntax
show ipv6 route ripng
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display IPv6 RIPng routes.
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 29
showipv6routestatic
Displays IPv6 static routes.
Syntax
show ipv6 route static
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display IPv6 static routes in the Routing Information Base
(RIB).
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 30
showipv6routesummary
Displays IPv6 routes summary.
Syntax
show ipv6 route summary
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display a summary of the various IPv6 routes by route source.
Examples
Example 1-14 shows a summary of IPv6 routes.
Example114showipv6routesummary:DisplayingasummaryofIPv6routes
vyatta@vyatta:~$showipv6routesummary
RouteSourceRoutesFIB
connected44
static22
Totals
6
6
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
Chapter1:ForwardingandRouting
ForwardingandRoutingCommands 31
showtable
Displays the systems routing table.
Syntax
show table
CommandMode
Operational mode.
Parameters
None.
Default
None.
UsageGuidelines
Use this command to display the systems routing table.
Examples
Example 1-15 shows how to display the routing table.
Example115Displayingtheroutingtable
vyatta@vyatta:~$showtable
table0
vyatta@vyatta:~$
BasicRouting
R6.3v01
Vyatta
32
Chapter2:StaticRoutes
This chapter explains how to set static routes using the Vyatta system.
This chapter presents the following topics:
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteConfiguration 33
StaticRouteConfiguration
This section presents the following topics:
StaticRoutesOverview
A static route is a manually configured route, which, in general, cannot be updated
dynamically from information the Vyatta system learns about the network topology.
However, if a link fails, the router will remove routes, including static routes, from
the Routing Information Base (RIB) that used this interface to reach the next hop.
In general, static routes should only be used for very simple network topologies, or
to override the behavior of a dynamic routing protocol for a small number of routes.
The collection of all routes the router has learned from its configuration or from its
dynamic routing protocols is stored in its Routing Information Base (RIB).
Unicast routes are directly used to determine the forwarding table used for unicast
packet forwarding.
ConfiguringStaticRoutes
In this example, a sample configurations are presented for basic static routes. When
you are finished, the system will be configured as shown in Figure 2-1. In this
example, a static route is created that says, in effect, any packets destined for the
11.0.0.0/8 network should be forwarded to 172.16.0.26.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteConfiguration 34
Figure21Staticroutes
R2
11.0.0.0/8
eth0
172.16.0.26
172 .16.0.0/24
eth0
172.16.0.65
Static Route
Destination: 11.0.0.0/8
Next-Hop: 172 .16.0.26
R1
10.10.40.0/24
Step
Command
CreateastaticroutetoR2.
vyatta@R1#setprotocolsstaticroute11.0.0.0/8nexthop
172.16.0.26
Committheconfiguration.
vyatta@R1#commit
FloatingStaticRoutes
Usually, static routes have a relatively short administrative distancetypically 1, and
usually shorter than the administrative distances for dynamic (learned) routes. A
floating static route is a static route with an administrative distance greater than
that for dynamic routes.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticIPv6RouteConfiguration 35
You can configure a static route to be a floating route by setting the administrative
distance higher than the distance applied to the routes in your dynamic routing
protocol. This renders the static route less desirable than a dynamic route. At the
same time, if the dynamic route is lost, the static route is available to take over traffic,
which can be forwarded through the static route as an alternate path.
ShowingStaticRoutesintheRoutingTable
To display route information, use the show ip route command. To show just static
routes, use the show ip route static filter, as shown in Example 2-2.
Example22Showingstaticroutesintheroutingtable
vyatta@R1:~$showiproutestatic
Codes:Kkernelroute,Cconnected,Sstatic,RRIP,OOSPF,
IISIS,BBGP,>selectedroute,*FIBroute
S>*11.0.0.0/8[1/0]via172.16.0.26,eth0
vyatta@R1:~$
StaticIPv6RouteConfiguration
Figure 2-2 shows an IPv6 network with three nodes. In this example we will show
configuration of the nodes using static routes to enable R2 and R4 to communicate
via R1.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticIPv6RouteConfiguration 36
Figure22StaticIPv6routingexample
R4
eth0
2001:db8:1::4
2001:db8:1::/64
2001:db8:1::1
eth0
R1
R2
eth2
2001:db8:2::1
eth0
2001 :db8:2::2
2001:db8:2::/64
VerifyThatIPv6ForwardingisEnabled
In order for R1 to be able to pass data between interfaces eth0 and eth2 (i.e., between
R4 and R2) it must be configured to enable forwarding. To determine if forwarding
is enabled, perform the following step in operational mode.
Example23DetermineifforwardingisenabledonR1
Step
Command
DisplaythestateofIPv6
forwardingonR1.
vyatta@R1:~$showipv6forwarding
ipv6forwardingisoff
If forwarding is not enabled, as is the case in Example 2-3, the system must be
configured to enable forwarding. To enable forwarding, perform the following steps
in configuration mode.
Example24EnableforwardingonR1
Step
Command
EnableforwardingonR1.
vyatta@R1#deletesystemipv6disableforwarding
Committhechange.
vyatta@R1#commit
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticIPv6RouteConfiguration 37
Example24EnableforwardingonR1
Changetooperationalmode
vyatta@R1#exit
exit
vyatta@R1:~$
DisplaythestateofIPv6
forwardingonR1.
vyatta@R1:~$showipv6forwarding
ipv6forwardingison
AddtheDefaultIPv6Route
On R4, all traffic that is not routed elsewhere will be sent to R1. To configure the
default route, perform the following steps in configuration mode.
Example25AddthedefaultrouteonR4
Step
Command
AddthedefaultrouteonR4.
vyatta@R4#setprotocolsstaticroute6::/0nexthop
2001:db8:1::1
Committhechange.
vyatta@R4#commit
Changetooperationalmode.
vyatta@R4#exit
exit
vyatta@R4:~$
Verifythedefaultrouteinthe
routingtable.
vyatta@R4:~$showipv6route
Codes:Kkernelroute,Cconnected,Sstatic,RRIPng,
OOSPFv3,
IISIS,BBGP,*FIBroute.
S>*::/0[1/0]via2001:db8:1::1,eth0
C>*::1/128isdirectlyconnected,lo
C>*2001:db8:1::/64isdirectlyconnected,eth0
C*fe80::/64isdirectlyconnected,eth1
C>*fe80::/64isdirectlyconnected,eth0
K>*ff00::/8isdirectlyconnected,eth0
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticIPv6RouteConfiguration 38
AddaStaticIPv6Route
As an alternative to the default route we created on R4, well create a static route on
R2. To configure a static route to the 2001:db8:1::/64 network, perform the
following steps in configuration mode.
Example26AddastaticrouteonR2
Step
Command
AddastaticrouteonR2.
vyatta@R1#setprotocolsstaticroute62001:db8:1::/64
nexthop2001:db8:2::1
Committhechange.
vyatta@R1#commit
Changetooperationalmode.
vyatta@R1#exit
exit
vyatta@R2:~$
Verifythestaticrouteinthe
routingtable.
vyatta@R2:~$showipv6route
Codes:Kkernelroute,Cconnected,Sstatic,RRIPng,
OOSPFv3,
IISIS,BBGP,*FIBroute.
C>*::1/128isdirectlyconnected,lo
S>*2001:db8:1::/64[1/0]via2001:db8:2::1,eth0
C>*2001:db8:2::/64isdirectlyconnected,eth0
C*fe80::/64isdirectlyconnected,eth1
C>*fe80::/64isdirectlyconnected,eth0
K>*ff00::/8isdirectlyconnected,eth0
ConfirmConnectivity
To confirm that R2 and R4 can communicate, use the ping6 command. To confirm
connectivity between R2 and R4, perform the following step in operational mode.
Example27ConfirmconnectivitybetweenR2andR4
Step
Command
PingR4fromR2.
vyatta@R2:~$ping62001:db8:1::4
PING2001:db8:1::4(2001:db8:1::4)56databytes
64bytesfrom2001:db8:1::4:icmp_seq=1ttl=63time=5.65ms
64bytesfrom2001:db8:1::4:icmp_seq=2ttl=63time=0.382ms
^C
2001:db8:1::4pingstatistics
2packetstransmitted,2received,0%packetloss,time1011ms
rttmin/avg/max/mdev=0.382/3.016/5.650/2.634ms
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticIPv6RouteConfiguration 39
Step
Command
TracetheroutefromR2toR4.
vyatta@R2:~$traceroute62001:db8:1::4
tracerouteto2001:db8:1::4(2001:db8:1::4),30hopsmax,40
bytepackets
1(2001:db8:2::1)4.448ms4.148ms4.092ms
2(2001:db8:1::4)4.297ms4.306ms4.308ms
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 40
StaticRouteCommands
This chapter contains the following commands.
ConfigurationCommands
protocolsstaticinterfaceroute<subnet>
nexthopinterface<interface>
Allowsyoutoconfigurethenexthopinterfaceforan
interfacebasedstaticroute.
protocolsstaticinterfaceroute6<subnet>
nexthopinterface<ethx>
Allowsyoutoconfigurethenexthopinterfaceforan
interfacebasedIPv6staticroute.
protocolsstaticroute<subnet>blackhole
Allowsyoutoconfigureablackholestaticroute.
protocolsstaticroute<subnet>nexthop<address> Allowsyoutoconfigurethenexthopforastaticroute.
protocolsstaticroute6<subnet>blackhole
AllowsyoutoconfigureablackholeIPv6staticroute.
protocolsstaticroute6<subnet>nexthop
<address>
AllowsyoutoconfigurethenexthopforanIPv6staticroute.
OperationalCommands
showiproutestatic
Displaysstaticroutes.Seepage 18.
showipv6routestatic
DisplaysIPv6staticroutes.Seepage 18.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 41
protocolsstaticinterfaceroute<subnet>
nexthopinterface<interface>
Allows you to configure the next-hop interface for an interface-based static route.
Syntax
set protocols static interface-route subnet next-hop-interface interface [disable |
distance distance]
delete protocols static interface-route subnet next-hop-interface interface [disable |
distance]
show protocols static interface-route subnet next-hop-interface interface [disable |
distance]
CommandMode
Configuration mode.
ConfigurationStatement
protocols{
static{
interfaceroutesubnet{
nexthopinterfaceinterface{
disable
distancedistance
}
}
}
}
Parameters
subnet
BasicRouting
interface
disable
R6.3v01
Vyatta
Chapter2:StaticRoutes
distance
StaticRouteCommands 42
Default
None.
UsageGuidelines
Use this command to configure interface-based static routes on the router.
Use the set form of this command to specify the next-hop interface for the route.
Use the delete form of this command to remove the next-hop interface.
Use the show form of this command to view the next-hop interface for the route.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 43
protocolsstaticinterfaceroute6<subnet>
nexthopinterface<ethx>
Allows you to configure the next hop interface for an interface-based IPv6 static
route.
Syntax
set protocols static interface-route6 subnet next-hop-interface ethx [disable | distance
distance]
delete protocols static interface-route6 subnet next-hop-interface ethx [disable |
distance]
show protocols static interface-route6 subnet next-hop-interface ethx [disable |
distance]
CommandMode
Configuration mode.
ConfigurationStatement
protocols{
static{
interfaceroute6subnet{
nexthopinterfaceethx{
disable
distancedistance
}
}
}
}
Parameters
subnet
ethx
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 44
disable
distance
Default
None.
UsageGuidelines
Use this command to configure interface-based IPv6 static routes on the system.
Use the set form of this command to specify the next hop interface for the route.
Use the delete form of this command to remove the next hop interface.
Use the show form of this command to view the next hop interface for the route.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 45
protocolsstaticroute<subnet>blackhole
Allows you to configure a black-hole static route.
Syntax
set protocols static route subnet blackhole [distance distance]
delete protocols static route subnet blackhole [distance]
show protocols static route subnet blackhole [distance]
CommandMode
Configuration mode.
ConfigurationStatement
protocols{
static{
routesubnet{
blackhole{
distancedistance
}
}
}
}
Parameters
subnet
distance
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 46
Default
None.
UsageGuidelines
Use this command to configure a black-hole static route on the router. A
black-hole route is a route for which the system silently discard packets that are
matched.
Use the set form of this command to set a black-hole route.
Use the delete form of this command to remove a black-hole route.
Use the show form of this command to view black-hole route configuration.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 47
protocolsstaticroute<subnet>nexthop<address>
Allows you to configure the next hop for a static route.
Syntax
set protocols static route subnet next-hop address [disable | distance distance]
delete protocols static route subnet next-hop address [disable | distance]
show protocols static route subnet next-hop address [disable | distance]
CommandMode
Configuration mode.
ConfigurationStatement
protocols{
static{
routesubnet{
nexthopaddress{
disable
distancedistance
}
}
}
}
Parameters
subnet
BasicRouting
address
disable
R6.3v01
Vyatta
Chapter2:StaticRoutes
distance
StaticRouteCommands 48
Default
None.
UsageGuidelines
Use this command to configure static routes on the router.
Use the set form of this command to specify the next hop for the route.
Use the delete form of this command to remove the static route next hop.
Use the show form of this command to view static route next-hop configuration.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 49
protocolsstaticroute6<subnet>blackhole
Allows you to configure a blackhole IPv6 static route.
Syntax
set protocols static route6 subnet blackhole [distance distance]
delete protocols static route6 subnet blackhole [distance]
show protocols static route6 subnet blackhole [distance]
CommandMode
Configuration mode.
ConfigurationStatement
protocols{
static{
route6subnet{
blackhole{
distancedistance
}
}
}
}
Parameters
subnet
distance
Default
None.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 50
UsageGuidelines
Use this command to configure a blackhole IPv6 static route. A blackhole route
silently discards packets that are matched.
Use the set form of this command to specify a blackhole IPv6 static route.
Use the delete form of this command to remove a blackhole IPv6 static route.
Use the show form of this command to view blackhole IPv6 static route
configuration.
BasicRouting
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 51
protocolsstaticroute6<subnet>nexthop<address>
Allows you to configure the next hop for an IPv6 static route.
Syntax
set protocols static route6 subnet next-hop address [disable | distance distance |
interface interface]
delete protocols static route6 subnet next-hop address [disable | distance | interface]
show protocols static route6 subnet next-hop address [disable | distance | interface]
CommandMode
Configuration mode.
ConfigurationStatement
protocols{
static{
route6subnet{
nexthopaddress{
disable
distancedistance
interfaceinterface
}
}
}
}
Parameters
subnet
BasicRouting
address
disable
R6.3v01
Vyatta
Chapter2:StaticRoutes
StaticRouteCommands 52
distance
interface
Default
None.
UsageGuidelines
Use this command to configure IPv6 static routes on the system.
Use the set form of this command to specify the next hop for the route.
Use the delete form of this command to remove the static route next hop.
Use the show form of this command to view static route next hop configuration.
BasicRouting
R6.3v01
Vyatta
53
GlossaryofAcronyms
ACL
ADSL
API
AS
autonomous system
ARP
BGP
BIOS
BPDU
CA
certificate authority
CCMP
CHAP
CLI
command-line interface
DDNS
dynamic DNS
DHCP
DHCPv6
DLCI
DMI
BasicRouting
R6.3v01
Vyatta
54
DMZ
demilitarized zone
DN
distinguished name
DNS
DSCP
DSL
eBGP
external BGP
EGP
ECMP
equal-cost multipath
ESP
FIB
FTP
GRE
HDLC
I/O
Input/Ouput
ICMP
IDS
IEEE
IGP
IPS
IKE
IP
Internet Protocol
IPOA
IP over ATM
IPsec
IP security
IPv4
IP Version 4
IPv6
IP Version 6
ISP
BasicRouting
R6.3v01
Vyatta
55
L2TP
LACP
LAN
LDAP
LLDP
MAC
MIB
MLPPP
multilink PPP
MRRU
MTU
NAT
ND
Neighbor Discovery
NIC
NTP
OSPF
OSPFv2
OSPF Version 2
OSPFv3
OSPF Version 3
PAM
PAP
PAT
PCI
PKI
PPP
Point-to-Point Protocol
PPPoA
PPPoE
PPTP
BasicRouting
R6.3v01
Vyatta
56
PVC
QoS
quality of service
RADIUS
RIB
RIP
RIPng
Rx
receive
SLAAC
SNMP
SMTP
SONET
SSH
Secure Shell
SSID
STP
TACACS+
TCP
TKIP
ToS
Type of Service
Tx
transmit
UDP
vif
virtual interface
VLAN
virtual LAN
VPN
VRRP
WAN
WAP
BasicRouting
R6.3v01
Vyatta
57
WPA
BasicRouting
R6.3v01
Vyatta