1.查看所有的接口信息及状态

show interfaces

2.查看某个特定的接口

show interfaces <type> <name>

e.g

show interfaces ethernet eth0

3.配置接口 ip 地址

  • 配置接口的地址获取方式为 dhcp
set interfaces <type> <name> address dhcp

e.g

set interfaces ethernet eth0 address dhcp
  • 手工配置接口 ip 地址
set interfaces <type> <name> address <x.x.x.x/x>

e.g

set interfaces ethernet eth0 address 192.0.2.1/24
set interfaces tunnel tun0 address 10.0.0.1/30
set interfaces bridge br0 address 203.0.113.45/26
set interfaces ethernet eth0 vif 30 address 2001:db8:3::1/64
set interfaces tunnel tun7 address 2001:db8:af:b4::1/64