![]() |
|
||||
GNU Zebra User's Guide |
Additional Features
Zebra Filtering
Zebra provides several flexible filtering features. Filtering is used for both input and output of the routing information. Once filtering is defined, it can be applied in any direction.
ip access-list Commands
The following table describes commands used in configuring IP access lists:
ip access-list Commands Command Description Basic filtering is created with an access-list as shown in the following example.access-list filter deny 10.0.0.0/9access-list filter permit 10.0.0.0/8
ip prefix-list Commands
ip prefix-list provides a powerful prefix-based filtering mechanism. Adding to access-list functionality, ip prefix-list has a prefix length range specification and sequential number specification. Users can add or delete a prefix-based filter to an arbitrary point of prefix-list using sequential numbers.
If no ip prefix-list is specified, it acts as a permit. Once the ip prefix-list is defined, then no match is performed and the default deny is applied.
ip prefix-list Commands Command Description ip prefix-list are created with these commands.Lesser than or equal to prefix numbers and greater than or equal to prefix numbers can be used together. The order of the le and ge commands does not matter.
If a prefix list is created with a different sequential number, but with the exact same rules as a previous list, an error results. However, no error results if sequential number and the rules are exactly the same.
If a list with the same sequential number as a previous list is created, the new list overwrites the old.
Matching of ip prefix is performed from the smaller sequential number to the larger. The matching stops once any rule is applied.
In the case of no le or ge command, the prefix length must exactly match the length specified in the prefix-list.
no ip prefix-list Command Command
ip prefix-list Description Commands
The following table describes the commands used in setting ip prefix-list descriptions:
ip prefix-list Sequential Number Control Commands
The following table describes commands used in setting ip prefix-list sequential number control:
ip prefix-list Display Commands
The following table describes commands used to display the ip prefix-lists:
clear ip prefix-list Counter Commands
The following table describes commands used in clearing ip prefix-list counters:
ip community-list Command
The following table describes the command used in setting ip community list:
ip community list Command Command
as-path access-list Command
The following table shows the command used in setting as-path access-list:
as-path access-list Command Command
route-map
route-map is a useful function in Zebra. There is a match and set statement used to define route-map.
In this example, the route match ip access-list number is defined as 10 and the local-preference value is set to 200.
route-map Command
The following table shows the command used in setting route-map commands:
route-map Command Command
route-map match Command
The following table describes commands used in matching route maps:
route-map match Command Command Description Match the specified ACCESS_LIST Match the specified IPV4_ADDR Match the specified AS_PATH Match the specified METRIC Match the specified COMMUNITY_LIST
route-map set Command
route-map:
Kernel Interface
There are two different methods for reading kernel routing table information:
Several methods are available for obtaining kernel information:
The ioctl method is a traditional way for reading or writing kernel information. ioctl can be used to look up interfaces and for modify interface addresses, flags, mtu settings and other types of information. Also, ioctl can insert and delete kernel routing table entries.
sysctl can lookup kernel information using MIB (Management Information Base) syntax. Normally, it only provides a way of getting information from the kernel. So, it is preferred to change kernel information using another method, such as ioctl.
proc filesystem provides an easy way of obtaining kernel information.
LynxOS uses this method by default.
SNMP Support
SNMP (Simple Network Managing Protocol) is a widely implemented feature for collecting network information from routers and hosts. Zebra itself does not support SNMP functionality. However, in conjunction with an SNMP agent, Zebra provides routing protocol for MIBs.
Zebra uses the SMUX protocol (RFC1227) to communicate with the SNMP agent. There are several SNMP agents which support SMUX. It is recommended to use the latest net-SNMP software. Zebra is tested with ucd-snmp-4.1.pre1.tar.gz.
After installing net-snmp, smuxpeer must be configured. Refer to the following sample configuration file:
SMUX Commands
The following describes commands used to configure smux.
SMUX commands Command Description Sets SMUX peer OID (Object ID) !smux peer .1.3.6.1.6.3.1 test!
![]() LynuxWorks, Inc. 855 Branham Lane East San Jose, CA 95138 http://www.lynuxworks.com 1.800.255.5969 |
![]() |
![]() |
![]() |
![]() |