前言
本篇博客將對(duì)HCIA的所有內(nèi)容做一個(gè)總結(jié),整合為一個(gè)綜合實(shí)驗(yàn)來(lái)完成。
要求
1.ISP路由器只能配置IP地址,之后不進(jìn)行任何配置 2.內(nèi)部整個(gè)網(wǎng)絡(luò)基于192.168.1.0/24進(jìn)行地址劃分 3.R1/2之間啟動(dòng)OSPF協(xié)議,單區(qū)域 4.PC1-4自動(dòng)獲取IP地址 5.PC1不能telnetR1,PC1外的其余內(nèi)網(wǎng)PC可以telnet 6.PC1-4,可以訪問(wèn)PC5,R2的公網(wǎng)接口只有一個(gè)公有IP地址12.1.1.1 7.外部的client可以通過(guò)域名訪問(wèn)http服務(wù) 8.ISP路由telnet12.1.1.1,最終成功登錄到R1上
一、子網(wǎng)劃分
需要三個(gè)子網(wǎng),將192.168.1.0/24 劃分到 192.168.1.0/26
192.168.1.0/24 192.168.1.0/26用于骨干網(wǎng)段 192.168.1.0/30192.168.1.4/30192.168.1.8/30...... 192.168.1.64/26用于AR1虛擬網(wǎng)段 192.168.1.64/27192.168.1.96/27 192.168.1.128/26用于AR2虛擬網(wǎng)段 192.168.1.128/27192.168.1.160/27 192.168.1.192/26
二、配置思路
1.IP地址 2.VLAN配置 3.DHCP服務(wù) 4.路由協(xié)議 5.ACL+NAT
三、配置命令
1.IP地址+vlan+dhcp服務(wù)
SW1
vlan batch 2 to 3 //創(chuàng)建vlan2-3 interface Ethernet0/0/1 //接口劃入vlan port link-type access port default vlan 2 interface Ethernet0/0/2 port link-type access port default vlan 2 interface Ethernet0/0/3 port link-type access port default vlan 3 interface GigabitEthernet0/0/1 //Trunk干道 port link-type trunk port trunk allow-pass vlan 2 to 3
SW2
vlan batch 2 to 3 interface Ethernet0/0/1 port link-type access port default vlan 2 interface Ethernet0/0/2 port link-type access port default vlan 3 interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 2 to 3
R1
interface GigabitEthernet0/0/0 ip address 192.168.1.1 255.255.255.252 dhcp enable//開(kāi)啟dhcp服務(wù) ip pool v2//創(chuàng)建IP地址池塘 gateway-list 192.168.1.65 network 192.168.1.64 mask 255.255.255.224 dns-list 114.114.114.114 8.8.8.8 ip pool v3 gateway-list 192.168.1.97 network 192.168.1.96 mask 255.255.255.224 dns-list 114.114.114.114 8.8.8.8 interface GigabitEthernet0/0/1.1//進(jìn)入子接口(單臂路由) dot1q termination vid 2//服務(wù)vlan2 arp broadcast enable//開(kāi)啟ARP應(yīng)答 ip address 192.168.1.65 255.255.255.224 dhcp select global//開(kāi)啟dhcp服務(wù) interface GigabitEthernet0/0/1.2 dot1q termination vid 3 arp broadcast enable ip address 192.168.1.97 255.255.255.224 dhcp select global
R2
interface GigabitEthernet0/0/0 ip address 192.168.1.2 255.255.255.252 interface GigabitEthernet0/0/1 ip address 12.1.1.1 255.255.255.0 dhcp enable ip pool v2 gateway-list 192.168.1.129 network 192.168.1.128 mask 255.255.255.224 dns-list 114.114.114.114 8.8.8.8 ip pool v3 gateway-list 192.168.1.161 network 192.168.1.160 mask 255.255.255.224 dns-list 114.114.114.114 8.8.8.8 interface GigabitEthernet0/0/2.1 dot1q termination vid 2 ip address 192.168.1.129 255.255.255.224 arp broadcast enable dhcp select global interface GigabitEthernet0/0/2.2 dot1q termination vid 3 ip address 192.168.1.161 255.255.255.224 arp broadcast enable dhcp select global
ISP
interface GigabitEthernet0/0/0 ip address 12.1.1.2 255.255.255.0 interface GigabitEthernet0/0/1 ip address 3.3.3.1 255.255.255.0
2.OSPF配置
R1
ospf 1 router-id 1.1.1.1 //開(kāi)啟ospf協(xié)議,給定router-id area 0.0.0.0 //進(jìn)入?yún)^(qū)域0 network 192.168.1.0 0.0.0.255 //宣告網(wǎng)段 interface GigabitEthernet0/0/0 ospf authentication-mode md5 1 cipher xiaoli123//在與鄰居相連接口上做認(rèn)證,保障安全
R2
ospf 1 router-id 2.2.2.2 default-route-advertise always area 0.0.0.0 network 192.168.1.0 0.0.0.255 interface GigabitEthernet0/0/0 ospf authentication-mode md5 1 cipher xiaoli123
3.ACL+NAT
R1
aaa local-user xiaoli password cipher xiaoli123//通過(guò)aaa創(chuàng)建賬戶(hù) local-user xiaoli service-type telnet//賬戶(hù)對(duì)應(yīng)的服務(wù)為telnet local-user xiaoli privilege level 15//賬戶(hù)權(quán)限1-15,15為最高等級(jí) user-interface vty 0 4//用于telnet的接口 authentication-mode aaa//接口上調(diào)用賬戶(hù) acl number 3000 //開(kāi)啟ACL 編號(hào)2000-2999為標(biāo)準(zhǔn)ACL,標(biāo)準(zhǔn)ACL只看源IP 3000-3999為擴(kuò)展ACL rule 5 deny tcp source 192.168.1.94 0 destination 192.168.1.65 0 destination-port eq telnet//拒絕IP地址為192.168.1.94對(duì)192.168.1.65的telnet請(qǐng)求 rule 10 deny tcp source 192.168.1.94 0 destination 192.168.1.97 0 destination-port eq telnet rule 10 deny tcp source 192.168.1.94 0 destination 192.168.1.1 0 destination-port eq telnet interface GigabitEthernet0/0/1.1 traffic-filter inbound acl 3000 //接口上調(diào)用ACL
R2
acl number 2000 rule 5 permit source 192.168.1.0 0.0.0.255 //抓取來(lái)自192.168.1.0-255的流量,用于nat地址轉(zhuǎn)換 interface GigabitEthernet0/0/1 nat outbound 2000 //在連接外網(wǎng)的接口上啟用nat,1對(duì)多nat,用來(lái)訪問(wèn)外網(wǎng) nat static protocol tcp global current-interface www inside 192.168.1.98 www netmask 255.255.255.255//1對(duì)1nat,用于固定某一服務(wù)所對(duì)應(yīng)的IP地址 nat static protocol tcp global current-interface telnet inside 192.168.1.1 telnet netmask 255.255.255.255
4.服務(wù)器配置
http服務(wù)器
dns服務(wù)器
總結(jié)
到此,整個(gè)實(shí)驗(yàn)已經(jīng)完成,如果可以順利完成這個(gè)實(shí)驗(yàn),說(shuō)明你對(duì)HCIA的掌握很好。
審核編輯:黃飛
-
服務(wù)器
+關(guān)注
關(guān)注
12文章
9329瀏覽量
86128 -
路由器
+關(guān)注
關(guān)注
22文章
3746瀏覽量
114537 -
ip地址
+關(guān)注
關(guān)注
0文章
303瀏覽量
17143
原文標(biāo)題:HCIA綜合實(shí)驗(yàn)
文章出處:【微信號(hào):網(wǎng)絡(luò)技術(shù)干貨圈,微信公眾號(hào):網(wǎng)絡(luò)技術(shù)干貨圈】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
模擬電路實(shí)驗(yàn)--綜合實(shí)驗(yàn)課件
請(qǐng)問(wèn)將GSM模塊實(shí)驗(yàn)加入到實(shí)驗(yàn)38綜合實(shí)驗(yàn)需要添加一些什么文件?
Java綜合練習(xí)實(shí)驗(yàn)
ARM的綜合實(shí)驗(yàn)
![ARM的<b class='flag-5'>綜合</b><b class='flag-5'>實(shí)驗(yàn)</b>](https://file1.elecfans.com//web2/M00/A4/83/wKgZomUMNIqAQbA7AAAS7nY4ixE249.jpg)
小車(chē)綜合控制實(shí)驗(yàn)
![小車(chē)<b class='flag-5'>綜合</b>控制<b class='flag-5'>實(shí)驗(yàn)</b>](https://file1.elecfans.com//web2/M00/A4/A7/wKgZomUMNSWAaaGwAAAkUfF6Q9Y873.jpg)
認(rèn)識(shí)綜合布線系統(tǒng)實(shí)驗(yàn)
LabVIEW的ActiveX實(shí)驗(yàn)總結(jié)
![LabVIEW的ActiveX<b class='flag-5'>實(shí)驗(yàn)</b><b class='flag-5'>總結(jié)</b>](https://file.elecfans.com/web1/M00/D9/4E/pIYBAF_1ac2Ac0EEAABDkS1IP1s689.png)
直流無(wú)刷電機(jī)控制綜合實(shí)驗(yàn)總結(jié)
![直流無(wú)刷電機(jī)控制<b class='flag-5'>綜合</b><b class='flag-5'>實(shí)驗(yàn)</b><b class='flag-5'>總結(jié)</b>](https://file.elecfans.com/web1/M00/D9/4E/pIYBAF_1ac2Ac0EEAABDkS1IP1s689.png)
【實(shí)驗(yàn)】實(shí)驗(yàn)課總結(jié)2 實(shí)驗(yàn)一
![【<b class='flag-5'>實(shí)驗(yàn)</b>】<b class='flag-5'>實(shí)驗(yàn)</b>課<b class='flag-5'>總結(jié)</b>2 <b class='flag-5'>實(shí)驗(yàn)</b>一](https://file.elecfans.com/web1/M00/D9/4E/pIYBAF_1ac2Ac0EEAABDkS1IP1s689.png)
《單片機(jī)技術(shù)及原理》實(shí)驗(yàn)總結(jié)
![《單片機(jī)技術(shù)及原理》<b class='flag-5'>實(shí)驗(yàn)</b><b class='flag-5'>總結(jié)</b>](https://file.elecfans.com/web1/M00/D9/4E/pIYBAF_1ac2Ac0EEAABDkS1IP1s689.png)
關(guān)于Vivado綜合設(shè)置使用總結(jié)
![<b class='flag-5'>關(guān)于</b>Vivado<b class='flag-5'>綜合</b>設(shè)置使用<b class='flag-5'>總結(jié)</b>](https://file.elecfans.com/web2/M00/31/89/pYYBAGIQtp-AOjQpAAC1633p4Qk260.png)
評(píng)論