Wednesday, 15 August 2012

GAIA CLISH Basics (Interfaces,Routes,Bonds,Saving)

Here are some really 'basic' GAIA CLISH commands everyone should know

Basic Configuration for an interface via CLISH (ifconfig/ethtool still work within expert-shell in case you prefer those):

Configure the interface with an appropriate ipv4 address and netmask
GAIA1> set interface eth2 ipv4-address mask-length 24
Interace comments
GAIA1> set interface eth2 comments "Internal Interface"
Interface speed hardcoding (use 'auto-negotation on' instead if required)
GAIA1> set interface eth2 link-speed 1000M/full
Turn the interface "on" and active
GAIA1> set interface eth2 state on
Show current information
GAIA1> show interface eth2      
link-speed 1000M/full
ipv6-autoconfig Not configured
speed 1000M
mac-addr 00:0c:29:38:9f:6d
state on
duplex full
type ethernet
comments {Internal Interface}
mtu 1500
auto-negotiation Not configured
ipv6-address Not Configured

TX bytes:0 packets:0 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:0 packets:0 errors:0 dropped:0 overruns:0 frame:0

Adding static routes in GAIA CLISH:

Destination of 10.100.101/24 via
GAIA1> set static-route nexthop gateway address on

GAIA1> show route
Codes: C - Connected, S - Static, R - RIP, B - BGP,
       O - OSPF IntraArea (IA - InterArea, E - External, N - NSSA)
       A - Aggregate, K - Kernel Remnant, H - Hidden, P - Suppressed

S           via, eth0, cost 0, age 2413 
C     is directly connected, eth2 
S     via, eth2, cost 0, age 37 
S     via, eth2, cost 0, age 20 
S     via, eth2, cost 0, age 17 
S     via, eth2, cost 0, age 14 
S     via, eth2, cost 0, age 11 
S     via, eth2, cost 0, age 8 
S     via, eth2, cost 0, age 5 
S     via, eth2, cost 0, age 2 
C         is directly connected, lo 
C      is directly connected, eth0

Creating a bond from CLISH:

#Create the bond and assign a slave interface in one command:
GAIA1> add bonding group 0 interface eth1
 Enter an interface to add to the bond group.
 Only ethernet interfaces can be added to a bond group.
 The interface shouldn't have any IP addresses or aliases configured.
 Hit tab to obtain the available interfaces that can be added to the bond group.
# Set the "mode" of the Bond (I choose 8023ad here - aka LACP)
GAIA1> set bonding group 0 mode 8023AD
# Set the bond's primary interface:
GAIA1> set bonding group 0 primary eth1
# View your bond:
GAIA1> show bonding group 0
Bond Configuration
    xmit-hash-policy layer2
    down-delay 200
    primary eth1
    lacp-rate slow
    mode 8023AD
    up-delay 200
    mii-interval 100
    Bond Interfaces

# This information is also available via Expert mode via /proc:
[Expert@GAIA1]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200

802.3ad info
LACP rate: slow
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 1
        Actor Key: 17
        Partner Key: 1
        Partner Mac Address: 00:00:00:00:00:00

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:38:9f:63
Aggregator ID: 1

Saving your configuration:

GAIA1> save config


  1. This comment has been removed by a blog administrator.

  2. how to remove "set interface eth2 link-speed 1000M/full" from configuration in case i want to auto-negotiate. i see both commands(below) in the running configuration

    set interface eth1-04 link-speed 1000M/full
    set interface eth1-04 auto-negotiation on

  3. Tease me until I’m begging for it Hey, i am looking for an online sexual partner ;) Click on my boobs if you are interested (. )( .)