某企業骨幹網絡拓撲以下圖所示:
企業網絡要求以下:
實驗要求:
1.R1爲企業內網設備,R2爲ISP供應商網絡;
2.企業內網運行MSTP協議保證網絡可靠性和負載均衡;
3.PC一、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-summarytcp
第四步:配置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
測試以下圖:
ide
第五步:配置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服務:
以下圖Client2能夠訪問Server2的www服務,但不能夠訪問FTP服務:
其次,設置外網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服務,內網中其餘設備並不受影響:
ui
至此,企業內網網絡配置及驗證完成!!!code