Fortinet white logo
Fortinet white logo

CLI Reference

network ip

network ip

Use these commands to add or delete a network interface, loopback interface, or virtual server (which functions somewhat like a virtual network interface) IP address, or to list the table of network interface IPs.

Back up the configuration before deleting a network interface table entry. FortiWeb presents no confirmation message, and in some cases such as the loopback interface, provides no undelete mechanism.

To use this command, your administrator account’s access control profile must have rw or w permission to the sysgrp area. For details, see Permissions.

Syntax

diagnose network ip add <interface_name> {<interface_ipv4> | interface_ipv6} {<interface_ipv4mask> |<interface_v6mask>}

diagnose network ip delete <interface_name> {<interface_ipv4> | interface_ipv6}

diagnose network ip list


Variable Description Default

<interface_name>

Enter the name of the interface to add or delete from the network interface table. No default.

{<interface_ipv4> | interface_ipv6}

Enter the IP address of the network interface. No default.

{<interface_ipv4mask> |<interface_v6mask>}

Enter the subnet mask. No default.

Example

This example displays a list of enabled network interfaces, including the loopback (lo).

FortiWeb # diagnose network ip list

lo: 127.0.0.1/24

port1: 10.200.123.2/16

lo: ::1/128

port1: fe80::20c:29ff:fec3:34a6/64

port5: fe80::20c:29ff:fec3:34ce/64

port9: fe80::20c:29ff:fec3:34f6/64

port2: fe80::20c:29ff:fec3:34b0/64

port6: fe80::20c:29ff:fec3:34d8/64

port10: fe80::20c:29ff:fec3:3400/64

port3: fe80::20c:29ff:fec3:34ba/64

port7: fe80::20c:29ff:fec3:34e2/64

port4: fe80::20c:29ff:fec3:34c4/64

port8: fe80::20c:29ff:fec3:34ec/64

port_tn: fe80::1854:64ff:fe68:fd55/64

Example

This example deletes the IP of a virtual server on port2.

diagnose network ip delete port1 192.0.2.221

Related topics

network ip

network ip

Use these commands to add or delete a network interface, loopback interface, or virtual server (which functions somewhat like a virtual network interface) IP address, or to list the table of network interface IPs.

Back up the configuration before deleting a network interface table entry. FortiWeb presents no confirmation message, and in some cases such as the loopback interface, provides no undelete mechanism.

To use this command, your administrator account’s access control profile must have rw or w permission to the sysgrp area. For details, see Permissions.

Syntax

diagnose network ip add <interface_name> {<interface_ipv4> | interface_ipv6} {<interface_ipv4mask> |<interface_v6mask>}

diagnose network ip delete <interface_name> {<interface_ipv4> | interface_ipv6}

diagnose network ip list


Variable Description Default

<interface_name>

Enter the name of the interface to add or delete from the network interface table. No default.

{<interface_ipv4> | interface_ipv6}

Enter the IP address of the network interface. No default.

{<interface_ipv4mask> |<interface_v6mask>}

Enter the subnet mask. No default.

Example

This example displays a list of enabled network interfaces, including the loopback (lo).

FortiWeb # diagnose network ip list

lo: 127.0.0.1/24

port1: 10.200.123.2/16

lo: ::1/128

port1: fe80::20c:29ff:fec3:34a6/64

port5: fe80::20c:29ff:fec3:34ce/64

port9: fe80::20c:29ff:fec3:34f6/64

port2: fe80::20c:29ff:fec3:34b0/64

port6: fe80::20c:29ff:fec3:34d8/64

port10: fe80::20c:29ff:fec3:3400/64

port3: fe80::20c:29ff:fec3:34ba/64

port7: fe80::20c:29ff:fec3:34e2/64

port4: fe80::20c:29ff:fec3:34c4/64

port8: fe80::20c:29ff:fec3:34ec/64

port_tn: fe80::1854:64ff:fe68:fd55/64

Example

This example deletes the IP of a virtual server on port2.

diagnose network ip delete port1 192.0.2.221

Related topics