《小牛試刀:企業網絡組建——階段二項目練習》
本實例為大家分享利用OSPF、PAT、MSTP、DHCP、VLAN技術實現企業內外網的組建互通的過程,如下圖所示
-
其中,紅色區域代表ISP互聯網服務商,藍色區域代表公司內網,要求實現公司內外網互通,且可以訪問內網的服務器和網絡設備
實驗要求如下:
1.內網交換機實現流量負載均衡;
2.企業內網使用OSPF路由協議;
3.確保PC1自動獲取IP地址,且與PC2網絡互通;
4.PC2可以遠程訪問內網交換機SW1;
5.Client1和訪問內網Server1。第一步:企業內網配置MSTP,實現流量負載均衡
SW1交換機配置
system-view
sysname SW1
vlan batch 10 20 30
port-group 1
port link-type trunk
port trunk allow-pass vlan all
quit
interface g0/0/2
port link-type access
port default vlan 30
quit
stp region-configuration
region-name ntd
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
quit
stp instance 10 root primary
stp instance 20 root primary
SW2交換機配置
system-view
vlan batch 10 20 30
port-group 1
group-member eth0/0/10 eth0/0/11
port link-type trunk
port trunk allow-pass vlan all
quit
interface eth0/0/1
port link-type access
port default vlan 10
quit
stp region-configuration
region-name ntd
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
quit
stp instance 10 root secondary
system-view
sysname SW3
vlan batch 10 20 30
port-group 1
group-member eth0/0/10 eth0/0/11
port link-type trunk
port trunk allow-pass vlan all
quit
interface eth0/0/1
port link-type access
port default vlan 20
quit
stp region-configuration
region-name ntd
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
quit
stp instance 20 root secondary第二步:內外網網絡地址配置
DHCP
system-view
sysname DHCP
interface G0/0/0
ip address 176.233.30.2 24
quit
SW1
interface Vlanif 1
ip address 176.233.100.2 24
quit
interface Vlanif 10
ip address 176.233.10.1 24
quit
interface Vlanif 20
ip address 176.233.20.1 24
quit
interface Vlanif 30
ip address 176.233.30.1 24
quit
R1
system-view
sysname R1
interface G0/0/1
ip address 176.233.100.1 24
interface g0/0/0
ip address 100.1.1.2 255.255.255.0
quit
R2
interface g0/0/0
ip address 100.1.1.1 24
interface g0/0/1
ip address 200.1.1.1 24第三步:企業配置OSPF配置
DHCP
ospf 1 router-id 3.3.3.3
area 0
network 176.233.30.0 0.0.0.255
SW1
ospf 1 router-id 2.2.2.2
area 0
network 176.233.10.0 0.0.0.255
network 176.233.20.0 0.0.0.255
network 176.233.30.0 0.0.0.255
network 176.233.100.0 0.0.0.255
R1
ospf 1 router-id 1.1.1.1
area 0
network 176.233.100.0 0.0.0.255
ip route-static 0.0.0.0 0.0.0.0 100.1.1.1
default-route-advertise always第四步:DHCP配置
DHCP
dhcp enable
interface G0/0/0
dhcp select global
quit
ip pool p1
network 176.233.10.0 mask 255.255.255.0
gateway-list 176.233.10.1
dns-list 10.10.10.10
SW1
dhcp enable
interface Vlanif 10
ip address 176.233.10.1 24
dhcp select relay
dhcp relay server-ip 176.233.30.2
quit第五步:配置內網設備映射以及遠程管理,
配置說明:對於PC1我們可使用Easy ip ,對於Server1和SW1使用NAT Server
R1上面配置NAT
acl 2000
rule 10 permit source 176.233.10.0 0.0.0.255
quit
interface g0/0/0
nat outbound 2000
nat server protocol tcp global current-interface 8080 inside 176.233.20.20 www
nat server protocol tcp global current-interface 8090 inside 176.233.100.2 telnet
SW1配置遠程管理
user-interface vty 0 4
user privilege level 15
authentication-mode password
set authentication password cipher 123456第六步:進行測試
PC1------------->PC2PC2------------->SW1遠程管理
Client1----------->Server1訪問內網服務器
至此全部驗證成功!!!!!!!
《小牛試刀:企業網絡組建——階段二項目練習》