这上面是老师网络拓扑图,下面是我的
首先我们先要吧三个主机配置上静态IP,虽然这个实验需要配置DHCP,配置静态IP方便我们检查配置过程中的错误,在配置过程中可以吧不用的端口down掉,方便观看拓扑
第一步 配置vlan
现在可以吧LSW3的,002,003,005,006都down掉,其他的交换机也一样,down掉没用的
LSW1
interface Ethernet0/0/1port link-type accessport default vlan 10interface Ethernet0/0/2port link-type accessport default vlan 20interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20 30
LSW3(这里把链路聚合一起配了)
vlan batch 10 20 30interface Vlanif10ip address 10.0.10.254 255.255.255.0interface Vlanif20ip address 10.0.20.254 255.255.255.0interface Vlanif30ip address 10.0.30.254 255.255.255.0interface Eth-Trunk1port link-type trunkport trunk allow-pass vlan 10 20 30mode lacp-staticinterface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20 30
LSW2
vlan batch 10 20 30interface Ethernet0/0/1port link-type accessport default vlan 10interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 20 30
LSW4
vlan batch 10 20 30interface Vlanif10ip address 10.0.10.254 255.255.255.0interface Vlanif20ip address 10.0.20.254 255.255.255.0interface Vlanif30ip address 10.0.30.254 255.255.255.0interface Eth-Trunk1port link-type trunkport trunk allow-pass vlan 10 20 30mode lacp-staticinterface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 20 30
第二步配置链路聚合
(上面已经配完了)
第三步配置STP
LSW4
stp mode stp
stp priority 4096
LSW1
stp mode stp
LSW2
stp mode stp
LSW3
stp mode stp
stp priority 0
第四步配置DHCP
LSW3
dhcp enableinterface Vlanif10dhcp select interfaceinterface Vlanif20dhcp select interface
第五步配置服务
LSW3
interface GigabitEthernet0/0/6port link-type trunkport trunk allow-pass vlan 10 20 30
LSW6
vlan batch 10 20 30interface Ethernet0/0/1port link-type accessport default vlan 30interface Ethernet0/0/2port link-type accessport default vlan 30interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20 30
第六步配置OSPF
AR1
interface Serial1/0/0link-protocol pppip address 100.0.12.1 255.255.255.252 interface GigabitEthernet0/0/0ip address 100.0.1.2 255.255.255.252 interface GigabitEthernet0/0/1ip address 100.0.1.6 255.255.255.252 interface GigabitEthernet2/0/0ip address 100.0.23.1 255.255.255.252 ospf 1 area 0.0.0.0 network 100.0.1.0 0.0.0.3 network 100.0.1.4 0.0.0.3 network 100.0.12.0 0.0.0.3 network 100.0.23.0 0.0.0.3
AR2
interface Serial2/0/0link-protocol pppip address 100.0.12.2 255.255.255.252 interface GigabitEthernet0/0/0ip address 100.0.24.1 255.255.255.252ospf 1 area 0.0.0.0 network 100.0.12.0 0.0.0.3 network 100.0.24.0 0.0.0.3
AR3
interface GigabitEthernet0/0/0ip address 100.0.23.2 255.255.255.252 interface GigabitEthernet0/0/1ip address 100.0.34.1 255.255.255.252 ospf 1 area 0.0.0.0 network 100.0.23.0 0.0.0.3 network 100.0.34.0 0.0.0.3
AR4
interface GigabitEthernet0/0/0ip address 100.0.34.2 255.255.255.252 interface GigabitEthernet0/0/1ip address 100.0.24.2 255.255.255.252 interface GigabitEthernet2/0/0ip address 192.168.1.1 255.255.255.0 interface GigabitEthernet2/0/1ip address 192.168.2.1 255.255.255.0 ospf 1 area 0.0.0.0 network 100.0.24.0 0.0.0.3 network 100.0.34.0 0.0.0.3 network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255
第七步配置三层交换机和路由器相连
LSW4
interface Vlanif1ip address 100.0.1.5 255.255.255.252ip route-static 0.0.0.0 0.0.0.0 100.0.1.6
LSW3
interface Vlanif1ip address 100.0.1.1 255.255.255.252ip route-static 0.0.0.0 0.0.0.0 100.0.1.2