资源描述:
《网络地址转换NAT配置》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、网络地址转换NAT配置解决ipv4地址不足的问题做好拓扑图:配置服务器ip地址:192.16&1.2255.255.255.0192.16&1.1配置pc机ip地址:222.0.2.2255.255.255.0222.0.2.12层交换机用做级联作用,就不做配置。对路由器0进行配置:Router>enableRouter#configterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Router(config)#hostnameRORO(config)#interfacefaO/ORO(
2、config-if)#ipaddress192.168.1.1255.255.255.0RO(config-if)#noshutdown%LINK-5-CHANGED:InterfaceFastEthernetO/O,changedstatetoup%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceFastEthernetO/O,changedstatetoupR0(config-if)#exitR0(config)#interfacese2/0R0(config-if)#ipaddress222.0.1.1255.25
3、5.255.0R0(config-if)#noshutdown%LlNK-5-CHANGED:InterfaceSerial2/0,changedstatetodownR0(config-if)#clockrate64000R0(config-if)#endR0#%SYS-5-CONFIG_I:Configuredfromconsolebyconsole对路由器R1进行配置:Router>enableRouter#configterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Router
4、(config)#hostnameR1R1(config)#interfacese2/0Rl(config-if)#exitR1(config)#interfacese2/0Rl(config-if)#ipaddress222.0.1.2255.255.255.0Rl(config-if)#noshutdown%LINK-5-CHANGED:InterfaceSerial2/0,changedstatetoupR1(config-if)#%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceSerial2/0,changed
5、statetoupRl(config-if)#exitR1(config)#interfacefa0/0Rl(config-if)#ipaddress222.0.2.1255.255.255.0R1(config-if)#noshutdown%LINK-5-CHANGED:InterfaceFastEthernetO/O,changedstatetoup%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceFastEthernetO/O,changedstatetoupR1(config-if)#下面进行路由配置情况:(静态
6、,动态,OSPF)。本例用静态路由路由器R0:R0>enableR0#configterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z・R0(config)#iproute222.0.2.0255.255.255.0%Incompletecommand・R0(config)#iproute222.0.2.0255.255.255.0222.0.1.2RO(config)#路由器Rl:Rl(config-if)#exitR1(config)#iproute192」68」.0255.255.25
7、5.0222.0.1」Rl(config)#endRl#%SYS-5-CONFIG_I:ConfiguredfromconsolebyconsoleRl#showiprouteCodes:C・connected,S・static,I-IGRP,R-RIP,M・mobile,B・BGPD・EIGRP,EX・EIGRPexternal,O-OSPF,IA・OSPFinterareaN1・OSPFNSSAexternaltype1,N2・OSPFNSSAexternaltype2El-OSPFexternaltype1,E2-OSPFexternaltype2,
8、E-EGPi・IS-IS,LI・IS-1Slevel-1,L2・I