1、接口支持别名即第二地址、vlan、端口聚合(bond)、桥接、PPPOE等。
如果在修改、添加、删除接口后在smartdashboard中使用get topology时显示错误的拓扑信息,可以在专家模式下先cpstop,然后cpstart.相当于把系统进程重启一遍。
2、cli设置网口ip
2.1
set interface eth1 ipv4-address 202.100.1.254 subnet-mask 255.255.255.0
set interface eth1 mtu 1500
set interface eth1 state on
set interface eth1 link-speed 1000M/full
2.2
添加、删除别名ip
add interface eth1 alias 202.100.1.253/24
delete interface eth1 alias eth1:2
2.3删除vlan
add interface vlan eth1
set interface eth1.100 ipv4-address 10.1.100.254 subnet-mask 255.255.255.0
set interface eth1.100 ipv6-address 209:99:1 mask-length 64
delete interface eth1 vlan 100
记得save config保存。
2.4端口聚合
2.4.1
add bonding group <bond-id>
delete bonding group <bond-id>
2.4.2定义bond mode
set bonding group <bond-id> mode <mode>
round-robin (default) 轮询
active-backup 热备
xor
802.3ad
2.4.3添加bonding group interface
add bonding group <Bond ID> interface <IF Name>
如:add bonding group 777 interface eth4
2.4.4设置eth4为primary
set bonding group 777 primary eth4
3、arp
添加静态arp
add arp static ipv4-address VALUE macaddress VALUE
删除
delete arp dynamic all
delete arp static ipv4-address ALUE
设置arp参数
set arp table validity-timeout VALUE
set arp table cache-size VALUE
查看arp设置参数
show arp dynamic all
show arp static all
show arp table validity-timeout
show arp table cache-size
4、设置静态路由
set static-route <Destination> nexthop gateway address <GW IP> [priority <P Value>]on|off 下一跳ip形式表现
nexthop gateway logical <GWIF> [priority <P Value>] on|off 下一跳以接口形式表现,不建议使用。
nexthop blackhole 路由黑洞,直接丢弃到目的网段的数据包,不回馈。
nexthop reject 丢弃到目的的数据包,并给出回应信息。
示例:
set static-route 192.0.2.100 nexthopgateway address 192.0.2.10 onpriority1
set static-route 192.0.2.0/24 nexthopgateway logical eth4 on priority 2
set static-route 192.0.2.0/24 nexthopgateway logical eth5 on priority 3
路由维护:
show route static 查看路由
set static-route <Destination> off 删除到目的网段的所有路由
set static-route <Destination> nexthop gateway <GW ID> off 删除到目的网段的某一条明确路由