多区域ospf配置(router-id和lookback接口用同一个)(是的,我没用)
LSW1
#
vlan batch 10
#
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ospf 1 router-id 10.1.1.1
area 0.0.0.1
network 192.168.10.0 0.0.0.255
network 1.1.1.1 0.0.0.0
#
LSW2
#
vlan batch 10 20
#
interface Vlanif10
ip address 192.168.10.2 255.255.255.0
#
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
ospf 1 router-id 20.1.1.1
area 0.0.0.0
network 192.168.20.0 0.0.0.255
network 2.2.2.2 0.0.0.0
area 0.0.0.1
network 192.168.10.0 0.0.0.255
#
LSW3
#
vlan batch 20 30
#
interface Vlanif20
ip address 192.168.20.2 255.255.255.0
#
interface Vlanif30
ip address 192.168.30.1 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ospf 1 router-id 30.1.1.1
area 0.0.0.0
network 192.168.20.0 0.0.0.255
network 3.3.3.3 0.0.0.0
area 0.0.0.2
network 192.168.30.0 0.0.0.255
#
LSW4
#
vlan batch 30 40
#
interface Vlanif30
ip address 192.168.30.2 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 30
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
ospf 1 router-id 40.1.1.1
area 0.0.0.2
network 192.168.30.0 0.0.0.255
network 4.4.4.4 0.0.0.0
#