Configuring L3 Ports

This section guides you though configuring an L3 port.

Configuring L3 ports on FlexSwitch is a simple process of assigning an IPv4 or IPv6 address to an physical (FpPort) port.

L3 Port Configuration Using the FlexSwitch CLI

This section describes creating the interface using the FlexSwitch CLI. For more information about the CLI, see Using the CLI.

Create the IPv4 Interface

Use the following CLI commands to:

  • set the shudown mode of the port.
  • assign an IP address to the port.
  • apply the configuration.
localhost(config):interface fpPort 1
localhost(config-if-eth-1):no shut
localhost(config-if-eth-1):ip address

Applying Config:
id: 33  object: Port   status: APPLIED CONFIG  valid: True delete: False num user cmds: 2
 command               attr        value    model attr    iskey    required    userprov    time provisioned
 interface fpPort 1    fpPort      1        IntfRef       True     X           X           Sun Nov 20 19:59:29 2033
 no shutdown UP        shutdown    UP       AdminState    False                X           Sun Nov 20 19:59:30 2033

Verify the Interface Creation

Use the following CLI command to verify that the interface was created.

localhost(config):show interface fpPort 1

Applying Show:
fpPort1 is UP Admin State is UP
  IPv4 Address is
  PresentInHW: YES
  Config Mode: L3
  PhyType: SGMII, Media Type Media Type, Address a8:2b:b5:17:b9:01
  MTU 16356 Bytes  Full_Duplex, 1000 Mb/s  Breakout Status: unsupported
  Last link down: 2033-11-20 19:59:16.195535974 +0000 UTC
  Last link up: 2033-11-20 20:01:11.05556268 +0000 UTC
  Number of Link flaps: 3
    10 unicast packets 100795 unicast octets
    103 input discards 0 input errors
    0 unknown protocol 0 runts 0 giants
    0 Fragments 0 CRC 0 jabber
  TX    7 unicast packets 2378 unicast octets
    0 output discards 0 output errors

L3 Port Configuration Using the FlexSwitch REST (cURL) Interface

The following is an example of configuring an L3 port using the FlexSwitch REST Interface.

Create the IPv4 Interface

Execute the following cURL commands to create the interface.

bash-4.3$ curl -sX POST -u admin -d '{"IntfRef":"fpPort1","IpAddr":""}' "http://localhost:8080/public/v1/config/Ipv4Intf" | python -m json.tool
Enter host password for user 'admin':
    "Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept",
    "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PATCH, DELETE",
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Max_age": "86400",
    "ObjectId": "aab1ae1b-2642-4799-5d4e-58c2d1bdbac5",
    "Result": "Success"

Verify the Interface Creation


Note that the endpoint for this API is /state/Ipv4Intf .

Execute the following fURL commands to verify the status of the interface.

bash-4.3$ curl -sX POST -u admin -d '{"IntfRef":"fpPort1"}' "http://localhost:8080/public/v1/state/Ipv4Intf" | python -m json.tool
Enter host password for user 'admin':
    "Object": {
        "IfIndex": 25,
        "IntfRef": "fpPort1",
        "IpAddr": "",
        "L2IntfId": 25,
        "L2IntfType": "port",
        "LastDownEventTime": "",
        "LastUpEventTime": "",
        "NumDownEvents": 0,
        "NumUpEvents": 0,
        "OperState": "DOWN"
    "ObjectId": "aab1ae1b-2642-4799-5d4e-58c2d1bdbac5"