三层架构实验

一.实验要求

 二.实验设计

 三.实验过程

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

四.测试

 

 

 

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值