Basic Routing Example

From StarOS Community Wiki
Revision as of 12:51, 6 December 2006 by Simcor23 (talk | contribs)
Jump to navigation Jump to search

Star-V3 Static Route Example



Using the A B and C example explained in the previous section "Routing 101" I'll give some basic static route information using Star-V3. This basic example is using all private address space on an internal network. I am not getting into NAT or Public IPs or anything like that, it is meant to show a very basic static route example for people to get to know the basics.


Router A


Has an ip assigned to its ether0 interface on the subnet of the network it is physically connected to. Lets say that ip is 192.168.1.254/24 And its wpci0 interface has an ip on the same subnet of the interface it is connected to on Router B. Lets say Router A's wpci0 ip is 10.1.1.1/24.


Router B


Following the same example above, ether0 192.168.2.254/24 wpci0 10.1.1.2/24 (connected to router A) wpci1 10.1.2.1/24 (same subnet as wpci0 on Router C)


Router C ether0 192.168.3.254/24 wpci0 10.1.2.2/24 (connected to wpci1 on router B)


Static Routes

Now that we have the ip addressing down, we can get to the routes for router A to be able to ping the networks on B and C.


Router A Static Routes

In order for router A to reach the network on the ether0 side of router B we nedd to add the following route to router A's static routing table ->routing->static and default routes in the Star-os menu.


network address - 192.168.2.0 network mask - 255.255.255.0 gateway address - 10.1.1.2

This statement say's that in order for a packet from router A's 192.168.1.0/24 network to reach router B's 192.168.2.0/24 network it must go through router B's wireless interface wpci0 10.1.1.2/24 (the gateway).


In order for router A to reach router C we add the next statement:


network address - 192.168.3.0 network mask - 255.255.255.0 gateway address - 10.1.1.2


This statement say's that in order for router A's network to reach router C's network go through gateway 10.1.1.2 (router B's Wireless interface wpci0)

Thats it for router A. It now knows how to get to router B's network and router C's network. On to router B....


Router B Stactic Routes


First statement to get back to router A:


network address - 192.168.1.0 network mask 255.255.255.0 gateway address - 10.1.1.1 (wireless interface of router A)


And to get to router C:


network address 192.168.3.0 network mask 255.255.255.0 gateway address 10.1.2.2 (wireless interface of router C)


Now router B can get back to router A and get to router C


Router C Static Routes


For router C we do basically the same thing as we did for router A but in reverse:


To get to router A's network


network address - 192.168.1.0 network mask 255.255.255.0 gateway address 10.1.2.1 (router B's wireless interface wpci1)

To get to router B's network


network address - 192.168.2.0 network mask - 255.255.255.0 gateway address - 10.1.2.1 (router B's wireless interface wpci1)


That is the basic example. Just remember that for static routes to work you must have a route to the destination and the destination also needs to know the route to get back.