Kronosnet: Difference between revisions

From Alteeve Wiki
Jump to navigation Jump to search
Line 59: Line 59:


== Create The kronosnet.conf Configuation File ==
== Create The kronosnet.conf Configuation File ==
'''''THIS IS ALL WRONG'''''


The core of kronosnet is configured using the <span class="code">kronosnet.conf</span> configuration file. To understand the example better, we need to define the nodes used.
The core of kronosnet is configured using the <span class="code">kronosnet.conf</span> configuration file. To understand the example better, we need to define the nodes used.

Revision as of 22:21, 12 December 2010

 AN!Wiki :: Kronosnet

Locate

Install

cd ~
yum -y groupinstall "Development Tools"
yum -y install pam-devel
git clone git://github.com/fabbione/kronosnet
cd kronosnet
./autogen.sh
./configure
make
make install

Create a user and group for kronosnet to run as.

groupadd -r kronosnetadm 
groupmems -g kronosnetadm -a root
useradd kronosnet -b /etc -M -r -s /bin/bash -g kronosnetadm

Set a password for the new kronosnet.

passwd kronosnet
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

For the sake of this tutorial, we'll use the password justatest.

Configure

There are two files to create. The first is a pam.d file to control access to kronosnet. The second is the actual kronosnet configuration file.

Create The pam.d Access File

vim /etc/pam.d/kronosnet
#%PAM-1.0
auth       include	password-auth
account    required	pam_nologin.so
account    include	password-auth
session    include	password-auth

Create The kronosnet.conf Configuation File

THIS IS ALL WRONG

The core of kronosnet is configured using the kronosnet.conf configuration file. To understand the example better, we need to define the nodes used.

There are found nodes, each with three network interfaces. These will be used to create the knet interface.

  • an-node03
    • eth0 - 192.168.1.73
    • eth1 - 192.168.2.73
    • eth2 - 192.168.3.73
    • knet0 - 192.168.4.73
  • an-node04
    • eth0 - 192.168.1.74
    • eth1 - 192.168.2.74
    • eth2 - 192.168.3.74
    • knet0 - 192.168.4.74
  • an-node05
    • eth0 - 192.168.1.75
    • eth1 - 192.168.2.75
    • eth2 - 192.168.3.75
    • knet0 - 192.168.4.75
  • an-node06
    • eth0 - 192.168.1.76
    • eth1 - 192.168.2.76
    • eth2 - 192.168.3.76
    • knet0 - 192.168.4.76
vim /etc/kronosnet/kronosnet.conf
# Global options
global {
	statistics: on
	rerouting: on
}

# Logging options
logging {
	debug: on
	to_logfile: yes
	to_syslog: no
	# Are these not implemented yet?
#	syslog_facility:
#	syslog_priority: 
#	logfile: 
#	logfile_priority:
}

### Node Definitions
node {
	nodename: an-node03
	nodeid: 1
	knet_ips: 192.168.4.73/24 3ffe::73/64
	knet_mtu: 1500
	nodeips: 192.168.1.73 192.168.2.73 192.168.3.73
	inet:
	preup:
	up:
	down:
	postdown:
}

node {
	nodename: an-node04
	nodeid: 2
	knet_ips: 192.168.4.74/24 3ffe::74/64
	knet_mtu: 1500
	nodeips: 192.168.1.74 192.168.2.74 192.168.3.74
	inet:
	preup:
	up:
	down:
	postdown:
}

node {
	nodename: an-node05
	nodeid: 3
	knet_ips: 192.168.4.75/24 3ffe::75/64
	knet_mtu: 1500
	nodeips: 192.168.1.75 192.168.2.75 192.168.3.75
	inet:
	preup:
	up:
	down:
	postdown:
}

node {
	nodename: an-node06
	nodeid: 4
	knet_ips: 192.168.4.76/24 3ffe::76/64
	knet_mtu: 1500
	nodeips: 192.168.1.76 192.168.2.76 192.168.3.76
	inet:
	preup:
	up:
	down:
	postdown:
}
  • Questions:
    • Confirm: nodename has no need to match any hostname. It is purely a reference withing knet.
    • nodeid: Does this need to be sequential? Must it be a real number?
    • knet_ips: can you have an arbitrary number?
    • knet_mtu: Is 9000 the maximum? What is the default, if any?
    • nodeips: These must match the IPs assigned to existing NICs, I assume?
    • inet: What is this for? Over-ridding the TAP name?
    • preup, up, down and postdown: Are these hooks to trigger scripts when <event> happens to the knet interface?
    • When this config file changes, how is best to load in the new config?

Run the Daemon

There is currently no init.d script for kronosnetd, so it will need to be started manually.

kronosnetd

There is no output from that command, and it will daemonized and return you to the shell. You can check that it is running with ps.

Network Setup

In this tutorial, we'll use four nodes, each with three network cards.

  • an-node03
  • an-node04
  • an-node05
  • an-node06

To log in for the first time, use telnet to connect to the localhost on TCP port 50000.

telnet localhost 50000
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Welcome to kronosnetd 0.1 (built Nov 28 2010 13:32:00)

login:

At this point, you can login using the kronostnet user name and justatest password. Once logged in successfully, you should see the knet prompt.

login:kronosnet
Password: 

Welcome kronosnet (::1) on vty(0)

knet#

To quit at any time, simply enter the telnet escape code. This is usually ^] (<ctrl> + ])


 

Any questions, feedback, advice, complaints or meanderings are welcome.
Alteeve's Niche! Enterprise Support:
Alteeve Support
Community Support
© Alteeve's Niche! Inc. 1997-2024   Anvil! "Intelligent Availability®" Platform
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.