一.实验要求
二.实验设计
三.实验过程
1.为ISP配置环回,为r1及sw1/2配置IP地址
2.ospf宣告
r1
ospf 1 router-id 1.1.1.1
default-route-advertise always
area 0.0.0.0
network 172.168.0.1 0.0.0.0
network 172.168.0.5 0.0.0.0
sw1
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 172.168.0.2 0.0.0.0
network 172.168.1.1 0.0.0.0
network 172.168.2.1 0.0.0.0
sw2
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 172.168.0.6 0.0.0.0
network 172.168.1.2 0.0.0.0
network 172.168.2.2 0.0.0.0
三.STP
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 1 root secondary
stp instance 2 root primary
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
4. VRRP
SW1
interface Vlanif1
vrrp vrid 1 virtual-ip 172.168.1.99
vrrp vrid 1 priority 120
interface Vlanif2
vrrp vrid 2 virtual-ip 172.168.2.99
SW2:
interface Vlanif2
vrrp vrid 2 virtual-ip 172.168.2.99
vrrp vrid 2 priority 120
interface Vlanif1
vrrp vrid 1 virtual-ip 172.168.1.99
5、链路聚合
SW2:
interface Eth-Trunk0
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface Ethernet0/0/1
eth-trunk 0
interface Ethernet0/0/4
eth-trunk 0
SW1:
interface Eth-Trunk0
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface Ethernet0/0/1
eth-trunk 0
interface Ethernet0/0/4
eth-trunk 0
6.DHCP
SW1
dhcp enable
ip pool v1
gateway-list 172.168.1.99
network 172.168.1.0 mask 255.255.255.0
dns-list 8.8.8.8
ip pool v2
gateway-list 172.168.2.99
network 172.168.2.0 mask 255.255.255.0
dns-list 8.8.8.8
interface Vlanif1
dhcp select global
interface Vlanif2
dhcp select global
SW2
dhcp enable
ip pool v1
gateway-list 172.168.1.99
network 172.168.1.0 mask 255.255.255.0
dns-list 8.8.8.8
ip pool v2
gateway-list 172.168.2.99
network 172.168.2.0 mask 255.255.255.0
dns-list 8.8.8.8
interface Vlanif1
dhcp select global
interface Vlanif2
dhcp select global
7.NAT
R1
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
interface GigabitEthernet0/0/0
nat outbound 2000
四.测试