3 ospf examples, 1 configuration example of ospf, Ospf – PLANET XGS3-24040 User Manual

Page 285: Xamples

Advertising
background image

Chapter 37 OSPF

37-9

37.3 OSPF Examples

37.3.1 Configuration Example of OSPF

Scenario 1: OSPF autonomous system.

This scenario takes an OSPF autonomous system consists of five switch for example.

Figure 5-1 Network topology of OSPF autonomous system

The configuration for layer3 Switch1 and Switch5 is shown below:

Layer 3 Switch1

Configuration of the IP address for interface vlan1

Switch1#config

Switch1(config)# interface vlan 1

Switch1(config-if-vlan1)# ip address 10.1.1.1 255.255.255.0

Switch1(config-if-vlan1)#exit

Configuration of the IP address for interface vlan2

Configure the IP address of interface vlan2

Switch1(config)# interface vlan 2

Switch1(config-if-vlan2)# ip address 100.1.1.1 255.255.255.0

Switch1 (config-if-vlan2)#exit

Enable OSPF protocol, configure the area number for interface vlan1 and vlan2.

Switch1(config)#router ospf

Switch1(config-router)#network 10.1.1.0/24 area 0

Switch1(config-router)#network 100.1.1.0/24 area 0

Switch1(config-router)#exit

Switch1(config)#exit

Switch1#

SwitchA

SwitchB

SwitchE

SwitchD

SwitchC

E1/2:10.1.1.1

vlan1

E1/1:10.1.1.2

vlan1

E1/1:100.1.1.1

vlan2

E1/1:100.1.1.2

vlan2

E1/2:20.1.1.1

vlan3

E1/1:20.1.1.2

vlan3

E1/2:30.1.1.1

vlan3

E1/1:30.1.1.2

vlan3

Area 0

Area 1

Advertising