routed.8 (18322) | routed.8 (19885) |
---|---|
1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 82 unchanged lines hidden (view full) --- 91If more than one interface is present (not counting the loopback interface), 92it is assumed that the host should forward packets among the 93connected networks. 94After transmitting a RIP 95.Em request 96and 97Router Discovery Advertisements or Solicitations on a new interface, 98the daemon enters a loop, listening for | 1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 82 unchanged lines hidden (view full) --- 91If more than one interface is present (not counting the loopback interface), 92it is assumed that the host should forward packets among the 93connected networks. 94After transmitting a RIP 95.Em request 96and 97Router Discovery Advertisements or Solicitations on a new interface, 98the daemon enters a loop, listening for |
99RIP request and response and Router Discover packets from other hosts. | 99RIP request and response and Router Discovery packets from other hosts. |
100.Pp 101When a 102.Em request 103packet is received, 104.Nm 105formulates a reply based on the information maintained in its 106internal tables. 107The --- 24 unchanged lines hidden (view full) --- 132from one of the several currently recognized gateways or 133advertise a better metric than at least one of the existing 134gateways. 135.Pp 136When an update is applied, 137.Nm 138records the change in its own tables and updates the kernel routing table 139if the best route to the destination changes. | 100.Pp 101When a 102.Em request 103packet is received, 104.Nm 105formulates a reply based on the information maintained in its 106internal tables. 107The --- 24 unchanged lines hidden (view full) --- 132from one of the several currently recognized gateways or 133advertise a better metric than at least one of the existing 134gateways. 135.Pp 136When an update is applied, 137.Nm 138records the change in its own tables and updates the kernel routing table 139if the best route to the destination changes. |
140The change in the kernel routing tableis reflected in the next batch of | 140The change in the kernel routing table is reflected in the next batch of |
141.Em response 142packets sent. 143If the next response is not scheduled for a while, a 144.Em flash update 145response containing only recently changed routes is sent. 146.Pp 147In addition to processing incoming packets, 148.Nm --- 45 unchanged lines hidden (view full) --- 194a good Advertisement, it stops listening for broadcast or multicast 195RIP responses. 196It tracks several advertising routers to speed recovery when the 197currently chosen router dies. 198If all discovered routers disappear, 199the daemon resumes listening to RIP responses. 200.Pp 201While using Router Discovery (which happens by default when | 141.Em response 142packets sent. 143If the next response is not scheduled for a while, a 144.Em flash update 145response containing only recently changed routes is sent. 146.Pp 147In addition to processing incoming packets, 148.Nm --- 45 unchanged lines hidden (view full) --- 194a good Advertisement, it stops listening for broadcast or multicast 195RIP responses. 196It tracks several advertising routers to speed recovery when the 197currently chosen router dies. 198If all discovered routers disappear, 199the daemon resumes listening to RIP responses. 200.Pp 201While using Router Discovery (which happens by default when |
202the system has a single network interface and a Router Discover Advertisement | 202the system has a single network interface and a Router Discovery Advertisement |
203is received), there is a single default route and a variable number of 204redirected host routes in the kernel table. 205.Pp | 203is received), there is a single default route and a variable number of 204redirected host routes in the kernel table. 205.Pp |
206The Router Discover standard requires that advertisements | 206The Router Discovery standard requires that advertisements |
207have a default "lifetime" of 30 minutes. That means should 208something happen, a client can be without a good route for 20930 minutes. It is a good idea to reduce the default to 45 210seconds using 211.Fl P Cm rdisc_interval=45 212on the command line or 213.Cm rdisc_interval=45 214in the 215.Pa /etc/gateways 216file. 217.Pp 218While using Router Discovery (which happens by default when 219the system has a single network interface and a Router Discover Advertisement 220is received), there is a single default route and a variable number of 221redirected host routes in the kernel table. | 207have a default "lifetime" of 30 minutes. That means should 208something happen, a client can be without a good route for 20930 minutes. It is a good idea to reduce the default to 45 210seconds using 211.Fl P Cm rdisc_interval=45 212on the command line or 213.Cm rdisc_interval=45 214in the 215.Pa /etc/gateways 216file. 217.Pp 218While using Router Discovery (which happens by default when 219the system has a single network interface and a Router Discover Advertisement 220is received), there is a single default route and a variable number of 221redirected host routes in the kernel table. |
222On a host with more than one network interface, 223this default route will be via only one of the interfaces. 224Thus, multi-homed hosts running with \f3\-q\f1 might need 225.Cm no_rdisc 226described below. |
|
222.Pp 223See the 224.Cm pm_rdisc 225facility described below to support "legacy" systems 226that can handle neither RIPv2 nor Router Discovery. 227.Pp | 227.Pp 228See the 229.Cm pm_rdisc 230facility described below to support "legacy" systems 231that can handle neither RIPv2 nor Router Discovery. 232.Pp |
228By default, neither Router Discovery advertisements nor solicications | 233By default, neither Router Discovery advertisements nor solicitations |
229are sent over point to point links (e.g. PPP). | 234are sent over point to point links (e.g. PPP). |
235The netmask associated with point-to-point links (such as SLIP 236or PPP, with the IFF_POINTOPOINT flag) is used by 237.Nm routed 238to infer the netmask used by the remote system when RIPv1 is used. |
|
230 231.Pp 232Options supported by 233.Nm routed : 234.Bl -tag -width Ds 235.It Fl s 236this option forces 237.Nm 238to supply routing information. 239This is the default if multiple network interfaces are present on which 240RIP or Router Discovery have not been disabled, and if the kernel switch 241ipforwarding=1. 242.It Fl q 243is the opposite of the 244.Fl s 245option. | 239 240.Pp 241Options supported by 242.Nm routed : 243.Bl -tag -width Ds 244.It Fl s 245this option forces 246.Nm 247to supply routing information. 248This is the default if multiple network interfaces are present on which 249RIP or Router Discovery have not been disabled, and if the kernel switch 250ipforwarding=1. 251.It Fl q 252is the opposite of the 253.Fl s 254option. |
255This is the default when only one interface is present. |
|
246.It Fl d 247Do not run in the background. 248This option is meant for interactive use. 249.It Fl g 250This flag is used on internetwork routers to offer a route 251to the "default" destination. 252It is equivalent to 253.Fl F --- 7 unchanged lines hidden (view full) --- 261file. 262since a larger metric 263will be used, reducing the spread of the potentially dangerous 264default route. 265This is typically used on a gateway to the Internet, 266or on a gateway that uses another routing protocol whose routes 267are not reported to other local routers. 268Notice that because a metric of 1 is used, this feature is | 256.It Fl d 257Do not run in the background. 258This option is meant for interactive use. 259.It Fl g 260This flag is used on internetwork routers to offer a route 261to the "default" destination. 262It is equivalent to 263.Fl F --- 7 unchanged lines hidden (view full) --- 271file. 272since a larger metric 273will be used, reducing the spread of the potentially dangerous 274default route. 275This is typically used on a gateway to the Internet, 276or on a gateway that uses another routing protocol whose routes 277are not reported to other local routers. 278Notice that because a metric of 1 is used, this feature is |
269dangerous. It is more commonly accidently used to create chaos with routing | 279dangerous. It is more commonly accidentally used to create chaos with routing |
270loop than to solve problems. 271.It Fl h 272This causes host or point-to-point routes to not be advertised, 273provided there is a network route going the same direction. 274That is a limited kind of aggregation. 275This option is useful on gateways to ethernets that have other gateway 276machines connected with point-to-point links such as SLIP. 277.It Fl m --- 118 unchanged lines hidden (view full) --- 396"host" lines. 397.Pp 398Gateways marked 399.Em external 400are also passive, but are not placed in the kernel 401routing table nor are they included in routing updates. 402The function of external entries is to indicate 403that another routing process | 280loop than to solve problems. 281.It Fl h 282This causes host or point-to-point routes to not be advertised, 283provided there is a network route going the same direction. 284That is a limited kind of aggregation. 285This option is useful on gateways to ethernets that have other gateway 286machines connected with point-to-point links such as SLIP. 287.It Fl m --- 118 unchanged lines hidden (view full) --- 406"host" lines. 407.Pp 408Gateways marked 409.Em external 410are also passive, but are not placed in the kernel 411routing table nor are they included in routing updates. 412The function of external entries is to indicate 413that another routing process |
404will install such a route if ncessary, | 414will install such a route if necessary, |
405and that alternate routes to that destination should not be installed 406by 407.Nm routed . 408Such entries are only required when both routers may learn of routes 409to the same destination. 410.Pp 411The 412.Em /etc/gateways --- 86 unchanged lines hidden (view full) --- 499This parameter must appear by itself on a line. 500.Pp 501Do not use this feature unless necessary. It is dangerous. 502.It Cm passwd Ns \&= Ns Ar XXX 503specifies a RIPv2 password that will be included on all RIPv2 504responses sent and checked on all RIPv2 responses received. 505The password must not contain any blanks, tab characters, commas 506or '#' characters. | 415and that alternate routes to that destination should not be installed 416by 417.Nm routed . 418Such entries are only required when both routers may learn of routes 419to the same destination. 420.Pp 421The 422.Em /etc/gateways --- 86 unchanged lines hidden (view full) --- 509This parameter must appear by itself on a line. 510.Pp 511Do not use this feature unless necessary. It is dangerous. 512.It Cm passwd Ns \&= Ns Ar XXX 513specifies a RIPv2 password that will be included on all RIPv2 514responses sent and checked on all RIPv2 responses received. 515The password must not contain any blanks, tab characters, commas 516or '#' characters. |
517.It Cm passwd Ns \&= Ns Ar XXX1[|KeyID[start|stop]][XXX2...] 518specifies one or more RIPv2 cleartext passwords that will be included on 519all RIPv2 responses sent, and checked on all RIPv2 responses received. 520Any blanks, tab characters, commas, or '#' or '|' characters in the 521password must be escaped with a backslash (\\). 522The 523.Cm KeyID 524must be unique but is ignored for cleartext passwords. 525If present, 526.Cm start 527and 528.Cm stop 529are timestamps in the form year/month/day@hour:minute. 530They specify when the password is valid. 531The first valid password is used on output packets. 532Incoming packets can carry any password that is valid, will 533be valid within 24 hours, or that was valid within 24 hours. 534.It Cm md5_passwd Ns \&= Ns Ar XXX1|KeyID[start|stop][XXX2...] 535specifes one or more RIPv2 MD5 passwords. 536Except that a 537.Cm KeyID 538is required, this keyword is the similar to 539.Cm passwd . |
|
507.It Cm no_ag 508turns off aggregation of subnets in RIPv1 and RIPv2 responses. 509.It Cm no_super_ag 510turns off aggregation of networks into supernets in RIPv2 responses. 511.It Cm passive | 540.It Cm no_ag 541turns off aggregation of subnets in RIPv1 and RIPv2 responses. 542.It Cm no_super_ag 543turns off aggregation of networks into supernets in RIPv2 responses. 544.It Cm passive |
512is equivalent 513.Cm no_rip Cm no_rdisc . | 545marks the interface to not be advertised in updates sent via other 546interfaces, and turns off all RIP and router discovery through the interface. |
514.It Cm no_rip 515disables all RIP processing on the specified interface. 516If no interfaces are allowed to process RIP packets, 517.Nm 518acts purely as a router discovery daemon. | 547.It Cm no_rip 548disables all RIP processing on the specified interface. 549If no interfaces are allowed to process RIP packets, 550.Nm 551acts purely as a router discovery daemon. |
519.Cm No_rip 520is equivalent to 521.Cm no_ripv1_in no_ripv2_in no_ripv1_out no_ripv2_out . | |
522 523Note that turning off RIP without explicitly turning on router 524discovery advertisements with 525.Cm rdisc_adv 526or 527.Fl s 528causes 529.Nm routed | 552 553Note that turning off RIP without explicitly turning on router 554discovery advertisements with 555.Cm rdisc_adv 556or 557.Fl s 558causes 559.Nm routed |
530to act as a client router discovery daemon, not adveritising. | 560to act as a client router discovery daemon, not advertising. |
531.It Cm no_ripv1_in 532causes RIPv1 received responses to be ignored. 533.It Cm no_ripv2_in 534causes RIPv2 received responses to be ignored. 535.It Cm ripv2_out 536turns off RIPv1 output and causes RIPv2 advertisements to be 537multicast when possible. | 561.It Cm no_ripv1_in 562causes RIPv1 received responses to be ignored. 563.It Cm no_ripv2_in 564causes RIPv2 received responses to be ignored. 565.It Cm ripv2_out 566turns off RIPv1 output and causes RIPv2 advertisements to be 567multicast when possible. |
568.It Cm ripv2 569is equivalent to 570.Cm no_ripv1_in 571and 572.Cm no_ripv1_out . |
|
538.It Cm no_rdisc 539disables the Internet Router Discovery Protocol. 540.It Cm no_solicit | 573.It Cm no_rdisc 574disables the Internet Router Discovery Protocol. 575.It Cm no_solicit |
541disables the tranmission of Router Discovery Solicitations. | 576disables the transmission of Router Discovery Solicitations. |
542.It Cm send_solicit 543specifies that Router Discovery solicitations should be sent, 544even on point-to-point links, 545which by default only listen to Router Discovery messages. 546.It Cm no_rdisc_adv 547disables the transmission of Router Discovery Advertisements 548.It Cm rdisc_adv | 577.It Cm send_solicit 578specifies that Router Discovery solicitations should be sent, 579even on point-to-point links, 580which by default only listen to Router Discovery messages. 581.It Cm no_rdisc_adv 582disables the transmission of Router Discovery Advertisements 583.It Cm rdisc_adv |
549specifies that Router Discovery advertisements should be sent, | 584specifies that Router Discovery Advertisements should be sent, |
550even on point-to-point links, 551which by default only listen to Router Discovery messages 552.It Cm bcast_rdisc 553specifies that Router Discovery packets should be broadcast instead of 554multicast. 555.It Cm rdisc_pref Ns \&= Ns Ar N 556sets the preference in Router Discovery Advertisements to the integer 557.Ar N . 558.It Cm rdisc_interval Ns \&= Ns Ar N 559sets the nominal interval with which Router Discovery Advertisements 560are transmitted to N seconds and their lifetime to 3*N. 561.It Cm fake_default Ns \&= Ns Ar metric 562has an identical effect to | 585even on point-to-point links, 586which by default only listen to Router Discovery messages 587.It Cm bcast_rdisc 588specifies that Router Discovery packets should be broadcast instead of 589multicast. 590.It Cm rdisc_pref Ns \&= Ns Ar N 591sets the preference in Router Discovery Advertisements to the integer 592.Ar N . 593.It Cm rdisc_interval Ns \&= Ns Ar N 594sets the nominal interval with which Router Discovery Advertisements 595are transmitted to N seconds and their lifetime to 3*N. 596.It Cm fake_default Ns \&= Ns Ar metric 597has an identical effect to |
563.Fl F Ar net[/mask][,metric] | 598.Fl F Ar net[/mask][=metric] |
564with the network and mask coming from the sepcified interface. 565.It Cm pm_rdisc 566is similar to 567.Cm fake_default . 568When RIPv2 routes are multicast, so that RIPv1 listeners cannot 569receive them, this feature causes a RIPv1 default route to be 570broadcast to RIPv1 listeners. 571Unless modified with 572.Cm fake_default , 573the default route is broadcast with a metric of 14. 574That serves as a "poor man's router discovery" protocol. | 599with the network and mask coming from the sepcified interface. 600.It Cm pm_rdisc 601is similar to 602.Cm fake_default . 603When RIPv2 routes are multicast, so that RIPv1 listeners cannot 604receive them, this feature causes a RIPv1 default route to be 605broadcast to RIPv1 listeners. 606Unless modified with 607.Cm fake_default , 608the default route is broadcast with a metric of 14. 609That serves as a "poor man's router discovery" protocol. |
610.It Cm trust_gateway Ns \&= Ns Ar rname 611causes RIP packets from that router and other routers named in 612other 613.Cm trust_gateway 614keywords to be accept, and packets from other routers to be ignored. |
|
575.El 576.Pp | 615.El 616.Pp |
577Note that the netmask associated with point-to-point links (such as SLIP 578or PPP, with the IFF_POINTOPOINT flag) is used by 579.Nm routed 580to infer the netmask used by the remote system when RIPv1 is used. 581.Pp | |
582.Sh FILES 583.Bl -tag -width /etc/gateways -compact 584.It Pa /etc/gateways 585for distant gateways 586.El 587.Sh SEE ALSO 588.Xr gated 8 , 589.Xr udp 4 , --- 16 unchanged lines hidden --- | 617.Sh FILES 618.Bl -tag -width /etc/gateways -compact 619.It Pa /etc/gateways 620for distant gateways 621.El 622.Sh SEE ALSO 623.Xr gated 8 , 624.Xr udp 4 , --- 16 unchanged lines hidden --- |