S6700 Series Ethernet Switches
Configuration Guide - IP Routing
Configuration Files
l
l
l
Issue 01 (2012-03-15)
As shown in the routing table, OSPF selects the next hop 10.1.2.2 as the unique optimal
route. This is because the preference of the next hop 10.1.2.2 (SwitchC) is higher than that
of the next hop 10.1.1.2 (SwitchB) after the preferences of the equal-cost routes are set.
Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20 50
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
#
interface Vlanif50
ip address 172.16.1.1 255.255.255.0
#
interface XGigabitEthernet0/0/1
port trunk allow-pass vlan 10
#
interface XGigabitEthernet0/0/2
port trunk allow-pass vlan 20
#
interface XGigabitEthernet0/0/3
port trunk allow-pass vlan 50
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
network 172.16.1.0 0.0.0.255
#
return
Configuration file of SwitchB
sysname SwitchB
#
vlan batch 10 30
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
#
interface Vlanif30
ip address 192.168.0.1 255.255.255.0
#
interface XGigabitEthernet0/0/1
port trunk allow-pass vlan 10
#
interface XGigabitEthernet0/0/2
port trunk allow-pass vlan 30
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 192.168.0.0 0.0.0.255
#
return
Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 20 40
#
interface Vlanif20
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
4 OSPF Configuration
160