发布时间:2019-08-29 07:36:42编辑:auto阅读(1794)
Router>en (进入特权模式) Router#config (进入全局配置模式) Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ho R3 (命名为R3) R3(config)#no ip domain-lo (关闭域名查询,在实验环境中,敲入错误的命令,它将进行域名查询,故关闭他) R3(config)#line c 0 (进入线路CONSOLE接口0下) R3(config-line)#logg syn (启用光标跟随,防止日志信息冲断命令显示的位置) R3(config-line)#exec-t 0 0 (防止超时,0 0 为永不超时) R3(config-line)#exit R3(config)#int e0 (进入以太网接口下) R3(config-if)#ip add 192.168.1.1 255.255.255.0 (设置IP地址) R3(config-if)#ip nat inside (设置为内部接口) R3(config-if)#no shut R3(config-if)#exit R3(config)#int ser1 (进入串口下) R3(config-if)#ip add 100.0.0.1 255.255.255.0 R3(config-if)#no shut R3(config-if)#ip nat outside (设置为外部接口) R3(config-if)#exit R3(config)#ip nat inside source static 191.168.1.1 100.0.0.1 (设置静态转换,其中ip nat inside source 为NAT转换关键字,这里是静态,故为STATIC) R3(config)#ip classless R3(config)#ip route 0.0.0.0 0.0.0.0 s0(这里是出口或者下一跳地址) R3(config)#exit |
(一): Router#config Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ho R2 R2(config)#no ip domain-lo R2(config)#line c 0 R2(config-line)#logg syn R2(config-line)#exec-t 0 0 R2(config-line)#exit R2(config)#int ser0 R2(config-if)#ip add 100.0.0.1 255.255.255.0 R2(config-if)#ip nat inside R2(config-if)#no shut R2(config-if)#clock rate 5600 R2(config-if)#ip access-group 1 out R2(config-if)#exit R2(config)#int e0 R2(config-if)#ip ad 10.0.0.1 255.255.255.0 R2(config-if)#no shut R2(config-if)#exit (二): R2(config)#ip nat inside source list 1 pool dongsheng (三): R2(config)#access-list 1 permit 10.0.0.1 0.0.0.0 R2(config)#access-list 1 permit 10.0.0.2 0.0.0.0 (四): R2(config)#ip nat pool dongsheng 100.0.0.1 100.0.0.2 netmask 255.255.255.0 R2(config)#exit |
ip nat inside source list 1 pool dongsheng access-list 1 permit 10.0.0.1 0.0.0.0(与下面的公网IP对应) access-list 1 permit 10.0.0.2 0.0.0.0 ip nat pool dongsheng 192.16.1.1 192.16.1.2 netmask 255.255.255.0 注:(一段IP地址范围,动态NAT与静态NAT一样,都是一对一的关系, |
Router#config Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ho R2 R2(config)#no ip domain-lo R2(config)#line c 0 R2(config-line)#logg syn R2(config-line)#exec-t 0 0 R2(config-line)#exit Router(config)#int ser0 Router(config-if)#ip add 100.1.1.1 255.255.255.0 Router(config-if)#no shut Router(config-if)#ip nat outside Router(config-if)#exi Router(config)#int e0 Router(config-if)#ip add 192.168.2.1 255.255.255.0 Router(config-if)#ip nat inside Router(config-if)#no shut Router(config-if)#exit Router(config)#ip nat inside source list 2 pool ds2 overload |
Router>en Router#config Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Router(config)#int ser1 Router(config-if)#exit Router(config)#no ip domain-lo Router(config)#line c 0 Router(config-line)#logg syn Router(config-line)#exec-t 0 0 Router(config-line)#exit Router(config)#int ser1 Router(config-if)#ip add 100.0.0.1 255.255.255.0 Router(config-if)#ip nat outside Router(config-if)#ip access-group 1 out Router(config-if)#no shut Router(config-if)#exit Router(config)#int e0 Router(config-if)#ip add 192.168.1.1 255.255.255.0 Router(config-if)#ip nat inside Router(config-if)#no shut Router(config-if)#exit Router(config)#ip nat inside source list 1 pool ds1 overload |
上一篇: Windows XP SP3细节官方详解
下一篇: h3c 更新ssh client key
47880
46445
37333
34773
29346
26008
24960
19978
19580
18074
5821°
6449°
5962°
5988°
7093°
5937°
5979°
6472°
6435°
7818°