SGS-6340 Series User Manual

Table Of Contents
Scenario 3
:
The function of OSPF importing the routers of other OSPF processes
As shown in the following graph, a switch running the OSPF routing protocol connects two
networks: network A and network B. Because of some reason, it is required that network A
should be able to learn the routers of network B, but network B should not be able to learn the
routers of network A. According to that, two OSPF processes can be started respectively on
interface VLAN 1 and interface VLAN 2. the OSPF process which interface VLAN 1 belongs to
is configured to import the routers of the OSPF process which interface VLAN 2 belongs to,
while the OSPF process which interface VLAN 2 belongs to should not be configured to import
the routers of the OSPF process which interface VLAN 1 belongs to.
Network A
Vlan1
1.1.1.1
Vlan2
2.2.2.2
Network B
Figure 26
-6
Function of OSPF importing the routers of other OSPF processes example
We can configure as follows:
Switch(config)#interface vlan 1
Switch(Config-if-Vlan1)#ip address 1.1.1.1 255.255.255.0
Switch(Config-if-Vlan1)#exit
Switch(config)#interface vlan 2
Switch(Config-if-Vlan2)#ip address 2.2.2.2 255.255.255.0
Switch(Config-if-Vlan2)#exit
Switch(config)#router ospf 10
Switch(config-router)#network 2.2.2.0/24 area 1
Switch(config-router)#exit
Switch(config)#router ospf 20
Switch(config-router)#network 1.1.1.0/24 area 1
Switch(config-router)#redistribute ospf 10
Switch(config-router)#exit
26-42