综合实验配置
这上面是老师网络拓扑图,下面是我的
首先我们先要吧三个主机配置上静态IP,虽然这个实验需要配置DHCP,配置静态IP方便我们检查配置过程中的错误,在配置过程中可以吧不用的端口down掉,方便观看拓扑
第一步 配置vlan
现在可以吧LSW3的,002,003,005,006都down掉,其他的交换机也一样,down掉没用的
LSW1
interface Ethernet0/0/1
port link-type access
port default vlan 10
interface Ethernet0/0/2
port link-type access
port default vlan 20
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30
LSW3(这里把链路聚合一起配了)
vlan batch 10 20 30
interface Vlanif10
ip address 10.0.10.254 255.255.255.0
interface Vlanif20
ip address 10.0.20.254 255.255.255.0
interface Vlanif30
ip address 10.0.30.254 255.255.255.0
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20 30
mode lacp-static
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30
LSW2
vlan batch 10 20 30
interface Ethernet0/0/1
port link-type access
port default vlan 10
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 30
LSW4
vlan batch 10 20 30
interface Vlanif10
ip address 10.0.10.254 255.255.255.0
interface Vlanif20
ip address 10.0.20.254 255.255.255.0
interface Vlanif30
ip address 10.0.30.254 255.255.255.0
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20 30
mode lacp-static
interface GigabitEthernet0/0/2
port link-type trunk
port 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 enable
interface Vlanif10
dhcp select interface
interface Vlanif20
dhcp select interface
第五步配置服务
LSW3
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 10 20 30
LSW6
vlan batch 10 20 30
interface Ethernet0/0/1
port link-type access
port default vlan 30
interface Ethernet0/0/2
port link-type access
port default vlan 30
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30
第六步配置OSPF
AR1
interface Serial1/0/0
link-protocol ppp
ip address 100.0.12.1 255.255.255.252
interface GigabitEthernet0/0/0
ip address 100.0.1.2 255.255.255.252
interface GigabitEthernet0/0/1
ip address 100.0.1.6 255.255.255.252
interface GigabitEthernet2/0/0
ip 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/0
link-protocol ppp
ip address 100.0.12.2 255.255.255.252
interface GigabitEthernet0/0/0
ip address 100.0.24.1 255.255.255.252
ospf 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/0
ip address 100.0.23.2 255.255.255.252
interface GigabitEthernet0/0/1
ip 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/0
ip address 100.0.34.2 255.255.255.252
interface GigabitEthernet0/0/1
ip address 100.0.24.2 255.255.255.252
interface GigabitEthernet2/0/0
ip address 192.168.1.1 255.255.255.0
interface GigabitEthernet2/0/1
ip 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 Vlanif1
ip address 100.0.1.5 255.255.255.252
ip route-static 0.0.0.0 0.0.0.0 100.0.1.6
LSW3
interface Vlanif1
ip address 100.0.1.1 255.255.255.252
ip route-static 0.0.0.0 0.0.0.0 100.0.1.2