How to configure the OSPF on ECS4620 series? Follow
Open Shortest Path First (OSPF) is a routing protocol for Internet Protocol (IP) networks. It uses a link-state routing protocol to generate a shortest-path tree, then builds up its routing table based on this tree. OSPF produces a more stable network because the participating routers act on network changes predictably and simultaneously, converging on the best route more quickly than RIP. Moreover, when several equal-cost routes to a destination exist, traffic can be distributed equally among them. A separate routing area scheme is also used to further reduce the amount of routing traffic.
Topology:
Procedure:
Switch_01 Configuration:
Step 1: Apply VLAN on port and configure VLAN's IP address.
switch-01(config)#interface ethernet 1/23
switch-01(config-if)#switchport allowed vlan add 100
switch-01(config-if)#switchport native vlan 100
switch-01(config-if)#exit
switch-01(config)#interface ethernet 1/24
switch-01(config-if)#switchport allowed vlan add 200
switch-01(config-if)#switchport native vlan 200
switch-01(config-if)#exit
switch-01(config)#interface vlan 100
switch-01(config-if)#ip address 192.168.0.1/30
switch-01(config-if)#exit
switch-01(config)#interface vlan 200
switch-01(config-if)#ip address 192.168.0.5/30
switch-01(config-if)#exit
switch-01(config)#interface vlan 1
switch-01(config-if)#ip address 192.168.1.254/24
switch-01(config-if)#exit
Step 2: Disable spanning tree on port 23,24.
switch-01#con
switch-01(config)#interface ethernet 1/23,24
switch-01(config-if)#spanning-tree spanning-disabled
Step 3: Configure OSPF function.
switch-01(config)#router ospf 1
switch-01(config-router)#router-id 192.168.0.1
switch-01(config-router)#network 192.168.0.0 255.255.255.252 area 0
switch-01(config-router)#network 192.168.0.4 255.255.255.252 area 0
switch-01(config-router)#network 192.168.1.0 255.255.255.0 area 0
Switch_02 Configuration:
Step 1: Apply VLAN on port and configure VLAN's IP address.
switch-02(config)#interface ethernet 1/1
switch-02(config-if)#switchport native vlan 2
switch-02(config-if)#switchport allowed vlan add 2
switch-02(config-if)#exit
switch-02(config)#interface ethernet 1/23
switch-02(config-if)#switchport native vlan 100
switch-02(config-if)#switchport allowed vlan add 100
switch-02(config-if)#exit
switch-02(config)#interface ethernet 1/24
switch-02(config-if)#switchport native vlan 300
switch-02(config-if)#switchport allowed vlan add 300
switch-02(config-if)#exit
switch-02(config)#interface vlan 2
switch-02(config-if)#ip address 192.168.2.254/24
switch-02(config-if)#exit
switch-02(config)#interface vlan 100
switch-02(config-if)#ip address 192.168.0.2/30
switch-02(config-if)#exit
switch-02(config)#interface vlan 300
switch-02(config-if)#ip address 192.168.0.9/30
switch-02(config-if)#exit
Step 2: Disable spanning tree on port 23,24.
switch-01#con
switch-01(config)#interface ethernet 1/23,24
switch-01(config-if)#spanning-tree spanning-disabled
Step 3: Configure OSPF function.
switch-02(config)#router ospf 1
switch-02(config-router)#router-id 192.168.0.2
switch-02(config-router)#network 192.168.0.0 255.255.255.252 area 0
switch-02(config-router)#network 192.168.0.8 255.255.255.252 area 0
switch-02(config-router)#network 192.168.2.0 255.255.255.0 area 0
Switch_03 Configuration:
Step 1: Apply VLAN on port and configure VLAN's IP address.
switch-03(config)#interface ethernet 1/1
switch-03(config-if)#switchport native vlan 3
switch-03(config-if)#switchport allowed vlan add 3
switch-03(config-if)#exit
switch-03(config)#interface ethernet 1/23
switch-03(config-if)#switchport native vlan 200
switch-03(config-if)#switchport allowed vlan add 200
switch-03(config-if)#exit
switch-03(config)#interface ethernet 1/24
switch-03(config-if)#switchport native vlan 300
switch-03(config-if)#switchport allowed vlan add 300
switch-03(config-if)#exit
switch-03(config)#interface vlan 3
switch-03(config-if)#ip address 192.168.3.254/24
switch-03(config-if)#exit
switch-03(config)#interface vlan 200
switch-03(config-if)#ip address 192.168.0.6/30
switch-03(config-if)#exit
switch-03(config)#interface vlan 300
switch-03(config-if)#ip address 192.168.0.10/30
switch-03(config-if)#exit
Step 2: Disable spanning tree on port 23,24.
switch-01#con
switch-01(config)#interface ethernet 1/23,24
switch-01(config-if)#spanning-tree spanning-disabled
Step 3: Configure OSPF function.
switch-03(config)#router ospf 1
switch-03(config-router)#router-id 192.168.0.3
switch-03(config-router)#network 192.168.0.4 255.255.255.252 area 0
switch-03(config-router)#network 192.168.0.8 255.255.255.252 area 0
switch-03(config-router)#network 192.168.3.0 255.255.255.0 area 0
Result:
Check the routing table on all the switches.
Switch-01's routing table:
Switch-02's routing table:
Switch-03's routing table:
Display the information about neighboring routers on all the switches.
Switch-01's OSPF Neighbor Information
Switch-02's OSPF Neighbor Information
Switch-03's OSPF Neighbor Information
VLAN2-Client A(192.168.2.1) could ping to VLAN1-Client C(192.168.1.1).
Comments
0 comments
Please sign in to leave a comment.