实验要求
实验拓扑
实验步骤
配置
[sw1]port-group group-member Ethernet 0/0/4 Ethernet 0/0/5 Eth-Trunk 0
[sw1-port-group]port link-type trunk
[sw1-Ethernet0/0/4]port link-type trunk
[sw1-Ethernet0/0/5]port link-type trunk
[sw1-Eth-Trunk0]port link-type trunk
[sw1-port-group]port trunk allow-pass vlan 2
[sw1-Ethernet0/0/4]port trunk allow-pass vlan 2
[sw1-Ethernet0/0/5]port trunk allow-pass vlan 2
[sw1-Eth-Trunk0]port trunk allow-pass vlan 2
[sw2]port-group group-member Ethernet 0/0/4 Ethernet 0/0/5 Eth-Trunk 0
[sw2-port-group]port link-type trunk
[sw2-Ethernet0/0/4]port link-type trunk
[sw2-Ethernet0/0/5]port link-type trunk
[sw2-Eth-Trunk0]port link-type trunk
[sw2-port-group]port trunk allow-pass vlan 2
[sw2-Ethernet0/0/4]port trunk allow-pass vlan 2
[sw2-Ethernet0/0/5]port trunk allow-pass vlan 2
[sw2-Eth-Trunk0]port trunk allow-pass vlan 2
[sw3]port-group group-member Ethernet 0/0/1 Ethernet 0/0/2
[sw3-port-group]port link-type trunk
[sw3-Ethernet0/0/1]port link-type trunk
[sw3-Ethernet0/0/2]port link-type trunk
[sw3-port-group]port trunk allow-pass vlan 2
[sw3-Ethernet0/0/1]port trunk allow-pass vlan 2
[sw3-Ethernet0/0/2]port trunk allow-pass vlan 2
[ sw4-port-group ]port link-type trunk
[ sw4-Etherneto/0/1]port link-type trunk
[ sw4-Etherneto/0/2]port link-type trunk
[ sw4-port-group]port trunk allow-pass vlan 2
[ sw4-Etherneto/0/1]port trunk allow-pass vlan 2
[ sw4-Ethernet0/0/2]port trunk allow-pass vlan 2
配置生成树
SW1
stp region-configuration
region-name a
instance 1 vlan 1
instance 2 vlan 2
active region-configuration
stp instance 1 root primary
stp instance 2 root secondary
SW2
stp region-configuration
region-name a
instance 1 vlan 1
instance 2 vlan 2
active region-configuration
stp instance 2 root primary
stp instance 1 root secondary
SW3
stp region-configuration
region-name a
instance 1 vlan 1
instance 2 vlan 2
active region-configuration
SW4
stp region-configuration
region-name a
instance 1 vlan 1
instance 2 vlan 2
active region-configuration
配置OSPF
[SW1]ospf 1
[SW1-ospf-1]silent-interface all
[SW1-ospf-1]undo silent-interface Ethernet 0/0/1
[SW1-ospf-1]undo silent-interface Eth-Trunk 0
[SW1-ospf-1]undo silent-interface Vlanif 1
[SW1-ospf-1]undo silent-interface Vlanif 100
[SW2]ospf 1
[SW2-ospf-1]silent-interface all
[SW2-ospf-1]undo silent-interface Ethernet 0/0/1
[SW2-ospf-1]undo silent-interface Eth-Trunk 0
[SW2-ospf-1]undo silent-interface Vlanif 100
[SW2-ospf-1]undo silent-interface Vlanif 1
测试