SONiC/initial-setup

From Wikitech

3Note that most of the steps below need to be automated through some ZTP flow. Until then they are needed to get a base config on a device.

Runbook

Cabling/Netbox

Connect/test/document console cable

Connect/document mgmt cable (to interface eth0)

Assign mgmt IP on the eth0 interface in Netbox

Dell OS10 uninstall

The dell switches come pre-installed with Dell OS10.

This is the only step that can't be automated. For larger scale deployments we need to ask for switches without any OS, so they can be fully automated.

On the console:

restart the switch (admin/admin then reload)

When the GRUB menu shows up select ONIE then Uninstall OS.

At the end the switch will reboot automatically in ONIE: Install OS

SONiC install

Onsite (USB)

Copy the .bin installer on a FAT32 formatted USB drive. Name it for example onie-installer.bin (or any name listed in SONiC/initial-setup#Automatic upgrade image search). Plug the USB disk on the switch and wait.

After ~5min the switch will restart on SONiC, either give it more time or check console before removing the disk.

Remote (HTTP)

Run onie-stop to stop the automatic upgrade search

Configure mgmt IP address: ifconfig eth0 10.65.x.x netmask 255.255.0.0 ip route add default via 10.65.0.1

Note that at this point it is possible to telnet on the IP and get the same screen as the console screen. Before that it should be possible to telnet from mr1 to the v6 link-local address.

Fetch and install the image from an HTTP (not HTTPS) IP (no DNS support): onie-nos-install http://xxxx/sonic/Enterprise_SONiC_OS_xxxx_Enterprise_Standard.bin

SONiC IP setup

The switch will reboot on the new SONiC OS

Still on the console: use the default credentials "admin/YourPaSsWoRd" then set a new temporary password (eg. "Wikimedia").

Dell SONiC

In sonic-cli:

configure terminal
no ztp enable
hostname lsw1-e8-eqiad
interface Management 0
ip address 10.65.x.x/16
exit
ip route vrf mgmt 0.0.0.0/0 10.65.0.1
ip name-server 10.3.0.1 vrf mgmt
exit
write memory

Note: After no ztp enable it's possible that the sonic-cli quits and takes time before becoming available again. In that case, wait a bit then continue the above instructions.

OSS SONiC

sudo config interface ip add eth0 10.65.x.x/16 10.65.0.1
sudo config vrf add mgmt
sudo config hostname lsw1-xx-eqiad
sudo config dns nameserver add 10.3.0.1
sudo config save

From now on the device is reachable on its SSH port.

Additional information

DHCP Discover content

More details on possible DHCP request matching on https://opencomputeproject.github.io/onie/user-guide/index.html

Option 125:3 probably have the service tag.

Note onie-syseeprom shows the Service Tag.

Dynamic Host Configuration Protocol (Discover)
    Message type: Boot Request (1)
    Hardware type: Ethernet (0x01)
    Hardware address length: 6
    Hops: 1
    Transaction ID: 0xfd10395e
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0
    Your (client) IP address: 0.0.0.0
    Next server IP address: 0.0.0.0
    Relay agent IP address: 10.65.0.1
    Client MAC address: c4:5a:b1:1a:63:05 (c4:5a:b1:1a:63:05)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (53) DHCP Message Type (Discover)
        Length: 1
        DHCP: Discover (1)
    Option: (61) Client identifier
        Length: 7
        Hardware type: Ethernet (0x01)
        Client MAC address: c4:5a:b1:1a:63:05 (c4:5a:b1:1a:63:05)
    Option: (57) Maximum DHCP Message Size
    Option: (55) Parameter Request List
        Length: 9
        Parameter Request List Item: (1) Subnet Mask
        Parameter Request List Item: (3) Router
        Parameter Request List Item: (6) Domain Name Server
        Parameter Request List Item: (7) Log Server
        Parameter Request List Item: (12) Host Name
        Parameter Request List Item: (15) Domain Name
        Parameter Request List Item: (28) Broadcast Address
        Parameter Request List Item: (42) Network Time Protocol Servers
        Parameter Request List Item: (119) Domain Search
    Option: (60) Vendor class identifier
        Length: 42
        Vendor class identifier: onie_vendor:x86_64-dellemc_s5248f_c3538-r0
    Option: (77) User Class Information
        Length: 20
        User Class Data (Text): onie_dhcp_user_class
    Option: (125) V-I Vendor-specific Information
        Length: 38
        Enterprise: Open Compute Project (42623)
            Length: 33
            Option 125 Suboption: 3
            Option 125 Suboption: 4
            Option 125 Suboption: 5
    Option: (255) End

Automatic upgrade image search

Info: Attempting file://dev/mmcblk0p1/onie-installer-x86_64-dellemc_s5248f_c3538-r0 ...
Info: Attempting file://dev/mmcblk0p1/onie-installer-x86_64-dellemc_s5248f_c3538-r0.bin ...
Info: Attempting file://dev/mmcblk0p1/onie-installer-x86_64-dellemc_s5248f_c3538 ...
Info: Attempting file://dev/mmcblk0p1/onie-installer-x86_64-dellemc_s5248f_c3538.bin ...
Info: Attempting file://dev/mmcblk0p1/onie-installer-dellemc_s5248f_c3538 ...
Info: Attempting file://dev/mmcblk0p1/onie-installer-dellemc_s5248f_c3538.bin ...
Info: Attempting file://dev/mmcblk0p1/onie-installer-x86_64-bcm ...
Info: Attempting file://dev/mmcblk0p1/onie-installer-x86_64-bcm.bin ...
Info: Attempting file://dev/mmcblk0p1/onie-installer-x86_64 ...
Info: Attempting file://dev/mmcblk0p1/onie-installer-x86_64.bin ...
Info: Attempting file://dev/mmcblk0p1/onie-installer ...
Info: Attempting file://dev/mmcblk0p1/onie-installer.bin ...
Info: Attempting tftp://onie-server/C4-5A-B1-1A-64-05/onie-installer-x86_64-dellemc_s5248f_c3538-r0 ...
Info: Attempting tftp://onie-server/onie-installer-x86_64-dellemc_s5248f_c3538-r0 ...
Info: Attempting tftp://onie-server/onie-installer-x86_64-dellemc_s5248f_c3538-r0.bin ...
Info: Attempting tftp://onie-server/onie-installer-x86_64-dellemc_s5248f_c3538 ...
Info: Attempting tftp://onie-server/onie-installer-x86_64-dellemc_s5248f_c3538.bin ...
Info: Attempting tftp://onie-server/onie-installer-dellemc_s5248f_c3538 ...
Info: Attempting tftp://onie-server/onie-installer-dellemc_s5248f_c3538.bin ...
Info: Attempting tftp://onie-server/onie-installer-x86_64-bcm ...
Info: Attempting tftp://onie-server/onie-installer-x86_64-bcm.bin ...
Info: Attempting tftp://onie-server/onie-installer-x86_64 ...
Info: Attempting tftp://onie-server/onie-installer-x86_64.bin ...
Info: Attempting tftp://onie-server/onie-installer ...
Info: Attempting tftp://onie-server/onie-installer.bin ...