
组网需求:
1、左侧网络通过AR1可以访问互联网。
2、右侧网络通过AR2访问互联网。
3、新增中间的网络SW3,使得所有PC互通。
4、中间的PC通过右侧网络访问互联网。
一、Ip设置:
SW1:vlanif100:10.100.0.1/19
Vlanif101:192.168.101.3/24
Vlanif30:192.168.30.1/24
SW2:vlanif16:192.168.16.1/24
Vlanif7:192.168.7.254/24
Vlanif30:192.168.30.2/24
Vlanif31:192.168.31.1/24
AR1:GE0/0/0:192.168.101.1,GE0/0/1:100.0.0.1/24
AR2:GE0/0/0:192.168.31.2/24,GE0/0/1:200.0.0.1/24
AR3:GE0/0/0:100.0.0.2/24
AR4:GE0/0/0:200.0.0.2/24
PC1:10.100.2.2/19 网关:10.100.0.1
PC2:10.100.3.2/19 网关:10.100.0.1
PC3:192.168.16.6/24 网关:192.168.16.1
PC4:192.168.7.6/24 网关:192.168.7.254
PC5:192.168.7.22/24 网关:192.168.7.254
PC6:192.168.16.22/24 网关:192.168.16.1
二、SW1的主要配置文件:
sysname SW1
vlan batch 30 100 to 101
interface Vlanif30
ip address 192.168.30.1 255.255.255.0
interface Vlanif100
ip address 10.100.0.1 255.255.224.0
interface Vlanif101
ip address 192.168.101.2 255.255.255.0
interface MEth0/0/1
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
interface GigabitEthernet0/0/2
port link-type access
port default vlan 100
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/4
port link-type access
port default vlan 101
ip route-static 0.0.0.0 0.0.0.0 192.168.101.1
ip route-static 192.168.7.0 255.255.255.0 192.168.30.2
ip route-static 192.168.16.0 255.255.255.0 192.168.30.2
return
三、SW2的主要配置文件:
sysname SW2
undo info-center enable
vlan batch 7 16 30 to 31
interface Vlanif7
ip address 192.168.7.254 255.255.255.0
interface Vlanif16
ip address 192.168.16.1 255.255.255.0
interface Vlanif30
ip address 192.168.30.2 255.255.255.0
interface Vlanif31
ip address 192.168.31.1 255.255.255.0
interface MEth0/0/1
interface GigabitEthernet0/0/1
port link-type access
port default vlan 16
interface GigabitEthernet0/0/2
port link-type access
port default vlan 7
interface GigabitEthernet0/0/3
port link-type access
port default vlan 31
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094
ip route-static 0.0.0.0 0.0.0.0 192.168.31.2
ip route-static 10.100.0.0 255.255.224.0 192.168.30.1
return
四、SW2的主要配置文件:
sysname SW3
undo info-center enable
vlan batch 7 16 30
interface GigabitEthernet0/0/1
port link-type access
port default vlan 7
interface GigabitEthernet0/0/2
port link-type access
port default vlan 16
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094
Return
五、AR1的主要配置文件:
acl number 2000
rule 5 permit
interface GigabitEthernet0/0/0
ip address 192.168.101.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 100.0.0.1 255.255.255.0
nat outbound 2000
ip route-static 0.0.0.0 0.0.0.0 100.0.0.2
ip route-static 10.100.0.0 255.255.224.0 192.168.101.2
return
六、AR2的主要配置文件:
acl number 2000
rule 5 permit
interface GigabitEthernet0/0/0
ip address 192.168.31.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 200.0.0.1 255.255.255.0
nat outbound 2000
ip route-static 0.0.0.0 0.0.0.0 200.0.0.2
ip route-static 192.168.7.0 255.255.255.0 192.168.31.1
ip route-static 192.168.16.0 255.255.255.0 192.168.31.1
Return
七、AR3的主要配置文件:
interface GigabitEthernet0/0/0
ip address 100.0.0.2 255.255.255.0
Return
八、AR4的主要配置文件:
interface GigabitEthernet0/0/0
ip address 200.0.0.2 255.255.255.0
Return
2205

被折叠的 条评论
为什么被折叠?



