本實驗重點考覈你們對VRRP、DHCP、OSPF、ACL、NAT的綜合應用和掌握狀況。
實驗要求以下:
1.PC1和Client1在vlan 10,PC2在vlan 20,DHCP服務器在vlan 66;
2.SW1爲vlan 10的主網關,vlan 20的備份網關;
3.SW2爲vlan 20的主網關,vlan 10的備份網關;
4.DHCP服務器在vlan 66,網關在SW2上面;
5.PC一、PC2自動獲取ip地址且能夠互相ping通;
6.企業內網運行OSPF協議;
7.僅容許Client1所在網絡能夠訪問Server1服務器的web服務;
8.企業內網設備僅容許被DHCP服務器遠程管理。web
實驗拓撲以下:其中紅色區域爲互聯網供應商網絡,藍色區域爲企業內網。
第一步:配置企業內部基本網絡;
配置命令以下:
SW1配置
sysname SW1
vlan batch 10 20 66 100
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
interface GigabitEthernet0/0/3
port link-type access
port default vlan 100
interface GigabitEthernet0/0/10
port link-type trunk
port trunk allow-pass vlan all
interface Vlanif10
ip address 192.168.10.251 255.255.255.0
interface Vlanif20
ip address 192.168.20.251 255.255.255.0
interface Vlanif100
ip address 192.168.100.2 255.255.255.0
SW2配置
sysname SW2
vlan batch 10 20 66 200
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
interface GigabitEthernet0/0/3
port link-type access
port default vlan 200
interface GigabitEthernet0/0/10
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/11
port link-type access
port default vlan 66
interface Vlanif10
ip address 192.168.10.252 255.255.255.0
interface Vlanif20
ip address 192.168.20.252 255.255.255.0
interface Vlanif66
ip address 192.168.66.1 255.255.255.0
interface Vlanif200
ip address 192.168.200.2 255.255.255.0
R1配置
sysname R1
interface g0/0/0
ip address 100.1.1.1 24
interface g0/0/1
ip address 192.168.100.1 24
interface g0/0/2
ip address 192.168.200.1 24
DHCP配置
sysname DHCP
interface GigabitEthernet0/0/0
ip address 192.168.66.2 255.255.255.0 服務器
第二步,配置VRRP;
SW1配置
interface Vlanif10
vrrp vrid 10 virtual-ip 192.168.10.250
vrrp vrid 10 priority 200
interface Vlanif20
vrrp vrid 20 virtual-ip 192.168.20.250
SW2配置
interface Vlanif10
vrrp vrid 10 virtual-ip 192.168.10.250
interface Vlanif20
vrrp vrid 20 virtual-ip 192.168.20.250
vrrp vrid 20 priority 200
VRRP驗證以下:
查看SW1以下:
查看SW2以下:
網絡
第三步:配置OSPF保證企業內網互通;
R1配置路由重發布
ip route-static 0.0.0.0 0.0.0.0 100.1.1.2
ospf 1
default-route-advertise always
area 0
network 192.168.100.0
network 192.168.200.0
SW1配置
ospf 1
area 0
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 192.168.100.0 0.0.0.255
SW2配置
ospf 1
area 0
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 192.168.60.0 0.0.0.255
network 192.168.200.0 0.0.0.255
DHCP配置
ospf 1
area 0
network 192.168.66.0 0.0.0.255
測試內網網絡互通(DHCP上ping路由器R1)以下:
tcp
第四步:配置DHCP,使得內網設備能夠自動獲取ip地址;
DHCP配置
dhcp enable
interface GigabitEthernet0/0/0
dhcp select global
ip pool p1
gateway-list 192.168.10.250
network 192.168.10.0 mask 255.255.255.0
dns-list 8.8.8.8
ip pool p2
gateway-list 192.168.20.250
network 192.168.20.0 mask 255.255.255.0
dns-list 8.8.8.8
SW1配置
dhcp enable
interface Vlanif10
dhcp select relay
dhcp relay server-ip 192.168.66.2
interface Vlanif20
dhcp select relay
dhcp relay server-ip 192.168.66.2
SW2配置
dhcp enable
interface Vlanif10
dhcp select relay
dhcp relay server-ip 192.168.66.2
interface Vlanif20
dhcp select relay
dhcp relay server-ip 192.168.66.2
驗證PC1和PC2都可以自動獲取ip地址,以下如:
查看PC1
查看PC2
ide
第五步:進行地址轉換和設備Telnet遠程設置,配置以下:
R1配置
acl 2000
rule 10 permit source 192.168.10.0 0.0.0.255
quit
interface GigabitEthernet0/0/0
nat outbound 2000
quit
acl number 3000
rule 10 permit tcp source 192.168.66.2 0 destination-port eq telnet
user-interface vty 0 4
acl 3000 inbound
authentication-mode password
123456測試
最後,進行驗證設置。。。。。。。。,以下圖: 驗證Client1所在網絡能夠訪問Server1服務器的web服務,以下圖:
驗證企業內網設備僅容許被DHCP服務器遠程管理,以下圖:
ui
至此,全部項目任務完成!!!!!!!!!!!!!!