静态主机配置

实验环境:GNS IOS     c3640-ik9o3s-mz.124-10.bin 和packet tracer 5.2 ------DNS解析配置部分
(先前试着使用了一下5.3,感觉好像没有5.2爽,有些命令在5.2中是对的,可在5.3中不行,对我这初学者,我还是使用5.2,就够了)
 
Router(config)#ip host router1 ?
  <0-65535>   Default telnet port number
  A.B.C.D     Host IP address   //我只实验使用了IP
  additional  Append addresses
  mx          Configure a MX record
  ns          Configure an NS record
  srv         Configure a SRV record
Router(config)#ip host router1 192.168.1.1 ?   //看书上写最多可以配置8个ip,下面是我
  A.B.C.D  Host IP address                                  //实验的结果,结果表明可以不只配置8个
  <cr>
Router(config)#ip host router1 192.168.1.1 192.168.1.2 ?
  A.B.C.D  Host IP address
  <cr>
Router(config)#$.1.5 192.168.1.6 192.168.1.7 192.168.1.8 ?
  A.B.C.D  Host IP address
  <cr>
Router(config)#$ 192.168.1.4 192.168.1.5 192.168.1.6 192.168.1.7 192.168.1.8 ?
  A.B.C.D  Host IP address
  <cr>
Router(config)#$.1.5 192.168.1.6 192.168.1.7 192.168.1.8 192.168.1.9 ?
  A.B.C.D  Host IP address
  <cr>
Router(config)#$68.1.6 192.168.1.7 192.168.1.8 192.168.1.9 192.168.1.10 ?
  A.B.C.D  Host IP address
  <cr>
Router(config)#$.168.1.7 192.168.1.8 192.168.1.9 192.168.1.10 192.168.1.11 ?
  A.B.C.D  Host IP address
  <cr>
Router(config)#$.168.1.7 192.168.1.8 192.168.1.9 192.168.1.10 192.168.1.11
Router(config)#do show host     //显示上面的结果。由于show命令不是这个模式的命令,所以使用show之前加上一个do,这样就不用切换回特权模式了,方便
Default domain is not set
Name/address lookup uses static mappings
Codes: UN - unknown, EX - expired, OK - OK, ?? - revalidate
       temp - temporary, perm - permanent
       NA - Not Applicable None - Not defined
Host                      Port  Flags      Age Type   Address(es)
router1                   None  (perm, OK)  0   IP    192.168.1.1  //这个perm应该是永久的意思,
                                                      192.168.1.2                          //我之前在 http://zhangsir.blog.51cto.com/1037125/316602  中有个实验是temp,应该是临时的
                                                      192.168.1.3
                                                      192.168.1.4
                                                      192.168.1.5
                                                      192.168.1.6
                                                      192.168.1.7
                                                      192.168.1.8
                                                      192.168.1.9
                                                      192.168.1.10
                                                      192.168.1.11
Router(config)#
 
 
 
下面是DNS解析配置,我用的是PT做的
 
Router(config)#ip name-server 192.168.1.2  //我配置的DNS服务器
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#router1                                          //telnet到router上,先解析名字
Translating "router1"...domain server (192.168.1.2)
Trying 192.168.1.5 ...% Connection timed out; remote host not responding //解析出来了

本文出自 “学习中” 博客,谢绝转载!

你可能感兴趣的:(职场,休闲,静态主机配置,静态主机)