企業項目拓撲1

某企業骨幹網絡拓撲如下圖所示:

企業項目拓撲1

企業網絡要求如下:

實驗要求:
1.R1爲企業內網設備,R2爲ISP供應商網絡;
2.企業內網運行MSTP協議保證網絡可靠性和負載均衡;
3.PC1、PC2自動獲取ip地址且可以互相ping通;
4.R1爲企業DHCP服務器;
5.企業內網運行OSPF協議和NAT使得內外網互通;
6.允許Client1所在網絡可以訪問Server1的所有服務,
且只允許訪問Server2的FTP服務;
7.Client2所在的網絡僅允許訪問server1和Server2的www服務;
8.企業網絡設備可以被R2遠程管理。

第一步:配置基本網絡;

SW1基本配置
sysname SW1
vlan batch 10 20 30 100
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/3
port link-type access
port default vlan 100
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
interface Vlanif20
ip address 192.168.20.254 255.255.255.0
interface Vlanif100
ip address 192.168.100.2 255.255.255.0
SW2基本配置
sysname SW2
vlan batch 10 20 30
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
interface Ethernet0/0/3
port link-type access
port default vlan 10
interface Ethernet0/0/4
port link-type access
port default vlan 20
SW3基本配置
sysname SW3
vlan batch 10 20 30
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
interface Ethernet0/0/3
port link-type access
port default vlan 20
interface Ethernet0/0/4
port link-type access
port default vlan 10
R1配置如下
sysname R1
interface g0/0/1
ip address 100.1.1.2 24
interface g0/0/0
ip address 192.168.100.1 24
interface g0/0/2
ip address 192.168.30.254 24
R2配置如下
sysname R2
interface g0/0/0
ip address 100.1.1.1 24
interface g0/0/1
ip address 200.1.1.254 24

第二步:配置STP;

STP配置
SW1配置如下:
stp region-configuration
region-name ntd
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
quit
stp instance 10 priority 8192
stp instance 20 priority 8192
SW2配置如下:
stp region-configuration
region-name ntd
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
quit
stp instance 10 priority 4096
SW3配置如下:
stp region-configuration
region-name ntd
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
quit
stp instance 20 priority 4096

第三步:配置OSPF

SW1配置如下
ospf 1
area 0.0.0.0
network 192.168.100.0 0.0.0.255
area 0.0.0.10
network 192.168.10.0 0.0.0.255
area 0.0.0.20
network 192.168.20.0 0.0.0.255
R1配置如下
ip route-static 0.0.0.0 0.0.0.0 100.1.1.1
ospf 1
default-route-advertise always
area 0.0.0.0
network 192.168.100.0 0.0.0.255
area 0.0.0.30
network 192.168.30.0 0.0.0.255
stub no-summary

第四步:配置DHCP並進行測試;

DHCP配置
R1配置
dhcp enable
ip pool p1
gateway-list 192.168.10.254
network 192.168.10.0 mask 255.255.255.0
lease day 7 hour 0 minute 0
dns-list 8.8.8.8
ip pool p2
gateway-list 192.168.20.254
network 192.168.20.0 mask 255.255.255.0
lease day 7 hour 0 minute 0
dns-list 8.8.8.8
interface GigabitEthernet0/0/0
dhcp select global
quit
SW1配置
dhcp enable
interface Vlanif10
dhcp select relay
dhcp relay server-ip 192.168.100.1
interface Vlanif20
dhcp select relay
dhcp relay server-ip 192.168.100.1
quit
測試如下圖:
企業項目拓撲1

    第五步:配置NAT和ACL,並進行測試;
在企業出口路由器R1進行設置
首先,設置內網acl,使得Client1僅允許訪問Server2的FTP服務,Client2僅允許訪問Server2的www服務,acl設置如下:

acl number 3000
rule 10 permit tcp source 192.168.10.0 0.0.0.255 destination 192.168.30.1 0 des
tination-port eq ftp
rule 15 permit tcp source 192.168.10.0 0.0.0.255 destination 192.168.30.1 0 des
tination-port eq ftp-data
rule 20 deny ip source 192.168.10.0 0.0.0.255 destination 192.168.30.1 0
rule 30 permit tcp source 192.168.20.0 0.0.0.255 destination 192.168.30.1 0 des
tination-port eq www
rule 40 deny ip source 192.168.20.0 0.0.0.255 destination 192.168.30.1 0
interface GigabitEthernet0/0/2
traffic-filter outbound acl 3000

如下圖Client1可以訪問Server2的FTP服務,但不可以訪問WWW服務:

企業項目拓撲1
企業項目拓撲1

     如下圖Client2可以訪問Server2的www服務,但不可以訪問FTP服務:

企業項目拓撲1
企業項目拓撲1

 其次,設置外網acl,使得Client1僅允許訪問Server1的所有服務,Client2僅允許訪問Server2的www服務,acl設置如下:

外網acl設置
acl number 3001
rule 10 permit tcp source 192.168.20.0 0.0.0.255 destination 200.1.1.1 0 destin
ation-port eq www
rule 20 deny ip source 192.168.20.0 0.0.0.255 destination 200.1.1.1 0
rule 30 permit ip
quit
interface GigabitEthernet0/0/1
nat outbound 3001
如下圖Client2可以訪問Server1的www服務,但不可以訪問FTP服務,內網中其他設備並不受影響:
企業項目拓撲1
企業項目拓撲1

至此,企業內網網絡配置及驗證完成!!!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章