标签:端口 server res shadow 技术 pc机 abi file -o
实验名称:内网访问外网<SW2>system-view
[SW2]vlan batch 10 20
[SW2]interface GigabitEthernet 0/0/3
[SW2-GigabitEthernet0/0/3]port link-type access
[SW2-GigabitEthernet0/0/3]port default vlan 20
[SW2-GigabitEthernet0/0/3]q
[SW2]interface GigabitEthernet 0/0/2
[SW2-GigabitEthernet0/0/2]port link-type access
[SW2-GigabitEthernet0/0/2]port default vlan 10
[SW2-GigabitEthernet0/0/2]q
[SW2]interface GigabitEthernet 0/0/3
[SW2-GigabitEthernet0/0/1]port link-type access
[SW2-GigabitEthernet0/0/1]port default vlan 20
[SW2-GigabitEthernet0/0/1]q
[SW2]interface GigabitEthernet 0/0/12
[SW2-GigabitEthernet0/0/12]port link-type trunk
[SW2-GigabitEthernet0/0/12]port trunk allow-pass vlan all
[SW2-GigabitEthernet0/0/12]q
[SW2]q
<SW2>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N] y
Now saving the current configuration to the slot 0.
Save the configuration successfully.
4.给路由器配置VRRP虚拟网关及备份网关. 链路的负载均衡 (例如AR1挂掉以后可以通过AR2与外部相连不影响正常工作)
<R1>system-view
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]vrrp vrid 10 virtual-ip 192.168.10.254
[R1-GigabitEthernet0/0/0]vrrp vrid 10 priority 250
[R1-GigabitEthernet0/0/0]vrrp vrid 10 track interface GigabitEthernet0/0/0 reduced 200
[R1-GigabitEthernet0/0/0]quit
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]vrrp vrid 20 virtual-ip 192.168.20.254
[R1-GigabitEthernet0/0/1]vrrp vrid 20 priority 50
[R1-GigabitEthernet0/0/1]vrrp vrid 20 track interface GigabitEthernet0/0/1] increased 100
[R1-GigabitEthernet0/0/1]quit
R2
<Huawei>system-view
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]vrrp vrid 20 virtual-ip 192.168.20.254
[R2-GigabitEthernet0/0/0]vrrp vrid 20 priority 100
[R2-GigabitEthernet0/0/0]vrrp vrid 20 track interface GigabitEthernet 0/0/2 increased 50
[R2-GigabitEthernet0/0/0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]vrrp vrid 10 virtual-ip 192.168.10.254
[R2-GigabitEthernet0/0/1]vrrp vrid 10 priority 100
[R2-GigabitEthernet0/0/1]vrrp vrid 10 track interface GigabitEthernet 0/0/2 increased 50
[R2-GigabitEthernet0/0/1]quit
<Huawei>system-view
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]vrrp vrid 20 virtual-ip 192.168.20.254
[R3-GigabitEthernet0/0/1]vrrp vrid 20 priority 250
[R3-GigabitEthernet0/0/1]vrrp vrid 20 track interface GigabitEthernet 0/0/2 reduced 200
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]vrrp vrid 10 virtual-ip 192.168.10.254
[R3-GigabitEthernet0/0/0]vrrp vrid 10 priority 80
[R3-GigabitEthernet0/0/0]vrrp vrid 10 track interface GigabitEthernet 0/0/2 increased 20
[R3-GigabitEthernet0/0/0]quit
说明: vlan 10的主网关在AR1上,vlan10的副网关同时在AR2和AR3上,vlan20的主网关在AR3上 ,同时AR1和AR2都具备vlan20的副网关,AR2同时具备vkan10和vlan20的副网关 ;
列如:
AR1挂掉了,那么PC1和PC2在AR2和AR3上都可以通过;
5.给连接外网交换机的路由器端口配置IP地址让内网可以访问外网;
AR1:
<Huawei>system-view
[R1]itnerface ethernet 0/0/2
[R1-GigabitEthernet0/0/2]ip address 192.168.30.1 255.255.255.0
[R1-GigabitEthernet0/0/2]quit
[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.30.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
SW7:
<Huawei>system-view
[SW7]vlan batch 30 40
[SW7]interface ethernet 0/0/1
[SW7-Ethernet0/0/1]port link-type access
[SW7-Ethernet0/0/1]port default vlan 30
[SW7-Ethernet0/0/1]q
[SW7]interface Vlanif 30
[SW7-Vlanif30]ip address 192.168.30.2 255.255.255.0
[SW7-Vlanif30]q
[SW7]inteface ethernet 0/0/4
[SW7-Ethernet0/0/4]port link-type access
[SW7-Ethernet0/0/4]port default vlan 40
[SW7-Ethernet0/0/4]q
[SW7]interface Vlanif 40
[SW7-Vlanif40]ip address 192.168.40.1 255.255.255.0
[SW7]ospf 1
[SW7-ospf-1] area 0
[SW7-ospf-1-area-0.0.0.0]network 192.168.30.2 0.0.0.0
[SW7-ospf-1-area-0.0.0.0]network 192.168.40.1 0.0.0.0
R4:
<Huawei>system-view
[R4]itnerface gi 0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.40.2 255.255.255.0
[R4-GigabitEthernet0/0/1]q
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.50.254 255.255.255.0
[R4]ospf1
[R4-ospf-1] area 0
[R4-ospf-1-area-0.0.0.0]network 192.168.40.2 0.0.0.0
[R4-ospf-1-area-0.0.0.0]network 192.168.50.254 0.0.0.0
6:给Server1配置地址;
server1:
IP:192.168.50.1 255.255.255.0 网关:192.168.50.254
在PC1进行测试:
AR2 和 AR3 同理 ;就不做过多操作了。
标签:端口 server res shadow 技术 pc机 abi file -o
原文地址:http://blog.51cto.com/13562456/2065623