Management and front port IPv4/IPv6 Address Follow
Example:
- Configure IP address on management port "eth0"
- Configure IP address on front port (aka physical interface)
- Configure IP address on port channel interface
- Configure IP address on loopback interface.
Reference model:
- Switch model name:
- AS7726-32X
- AS7326-56X
- AS7816-64X
- AS5835-54X(T)
- AS4630-54PE
- AS9716-32D
- AS8000(Minipack)
- Wedge100BF-32X
- Edgecore SONiC version:
- Edgecore-SONiC_20201123_130028_ec202006_74
- Edgecore-SONiC_20201229_070315_ec202006_101
- Edgecore-SONiC_20201229_070315_ec202006_bfn_65(Wedge100BF-32X)
Default setting:
- DHCP address on management port"eth0"
- All of management port on Edgecore model will be "eth0"
Example 1: Configure IP address on management port "eth0"
Procedure :
Steps 1. Configure IP address on management port "eth0"
admin@sonic:~$ sudo config interface ip add eth0 188.188.97.16/16 188.188.1.1
admin@sonic:~$ sudo config interface ip add eth0 2001::8/64 2001::1
Steps 2. Check IP address
admin@sonic:~$ show ip interfaces
Interface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor
----------- -------- ------------------- ------------ -------------- ---------
Loopback0 10.1.0.1/32 up/up N/A N/A
docker0 240.127.1.1/24 up/down N/A N/A
eth0 188.188.97.16/16 up/up N/A N/A
lo 127.0.0.1/8 up/up N/A N/A
admin@sonic:~$ show ipv6 interfaces
Interface Master IPv6 address/mask Admin/Oper BGP Neighbor Neighbor IP
----------- -------- --------------------------------------- ------------ -------------- -------------
Bridge fe80::4020:6aff:fee4:b0a3%Bridge/64 up/down N/A N/A
Ethernet0 fe80::ba6a:97ff:fee2:479c%Ethernet0/64 up/up N/A N/A
Ethernet1 fe80::ba6a:97ff:fee2:479c%Ethernet1/64 up/up N/A N/A
Ethernet48 fe80::ba6a:97ff:fee2:479c%Ethernet48/64 up/up N/A N/A
Ethernet52 fe80::ba6a:97ff:fee2:479c%Ethernet52/64 up/up N/A N/A
Loopback0 fe80::243e:e6ff:fee7:5ca1%Loopback0/64 up/up N/A N/A
eth0 2001::8/64 up/up N/A N/A
fe80::ba6a:97ff:fee2:479c%eth0/64
lo ::1/128 up/up N/A N/A
admin@sonic:~$ show management_interface address
Management IP address = 188.188.97.16/16
Management Network Default Gateway = 188.188.1.1
Management IP address = 2001::8/64
Management Network Default Gateway = 2001::1
Caution: "BGP Neighbor" and "Neighbor IP" won't support on 202006 branch.
Steps 3. Save the setting to config_db.json
admin@sonic:~$ sudo config save -y
Steps 4. Check IP address setting on config_db.json
admin@sonic:/etc/sonic$ sudo vi config_db.json
{
...omitted
"MGMT_INTERFACE": {
"eth0|188.188.97.16/16": {
"gwaddr": "188.188.1.1"
},
"eth0|2001::8/64": {
"gwaddr": "2001::1"
}
},
...omitted
}
Example 2: Configure IP address on front port (aka physical interface).
Procedure :
Steps 1. Configure IP address on front port. i.e Ethernet0
admin@sonic:~$ sudo config interface ip add Ethernet0 192.168.1.1/24 admin@sonic:~$ sudo config interface ip add Ethernet0 2002::1/64
Steps 2. Check IP address
admin@sonic:~$ show ip interfaces Interface IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP ----------- ------------------- ------------ -------------- ------------- Ethernet0 192.168.1.1/24 up/down N/A N/A
docker0 240.127.1.1/24 up/down N/A N/A eth0 188.188.97.32/16 up/up N/A N/A lo 127.0.0.1/8 up/up N/A N/A 10.1.0.1/32 admin@sonic:~$ show ipv6 interfaces Interface IPv6 address/mask Admin/Oper BGP Neighbor Neighbor IP ----------- -------------------------------------- ------------ -------------- ------------- Bridge fe80::f4f6:a4ff:fe97:3c88%Bridge/64 up/up N/A N/A
Ethernet0 2002::1/64 up/down N/A N/A dummy fe80::90cd:eff:fe7b:359f%dummy/64 up/up N/A N/A eth0 fe80::aa2b:b5ff:fe9d:d7db%eth0/64 up/up N/A N/A lo ::1/128 up/up N/A N/A
Steps 3. Save the setting to config_db.json
admin@sonic:~$ sudo config save -y
Steps 4. Check IP address setting on config_db.json
admin@sonic:/etc/sonic$ sudo vi config_db.json { ...omitted
"INTERFACE": {
"Ethernet0": {},
"Ethernet0|192.168.1.1/24": {},
"Ethernet0|2002::1/64": {}
},
...omitted
}
Example 3: Configure IP address on port channel interface.
Procedure :
Steps 1. Configure IP address on portchannel. i.e PortChannel01
Steps 2. Check IP address
Steps 3. Save the setting to config_db.json
Steps 4. Check IP address setting on config_db.json
Example 4: Configure IP address on loopback interface.
Procedure :
Steps 1. Configure IP address to loopback interface i.e Loopback0
Steps 2. Check IP address
Steps 3. Save the setting to config_db.json
Steps 4. Check IP address setting on config_db.json
Comments
0 comments
Please sign in to leave a comment.