資源描述:
《單臂路由-NAT》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在教育資源-天天文庫。
1、單臂路由+NAT實驗網(wǎng)絡拓撲結構:E0e0.110.100.2.1e0.210.100.3.1e0.310.100.4.1E1192.168.0.253/24校園網(wǎng)192.168.0.254/24SwitchPC-A10.100.2.2VLAN2PC-B10.100.3.2VLAN3PC-C10.100.4.2VLAN4TRUNKE0/24E0/2E0/3E0/4在路由器E0口上建立三個子接口并配置相應IP地址,并在路由器子接口上封裝VLAN標簽協(xié)議;在交換機上建立三個VLAN,每個VLAN接入一臺計算機,計算機的默認網(wǎng)關為各子接口IP地址;交換機連接路由器的接口要設置
2、為TRUNK模式。命令參考:1.路由器的配置#配置缺省路由[Router]iproute-static0.0.0.00.0.0.0192.168.0.254preference60#建立訪問控制列表[Router]acl101match-orderauto#設置訪問規(guī)則#只允許網(wǎng)絡地址為10.100的IP進行地址轉(zhuǎn)換[Router-acl-101]rulenormalpermitipsource10.100.0.00.0.255.255destinationany[Router-acl-101]rulenormalpermitipsource192.168.0.00.0
3、.0.255destinationany[Router-acl-101]rulenormaldenyipsourceanydestinationany[Router-acl-101]quit#建立地址池pool1[Router]nataddress-group192.168.0.240192.168.0.252pool1//注意每組實驗地址池不要重復#將接口和地址池及其訪問控制列表相關聯(lián)[Router]interfaceEthernet1[Router-Ethernet1]ipadd192.168.0.253255.255.255.0[Router-Ethernet1]
4、firewallpacket-filter101outbound[Router-Ethernet1]natoutbound101address-grouppool1[Router][Router-Ethernet0]intere0.1//定義子接口E0.1[Router-Ethernet0.1]ipadd10.100.2.1255.255.255.0[Router-Ethernet0.1]vlan-typedot1qvid2//指定以太網(wǎng)子接口屬于VLAN2,此命令應用在以太網(wǎng)子接口上。只有配置了該命令之后,以太網(wǎng)子接口才會根據(jù)配置的VLANID號在以太網(wǎng)幀頭中嵌入VL
5、AN標簽,與該網(wǎng)口相連的交換機接口才能正確處理接收到的幀。[Router-Ethernet0.1]intere0.2//定義子接口E0.2[Router-Ethernet0.2]ipadd10.100.3.1255.255.255.0[Router-Ethernet0.2]vlan-typedot1qvid3//指定以太網(wǎng)子接口屬于VLAN3[Router-Ethernet0.2]intere0.3//定義子接口E0.3[Router-Ethernet0.3]ipadd10.100.4.1255.255.255.0[Router-Ethernet0.3]vlan-typ
6、edot1qvid4//指定以太網(wǎng)子接口屬于VLAN4[Router-Ethernet0.3]intere0[Router-Ethernet0]undoshut2.交換機的配置sysEntersystemview,returnuserviewwithCtrl+Z.[Quidway]vlan2[Quidway-vlan2]portethernet0/2//將第2端口加入VLAN2[Quidway-vlan2]vlan3[Quidway-vlan3]porteth0/3//將第3端口加入VLAN3[Quidway-vlan2]vlan4[Quidway-v
7、lan4]porteth0/4//將第4端口加入VLAN4[Quidway-vlan4]intere0/24[Quidway-Ethernet0/24]portlink-typetrunk//將第24端口設為trunk口[Quidway-Ethernet0/24]porttrunkpermitvlanall //允許所有VLAN流量通過Pleasewait...........................................Done.[Quidway-Ethernet0/24]disporttrunk//檢驗TRUNK口