新华三模拟器vrrp实验1.按照拓扑图连接以及配置IP地址 2.所有端口配置trunk放行vlan 3.使用VRRP. PC6的主网关为sw1,pc7的主网关为sw3 4.要求sw1和sw2互为主备,当设备故障时能够切换 5.要求业务流量能和sw1的公关流量互访
时间: 2024-04-30 10:24:07 浏览: 360
实验步骤:
1. 按照拓扑图连接以及配置IP地址
根据拓扑图,将设备连接好,配置各个设备的IP地址。具体配置如下:
```
PC1: 192.168.1.1/24
PC2: 192.168.1.2/24
PC3: 192.168.2.1/24
PC4: 192.168.2.2/24
PC5: 192.168.3.1/24
PC6: 192.168.3.2/24
PC7: 192.168.4.2/24
SW1:
VLAN10: 192.168.1.254/24
VLAN20: 192.168.3.254/24
VLAN30: 192.168.5.254/24
VLAN40: 192.168.7.254/24
SW2:
VLAN10: 192.168.1.253/24
VLAN20: 192.168.3.253/24
VLAN30: 192.168.5.253/24
VLAN40: 192.168.7.253/24
SW3:
VLAN10: 192.168.2.254/24
VLAN20: 192.168.3.1/24
VLAN30: 192.168.6.254/24
VLAN40: 192.168.8.254/24
SW4:
VLAN10: 192.168.2.253/24
VLAN20: 192.168.3.2/24
VLAN30: 192.168.6.253/24
VLAN40: 192.168.8.253/24
```
2. 所有端口配置trunk放行vlan
将所有设备的端口都配置为trunk,并放行所需要的VLAN。具体配置如下:
```
SW1:
interface range GigabitEthernet 0/1-2
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40
SW2:
interface range GigabitEthernet 0/1-2
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40
SW3:
interface range GigabitEthernet 0/1-2
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40
SW4:
interface range GigabitEthernet 0/1-2
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40
```
3. 使用VRRP. PC6的主网关为sw1,pc7的主网关为sw3
在SW1和SW3上分别配置VRRP,将PC6和PC7的主网关设置为VRRP虚拟IP地址。具体配置如下:
```
SW1:
interface vlan 10
ip address 192.168.1.254/24
vrrp 1 ip 192.168.1.1
vrrp 1 priority 100
vrrp 1 preempt
interface vlan 20
ip address 192.168.3.254/24
vrrp 2 ip 192.168.3.1
vrrp 2 priority 100
vrrp 2 preempt
SW3:
interface vlan 20
ip address 192.168.3.1/24
vrrp 2 ip 192.168.3.1
vrrp 2 priority 100
vrrp 2 preempt
interface vlan 30
ip address 192.168.6.254/24
vrrp 3 ip 192.168.6.1
vrrp 3 priority 100
vrrp 3 preempt
```
4. 要求sw1和sw2互为主备,当设备故障时能够切换
在SW1和SW2上分别配置VRRP,将VLAN10和VLAN20设置为主备关系。具体配置如下:
```
SW1:
interface vlan 10
ip address 192.168.1.254/24
vrrp 1 ip 192.168.1.1
vrrp 1 priority 100
vrrp 1 preempt
interface vlan 20
ip address 192.168.3.254/24
vrrp 2 ip 192.168.3.1
vrrp 2 priority 100
vrrp 2 preempt
SW2:
interface vlan 10
ip address 192.168.1.253/24
vrrp 1 ip 192.168.1.1
vrrp 1 priority 90
vrrp 1 preempt
interface vlan 20
ip address 192.168.3.253/24
vrrp 2 ip 192.168.3.1
vrrp 2 priority 90
vrrp 2 preempt
```
5. 要求业务流量能和sw1的公关流量互访
为了使业务流量能够和SW1的公关流量互访,需要在SW1上添加路由。具体配置如下:
```
SW1:
ip route 0.0.0.0 0.0.0.0 192.168.7.253
```
至此,新华三模拟器VRRP实验完成。
阅读全文