情灭缘尽 发表于 2010-9-7 11:21:37

show configuration

本帖最后由 情灭缘尽 于 2010-9-7 11:24 编辑

vyatta支持两种配置show,如下,希望大家灵活使用,因为避免浪费篇幅,故只截取eth0口的配置show
NO.1
vyatta@vyatta:~$ show configuration cmds
set interfaces ethernet eth0 address '172.31.3.1/24'
set interfaces ethernet eth0 description 'vmnet3-to-VR3'
set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '00:0c:29:88:e1:33'
set interfaces ethernet eth0 smp_affinity 'auto'
set interfaces ethernet eth0 speed 'auto'

NO.2
vyatta@vyatta:~$show configuration
interfaces {
    ethernet eth0 {
      address 172.31.3.1/24
      description vmnet3-to-VR3
      duplex auto
      hw-id 00:0c:29:88:e1:33
      smp_affinity auto
      speed auto
    }
}

情灭缘尽 发表于 2010-9-7 11:43:11

接口配置
set interfaces ethernet eth0 address '172.31.3.1/24'
设置eth0接口的ip地址
set interfaces ethernet eth0 description 'vmnet3-to-VR3'
设置eth0接口的描述
set interfaces ethernet eth0 duplex 'auto'
设置eth0接口的双工模式为自协商
set interfaces ethernet eth0 hw-id '00:0c:29:88:e1:33'
设置eth0接口的mac地址
set interfaces ethernet eth0 smp_affinity 'auto'
设置eth0接口的smp_affinity,主要是在多路CPU的时候或者多核心的时候不同的cpu分担不同的接口数据,提高负载能力。
set interfaces ethernet eth0 speed 'auto'
设置eth0接口的速率为主协商。

情灭缘尽 发表于 2010-9-7 16:51:25

set system host-name 'vyatta'
设置路由器名称

情灭缘尽 发表于 2010-9-7 16:56:48

set system name-server '202.103.24.68'
set system name-server '202.103.0.117'

设置DNS服务器地址

情灭缘尽 发表于 2010-9-7 16:59:19

set system time-zone 'Asia/Shanghai'
设置时区

情灭缘尽 发表于 2010-9-7 17:34:07

set service ssh port '22'
set service ssh protocol-version 'v2'

启ssh服务

情灭缘尽 发表于 2010-9-7 17:36:42

set protocols static route 0.0.0.0/0 next-hop '192.168.1.254'
设置静态路由

情灭缘尽 发表于 2010-9-7 18:16:38

set service nat rule 1 destination address '0.0.0.0/0'
set service nat rule 1 outbound-interface 'eth2'
set service nat rule 1 protocol 'all'
set service nat rule 1 source address '0.0.0.0/0'
set service nat rule 1 type 'masquerade'

简单的NAT设置

情灭缘尽 发表于 2010-9-7 18:17:18

set protocols ospf area 0.0.0.0 network '172.31.2.0/24'
set protocols ospf area 0.0.0.0 network '172.31.3.0/24'
set protocols ospf default-information originate 'always'
set protocols ospf default-information originate metric-type '2'
set protocols ospf parameters abr-type 'cisco'
set protocols ospf parameters router-id '172.31.3.1'
set protocols ospf redistribute connected metric-type '2'
set protocols ospf redistribute static metric-type '1'
简单OSPF路由协议设置
页: [1]
查看完整版本: show configuration