beautypg.com

7 configuring ospf – Asante Technologies 35516 User Manual

Page 70

background image

- 70 -

5.6.4 Applying an Access List to an Interface

After creating your access lists, you must apply them to an interface in order to enable the access list. Enter the
interface configuration mode for the desired interface. Each interface may have only one access list applied to it at
one time. Access lists are applied to either inbound traffic or to outbound traffic.

In the next example, we will create an extended access list that will allow only SMTP traffic (port 25) to be sent out,
and deny all other traffic.

Router(config)# access-list 101 permit tcp 192.168.123.0 0.0.0.255 any eq 25
Router(config)# access-list 101 deny any
Router(config)# interface eth1
Router(config-if-eth1)# ip ?
access-group Apply an access-group entry
Router(config-if-eth1)# ip access-group ?
WORD access-list number or name
Router(config-if-eth1)# ip access-group 101 ?
in inbound direction
out outbound direction
Router(config-if-eth1)# ip access-group 101 out
Router(config-if-eth1)# exit

5.7 Configuring OSPF

Open Shortest Path First (OSPF) is an interior gateway protocol (IGP) designed expressly for IP networks. OSPF
supports IP sub-netting and tagging of externally derived routing information, as well as supporting packet
authentication and IP multicasting when sending/receiving packets.

OSPF works best in a hierarchical routing environment. The first and most important decision on OSPF network is to
determine area border routers (routers connected to multiple areas), and autonomous system boundary routers. At a
minimum, OSPF-based routers can be configured with all the default parameter values, no authentication, and
interfaces assigned to areas. If users intend to customize their networking environment, they must ensure
coordinated configurations of all routers.

To configure OSPF, complete the tasks in the following sections. After enabling OSPF, the other configuration tasks
are optional.

5.7.1 Enable OSPF

As with other routing protocols, enabling OSPF requires that you create an OSPF routing process, specify the range
of IP addresses to be associated with the routing process, and assign area IDs to be associated with that range of IP
addresses. Perform the following tasks, starting in global configuration mode.

Command Purpose

router ospf

Step 1 Enable an OSPF routing process, which places you in
router configuration mode.

router-id router-id

Step 2 Specify a routing process ID. A router ID is a 32-bit
number in dotted-decimal notation.

network prefix-length
area {area-ID | area-address}

Step 3 Define an interface on which to run OSPF and specify
the area ID or IP address for that interface.