作者:月夜行舟
實(shí)驗(yàn)拓?fù)?/p>
圖 1-1
注:如無特別說明,描述中的 R1 或 SW1 對(duì)應(yīng)拓?fù)渲性O(shè)備名稱末尾數(shù)字為 1 的設(shè)備,R2 或 SW2 對(duì)應(yīng)拓?fù)渲性O(shè)備名稱末尾數(shù)字為 2 的設(shè)備,以此類推;另外,同一網(wǎng)段中,IP 地址的主機(jī)位為其設(shè)備編號(hào),如 R3 的 g0/0 接口若在192.168.1.0/24[1]網(wǎng)段,則其 IP 地址為192.168.1.3/24[2],以此類推
實(shí)驗(yàn)需求
按照?qǐng)D示配置 IP 地址
sw2和sw10使用鏈路聚合
四個(gè)部門:地址為dhcp獲取
sw2,r13,sw10,運(yùn)行ospf,使其內(nèi)網(wǎng)互通,ospf使用命令下發(fā)缺省網(wǎng)關(guān)
R13與R14采用雙向認(rèn)證。
僅允許技術(shù)部和產(chǎn)品研發(fā)部方位外網(wǎng),財(cái)務(wù)部門訪問財(cái)務(wù)服務(wù)器
R11作為ftp服務(wù)器,要求外網(wǎng)用戶可以訪問
實(shí)驗(yàn)解法
8,配置 IP 地址部分
R14
sys SystemView:returntoUserViewwithCtrl+Z. [H3C]sysnr14 [r14]intmp-gr1 [r14-MP-group1]ints1/0 [r14-Serial1/0]pppmpmp-gr1 [r14-Serial1/0] [r14-Serial1/0]ints2/0 [r14-Serial2/0]pppmpmp-gr1 [r14]intmp-gr1 [r14-MP-group1]ipadd100.1.1.224
R13
SYS [H3C]SYSNr13 [r13]intmp-gr1 [r13-MP-group1]ints1/0 [r13-Serial1/0]pppmpmp-gr1 [r13-Serial1/0]ints2/0 [r13-Serial2/0]pppmpmp-gr1 [r13-Serial2/0]intmp-gr1 [r13-MP-group1]ipadd100.1.1.124 [r13]intg0/0 [r13-GigabitEthernet0/0]ipadd192.168.60.224 [r13-GigabitEthernet0/0]intg0/1 [r13-GigabitEthernet0/1]ipadd192.168.70.224
SW2
sys SystemView:returntoUserViewwithCtrl+Z. [H3C]syssw2 [sw2]vlan10 [sw2-vlan10]vlan20 [sw2-vlan20]vlan30 [sw2-vlan30]vlan40 [sw2-vlan40]vlan50 [sw2-vlan50]vlan60 [sw2-vlan60]intvlan10 [sw2-Vlan-interface10]ipadd192.168.1.25424 [sw2-Vlan-interface10]intvlan20 [sw2-Vlan-interface20]ipadd192.168.2.25424 [sw2-Vlan-interface20]intvlan30 [sw2-Vlan-interface30]ipadd192.168.3.25424 [sw2-Vlan-interface30]intvlan40 [sw2-Vlan-interface40]ipadd192.168.4.25424 [sw2-Vlan-interface40]intvlan50 [sw2-Vlan-interface50]ipadd192.168.50.124 [sw2-Vlan-interface50]intvlan60 [sw2-Vlan-interface60]ipadd192.168.60.124 [sw2-Vlan-interface60]intg1/0/5 [sw2-GigabitEthernet1/0/5]portlink-tyac [sw2-GigabitEthernet1/0/5]portacvlan60 [sw2]intrangeg1/0/1tog1/0/2 [sw2-if-range]porttrpevlanall
SW10
SYS SystemView:returntoUserViewwithCtrl+Z. [H3C]SYSNsw10 [sw10]vlan10 [sw10-vlan10]vlan20 [sw10-vlan20]vlan50 [sw10-vlan50]vlan70 [sw10-vlan70]intvlan10 [sw10-Vlan-interface10]ipadd192.168.80.224 [sw10-Vlan-interface10]intvlan20 [sw10-Vlan-interface20]ipadd192.168.90.224 [sw10-Vlan-interface20]intvlan50 [sw10-Vlan-interface50]ipadd192.168.50.224 [sw10-Vlan-interface50]intvlan70 [sw10-Vlan-interface70]ipadd192.168.70.124 [sw10-Vlan-interface70]intrang1/0/1tog1/0/2 [sw10-if-range]portlink-tyac [sw10-if-range]intg1/0/1 [sw10-GigabitEthernet1/0/1]portacvlan10 [sw10-GigabitEthernet1/0/1]intg1/0/2 [sw10-GigabitEthernet1/0/2]portacvlan20
SW1
SYS SystemView:returntoUserViewwithCtrl+Z. [H3C]SYSNSW1 [SW1]vlan10 [SW1-vlan10]vlan20 [SW1]INTG1/0/4 [SW1-GigabitEthernet1/0/4]portlink-tytr [SW1-GigabitEthernet1/0/4]porttrpevlanall [SW1-vlan20]intrang1/0/1tog1/0/2 [SW1-if-range]portlink-tyaccess [SW1-if-range]portacvlan10 [SW1-if-range]intg1/0/3 [SW1-GigabitEthernet1/0/3]portlink-tyacc [SW1-GigabitEthernet1/0/3]portacvlan20
SW3
SYS SystemView:returntoUserViewwithCtrl+Z. [H3C]SYSNSW3 [SW3-vlan20]intg1/0/4 [SW3-GigabitEthernet1/0/4]portlink-tytr [SW3-GigabitEthernet1/0/4]porttrpevlanall [SW3-GigabitEthernet1/0/1]portlink-tyac [SW3-GigabitEthernet1/0/1]portacvlan30 [SW3-GigabitEthernet1/0/1]intrang1/0/2tog1/0/3 [SW3-if-range]portlink-tyac [SW3-if-range]portacvlan40
R11(路由作為電腦設(shè)備使用需要增加缺省路由,服務(wù)器系統(tǒng)自動(dòng)添加,這個(gè)只是模擬器,你自己的電腦也會(huì)添加缺省路由來上網(wǎng),模擬器需要自己手動(dòng)配置下)
SYS SystemView:returntoUserViewwithCtrl+Z. [H3C]SYSNR11 [R11]intg0/0 [R11-GigabitEthernet0/0]ipadd192.168.80.124 [R11]iproute-static0.0.0.00.0.0.0192.168.80.2
R12
SYS SystemView:returntoUserViewwithCtrl+Z. [H3C]SYSNR12 [R12]intg0/0 [R12-GigabitEthernet0/0]ipadd192.168.90.124 [R12]iproute-static0.0.0.00.0.0.0192.168.90.2
PC4-PC9(DHCP分配地址)
9,sw2和sw10使用鏈路聚合
步驟 1:在 SW2上創(chuàng)建 聚合組,并添加端口,雙方都建立后不會(huì)警告(默認(rèn)vlan)PVID不匹配
SW2
sys SystemView:returntoUserViewwithCtrl+Z. [sw2]intBridge-Aggregation1 [sw2-Bridge-Aggregation1]intrang1/0/3tog1/0/4 [sw2-if-range]portlink-agggr1 [sw2-if-range]intBridge-Aggregation1 [sw2-Bridge-Aggregation1]portlink-typeac ConfiguringGigabitEthernet1/0/3done. ConfiguringGigabitEthernet1/0/4done. [sw2-Bridge-Aggregation1]portacvlan50 ConfiguringGigabitEthernet1/0/3done. ConfiguringGigabitEthernet1/0/4done.
步驟2:在 SW10上創(chuàng)建 聚合組,并添加端口
SW10
SYS SystemView:returntoUserViewwithCtrl+Z. [sw10]intBridge-Aggregation1. [sw10-Bridge-Aggregation1]intrang1/0/3tog1/0/4 [sw10-if-range]portlink-agggr1 [sw10-if-range]intBridge-Aggregation1 [sw10-Bridge-Aggregation1]portlink-tyac ConfiguringGigabitEthernet1/0/3done. ConfiguringGigabitEthernet1/0/4done. [sw10-Bridge-Aggregation1]portacvlan50 ConfiguringGigabitEthernet1/0/3done. ConfiguringGigabitEthernet1/0/4done.
10,四個(gè)部門:地址為dhcp獲取
步驟 1:在 SW2上創(chuàng)建 DHCP地址池,網(wǎng)關(guān)為vlan地址,開啟DHCP全局模式,不同vlan配置不同的地址池,dns設(shè)置為114.114.114.114[3]
[sw2]dhcpenable [sw2]dhcpserveripvlan10 [sw2-dhcp-pool-vlan10]netw192.168.1.0ma255.255.255.0 [sw2-dhcp-pool-vlan10]gat192.168.1.254 [sw2-dhcp-pool-vlan10]dns114.114.114.114 [sw2-dhcp-pool-vlan10]dhcpseripvlan20 [sw2-dhcp-pool-vlan20]netw192.168.2.0ma255.255.255.0 [sw2-dhcp-pool-vlan20]gat192.168.2.254 [sw2-dhcp-pool-vlan20]dns114.114.114.114 [sw2-dhcp-pool-vlan20]dhcpseripvlan30 [sw2-dhcp-pool-vlan30]netw192.168.3.0ma255.255.255.0 [sw2-dhcp-pool-vlan30]gat192.168.3.254 [sw2-dhcp-pool-vlan30]dns114.114.114.114 [sw2]dhcpseripvlan40 [sw2-dhcp-pool-vlan40]netw192.168.4.0ma255.255.255.0 [sw2-dhcp-pool-vlan40]gat192.168.4.254 [sw2-dhcp-pool-vlan40]dns114.114.114.114
步驟 2:查看各個(gè)部門的電腦ip已經(jīng)自動(dòng)分配或者使用dis arp all 命令也可以查詢
11,sw2,r13,sw10,運(yùn)行ospf,使其內(nèi)網(wǎng)互通,ospf使用命令下發(fā)缺省網(wǎng)關(guān)
R13(ospf下發(fā)缺省路由指向互聯(lián)網(wǎng))
[r13]ospf [r13-ospf-1]a0 [r13-ospf-1-area-0.0.0.0]netw192.168.60.20.0.0.0 [r13-ospf-1-area-0.0.0.0]netw192.168.70.20.0.0.0 [r13-ospf-1-area-0.0.0.0]netw100.1.1.10.0.0.0 [r13-ospf-1-area-0.0.0.0]q [r13-ospf-1]q [r13]iproute-static0.0.0.00.0.0.0100.1.1.2 [r13]ospf [r13-ospf-1]default-route-advertise
SW2
[sw2]ospf [sw2-ospf-1]a0 [sw2-ospf-1-area-0.0.0.0]netw192.168.1.2540.0.0.0 [sw2-ospf-1-area-0.0.0.0]netw192.168.2.2540.0.0.0 [sw2-ospf-1-area-0.0.0.0]netw192.168.3.2540.0.0.0 [sw2-ospf-1-area-0.0.0.0]netw192.168.4.2540.0.0.0 [sw2-ospf-1-area-0.0.0.0]netw192.168.50.10.0.0.0 [sw2-ospf-1-area-0.0.0.0]netw192.168.60.10.0.0.0
SW10
[sw10]ospf [sw10-ospf-1]a0 [sw10-ospf-1-area-0.0.0.0]netw192.168.80.20.0.0.0 [sw10-ospf-1-area-0.0.0.0]netw192.168.90.20.0.0.0 [sw10-ospf-1-area-0.0.0.0]netw192.168.50.20.0.0.0 [sw10-ospf-1-area-0.0.0.0]netw192.168.70.10.0.0.0
12,R13與R14采用雙向認(rèn)證。
步驟一:創(chuàng)建用戶han,密碼為123,設(shè)置為用戶名單,直接修改端口模式為chap,直接調(diào)用用戶名單進(jìn)行雙向驗(yàn)證,端口切記關(guān)閉在開啟才能生效
R13
[r13]local-userhanclanetw Newlocaluseradded. [r13-luser-network-han]passi123 [r13-luser-network-han]serppp [r13]ints1/0 [r13-Serial1/0]pppauthchap [r13-Serial1/0]pppchapuserhan [r13-Serial1/0]ints2/0 [r13-Serial2/0]pppauthchap [r13-Serial2/0]pppchapuserhan
R14
[r14]local-userhanclanetw Newlocaluseradded. [r14-luser-network-han]passi123 [r14-luser-network-han]serppp [r14]ints1/0 [r14-Serial1/0]pppauthchap [r14-Serial1/0]pppchapuserhan [r14-Serial1/0]ints2/0 [r14-Serial2/0]pppauthchap [r14-Serial2/0]pppchapuserhan
僅允許技術(shù)部和產(chǎn)品研發(fā)部方位外網(wǎng),只允許財(cái)務(wù)部門訪問財(cái)務(wù)服務(wù)器
步驟一,使用acl策略匹配技術(shù)部與產(chǎn)品研發(fā)部的流量,在驗(yàn)證mp-group使用簡(jiǎn)單nat進(jìn)行外網(wǎng)訪問控制
R13
[r13]aclbasic2000 [r13-acl-ipv4-basic-2000]rulepersource192.168.2.00.0.0.255 [r13-acl-ipv4-basic-2000]rulepermitsource192.168.4.00.0.0.255 [r13]intMP-group1 [r13-MP-group1]natoutbound2000
sw10
步驟二利用acl策略匹配流量,第一條如果沒有匹配上會(huì)進(jìn)行第二條,只會(huì)生效一條,注意順序,vlan調(diào)用acl為出口方向(答案不唯一多種方式都可以)
[sw10]aclbasic2000 [sw10-acl-ipv4-basic-2000]ruledenysource192.168.1.00.0.0.255 [sw10-acl-ipv4-basic-2000]ruledenysource192.168.2.00.0.0.255 [sw10-acl-ipv4-basic-2000]ruledenysource192.168.4.00.0.0.255 [sw10]intvlan20 [sw10-Vlan-interface20]packet-filter2000out
13,R11作為ftp服務(wù)器,要求外網(wǎng)用戶可以訪問
步驟一,創(chuàng)建ftp服務(wù)器,密碼為1234,用戶名為hany
R11
[R11]ftpseren [R11]local-userhanyclassmanage Newlocaluseradded. [R11-luser-manage-han]passim1234 [R11-luser-manage-han]authorization-attributeuser-rolelevel-15 [R11-luser-manage-han]service-typeftp
步驟二:在 R3 的公網(wǎng)接口上配置 NAT SERVER,映射端口 20 和 21,這里映射ftp服務(wù)器的地址為192.168.80.1,映射后地址為R3外網(wǎng)出口地址
[r13]intmp-gr1 [r13-MP-group1]natserprotcpglobalcurrent-interface2021inside192.168.80.12021
最后在R14上測(cè)試ftp登錄正常
vlan10 vlan20 vlan 40無法訪問財(cái)務(wù)服務(wù)器
審核編輯:湯梓紅
-
服務(wù)器
+關(guān)注
關(guān)注
12文章
9204瀏覽量
85548 -
FTP
+關(guān)注
關(guān)注
0文章
110瀏覽量
40651 -
ip地址
+關(guān)注
關(guān)注
0文章
303瀏覽量
17067 -
命令
+關(guān)注
關(guān)注
5文章
685瀏覽量
22044
原文標(biāo)題:H3CNE綜合小實(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)推薦
評(píng)論