manage routing with stacki

7
Manage Routing with Stacki Don MacVittie, Sr. Solutions Architect

Upload: stackiq

Post on 21-Jan-2018

373 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Manage Routing With Stacki

Manage Routing with Stacki Don MacVittie, Sr. Solutions Architect

Page 2: Manage Routing With Stacki

Overview

•  Stacki offers a broad set of networking tools to customize an installation.

•  This tutorial focuses on managing the routes Stacki-installed hosts use.

•  Commands covered are add route, add appliance route, add host route, list host route. Ancillary coverage is given to stack sync host network

•  Finally, the tutorial will verify that the route is properly propagated.

Page 3: Manage Routing With Stacki

Checking Routes

stack list host route [server]

This command starts with the routes defined globally for all hosts, modifies that list by adding those defined by appliance for the type of server installed, and finally modifies the resulting list by adding in those defined for this specific server.The next few slides will show how to add routes at each of these layers.

[root@stackidon ~]# stack list host route backend-0-0 HOST NETWORK NETMASK GATEWAY SOURCE backend-0-0: 0.0.0.0 0.0.0.0 10.1.1.1 G backend-0-0: 10.10.100.0 255.255.255.0 -------- G backend-0-0: 192.168.0.215 255.255.255.255 10.1.1.1 G backend-0-0: 224.0.0.0 255.255.255.0 eth0 G backend-0-0: 255.255.255.255 255.255.255.255 eth0 G

Page 4: Manage Routing With Stacki

Tell Stacki About It

There are three ways to add routes. Each is targeted at a different grouping of servers. stack add route [address] [gateway] netmask=[netmask]•  Adds a route globally. •  Netmask is optional, and defaults to a single host (255.255.255.255) if left out.•  Address defines the address range to route. This can be expressed as an address, an address with

the netmask, or a stacki-defined network name.•  Gateway is just that – where to route to. It can be an address, a network name, or a local device.stack add appliance route [appliance] [address] [gateway] netmask=[netmask]•  The same as global, except [appliance] is the name of an appliance this route applies to. Stacki ver

sion 1.0 ships with only the backend (and technically the frontend) appliance type.stack add host route [hostname] [address] [gateway] netmask=[netmask]•  Again, the same as adding a route globally, but only applies to the host defined in [hostname]. Host

name can be a space separated list of hosts.

Page 5: Manage Routing With Stacki

Telling Stacki it’s Time to Propagate Changes

Just tell Stacki that is time to update the hosts with the information just added to the database. This is achieved with the command stack sync host network [hostname] There is an optional boolean named parameter restart that defaults to yes. If the parameter is provided with any other value, the network on the target host will not be restarted.

[root@stackidon ~]# stack list host route backend-0-0 HOST NETWORK NETMASK GATEWAY SOURCE backend-0-0: 0.0.0.0 0.0.0.0 10.1.1.1 G backend-0-0: 10.10.100.0 255.255.255.0 -------- G backend-0-0: 192.168.0.215 255.255.255.255 10.1.1.1 G backend-0-0: 224.0.0.0 255.255.255.0 eth0 G backend-0-0: 255.255.255.255 255.255.255.255 eth0 G [root@stackidon ~]# stack add host route backend-0-0 0.0.0.0 192.168.0.1 netmask=0.0.0.0 [root@stackidon ~]# stack list host route backend-0-0 HOST NETWORK NETMASK GATEWAY SOURCE backend-0-0: 0.0.0.0 0.0.0.0 192.168.0.1 H backend-0-0: 10.10.100.0 255.255.255.0 ----------- G backend-0-0: 192.168.0.215 255.255.255.255 10.1.1.1 G backend-0-0: 224.0.0.0 255.255.255.0 eth0 G backend-0-0: 255.255.255.255 255.255.255.255 eth0 G [root@stackidon ~]# stack sync host network backend-0-0

Page 6: Manage Routing With Stacki

Routes Complete.

That is all it takes to set up routing on backend machines. After the stack sync host network command has been executed, the host networking has been updated and restarted, and all is ready for the target machine(s) to use the networks they’ve just gained access to.

[root@stackidon ~]# ssh backend-0-0 Last login: Fri Aug 21 13:41:41 2015 from stackidon.local [root@backend-0-0 ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 255.255.255.255 * 255.255.255.255 UH 0 0 0 eth0 stackidon.stack stackidon.local 255.255.255.255 UGH 0 0 0 eth0 192.168.0.0 * 255.255.255.0 U 0 0 0 eth1 10.1.1.0 * 255.255.255.0 U 0 0 0 eth0 224.0.0.0 * 255.255.255.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 1002 0 0 eth0 link-local * 255.255.0.0 U 1003 0 0 eth1 default 192.168.0.1 0.0.0.0 UG 0 0 0 eth1 [root@backend-0-0 ~]# ping www.google.com PING www.google.com (216.58.217.132) 56(84) bytes of data. 64 bytes from iad23s43-in-f132.1e100.net (216.58.217.132): icmp_seq=1 ttl=50 time=146 ms 64 bytes from iad23s43-in-f132.1e100.net (216.58.217.132): icmp_seq=2 ttl=50 time=45.0 ms 64 bytes from iad23s43-in-f132.1e100.net (216.58.217.132): icmp_seq=3 ttl=50 time=56.8 ms 64 bytes from iad23s43-in-f132.1e100.net (216.58.217.132): icmp_seq=4 ttl=50 time=68.5 ms --- www.google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 4953ms rtt min/avg/max/mdev = 45.046/79.316/146.819/39.852 ms

Page 7: Manage Routing With Stacki

Stacki Resources

•  There is a lot more to Stacki than this few slides can show. Join us at the linksbelow to explore Stacki’s rich command structure and see how it answers yourproblems.

Quick access to Stacki resources:•  Visit www.Stacki.com to download a pre-build ISO for RHEL/CentOS 6 & 7 and to sign up

for our charter program•  Stacki source code is available on the StackIQ GitHub: https://github.com/StackIQ/stacki•  Engage with other users and developers in the Stacki Google Group:

https://groups.google.com/forum/#!forum/stacki

Follow us on Twitter @StackIQ