版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。
版权
华为杯同时被 2 个专栏收录
2 篇文章0 订阅
订阅专栏
2 篇文章0 订阅
订阅专栏
上一篇详细配置如下(依个人配置参考):
[R1]配置
sysname R1
router id 1.1.1.1
interface Ethernet0/0/0
ip address 12.1.1.1 255.255.255.252
interface GigabitEthernet0/0/1
ip address 12.1.1.5 255.255.255.252
ospf 100
area 0.0.0.0
network 12.1.1.0 0.0.0.255
[R2]配置
sysname R2
router id 2.2.2.2
interface Ethernet0/0/0
ip address 12.1.1.2 255.255.255.252
interface GigabitEthernet0/0/1
ip address 12.1.1.9 255.255.255.252
interface GigabitEthernet0/0/2
ip address 180.1.1.1 255.255.255.252
ospf 100
area 0.0.0.0
network 12.1.1.0 0.0.0.255
area 0.0.0.3
network 180.1.1.0 0.0.0.3
[SW1]配置
sysname S1
router id 3.3.3.3
vlan batch 10 20 40 50
interface Vlanif10
ip address 10.1.1.1 255.255.255.128
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
interface Vlanif40
ip address 12.1.1.6 255.255.255.252
interface Vlanif50
ip address 12.1.1.13 255.255.255.252
interface Eth-Trunk1
port link-type trunk
port trunk pvid vlan 10
port trunk allow-pass vlan 2 to 4094
interface Eth-Trunk2
port link-type trunk
port trunk pvid vlan 20
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/1
port link-type access
port default vlan 40
interface GigabitEthernet0/0/2
eth-trunk 1
interface GigabitEthernet0/0/3
eth-trunk 2
interface GigabitEthernet0/0/4
port link-type trunk
port trunk pvid vlan 50
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/5
eth-trunk 1
interface GigabitEthernet0/0/6
eth-trunk 2
ospf 100
area 0.0.0.0
network 12.1.1.12 0.0.0.255
area 0.0.0.1
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
[SW2]配置
sysname S2
router id 4.4.4.4
vlan batch 30 50 60
interface Vlanif30
ip address 10.1.1.254 255.255.255.128
interface Vlanif50
ip address 12.1.1.14 255.255.255.252
interface Vlanif60
ip address 12.1.1.10 255.255.255.252
interface GigabitEthernet0/0/1
port link-type access
port default vlan 60
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30
interface GigabitEthernet0/0/4
port link-type trunk
port trunk pvid vlan 50
port trunk allow-pass vlan 2 to 4094
ospf 100
area 0.0.0.0
network 12.1.1.0 0.0.0.255
area 0.0.0.2
network 10.1.1.0 0.0.0.255
[SW3]配置
sysname S3
vlan batch 10
interface Vlanif10
ip address 10.1.1.1 255.255.255.128
interface Eth-Trunk1
port link-type trunk
port trunk pvid vlan 10
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
interface GigabitEthernet0/0/2
eth-trunk 1
interface GigabitEthernet0/0/3
eth-trunk 1
ip route-static 0.0.0.0 0.0.0.0 10.1.1.126
[SW4]配置
sysname S4
vlan batch 20
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
interface Eth-Trunk2
port link-type trunk
port trunk pvid vlan 20
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
interface GigabitEthernet0/0/2
eth-trunk 2
interface GigabitEthernet0/0/5
eth-trunk 2
ip route-static 0.0.0.0 0.0.0.0 10.1.2.254