Network address setup

From VyOS
Jump to: navigation, search

VyOS offers four ways to configure network addresses on interfaces: static, DHCP (DHCPv6), IPv6 autoconfiguration, and IPv6 EUI.

Static addresses

This method is supported on all interfaces, apart from OpenVPN that uses different syntax and wireless modems that are always autoconfigured through PPP. Static IPv6 addresses are supported on all interfaces except VTI.

The command is "set interfaces $type $name address $address". Examples:

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

DHCP (IPv4)

This method is supported on all physical interfaces, and those that are directly connected to a physical interface (ethernet, VLAN, bridge, bond, pseudo-ethernet, wireless).

The command is "set interfaces $type $name address dhcp". Examples:

set interfaces ethernet eth0 vif 90 address dhcp
set interfaces bridge br0 address dhcp

DHCPv6

This method is supported on all physical interfaces, and those that are directly connected to a physical interface (ethernet, VLAN, bridge, bond, pseudo-ethernet, wireless).

The command is "set interfaces $type $name address dhcpv6". Examples:

set interfaces bonding bond1 address dhcpv6
set interfaces bridge br0 vif 56 address dhcpv6

IPv6 autoconfiguration

This method is supported on all physical interfaces, and those that are directly connected to a physical interface (ethernet, VLAN, bridge, bond, pseudo-ethernet, wireless).

The command is "set interfaces $type $name ipv6 address autoconf". Examples:

set interfaces ethernet eth0 vif 90 ipv6 address autoconf
set interfaces bridge br0 ipv6 address autoconf

Note: This method automatically disables IPv6 traffic forwarding on the interface in question.

IPv6 EUI

IPv6 addresses in /64 networks can be automatically generated from the prefix and MAC address, if you specify the prefix.

The command is "set interfaces $type $name ipv6 address eui64 $prefix". Examples:

set interfaces pseudo-ethernet peth0 ipv6 address eui64 2001:db8:aa::/64