Chinaunix首页 | 论坛 | 博客
  • 博客访问: 663531
  • 博文数量: 779
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 5000
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-27 13:28
文章分类

全部博文(779)

文章存档

2011年(1)

2008年(778)

我的朋友

分类:

2008-10-27 13:29:09

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

--------------------next---------------------

阅读(254) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~